测试mAP,报错:
and the problem:
VOC07 metric? Yes
000001
Traceback (most recent call last):
File "./tools/test_net.py", line 90, in
test_net(net, imdb, max_per_image=args.max_per_image, vis=args.vis)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 295, in test_net
imdb.evaluate_detections(all_boxes, output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 322, in evaluate_detections
self._do_python_eval(output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 285, in _do_python_eval
use_07_metric=use_07_metric)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 127, in voc_eval
R = [obj for obj in recs[imagename] if obj['name'] == classname]
KeyError: '000001'
VOC07 metric? Yes
000001
Traceback (most recent call last):
File "./tools/test_net.py", line 90, in
test_net(net, imdb, max_per_image=args.max_per_image, vis=args.vis)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 295, in test_net
imdb.evaluate_detections(all_boxes, output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 322, in evaluate_detections
self._do_python_eval(output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 285, in _do_python_eval
use_07_metric=use_07_metric)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 127, in voc_eval
R = [obj for obj in recs[imagename] if obj['name'] == classname]
KeyError: '000001'
解决方法:
had the same problem with an old annotation cache. Just delete it
You should also delete the roidb cache:
rm data/VOCdevkit2007/annotations_cache/annots.pkl
and run the program again.You should also delete the roidb cache:
rm data/cache/voc_2007_trainval_gt_roidb.pkl
PS:如要可视化测试结果,可在CPU电脑上运行tf-faster-rcnn/tools/demo_one.py程序。
没有评论:
发表评论