Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Jun 22;23(13):5824.
doi: 10.3390/s23135824.

Research on Safety Helmet Detection Algorithm Based on Improved YOLOv5s

Affiliations

Research on Safety Helmet Detection Algorithm Based on Improved YOLOv5s

Qing An et al. Sensors (Basel). .

Abstract

Safety helmets are essential in various indoor and outdoor workplaces, such as metallurgical high-temperature operations and high-rise building construction, to avoid injuries and ensure safety in production. However, manual supervision is costly and prone to lack of enforcement and interference from other human factors. Moreover, small target object detection frequently lacks precision. Improving safety helmets based on the helmet detection algorithm can address these issues and is a promising approach. In this study, we proposed a modified version of the YOLOv5s network, a lightweight deep learning-based object identification network model. The proposed model extends the YOLOv5s network model and enhances its performance by recalculating the prediction frames, utilizing the IoU metric for clustering, and modifying the anchor frames with the K-means++ method. The global attention mechanism (GAM) and the convolutional block attention module (CBAM) were added to the YOLOv5s network to improve its backbone and neck networks. By minimizing information feature loss and enhancing the representation of global interactions, these attention processes enhance deep learning neural networks' capacity for feature extraction. Furthermore, the CBAM is integrated into the CSP module to improve target feature extraction while minimizing computation for model operation. In order to significantly increase the efficiency and precision of the prediction box regression, the proposed model additionally makes use of the most recent SIoU (SCYLLA-IoU LOSS) as the bounding box loss function. Based on the improved YOLOv5s model, knowledge distillation technology is leveraged to realize the light weight of the network model, thereby reducing the computational workload of the model and improving the detection speed to meet the needs of real-time monitoring. The experimental results demonstrate that the proposed model outperforms the original YOLOv5s network model in terms of accuracy (Precision), recall rate (Recall), and mean average precision (mAP). The proposed model may more effectively identify helmet use in low-light situations and at a variety of distances.

Keywords: K-means++; SIoU; YOLOv5; combinatorial attention mechanisms; detection; knowledge distillation.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
Overall framework diagram of the proposed method.
Figure 2
Figure 2
Different target detection algorithms are used for small targets with complex backgrounds in real images and actual detection effect pictures. (a) The detection effect diagram of the SSD model. (b) The detection effect diagram of the Fast R-CNN model. (c) The detection effect diagram of the Faster R-CNN model. (d) The detection effect diagram of the YOLOv5s model.
Figure 3
Figure 3
YOLOv5s network structure.
Figure 4
Figure 4
Intersection and comparison schematic diagram.
Figure 5
Figure 5
CBAM attention module.
Figure 6
Figure 6
GAM attention module in our proposed method.
Figure 7
Figure 7
Comparison of model thermal map feature visualization output before and after adding attention mechanism. (a) Original YOLOv5s model. (b) Model after adding the combined attention mechanism.
Figure 8
Figure 8
Effect of the angular factors on the loss function.
Figure 9
Figure 9
Schematic diagram of knowledge distillation process.
Figure 10
Figure 10
Loss comparison between this paper’s methodology with YOLOv5s. (a) Box_Loss comparison diagram of training results. (b) Cls_Loss comparison diagram of training results. (c) Obj_Loss comparison diagram of training results.
Figure 11
Figure 11
Training results for the different methods. (a) YOLOv5s model. (b) YOLOv5s-Improved model.
Figure 12
Figure 12
Schematic comparison of actual detection effect of different detection algorithms in outdoor environment. (a) The detection effect diagram of the SSD model. (b) The detection effect diagram of the Faster R-CNN model. (c) The detection effect diagram of the YOLOv5s model. (d) The detection effect diagram of the YOLOv6s model. (e) The YOLOv7-w6 model detection effect diagram. (f) The YOLOv5s-Improved model detection effect diagram.
Figure 13
Figure 13
Comparison of different detection algorithms’ real detection results in darkened situations. (a) The detection effect diagram of the SSD model. (b) The detection effect diagram of the Faster R-CNN model. (c) The detection effect diagram of the YOLOv5s model. (d) The detection effect diagram of the YOLOv6s model. (e) The YOLOv7-w6 model detection effect diagram. (f) The YOLOv5s-Improved model detection effect diagram.
Figure 14
Figure 14
Comparison of the actual detection effect of different detection algorithms in indoor environment. (a) The detection effect diagram of the SSD model. (b) The detection effect diagram of the Faster R-CNN model. (c) The detection effect diagram of the YOLOv5s model. (d) The detection effect diagram of the YOLOv6s model. (e) The YOLOv7-w6 model detection effect diagram. (f) The YOLOv5s-Improved model detection effect diagram.

Similar articles

Cited by

References

    1. Liu P., Li Q., Bian J., Song L., Xiahou X. Using Interpretative Structural Modeling to Identify Critical Success Factors for Safety Management in Subway Construction: A China Study. Int. J. Environ. Res. Public Health. 2018;15:1359. doi: 10.3390/ijerph15071359. - DOI - PMC - PubMed
    1. Jia W., Xu S., Liang Z., Zhao Y., Min H., Li S., Yu Y. Real-time automatic helmet detection of motorcyclists in urban traffic using improved YOLOv5 detector. IET Image Process. 2021;15:3623–3637. doi: 10.1049/ipr2.12295. - DOI
    1. Kartik B., Manimaran P. IOT based Smart Helmet for Hazard Detection in mining industry. arXiv. 20232304.10156
    1. Zhang C., Liu H., Deng Y., Xie B., Li Y. TokenHPE: Learning Orientation Tokens for Efficient Head Pose Es-timation via Transformers; Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); Vancouver, BC, Canada. 18–22 June 2023; pp. 8897–8906.
    1. Liu H., Zhang C., Deng Y., Xie B., Liu T., Zhang Z., Li Y.-F. TransIFC: Invariant Cues-aware Feature Concentration Learning for Efficient Fine-grained Bird Image Classification. IEEE Trans. Multimed. 2023:1–14. doi: 10.1109/TMM.2023.3238548. - DOI

LinkOut - more resources