frankkramer-lab / MIScnn

A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
GNU General Public License v3.0
400 stars 116 forks source link

Integrate new Loss functions from Yeung et al. #108

Closed muellerdo closed 2 years ago

muellerdo commented 2 years ago

New loss functions:

Reference Implementation: https://github.com/mlyg/unified-focal-loss Manuscript: https://arxiv.org/abs/2102.04525

Includes:

muellerdo commented 2 years ago

Wiki entry:

Loss functions from Michael Yeung et al. Analysis

The authors Yeung et al. implemented various common and widely used loss functions as well as proposed the Unified Focal loss, a new hierarchical framework that generalises Dice and cross entropy-based losses for handling class imbalance.

List of loss functions:

Authors: Michael Yeung, Evis Sala, Carola-Bibiane Schönlieb, Leonardo Rundo Implementation: https://github.com/mlyg/unified-focal-loss
Reference: https://arxiv.org/abs/2102.04525

from miscnn.neural_network.metrics import *

metric_list = [combo_loss,
               focal_tversky_loss,
               symmetric_focal_loss,
               symmetric_focal_tversky_loss,
               asymmetric_focal_loss,
               asymmetric_focal_tversky_loss,
               sym_unified_focal_loss,
               asym_unified_focal_loss]

model = Neural_Network(preprocessor=pp, loss=combo_loss,
                       metrics=metric_list)