smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow
MIT License
2.34k stars 1.12k forks source link

when I run the test.py to get the mAP of each class. something wrong. #204

Open Suodislie opened 7 years ago

Suodislie commented 7 years ago

when I run the test.py to get the mAP of each class. something wrong as fllows: ... im_detect: 4951/4952 0.505s 0.001s im_detect: 4952/4952 0.505s 0.001s Evaluating detections Writing aeroplane VOC results file Writing bicycle VOC results file Writing bird VOC results file Writing boat VOC results file Writing bottle VOC results file Writing bus VOC results file Writing car VOC results file Writing cat VOC results file Writing chair VOC results file Writing cow VOC results file Writing diningtable VOC results file Writing dog VOC results file Writing horse VOC results file Writing motorbike VOC results file Writing person VOC results file Writing pottedplant VOC results file Writing sheep VOC results file Writing sofa VOC results file Writing train VOC results file Writing tvmonitor VOC results file VOC07 metric? Yes Traceback (most recent call last): File "./tools/test_net.py", line 98, in test_net(sess, network, imdb, weights_filename) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/fast_rcnn/test.py", line 345, in test_net imdb.evaluate_detections(all_boxes, output_dir) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/pascal_voc.py", line 325, in evaluate_detections self._do_python_eval(output_dir) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/pascal_voc.py", line 288, in _do_python_eval use_07_metric=use_07_metric) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/voc_eval.py", line 126, in voc_eval R = [obj for obj in recs[imagename] if obj['name'] == classname] KeyError: '00173'

'00173 'is my first image name in test.txt the image and annotation is exist. Hope for your help ,Ths!

liuxinhai commented 7 years ago

I have solved this problem, this might help you.https://github.com/rbgirshick/py-faster-rcnn/issues/163