mAP (mean Average Precision)
mAP (mean Average Precision) is a metric that evaluates object detection models by averaging precision across recall thresholds for each class, then averaging over all classes. It measures how well a model localizes and classifies objects—higher mAP means fewer false positives and missed detections. For operators running local AI, mAP matters when comparing detection models (e.g., YOLO, DETR) for tasks like surveillance or document scanning: a model with mAP 0.5 at IoU 0.5 is less accurate than one with mAP 0.7 at the same IoU, but the latter may require more VRAM or slower inference.
Deeper dive
mAP is computed by first generating precision-recall curves per class. Average Precision (AP) for a class is the area under that curve, often interpolated. mAP is the mean of AP across all classes. Common variants include [email protected] (IoU threshold 0.5) and [email protected]:0.95 (average over IoU thresholds 0.5 to 0.95, step 0.05). The latter is stricter and correlates better with human judgment. In local AI, operators encounter mAP in model benchmarks on datasets like COCO or Open Images. A higher [email protected]:0.95 generally indicates a more robust model, but inference speed and VRAM footprint also matter—a lightweight YOLOv8n may run at 120 FPS on an RTX 3060 with mAP 0.37, while YOLOv8x achieves mAP 0.54 but only 30 FPS on the same GPU.
Practical example
When choosing an object detection model for a local AI rig, an operator might compare YOLOv8n ([email protected]:0.95 = 0.37, 3.2M parameters) vs YOLOv8x ([email protected]:0.95 = 0.54, 68.2M parameters) on COCO. On an RTX 3060 (12 GB VRAM), YOLOv8n runs at ~120 FPS, while YOLOv8x runs at ~30 FPS and uses ~7 GB VRAM. The operator must decide whether the mAP gain justifies the VRAM and latency cost.
Workflow example
In a typical workflow, an operator downloads a YOLO model (e.g., wget https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt) and runs validation with yolo val model=yolov8n.pt data=coco.yaml. The output reports [email protected] and [email protected]:0.95. If the operator is using Hugging Face Transformers with DETR, they might run detr.evaluate() and see mAP in the logs. The metric guides model selection for deployment in LM Studio or vLLM-based vision pipelines.
Reviewed by Fredoline Eruo. See our editorial policy.