0
0
Computer Visionml~8 mins

Why face analysis is a core CV application in Computer Vision - Why Metrics Matter

Choose your learning style9 modes available
Metrics & Evaluation - Why face analysis is a core CV application
Which metric matters for this concept and WHY

In face analysis, accuracy is important to measure overall correct predictions. But more crucial are precision and recall because:

  • Precision tells us how many detected faces are actually correct. This avoids false alarms.
  • Recall tells us how many real faces were found. Missing faces can cause problems.

For example, in security, missing a face (low recall) is worse than a false alarm (low precision). So recall is often prioritized.

Confusion matrix or equivalent visualization (ASCII)
      | Predicted Face       | Predicted No Face    |
      |----------------------|----------------------|
      | True Positive (TP)  = 90           | False Negative (FN) = 10           |
      | False Positive (FP) = 5            | True Negative (TN)  = 895          |
    

Here, out of 100 actual faces, 90 were correctly detected (TP), 10 missed (FN). There were 5 false alarms (FP) among 900 non-face images.

Precision vs Recall tradeoff with concrete examples

Imagine a face unlock system on your phone:

  • High precision, low recall: The system only unlocks when very sure. It rarely mistakes others for you (few false alarms), but sometimes it won't recognize you (misses).
  • High recall, low precision: The system tries to recognize you all the time, but sometimes lets others in by mistake (false alarms).

For security, high precision is critical to avoid unauthorized access. For convenience, high recall helps avoid frustration.

What "good" vs "bad" metric values look like for this use case
  • Good: Precision > 0.95, Recall > 0.90, Accuracy > 0.95. This means most faces are found and few false alarms.
  • Bad: Precision < 0.70 or Recall < 0.60. Many faces missed or many false detections, making the system unreliable.
Metrics pitfalls (accuracy paradox, data leakage, overfitting indicators)
  • Accuracy paradox: If most images have no faces, a model that always says "no face" can have high accuracy but is useless.
  • Data leakage: If training and test images overlap, metrics look better but model won't work well in real life.
  • Overfitting: Very high training accuracy but low test recall means the model memorized training faces but can't generalize.
Self-check question

Your face detection model has 98% accuracy but only 12% recall on faces. Is it good for production? Why not?

Answer: No, it is not good. The model misses most faces (low recall), which is critical in face analysis. High accuracy is misleading because most images have no faces, so the model just predicts "no face" often.

Key Result
In face analysis, high recall and precision are key to reliably detect faces and avoid false alarms, beyond just accuracy.