Applied Artificial Intelligence (Dec 2024)
DRFL: Dynamic-Recall Focal Loss for Image Classification and Segmentation
Abstract
The accuracy of neural networks heavily depends on numerous precisely annotated samples. But in actual datasets, the number of samples for each category varies greatly. In the dataset, some classes may have a large sample size, called majority classes, while others may have a small sample size, called minority classes. Training model with imbalanced data is often conducive to the majority classes, while unfair to minority classes. As a result, the outputs return good performance on majority classes and bad performance on minority classes. This article proposes a new loss function called dynamic-recall focal loss (DRFL), which can solve the problem of imbalanced data categories in image classification and medical segmentation tasks. The DRFL assigns different weight coefficient to the classes according to their dynamic recall based on focal loss. Experimental results have shown that the newly proposed loss function DRFL can effectively improve the classification and segmentation accuracy of two imbalanced datasets.