- 我使用了object_detection/metrics/offline_eval_map_corloc.py函数来获得测试数据集的评估。代码运行良好,但对于大和中等大小的边界框,我得到了AR和AP的负值。
平均精度(AP)@[IoU=0.50:0.95|area=all|maxDets=100]=0.459
平均精度(AP)@[IoU=0.50|area=all|maxDets=100]=0.601
平均精度(AP)@[IoU=0.75|area=all|maxDets=100]=0.543
平均精度(AP)@[IoU=0.50:0.95|area=small|maxDets=100]=0.459
平均精度(AP)@[IoU=0.50:0.95|area=medium|maxDets=100]=-1.000
平均精度(AP)@[IoU=0.50:0.95|area=large|maxDets=100]=-1.000
平均召回率(AR)@[IoU=0.50:0.95|area=all|maxDets=1]=0.543
平均召回率(AR)@[IoU=0.50:0.95|area=all|maxDets=10]=0.627
平均召回率(AR)@[IoU=0.50:0.95|area=all|maxDets=100]=0.628
平均召回率(AR)@[IoU=0.50:0.95|area=small|maxDets=100]=0.628
平均召回率(AR)@[IoU=0.50:0.95|area=medium|maxDets=100]=-1.000
平均召回率(AR)@[IoU=0.50:0.95|area=large|maxDets=100]=-1.000
现在,我知道mAP和AR不可能是负数,有些地方出了问题。我想知道为什么在测试数据集上运行离线评估时会看到负值?我用来运行此流程的查询是:SPLIT=test
echo "
label_map_path: '/training_demo/annotations/label_map.pbtxt'
tf_record_input_reader: { input_path: '/training_demo/Predictions/test.record' }
" > /training_demo/${SPLIT}_eval_metrics/${SPLIT}_input_config.pbtxt
echo "
metrics_set: 'coco_detection_metrics'
" > /training_demo/${SPLIT}_eval_metrics/${SPLIT}_eval_config.pbtxt
python object_detection/metrics/offline_eval_map_corloc.py \
--eval_dir='/training_demo/test_eval_metrics' \
--eval_config_path='training_demo/test_eval_metrics/test_eval_config.pbtxt' \
--input_config_path='/training_demo/test_eval_metrics/test_input_config.pbtxt'
- 我也尝试了 object_detection/legacy/eval.py,但我得到的评估指标值是负数:
DetectionBoxes_Recall/AR@100(medium):-1.0 DetectionBoxes_Recall/AR@100(small):-1.0 DetectionBoxes_Precision/mAP@.50IOU:-1.0 DetectionBoxes_Precision/mAP(medium):-1.0 等等。
我使用了以下管道:
python eval.py \ --logtostderr \ --checkpoint_dir=trained-inference-graphs/output_inference_graph/ \ --eval_dir=test_eval_metrics \ --pipeline_config_path=training/faster_rcnn_resnet101_coco-Copy1.configfaster_rcnn_resnet101_coco-Copy1.config中的eval_input_reader指向具有真实信息和检测信息的测试TFRecord。
- 我还尝试了object_detection/utils/object_detection_evaluation来进行评估。这与使用第一种方法没有什么不同,因为它使用相同的基础函数-evaluator.evaluate()
我会非常感激任何帮助。