REG: Refined Generalized Focal Loss for Road Asset Detection on Thai Highways Using Vision-Based Detection and Segmentation Models
Teerapong Panboonyuen
TL;DR
The paper tackles road asset detection and segmentation on Thai highways, where extreme class imbalance and small object localization pose significant challenges. It introduces Refined Generalized Focal Loss (REG), augmenting Generalized Focal Loss with a spatial-contextual refinement term and probabilistic uncertainty modeling, integrated into a multi-task framework for simultaneous detection and segmentation. The methodology combines REG with joint optimization, propagation on Riemannian manifolds, Lagrangian dual calculations, proximal gradient steps, and variational inference to robustly train across tasks. Empirically, REG-based approaches achieve strong performance, with detection mAP50 around 80.34 and segmentation masks/boxes mAP50 values reaching up to about 90.1 and 91.2 respectively, indicating notable improvements over conventional losses. These results underscore REG’s potential to enhance road asset recognition, contributing to safer and more efficiently managed road infrastructure.
Abstract
This paper introduces a novel framework for detecting and segmenting critical road assets on Thai highways using an advanced Refined Generalized Focal Loss (REG) formulation. Integrated into state-of-the-art vision-based detection and segmentation models, the proposed method effectively addresses class imbalance and the challenges of localizing small, underrepresented road elements, including pavilions, pedestrian bridges, information signs, single-arm poles, bus stops, warning signs, and concrete guardrails. To improve both detection and segmentation accuracy, a multi-task learning strategy is adopted, optimizing REG across multiple tasks. REG is further enhanced by incorporating a spatial-contextual adjustment term, which accounts for the spatial distribution of road assets, and a probabilistic refinement that captures prediction uncertainty in complex environments, such as varying lighting conditions and cluttered backgrounds. Our rigorous mathematical formulation demonstrates that REG minimizes localization and classification errors by applying adaptive weighting to hard-to-detect instances while down-weighting easier examples. Experimental results show a substantial performance improvement, achieving a mAP50 of 80.34 and an F1-score of 77.87, significantly outperforming conventional methods. This research underscores the capability of advanced loss function refinements to enhance the robustness and accuracy of road asset detection and segmentation, thereby contributing to improved road safety and infrastructure management. For an in-depth discussion of the mathematical background and related methods, please refer to previous work available at \url{https://github.com/kaopanboonyuen/REG}.
