Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to evaluate and calculate mAP on VOC test 2007 by infer.py #43

Closed
jamiechoi1995 opened this issue Mar 20, 2019 · 2 comments
Closed

Comments

@jamiechoi1995
Copy link

jamiechoi1995 commented Mar 20, 2019

Thanks for your great code to implement SSD, here are my questions:

how can I evaluate the model on VOC test 2007 and calculate mAP?

I can't compute the mAP as

compute_stats = False

and in

if args.data_source:
, you use args.data_source, however, there no args.data_source in the parser part.

even if I add the args.data_source in parser, it shows:
Traceback (most recent call last): File "infer.py", line 286, in <module> sys.exit(main()) File "infer.py", line 155, in main source.load_test_data(args.data_dir) File "/cephfs/group/teg-qboss-teg-qboss-ocr-shixi/jamiecai/workspace/detection/ssd-tensorflow-master_ljanyst/source_pascal_voc.py", line 196, in load_test_data annot = self.__build_annotation_list(root, 'test') File "/cephfs/group/teg-qboss-teg-qboss-ocr-shixi/jamiecai/workspace/detection/ssd-tensorflow-master_ljanyst/source_pascal_voc.py", line 81, in __build_annotation_list with open(root + '/ImageSets/Main/' + dataset_type + '.txt') as f: FileNotFoundError: [Errno 2] No such file or directory: 'pascal-voc/test/VOCdevkit/VOC2012/ImageSets/Main/test.txt'

would you please update infer.py?
Thank you very much :D

@chenweizhi
Copy link

Thanks for your great code to implement SSD, here are my questions:

how can I evaluate the model on VOC test 2007 and calculate mAP?

I can't compute the mAP as

ssd-tensorflow/infer.py

Line 147 in e9c1ee5

compute_stats = False
and in

ssd-tensorflow/infer.py

Line 149 in e9c1ee5

if args.data_source:
, you use args.data_source, however, there no args.data_source in the parser part.
even if I add the args.data_source in parser, it shows:
Traceback (most recent call last): File "infer.py", line 286, in <module> sys.exit(main()) File "infer.py", line 155, in main source.load_test_data(args.data_dir) File "/cephfs/group/teg-qboss-teg-qboss-ocr-shixi/jamiecai/workspace/detection/ssd-tensorflow-master_ljanyst/source_pascal_voc.py", line 196, in load_test_data annot = self.__build_annotation_list(root, 'test') File "/cephfs/group/teg-qboss-teg-qboss-ocr-shixi/jamiecai/workspace/detection/ssd-tensorflow-master_ljanyst/source_pascal_voc.py", line 81, in __build_annotation_list with open(root + '/ImageSets/Main/' + dataset_type + '.txt') as f: FileNotFoundError: [Errno 2] No such file or directory: 'pascal-voc/test/VOCdevkit/VOC2012/ImageSets/Main/test.txt'

would you please update infer.py?
Thank you very much :D

take a look at souce_pascal_voc.py , go ahead to function 'load_test_data'
change voc2012 to voc2007 if you are testing that one

@jamiechoi1995
Copy link
Author

@chenweizhi thanks, I find that and I have created a PR #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants