Model Evaluation Metrics: Precision, Recall, F1, IoU, mAP
Model Evaluation Metrics
"The model is 95% accurate" means little unless you say what was measured and how. The core metrics for detection and segmentation models:
Precision and Recall
- Precision: when the model says "present", how often is it right? Low means many false alarms.
- Recall: how much of what is really there does it find? Low means it misses things.
There is usually a trade-off: lowering the threshold raises recall and lowers precision.
F1 Score
The harmonic mean of precision and recall. If either one is very low, F1 is low too; used as a single-number summary.
IoU (Intersection over Union)
The area where prediction and ground truth overlap divided by their combined area. A prediction usually counts as "correct" at IoU ≥ 0.5.
mAP (mean Average Precision)
The area under the precision-recall curve across thresholds, averaged over classes. mAP50 is computed at IoU ≥ 0.5; mAP50-95 is stricter.
For Numeric Prediction: RMSE and R²
Regression models (e.g. predicting milk fat from a spectrum) measure error with RMSE and explained variance with R².
What Really Matters: The Test Set
Test data must be independent of training. If parts of the same area end up in both training and test images, the score is inflated. That is why we split tests by time or by geographic blocks. See Overfitting.