0
0
Computer Visionml~8 mins

Image augmentation transforms in Computer Vision - Model Metrics & Evaluation

Choose your learning style9 modes available
Metrics & Evaluation - Image augmentation transforms
Which metric matters for Image Augmentation Transforms and WHY

Image augmentation helps models learn better by showing more varied pictures. The key metrics to check if augmentation works are validation accuracy and validation loss. These show if the model is learning to recognize images well on new, unseen data. If augmentation is good, validation accuracy should improve or stay stable while training accuracy might be lower. This means the model is not just memorizing but generalizing better.

Confusion Matrix Example

Imagine a model classifying cats and dogs. After training with augmentation, the confusion matrix might look like this:

      | Predicted Cat | Predicted Dog |
      |---------------|---------------|
      | 45 (TP)       | 5 (FN)        |
      | 3 (FP)        | 47 (TN)       |
    

Total samples = 45 + 5 + 3 + 47 = 100

Precision = 45 / (45 + 3) = 0.94

Recall = 45 / (45 + 5) = 0.90

F1 Score = 2 * (0.94 * 0.90) / (0.94 + 0.90) ≈ 0.92

Precision vs Recall Tradeoff with Image Augmentation

Augmentation can help balance precision and recall. For example:

  • High precision: The model rarely mistakes dogs for cats, so predictions are trustworthy.
  • High recall: The model finds most cats, even if some dogs are wrongly labeled as cats.

If augmentation is too weak, recall might be low because the model misses varied cat images. If augmentation is too strong or unrealistic, precision might drop because the model gets confused.

Good vs Bad Metric Values for Image Augmentation

Good: Validation accuracy close to training accuracy, high F1 score (above 0.85), and balanced precision and recall.

Bad: Large gap between training and validation accuracy (overfitting), low recall (missing many true images), or very low precision (many wrong predictions).

Common Pitfalls in Metrics for Image Augmentation
  • Accuracy paradox: High accuracy but poor recall if classes are imbalanced (e.g., many dog images, few cat images).
  • Data leakage: Augmented images too similar to training images can inflate validation scores falsely.
  • Overfitting indicators: Training accuracy very high but validation accuracy low, meaning augmentation is not helping generalization.
Self-Check Question

Your model trained with image augmentation has 98% training accuracy but only 60% validation accuracy. What does this mean?

Answer: The model is overfitting. It learned the training images too well but cannot generalize to new images. The augmentation might be too weak or not diverse enough to help the model learn general features.

Key Result
Validation accuracy and F1 score best show if image augmentation helps the model generalize well.