Papers › Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class...

Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation

8 Feb 2021arXiv:2102.04525archive 2025-07-28

Michael Yeung, Evis Sala, Carola-Bibiane Schönlieb, Leonardo Rundo

Automatic segmentation methods are an important advancement in medical image analysis. Machine learning techniques, and deep neural networks in particular, are the state-of-the-art for most medical image segmentation tasks. Issues with class imbalance pose a significant challenge in medical datasets, with lesions often occupying a considerably smaller volume relative to the background. Loss functions used in the training of deep learning algorithms differ in their robustness to class imbalance, with direct consequences for model convergence. The most commonly used loss functions for segmentation are based on either the cross entropy loss, Dice loss or a combination of the two. We propose the Unified Focal loss, a new hierarchical framework that generalises Dice and cross entropy-based losses for handling class imbalance. We evaluate our proposed loss function on five publicly available, class imbalanced medical imaging datasets: CVC-ClinicDB, Digital Retinal Images for Vessel Extraction (DRIVE), Breast Ultrasound 2017 (BUS2017), Brain Tumour Segmentation 2020 (BraTS20) and Kidney Tumour Segmentation 2019 (KiTS19). We compare our loss function performance against six Dice or cross entropy-based loss functions, across 2D binary, 3D binary and 3D multiclass segmentation tasks, demonstrating that our proposed loss function is robust to class imbalance and consistently outperforms the other loss functions. Source code is available at: https://github.com/mlyg/unified-focal-loss

PaperPDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

mlyg/generalised-focal-loss officialmentioned in papermentioned on GitHubtfSyntology: not harvested report
mlyg/unified-focal-loss officialmentioned in papermentioned on GitHubtfSyntology: not harvested report
EvgenyDyshlyuk/Oil_Seep_Detection mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to U-Net: Convolutional Networks for Biomedical Image Segmentation (arXiv:1505.04597; that paper's own run record: 530 ran (of which 247 constructed an object rather than computing a result; 378 with no instrument failure: 18 honoured, 10 violated, 350 with no contract checked; 152 where Syntology's instrument failed) · 227 unverified); nothing checks that they implement this paper's method. report
oikosohn/compound-loss-pytorch mentioned on GitHubpytorchSyntology: not harvested report
frankkramer-lab/MIScnn tfSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image SegmentationMedical Image AnalysisMedical Image SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Concatenated Skip ConnectionConvolutionDice LossFocal LossMax PoolingReLUU-Net

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections