sovit-123 / fasterrcnn-pytorch-training-pipeline

PyTorch Faster R-CNN Object Detection on Custom Dataset
MIT License
223 stars 75 forks source link

Negative Metric Report #83

Closed aymuos15 closed 1 year ago

aymuos15 commented 1 year ago

Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.005 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.019 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.005 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.018 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.004 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.026 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.057 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.058 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.057 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000

What does negative mean in terms of Precision and Recall?

Sorry if this is already mentioned in the code.

sovit-123 commented 1 year ago

This is happening because pycocotools does not find bounding boxes which are large in the dataset. For pycocotools large bunding boxes means at least 96x96 pixel boxes.

aymuos15 commented 1 year ago

So essentially then, the model is working. Just that the bounding box sizes are small so that metric is not going to show anything?

Am I right in saying this?

sovit-123 commented 1 year ago

@aymuos15 Yes, if a dataset does not contain a specific bounding box shape, pycocotools will report -1 for that size.

aymuos15 commented 1 year ago

Thanks a lot!