isaaccorley / torchseg

Segmentation models with pretrained backbones. PyTorch.
MIT License
91 stars 7 forks source link

Overhaul of torchseg.losses #15

Open notprime opened 4 months ago

notprime commented 4 months ago

Overhaul of torchseg.losses, starting from DiceLoss.

General changes applied to DiceLoss (to be applied later to all other losses):

Specific changes applied to DiceLoss:

notprime commented 4 months ago

@isaaccorley let me know what do you think about the "new" DiceLoss, it seems cleaner and more efficient without the burden of specyfying binary, multilabel and multiclass modes.

I'm not particularly sure about line 135 and 136 in the forward of DiceLoss, it does not make much sense to me for the two reasons I've written in the comment.

I think that we should just rewrite the losses before implementing the new ones