TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Photo by Riho Kroll on Unsplash

Member-only story

How To Evaluate Image Segmentation Models?

Dice and Jaccard’s explained…

Seyma Tas
4 min readJul 30, 2020

--

We are working on a deep learning model that predicts masks for brain tumors or skin lesions. What is making a mask? We classify pixels of an image as 1 or 0. If there is a mask in a pixel we state 1, if there is not a mask we state 0. Making pixelwise binary classification of images is called “Semantic Segmentation”.

Image by author: Brain Tumor MRI and corresponding mask

If we are trying to recognize many objects in an image we are performing “Instance Segmentation”. Instance Segmentation is a multiclass segmentation. For example, in self-driving cars, objects are classified as car, road, tree, house, sky, pedestrian, etc.

In both semantic(binary) and instance (multiclass)segmentations, we need a loss function for calculating gradients.

Which accuracy-loss function is used for image segmentation?

Let’s see some of our options:

1. Pixel accuracy:

We can compare each pixel one by one with the ground truth mask. But this is very problematic where there is a class imbalance. Let me explain in an example:

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

No responses yet