eval.py模型评估问题
Created by: atomrun39
在ppyolo_reader.yml中, EvalReader: dataset: !COCODataSet image_dir: val_image anno_path: annotations/instances_val.json dataset_dir: dataset/coco EvalReader中dataset写成训练集、验证集都可以正确评估,结果如下:
2020-08-23 21:43:21,135-INFO: Total number of images: 5455, inference time: 44.73748905550997 fps. loading annotations into memory... Done (t=0.45s) creating index... index created! 2020-08-23 21:43:26,110-INFO: Start evaluate... Loading and preparing results... DONE (t=1.41s) creating index... index created! Running per image evaluation... Evaluate annotation type bbox DONE (t=133.69s). Accumulating evaluation results... DONE (t=2.70s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.579 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.929 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.607 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.432 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.632 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.742 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.166 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.449 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.661 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.555 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.711 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.812
为什么把dataset换成测试集test就评估的有问题(值都非常低)?这是什么原因造成的呢?
2020-08-23 21:33:40,515-INFO: Total number of images: 1517, inference time: 44.12258426555442 fps. loading annotations into memory... Done (t=0.10s) creating index... index created! 2020-08-23 21:33:41,894-INFO: Start evaluate... Loading and preparing results... DONE (t=0.37s) creating index... index created! Running per image evaluation... Evaluate annotation type bbox DONE (t=2.01s). Accumulating evaluation results... DONE (t=0.80s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.002 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.003 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.002 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.003 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.009 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.037 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.132 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.166 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.106 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.200 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.223