niftynet

Generalised dice loss only learning one class


I am experimenting with the generalised dice loss implemented in niftynet to segment MRI volumes containing 4 classes (1 background 3 regions of interest) using the V-Net. I tried to format the labels in 2 ways:

an inference from the second case produced a 3D volume where only the class with label '3' was detected while the loss didn't decrease at all during training for the first case. Am I storing the labels in the correct format?


Solution

  • I think the first format is the correct one.

    You might need to clip the gradients in the code for segmentation application. Does the loss decrease when you use a standard Dice metric?