Hi and thanks for your great and detailed answer!



 KFrank:

assume that you mean you sometimes have overlapping target
labels – your ground-truth annotations that you use to train – rather
than overlapping predicted labels.


Here I need to clarify some things about my data:
My dataset consists of one large bone structure. This bone structure has been segmented as a whole but it has also been split and segmented as three single structures.



 KFrank:

(In such case, however, you would use CrossEntropyLoss


I actually use a combination of CE and Soft-dice which seems to work quite well.



 KFrank:

But if you do have overlapping labels, how can you convert them
to one-hot encoding?


Good question! Some further clarification:
The  network that uses one hot encoded labels was only trained in order to predict the three single structures.
What I noticed is that the network struggles somewhat when one structure ends and The next begins. This is just because they are basically belonging to the same bone structure. Nevertheless I want my model to be able to differentiate between them.
In addition I want my model to be able to predict the three single structures as well as the whole structure.
This is what I meant with ‘overlapping (target) labels’ and where I had the idea of stacking the segmentations into different image channels.



 KFrank:

Do you have an unbalanced dataset


That is probably the case as the whole structure has much more foreground pixels than the single structures on their own.
I made a quick check and removed the channel with the whole structure and that seems to work.
What I don’t understand though is why the predictions in the different channels become the same when I include the segmentation of the whole structure.
I would have expected that the channel wise Dice coeffient (which is used as an evaluation metric), would be good for 1 channel but would get worse for the other three as the whole segmentation takes over the loss function…
Best regards,
Michael