0
0
Computer Visionml~8 mins

FCN (Fully Convolutional Network) in Computer Vision - Model Metrics & Evaluation

Choose your learning style9 modes available
Metrics & Evaluation - FCN (Fully Convolutional Network)
Which metric matters for FCN and WHY

Fully Convolutional Networks (FCNs) are mainly used for image segmentation. This means the model labels each pixel in an image. So, the key metrics measure how well the model predicts pixel classes.

Common metrics:

  • Intersection over Union (IoU): Measures overlap between predicted and true pixel areas. Higher IoU means better segmentation.
  • Pixel Accuracy: Percentage of pixels correctly classified. Simple but can be misleading if classes are imbalanced.
  • Dice Coefficient (F1 score for pixels): Balances precision and recall for pixel classification.

These metrics help us understand how well the FCN segments images, which is the main goal.

Confusion matrix for pixel classification

For segmentation, the confusion matrix counts pixels:

      | Predicted Positive | Predicted Negative |
      |--------------------|--------------------|
      | True Positive (TP)  | False Negative (FN) |
      | False Positive (FP) | True Negative (TN)  |
    

Example for one class (e.g., 'car' pixels):

      TP = 8000 pixels (correctly predicted as car)
      FP = 2000 pixels (wrongly predicted as car)
      FN = 1000 pixels (car pixels missed)
      TN = 89000 pixels (correctly predicted as not car)
    

Total pixels = TP + FP + FN + TN = 8000 + 2000 + 1000 + 89000 = 100000 pixels

Precision vs Recall tradeoff in FCN segmentation

Precision tells us how many pixels predicted as a class are actually correct.

Recall tells us how many true pixels of a class were found by the model.

Example:

  • High precision but low recall: Model is very sure about predicted pixels but misses many true pixels. Good if false positives are costly.
  • High recall but low precision: Model finds most true pixels but also predicts many wrong pixels. Good if missing pixels is costly.

For medical image segmentation, high recall is important to not miss any diseased area. For autonomous driving, high precision avoids false alarms.

What good vs bad metric values look like for FCN

Good segmentation:

  • IoU above 0.7 (70%) means strong overlap between prediction and truth.
  • Pixel accuracy above 90% if classes are balanced.
  • Dice coefficient above 0.8 shows good balance of precision and recall.

Bad segmentation:

  • IoU below 0.4 means poor overlap, many pixels misclassified.
  • Pixel accuracy can be misleadingly high if background dominates, so low IoU or Dice is a warning.
  • Dice coefficient below 0.5 means model struggles to find correct pixels.
Common pitfalls in FCN metric evaluation
  • Accuracy paradox: High pixel accuracy can happen if background pixels dominate, hiding poor class predictions.
  • Ignoring class imbalance: Small objects may have low IoU but be important; metrics should consider this.
  • Data leakage: Using test images in training inflates metrics falsely.
  • Overfitting: Very high training metrics but low test metrics means model memorizes training images, not generalizing.
Self-check question

Your FCN model has 98% pixel accuracy but only 12% recall on a small but important class (e.g., tumor pixels). Is this good for production?

Answer: No. The model misses 88% of true tumor pixels. High accuracy is misleading because most pixels are background. Low recall means many tumors go undetected, which is dangerous.

Key Result
For FCNs, IoU and Dice coefficient best measure segmentation quality, while pixel accuracy can be misleading due to class imbalance.