Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance

Keypoint-based deep learning detectors have proven highly effective in object detection tasks by predicting specific keypoints to determine object classification and location. Examples include CornerNet, CenterNet, ExtremeNet, RetinaNet, FCOS, and ObjectBox. Despite their strengths, these methods ar...

Full description

Saved in:
Bibliographic Details
Main Authors: Zhihao Su, Afzan Adam, Mohammad Faidzul Nasrudin
Format: Article
Language:English
Published: IEEE 2025-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/10872927/
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850191390694178816
author Zhihao Su
Afzan Adam
Mohammad Faidzul Nasrudin
author_facet Zhihao Su
Afzan Adam
Mohammad Faidzul Nasrudin
author_sort Zhihao Su
collection DOAJ
description Keypoint-based deep learning detectors have proven highly effective in object detection tasks by predicting specific keypoints to determine object classification and location. Examples include CornerNet, CenterNet, ExtremeNet, RetinaNet, FCOS, and ObjectBox. Despite their strengths, these methods are particularly susceptible to class imbalance, which can result in poor detection performance for less frequent classes. Popular solutions such as hard sampling, soft sampling, and sampling-free methods have been proposed to tackle this issue. However, these approaches often have inherent limitations, including sensitivity to hyperparameters and neglecting the gradient dynamics of the loss function. To address these challenges, this paper proposes Adaptive Focal Loss (AFL), which combines the strengths of Focal Loss (FL) and Class-Balanced Loss (CBL) while introducing an Adaptive Gradient Function. This function is specifically designed to mitigate the impact of large gradients during the early stages of training. Extensive experiments demonstrate that AFL significantly outperforms classical sampling methods across key metrics on the MS COCO, LVIS, and PASCAL VOC datasets. Notably, on the LVIS dataset, AFL achieves an average improvement of over 3% <inline-formula> <tex-math notation="LaTeX">$AP_{r}$ </tex-math></inline-formula> compared to the baseline Focal Loss across multiple keypoint-based detectors, showcasing its effectiveness in enhancing rare class accuracy. Furthermore, AFL delivers substantial improvements in the <inline-formula> <tex-math notation="LaTeX">$AP_{0.5\sim 0.95}$ </tex-math></inline-formula> metric, surpassing the baseline Focal Loss by an average of over 2%, 1%, and 0.2% on the LVIS, MS COCO, and PASCAL VOC datasets, respectively. This highlights AFL&#x2019;s capability to enhance the overall accuracy of foreground objects. By providing a more balanced and robust solution to class imbalance, AFL demonstrates superior performance in challenging scenarios, making it a valuable advancement in keypoint-based detection.
format Article
id doaj-art-0850e11013cd4fb7aeb968796871b199
institution OA Journals
issn 2169-3536
language English
publishDate 2025-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj-art-0850e11013cd4fb7aeb968796871b1992025-08-20T02:14:56ZengIEEEIEEE Access2169-35362025-01-0113318423185610.1109/ACCESS.2025.353891710872927Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class ImbalanceZhihao Su0https://orcid.org/0009-0002-1238-3929Afzan Adam1https://orcid.org/0000-0003-1116-1005Mohammad Faidzul Nasrudin2Center for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, Bangi, Selangor, MalaysiaCenter for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, Bangi, Selangor, MalaysiaCenter for Artificial Intelligence Technology, Faculty of Information Science and Technology, Universiti Kebangsaan Malaysia, Bangi, Selangor, MalaysiaKeypoint-based deep learning detectors have proven highly effective in object detection tasks by predicting specific keypoints to determine object classification and location. Examples include CornerNet, CenterNet, ExtremeNet, RetinaNet, FCOS, and ObjectBox. Despite their strengths, these methods are particularly susceptible to class imbalance, which can result in poor detection performance for less frequent classes. Popular solutions such as hard sampling, soft sampling, and sampling-free methods have been proposed to tackle this issue. However, these approaches often have inherent limitations, including sensitivity to hyperparameters and neglecting the gradient dynamics of the loss function. To address these challenges, this paper proposes Adaptive Focal Loss (AFL), which combines the strengths of Focal Loss (FL) and Class-Balanced Loss (CBL) while introducing an Adaptive Gradient Function. This function is specifically designed to mitigate the impact of large gradients during the early stages of training. Extensive experiments demonstrate that AFL significantly outperforms classical sampling methods across key metrics on the MS COCO, LVIS, and PASCAL VOC datasets. Notably, on the LVIS dataset, AFL achieves an average improvement of over 3% <inline-formula> <tex-math notation="LaTeX">$AP_{r}$ </tex-math></inline-formula> compared to the baseline Focal Loss across multiple keypoint-based detectors, showcasing its effectiveness in enhancing rare class accuracy. Furthermore, AFL delivers substantial improvements in the <inline-formula> <tex-math notation="LaTeX">$AP_{0.5\sim 0.95}$ </tex-math></inline-formula> metric, surpassing the baseline Focal Loss by an average of over 2%, 1%, and 0.2% on the LVIS, MS COCO, and PASCAL VOC datasets, respectively. This highlights AFL&#x2019;s capability to enhance the overall accuracy of foreground objects. By providing a more balanced and robust solution to class imbalance, AFL demonstrates superior performance in challenging scenarios, making it a valuable advancement in keypoint-based detection.https://ieeexplore.ieee.org/document/10872927/Deep learning algorithmobject detectionkeypoint-based deep learning detectorclass imbalancesampling method
spellingShingle Zhihao Su
Afzan Adam
Mohammad Faidzul Nasrudin
Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
IEEE Access
Deep learning algorithm
object detection
keypoint-based deep learning detector
class imbalance
sampling method
title Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
title_full Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
title_fullStr Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
title_full_unstemmed Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
title_short Adaptive Focal Loss for Keypoint-Based Deep Learning Detectors Addressing Class Imbalance
title_sort adaptive focal loss for keypoint based deep learning detectors addressing class imbalance
topic Deep learning algorithm
object detection
keypoint-based deep learning detector
class imbalance
sampling method
url https://ieeexplore.ieee.org/document/10872927/
work_keys_str_mv AT zhihaosu adaptivefocallossforkeypointbaseddeeplearningdetectorsaddressingclassimbalance
AT afzanadam adaptivefocallossforkeypointbaseddeeplearningdetectorsaddressingclassimbalance
AT mohammadfaidzulnasrudin adaptivefocallossforkeypointbaseddeeplearningdetectorsaddressingclassimbalance