rafaelpadilla / review_object_detection_metrics

Object Detection Metrics. 14 object detection metrics: mean Average Precision (mAP), Average Recall (AR), Spatio-Temporal Tube Average Precision (STT-AP). This project supports different bounding box formats as in COCO, PASCAL, Imagenet, etc.
Other
1.08k stars 215 forks source link

Calculate mAP with a different annotation format? #65

Closed YashRunwal closed 3 years ago

YashRunwal commented 3 years ago

Hello,

I am training a custom model based on CenterNet. To start with, I am training for 20 Epochs. I want the model to evaluate the mAP of the validation dataset after 10 epochs. Therefore, I want to use this repo.

However, my dataset annotation format looks like this: x1, y1, x2, y2, class_id It is not like YOLO Dataset and COCO Dataset. Every image has its own annotation file (.txt) with N bounding boxes. The model evaluation returns the following: Top 100 box predictions, Top 100 scores, Top 100 class indices.

How do I in this case use this repo? I mean I can change the code too if needed.

Thanks.

rafaelpadilla commented 3 years ago

Hi @YashRunwal ,

Yes, you could adapt the code to retrieve the mAP result after any epoch.

You have to call get_pascalvoc_metrics function passing a BoundingBox object representing your groundtruths (gt_boxes) and a BoundingBox object representing your detections (det_boxes).

See here the BoundingBox class.

Follow this example to create your BoundingBox objects.

I hope that helps.

Best regards

rafaelpadilla commented 3 years ago

Closing issue as no update was reported