Metric for image segmentation

(Vishal R) #1

I’m retraining resnet101 to work better on my dataset for image segmentation. I’m not sure which metric to use to calculate the loss. Can someone help?

0 Likes

#2

You say metric and also loss, these are two separate things.

Good metrics include IOU and Dice.

0 Likes

(Vishal R) #3

Oh, Okay. I’ll look into the difference. What will be a good loss function?

0 Likes

#4

fastai uses by default pixel-wise cross entropy loss.

0 Likes

(Vishal R) #5

Okay. Thank you.

0 Likes

(James Rees) #6

I’ve been using Dice Loss in place of pixel-wise cross-entropy with some encouraging results. I used the function from here: https://github.com/kevinzakka/pytorch-goodies/blob/master/losses.py

Note you’ll need to swap the arguments order, as fastai passes the result of the model first, not the ground truth.

0 Likes