Mmdetection: Pascal VOC eval?

Created on 3 Jan 2019  ·  11Comments  ·  Source: open-mmlab/mmdetection

when I finish training on pascal_voc dataset, and test the result by the script:
python tools/test.py --gpus --out
and I got: AttributeError: 'VOCDataset' object has no attribute 'img_ids'
How to test the result correctly?

Most helpful comment

I have check it, my setting is right, and I found that the test.py doesn't include voc_eval, I must run the voc evaluation by:
python tools/voc_eval.py results.pkl ./configs/pascal_voc/cascade_rcnn_r101_fpn_1x_voc2021.py
atfer using test.py script

All 11 comments

when I finish training on pascal_voc dataset, and test the result by the script:
python tools/test.py --gpus --out
and I got: AttributeError: 'VOCDataset' object has no attribute 'img_ids'
How to test the result correctly?

'img_ids' is one of the attribute of 'cocodataset',
check your training or and try again?

I have check it, my setting is right, and I found that the test.py doesn't include voc_eval, I must run the voc evaluation by:
python tools/voc_eval.py results.pkl ./configs/pascal_voc/cascade_rcnn_r101_fpn_1x_voc2021.py
atfer using test.py script

emm,In my understanding, it has three parts:
train, and generate model file
test and generate result file
evaluation the result file and calc map.

yeah, the last part can't work by test.py and I should do it in another way.

@PCML-WangZhe Hi !!! what's results you got? training with default setting? Can you share?

hi,I make a same error,can you tell me how to solve it? Thanks!

这个项目 文档少 例子少 难道都靠 issue 来维持吗

这个项目 文档少 例子少 难道都靠 issue 来维持吗

I think they have given us enough instructions, or you can write another instruction instead of talking xxx.

这个项目 文档少 例子少 难道都靠 issue 来维持吗

I think they have given us enough instructions, or you can write another instruction instead of talking xxx.

I agree with you!

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

Ty,guys

Was this page helpful?
0 / 5 - 0 ratings

Related issues

namheegordonkim picture namheegordonkim  ·  3Comments

Youngkl0726 picture Youngkl0726  ·  3Comments

letanloc1998 picture letanloc1998  ·  3Comments

michaelisc picture michaelisc  ·  3Comments

songyuc picture songyuc  ·  3Comments