Calculate mean Average Precision for evaluating object detection model performance.
Mean Average Precision (mAP) is the primary metric for object detection, computed as the average of per-class Average Precision (AP) scores. Each class's AP summarizes the precision-recall curve into a single number, and mAP averages these across all object categories.
mAP
mAP = (1/C) * sum(AP_c) for c=1..C
mAP@0.5 uses a single IoU threshold of 0.5 to determine correct detections. mAP@[0.5:0.95] averages mAP across IoU thresholds from 0.5 to 0.95 in steps of 0.05, rewarding more precise localization.
AP is the area under the precision-recall curve for that class. Detections are sorted by confidence, and precision/recall are computed at each threshold, then integrated (often using 101-point interpolation in COCO).