Mmdetection: Error: 'VOCDataset' object has no attribute 'img_ids'

Created on 17 Mar 2019  路  5Comments  路  Source: open-mmlab/mmdetection

When i test voc-style data, it report an error that File coco_utils.py, line 106, in det2json,
img_id = dataset.img_ids[idx], AttributeError: 'VOCDataset' object has no attribute 'img_ids'.
How can i solve this problem?

Most helpful comment

You may be passing the --eval argument while running tools/test.py. Do not do that to evaluate results on voc.
Instead write the results to a pkl file by using --out results.pkl. Then evaluate the results using tools/voc_eval.py

All 5 comments

You need to use voc_eval instead of coco_eval for voc-style datasets. #226 #145

Thank you for your explanation, i have solved the prolem.

@Yuyang-01 I met the same question,but i can not solve it ,can you help me ?

@Yuyang-01 I met the same question,but i can not solve it ,can you help me ?

take a look at tools/voc_eval.py,you need two steps to evalutate voc-format dataset.

You may be passing the --eval argument while running tools/test.py. Do not do that to evaluate results on voc.
Instead write the results to a pkl file by using --out results.pkl. Then evaluate the results using tools/voc_eval.py

Was this page helpful?
0 / 5 - 0 ratings