For face detection, the key metrics are Precision and Recall. Precision tells us how many detected faces are actually faces, so it helps avoid false alarms. Recall tells us how many real faces the model finds, so it helps avoid missing faces. Both matter because missing a face or wrongly detecting a face can cause problems in real life, like security or photo tagging.
Face detection with deep learning in Computer Vision - Model Metrics & Evaluation
| Predicted Face | Predicted No Face |
|----------------|-------------------|
| True Positive | False Positive |
| False Negative | True Negative |
Example:
TP = 90 (faces correctly detected)
FP = 10 (wrongly detected faces)
FN = 15 (faces missed)
TN = 885 (correctly ignored non-faces)
Total samples = 90 + 10 + 15 + 885 = 1000
If the model tries to find every face (high recall), it might detect some things that are not faces (lower precision). For example, in a security camera, missing a face (low recall) is bad because you want to catch everyone. But if it detects too many false faces (low precision), it wastes time checking wrong alerts.
On the other hand, if the model is very strict and only detects faces it is sure about (high precision), it might miss some faces (low recall). This might be okay for photo apps where false faces annoy users, but not for safety systems.
Good: Precision and Recall both above 90%. This means most detected faces are real, and most real faces are found.
Bad: Precision below 70% means many false alarms. Recall below 70% means many faces missed. For example, 50% recall means half the faces are not detected, which is usually unacceptable.
- Accuracy paradox: If most images have no faces, a model that always says "no face" can have high accuracy but is useless.
- Data leakage: Testing on images very similar to training can give too optimistic metrics.
- Overfitting: Very high training metrics but poor test metrics mean the model learned noise, not real face patterns.
Your face detection model has 98% accuracy but only 12% recall on faces. Is it good for production? Why or why not?
Answer: No, it is not good. The high accuracy is misleading because most images might not have faces. The very low recall means the model misses almost all faces, which defeats the purpose of face detection.