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:
spatial dimensions only with 0 being background and 1,2,3 being the labels for the regions of interest.
5 dimensional images ([3 spatial],1,4) storing binary volumes for each class in the 5th dimension
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?
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?