{"action":"created","issue":{"url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/145","repository_url":"https://api.github.com/repos/open-mmlab/mmdetection","labels_url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/145/comments","events_url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/145/events","html_url":"https://github.com/open-mmlab/mmdetection/issues/145","id":388342098,"node_id":"MDU6SXNzdWUzODgzNDIwOTg=","number":145,"title":"How to evaluate with COCO style using CustomDataset?","user":{"login":"xuw080","id":30009934,"node_id":"MDQ6VXNlcjMwMDA5OTM0","avatar_url":"https://avatars2.githubusercontent.com/u/30009934?v=4","gravatar_id":"","url":"https://api.github.com/users/xuw080","html_url":"https://github.com/xuw080","followers_url":"https://api.github.com/users/xuw080/followers","following_url":"https://api.github.com/users/xuw080/following{/other_user}","gists_url":"https://api.github.com/users/xuw080/gists{/gist_id}","starred_url":"https://api.github.com/users/xuw080/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuw080/subscriptions","organizations_url":"https://api.github.com/users/xuw080/orgs","repos_url":"https://api.github.com/users/xuw080/repos","events_url":"https://api.github.com/users/xuw080/events{/privacy}","received_events_url":"https://api.github.com/users/xuw080/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-06T18:32:53Z","updated_at":"2018-12-07T01:39:30Z","closed_at":null,"author_association":"NONE","body":"I prepared my custom dataset using CustomDataset object, however, when I was testing my model on custom datasets, this error will appear:\r\n\r\nTraceback (most recent call last):\r\n  File \"tools/test.py\", line 124, in <module>\r\n    main()\r\n  File \"tools/test.py\", line 112, in main\r\n    results2json(dataset, outputs, result_file)\r\n  File \"/home/Xwang/anaconda3/envs/mmdetection/lib/python3.7/site-packages/mmdet-0.5.4+65a2e5e-py3.7.egg/mmdet/core/evaluation/coco_utils.py\", line 142, in results2json\r\n    json_results = det2json(dataset, results)\r\n  File \"/home/Xwang/anaconda3/envs/mmdetection/lib/python3.7/site-packages/mmdet-0.5.4+65a2e5e-py3.7.egg/mmdet/core/evaluation/coco_utils.py\", line 106, in det2json\r\n    img_id = dataset.img_ids[idx]\r\nAttributeError: 'CustomDataset' object has no attribute 'img_ids'\r\n\r\nIf we can not use coco_utils for testing, due to CustomDataset doesn't have img_ids. How do we test CustomDatasets with coco style evaluation methods?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/comments/445092835","html_url":"https://github.com/open-mmlab/mmdetection/issues/145#issuecomment-445092835","issue_url":"https://api.github.com/repos/open-mmlab/mmdetection/issues/145","id":445092835,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTA5MjgzNQ==","user":{"login":"xuw080","id":30009934,"node_id":"MDQ6VXNlcjMwMDA5OTM0","avatar_url":"https://avatars2.githubusercontent.com/u/30009934?v=4","gravatar_id":"","url":"https://api.github.com/users/xuw080","html_url":"https://github.com/xuw080","followers_url":"https://api.github.com/users/xuw080/followers","following_url":"https://api.github.com/users/xuw080/following{/other_user}","gists_url":"https://api.github.com/users/xuw080/gists{/gist_id}","starred_url":"https://api.github.com/users/xuw080/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuw080/subscriptions","organizations_url":"https://api.github.com/users/xuw080/orgs","repos_url":"https://api.github.com/users/xuw080/repos","events_url":"https://api.github.com/users/xuw080/events{/privacy}","received_events_url":"https://api.github.com/users/xuw080/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T01:39:30Z","updated_at":"2018-12-07T01:39:30Z","author_association":"NONE","body":"Will try it, thanks for your kind reply."}}
{"actor":{"display_login":"xuw080"}}