Enhancing Helmet Wear Detection with Integrated Upsampling and Attention Mechanism in YOLOv8n Algorithm
Ji Wu · 2024
Wearing a safety helmet can significantly decrease the likelihood of construction workers sustaining head injuries. This paper suggests an enhanced safety helmet detection algorithm using YOLOv8 (You Only Look Once) to improve accuracy in detecting small targets and complex environments, addressing the limitations of current algorithms. Firstly, Mosaic data augmentation techniques are employed to increase the dataset size through the application of cropping, rotation, and stitching. Following this, a Global Attention Mechanism (GAM) is integrated to enhance the network's capability for target detection by reducing data loss and improving global interaction representations. Finally, the DySample is used to replace the UpSample, reducing parameters while improving detection efficiency. The improved YOLOv8n model achieves a recall rate (R) and mAP50 of 92.96% and 96.56%, respectively, which are 1.85% and 1.78% higher than YOLOv8n. The improved YOLOv8 algorithm demonstrates good detection performance and can provide reference for the deployment and application of safety helmet detection devices.