Course contentsShow
← Machine Learning and Deep Learning
Lesson 960 of 3,53822. Computer Vision TasksFree lesson

Mean Average Precision (mAP)

Master the standard object detection metric: computing precision-recall curves and averaging across classes and IoU thresholds.

Mean Average Precision (mAP)

What You'll Learn

You'll understand how mAP provides a single, comprehensive score to evaluate object detection models by combining precision-recall trade-offs across multiple classes and IoU thresholds.

The Core Idea

Mean Average Precision (mAP) is the standard metric for measuring object detection performance. It answers the question: "How accurately does my detector find objects across all categories?"

Here's how it works step-by-step:

1. Precision-Recall Curves

For each class, you plot how precision changes as you vary the confidence threshold. At low thresholds, you detect more objects (high recall) but make more mistakes (lower precision). At high thresholds, you're more selective (high precision) but miss objects (lower recall).

2. Average Precision (AP) per Class

For one class, you calculate the area under its precision-recall curve. This single number—the Average Precision—summarizes detection quality for that class across all confidence levels.

3. Averaging Across Classes

Take the AP for each class (person, car, dog, etc.) and average them together. This gives you mAP: the mean of all Average Precisions.

4. Multiple IoU Thresholds

Modern mAP (like COCO mAP) evaluates at multiple IoU thresholds (0.5, 0.55, 0.6...0.95) and averages those scores. A detection counts as correct only if its IoU exceeds the threshold. This rewards models that localize objects precisely, not just roughly.

Why It Matters

mAP combines everything: classification accuracy, localization quality, and performance across diverse object categories. A single mAP score (e.g., "mAP@0.5:0.95 = 42.3") tells you how well your detector works overall.

Key Takeaway: Mean Average Precision (mAP) is the gold-standard object detection metric—it averages precision-recall performance across all classes and IoU thresholds to give one comprehensive quality score.