Scientific Reports (Dec 2023)

Detection of safety helmet and mask wearing using improved YOLOv5s

  • Shuangyuan Li,
  • Yanchang Lv,
  • Xiangyang Liu,
  • Mengfan Li

DOI
https://doi.org/10.1038/s41598-023-48943-3
Journal volume & issue
Vol. 13, no. 1
pp. 1 – 11

Abstract

Read online

Abstract With the advancement of society, ensuring the safety of personnel involved in municipal construction projects, particularly in the context of pandemic control measures, has become a matter of utmost importance. This paper introduces a security measure for municipal engineering, combining deep learning with object detection technology. It proposes a lightweight artificial intelligence (AI) detection method capable of simultaneously identifying individuals wearing masks and safety helmets. The method primarily incorporates the ShuffleNetv2 feature extraction mechanism within the framework of the YOLOv5s network to reduce computational overhead. Additionally, it employs the ECA attention mechanism and optimized loss functions to generate feature maps with more comprehensive information, thereby enhancing the precision of target detection. Experimental results indicate that this algorithm improves the mean average precision (mAP) value by 4.3%. Furthermore, it reduces parameter and computational loads by 54.8% and 53.8%, respectively, effectively striking a balance between lightweight operation and precision. This study serves as a valuable reference for research pertaining to lightweight target detection in the realm of municipal construction safety measures.