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?
You say metric and also loss, these are two separate things.
Good metrics include IOU and Dice.
Oh, Okay. I’ll look into the difference. What will be a good loss function?
fastai uses by default pixel-wise cross entropy loss.
Okay. Thank you.
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.