CGDE-YOLOv5n: a real-time safety helmet-wearing detection algorithm - Luo, Wanbo; Mohd Yassin, Ahmad Ihsan; Mohd Shariff, Khairul Khaizi; Raju, Rajeswari (Indonesian Journal of Electrical Engineering and Computer Science, 2025)
Due to numerous parameters and calculations, existing safety helmetwearing detection models are challenging to deploy on embedded devices. Therefore, this paper proposed a you only look once (YOLO) v5n-based lightweight detection algorithm called CGDE-YOLOv5n to address the shortcomings in the following areas: (i) the YOLOv5n algorithm was selected to minimize the model’s parameters and calculations, reducing the hardware cost. (ii) The convolutional block attention module (CBAM) was integrated into the backbone to enhance the network’s feature extraction capability. (iii) The neck was improved using the efficient re-parameterized generalized feature pyramid network (efficient RepGFPN) to enhance the multi-scale object detection capability. (iv) The C3 module was improved using the deformable ConvNets v2 (DCNv2) module to enhance the network’s adaptability to geometric changes of objects. (v) The complete intersection over union (CIoU) loss was replaced with focal-efficient IoU (focal-EIoU) loss to reduce the missed detection rate. Experimental results demonstrated that the customized gradient descent estimation (CGDE)- YOLOv5n achieved a mean average precision (mAP) 50 of 89.5% and recall of 84%, which is 1% and 0.8% higher than the YOLOv5n. In particular, the recall of workers not wearing safety helmets increased by 1.7%. Furthermore, the improved model achieved a detection speed of 68.5 frames per second (FPS), meeting the real-time requirements.