我已经调整了Model Zoo上可用的faster_rcnn_resnet101模型来检测我的自定义对象。我将数据拆分为train和eval set,我在训练时在配置文件中使用它们。现在训练完成后,我想在一个看不见的数据上测试我的模型(我称之为测试数据)。我使用了几个函数,但无法确定使用tensorflow的API来评估测试数据集的性能。以下是我尝试过的事情:
平均精度(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'
DetectionBoxes_Recall / AR @ 100(中): - 1.0 DetectionBoxes_Recall / AR @ 100(小): - 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.config
在fast_rcnn_resnet101_coco-Copy1.config中的eval_input_reader指向测试TFRecord的地面实况和检测信息。
我将不胜感激任何帮助。