mean average precision
Mean average precision is the headline score for object detection — the number that decides which detector 'wins' on COCO or PASCAL VOC. Detection is harder to grade than classification because a model outputs many boxes, each with a class label, a confidence score, and a location, and it must get all three right. mAP rolls accuracy of localization, classification, and ranking-by-confidence into a single number from 0 to 1, computed in a way that rewards finding every object (recall) while not drowning the answer in false boxes (precision).
Building it up: first you decide when a predicted box 'counts' as matching a ground-truth box using Intersection over Union (IoU) — the overlap area divided by the union area — and a threshold such as IoU ≥ 0.5. Then, for one class, you sort all predicted boxes by confidence and sweep down the list, computing precision and recall at each step; this traces a precision–recall curve. Average Precision (AP) is the area under that curve — a single class's quality across all confidence thresholds. mAP is then the mean of AP over all classes, so every category counts equally regardless of how common it is.
The IoU threshold is a knob that sets how strict 'a correct location' must be. The older PASCAL VOC metric used a single lenient threshold ([email protected]). Modern COCO reports mAP@[.5:.95]: it computes AP at ten IoU thresholds from 0.50 to 0.95 in steps of 0.05 and averages them, demanding ever-tighter boxes. This is why a model can score, say, 55 [email protected] but only 37 mAP@[.5:.95] — the stricter average punishes sloppy localization. COCO also breaks results out by object size (small/medium/large), exposing that small objects are usually the hardest.
A few subtleties make or break the number. Each ground-truth box may be matched by only one prediction (the highest-confidence one); extra overlapping predictions become false positives, which is why non-maximum suppression matters. Duplicate or low-quality boxes drag precision down at high recall, so the AP integral genuinely measures the full precision–recall behavior, not a single operating point. Because mAP is averaged over classes, doing well on rare categories is just as valuable as doing well on common ones — a property that makes it a fair but demanding benchmark used for everything from Faster R-CNN to DETR and modern transformer detectors.
Always state the protocol: 'mAP' alone is ambiguous. [email protected] (VOC-style) and mAP@[.5:.95] (COCO-style) can differ by 15–20 points on the same model, and instance-segmentation mAP uses mask IoU rather than box IoU. Comparing numbers across protocols is meaningless.