Abstract:
To address the challenge of low detection accuracy in existing safety helmet detection algorithms, particularly in scenarios with small targets, dense environments, and complex surroundings like construction sites, tunnels, and coal mines, we introduce an enhanced object detection approach, denoted as YOLOv5-GBCW. Our methodology includes several key innovations. First, we apply Ghost convolution to overhaul the backbone network, considerably reducing model complexity, decreasing computational requirements by 48.73%, and reducing model size by 45.84% while maintaining high accuracy with only a 1.6 percentage point reduction. Second, we employ a two-way feature pyramid network (BiFPN) to enhance feature fusion, providing distinct weights to objects of varying scales. This empowers our algorithm to excel in detecting small targets. We incorporate a leap-layer connection strategy for cross-scale weight suppression and feature expression, further enhancing object detection performance. In addition, we introduce the coordinate attention module to allocate attention resources to key areas, minimizing background interference in complex environments. Finally, we propose the Beta-WIoU border loss function, employing a dynamic non-monotonic focusing mechanism to reduce the impact of simple examples on loss values. This enables the model to prioritize challenging examples like occlusions, enhancing generalization performance. We also introduce anchor box feature calculations to improve prediction accuracy and expedite model convergence. To validate our algorithm’s feasibility, we use a dataset of 7000 images collected by our research group featuring safety helmets in construction sites, tunnels, mines, and various other scenarios. We conduct comparisons with classic algorithms, including Faster RCNN, SSD, YOLOv3, YOLOv4, and YOLOv5s, along with algorithms from relevant literature. We employ adaptive Gamma transformation for image preprocessing during training to facilitate subsequent detection. Ablation experiments systematically investigate the contributions of each improvement module. Our experimental findings demonstrate that, compared to the YOLOv5s algorithm, our improved YOLOv5-GBCW achieves a remarkable average accuracy improvement of 5.8% at IOU=0.5, reaching 94.5% while maintaining a detection speed of 124.6 FPS(Frames per second). This results in a lighter model with faster convergence, considerably enhancing its detection capabilities in complex, dense, and small target environments while meeting the stringent requirements for helmet detection accuracy and real-time performance. This work introduces a novel approach for detecting safety helmets in intricate construction settings.