Notes

Mean Average Precision (mAP)

When an object detector looks at a photo, it must answer two questions at once: what is present, and where is it? Mean Average Precision (mAP) measures how well it does both across an entire test set, rewarding detectors that find the right objects, place boxes accurately, and avoid confident false alarms.

How the score is built
For each object class, such as “car” or “person,” the detector’s predicted boxes are sorted from highest to lowest confidence. Each prediction is compared with ground-truth boxes using Intersection over Union (IoU). A prediction counts as a true positive when it has the right class and overlaps an unmatched real object by at least the chosen IoU threshold. Otherwise, it is a false positive.

  • Precision asks: of the boxes predicted so far, how many were correct?
  • Recall asks: of all real objects, how many did the detector find?
  • Average Precision (AP) is the area under that class’s precision–recall curve.
  • mAP is the mean of AP values across all classes.

Why IoU thresholds matter
A box can identify a car but still be poorly positioned. At mAP@0.5, a prediction needs IoU of at least 0.50, a fairly forgiving overlap requirement. The COCO benchmark reports mAP@[0.5:0.95], averaging AP across IoU thresholds from 0.50 to 0.95 in steps of 0.05. This stricter score values precise localization, not just rough object finding.

Why it matters in practice
mAP reveals failures that plain classification accuracy hides. In autonomous driving, duplicate detections of one pedestrian reduce precision; missed cyclists reduce recall; loose boxes reduce high-IoU AP. In production-line inspection, it measures whether a detector finds every defect without flagging harmless marks. Libraries such as pycocotools implement the standard COCO evaluation procedure, making results comparable across detectors and datasets.

Mean Average Precision (mAP) is a standard metric for evaluating object detectors. It computes average precision from the precision–recall curve for each object class, then averages those values across classes; detection matches are determined by an intersection over union (IoU) threshold. mAP measures both classification accuracy and bounding-box localization quality, enabling consistent comparison of detection models.

Imagine judging a lost-and-found helper. It must point to every backpack, bottle, and phone in a photo—and avoid falsely calling a shoe a phone. Mean Average Precision (mAP) is a report-card score for how well an AI does this.

It rewards the system for finding the right objects in the right places, while penalizing missed objects and incorrect guesses. It also checks several object types, then combines their scores into one easy-to-compare number. A higher mAP means the detector is generally more reliable. Researchers use it to compare object-detection systems fairly, much like comparing athletes by an overall performance score rather than one lucky moment.