Understanding Detectron2 COCO Evaluator

1.6k Views Asked by At

I am evaluating Cityscapes dataset using COCOEvaluator from Detectron2.

I want to know if COCO Evaluation metric implemented in Detectron2 takes into consideration the number of instances of each class, i.e. if the mAP is actually the weighted mAP.

Disclaimer: I already googled for high level algorithmic details about COCO mAP metric but didn't found any reference about whether the mAP is weighted or not. Also took a look into the COCO API and Detectron2 mAP implementation code but it's way to complex.

2

There are 2 best solutions below

0
Shawn Jiang On

I don't think the COCOEvaluator calculate a weighted mAP based on different classes. Actually, it directly calls the code prom pycoco library. They calculate the average mAP over different object categories directly

0
Prayag Pawar On

Per-Class AP Calculation: First, the Average Precision (AP) is calculated independently for each class (category) based on the precision-recall curve. AP measures the precision of the model for a specific class.

Overall mAP Calculation: Once the AP is computed for each class, the overall mAP is calculated by taking the mean (average) of these AP values across all classes. This overall mAP is what you typically see in the evaluation results.