MONAI
MONAI copied to clipboard
Add Hybrid Segmentation Loss
I was trying to implement UNet++ (issue #896 ). In the UNet++ paper, authors suggest using hybrid segmentation loss:
We then define a hybrid segmentation loss consisting of pixelwise cross-entropy loss and soft dice-coefficient loss for each
semantic scale. The hybrid loss may take advantages of what both loss functions have to offer: smooth gradient and handling
of class imbalance.
Equation 2 in this paper, describes the Mathematical formula to calculate the loss.
Can this loss be implemented in MONAI?
Additional context
@Nic-Ma, Shall this loss be added, will it be helpful? Thank you
Hi @yashika-git ,
I think it would be a nice enhancement for MONAI, welcome your contribution. @wyli Do you have any concern?
Thanks.
Thank you, I'll try adding this.
is this hybrid loss the same as Dice + CrossEntropy loss? https://github.com/Project-MONAI/MONAI/blob/dev/monai/losses/dice.py#L609
@myron, Yes, it seems to be the same. I'll close the issue.