From detections to one number
- Sort all detections of a class by confidence, highest first.
- Walk down the list. A detection is a true positive if it overlaps a still unmatched ground-truth object by at least the IoU threshold; otherwise it is a false positive. Each ground-truth object can be matched once.
- After every detection, record precision and recall so far. Together they trace the precision-recall curve.
- Average precision (AP) is the area under that curve, after precision is made non-increasing from right to left.
- mAP is the mean of AP over all classes.
AP = ∫₀¹ p(r) drmAP = (1 / N) · Σ APcmAP50-95 = (1 / 10) · Σ mAPt, t ∈ {0.50, 0.55, …, 0.95}mAP50 or mAP50-95?
mAP50 counts a box as correct once it overlaps the object by half, so it rewards finding objects. mAP50-95 repeats the evaluation at ten IoU thresholds and averages them, so a detector with loose boxes loses points it would keep under mAP50. COCO papers write the averaged score as "AP"; it is the same quantity, already averaged over classes.
What mAP does not tell you
- It sweeps every confidence threshold, while a deployed model runs at one. Two models with equal mAP can behave differently at the threshold you ship.
- A class average hides a rare class that fails completely if the frequent classes score well.
- Numbers from different tools are not always comparable: interpolation, area ranges and maximum detections per image differ.
In Supervisely
Every detection and instance segmentation model trained on the platform gets an evaluation report with mAP over IoU thresholds from 0.50 to 0.95, AP50 and AP75, precision-recall curves, per-class metrics and the best confidence threshold. The object detection metrics page of the docs explains each chart.