Back to top

me | blogs | notes | tags | categories | feed | home |

image segmentation



tags: image
categories: Machine Learning


Types of image segmentation

Semantic segmentation

Instance segmentation

Apporaches for segmentation

Using Classical Approach

Histogram Based Segmentation

thresholding

Random Walker Segmentation

Watershed Segmentation

Graph based segmentation

Using Unsupervised Approach

Gaussian Mixture Model

Kmeans Clustering

Using Deep Learning

UNET

Image Segmentation Loss/Evaluation Method

  • Problem with other common metrics
  • We need metrics that target pixels in foreground

Intersection over union (Jaccard index)

  • sklearn jaccard module

  • Overall accuracy is not a good metric for semantic segmentation, especially for imbalanced dataset

  • IOU = \(\frac{Intersection}{Union}\)

    = \(\frac{\sum{\hat{y}*y}} {\sum{\hat{y} + y - \hat{y} * y}}\)

    = \(\frac{TP}{TP + FP + FN}\)

Dice Score

  • Easy to differentiate
  • For Image = \(\frac{2*\sum{\hat{y}*y}} {\sum{\hat{y} + y}}\)
  • priortise both precision and recall equally
  • Loss = 1 - Dice

IOU vs Dice Score

IoU metric tends to penalize single instances of bad classification more than the F1/Dice score quantitatively even when they can both agree that this one instance is bad.1


Links to this note