中国安全科学学报 ›› 2022, Vol. 32 ›› Issue (5): 194-200.doi: 10.16265/j.cnki.issn1003-3033.2022.05.0714

• 职业卫生 • 上一篇    下一篇

改进YOLOv3的复杂施工环境下安全帽佩戴检测算法

赵红成1(), 田秀霞1, 杨泽森1, 白万荣2   

  1. 1 上海电力大学 计算机科学与技术系,上海 200090
    2 国网甘肃省电力公司电力科学研究院,甘肃 兰州 730070
  • 收稿日期:2021-12-11 修回日期:2022-03-12 出版日期:2022-08-17 发布日期:2022-11-28
  • 作者简介:

    赵红成 (1996—),男,江苏盐城人,硕士研究生,主要研究方向为安全工程、机器视觉。E-mail:

  • 基金资助:
    国家自然科学基金资助(61772327); 国网甘肃省电力公司电力科学研究院项目(H2019-275)

Safety helmet wearing detection algorithm in complex construction environment based on improved YOLOv3

ZHAO Hongcheng1(), TIAN Xiuxia1, YANG Zesen1, BAI Wanrong2   

  1. 1 School of Computer Science and Technology, Shanghai University of Electric Power, Shanghai 200090, China
    2 State Grid Gansu Electric Power Research Institute Gansu, Lanzhou Gansu 730070, China
  • Received:2021-12-11 Revised:2022-03-12 Online:2022-08-17 Published:2022-11-28

摘要:

为解决施工场所环境复杂导致的智能监控下安全帽佩戴检测准确率低及漏检等问题,提出一种改进YOLOv3的安全帽佩戴检测算法。采用Focal Loss专注困难正样本训练,提高模型在复杂环境下的鲁棒性;在原始网络基础上使用空间金字塔多级池化融合局部与整体特征,提高多尺度检测能力;引入注意力机制,将通道和空间注意力模块分别集成到YOLOv3的主干网络和检测层的残差结构中,使模型专注于安全帽特征学习;使用GIoU提高定位准确率,在复杂施工环境不同视觉条件下验证算法的有效性。结果表明:改进模型的平均精度达到88%,较原始模型提高13.3%,其中person及helmet的精度分别提高17.2%、9.5%,召回率分别提高15.3%、7.6%。

关键词: YOLOv3, 复杂施工环境, 安全帽佩戴, 检测算法, Focal Loss, 空间金字塔池化(SPP), 注意力机制, 并集上的广义交集(GIoU)

Abstract:

In order to address problems of inaccurate or failed detection of safety helmet wearing under intelligent monitoring due to complex environment in construction sites, an improved YOLOv3 detection algorithm was proposed. Focal Loss was adopted to train difficult positive samples so as to improve the model's robustness in complex environment. Then, its multi-scale detection capabilities were improved by using spatial pyramid multi-level pooling based on initial network. Thirdly, attention mechanism was introduced, and channel and spatial attention modules were respectively integrated into YOLOv3's backbone and residual structure of detection layer network, so that it would focus on helmet feature learning. Finally, GIoU was utilized to improve positioning accuracy, and the algorithm's effectiveness was verified under different visual conditions in a complex construction environment. The results show that the improved model's mean accuracy reaches 88%, 13.3% higher than the original one, among which the precision of person and helmet are increased by 17.2% and 9.5%, while recall rate is increased by 15.3% and 7.6%.

Key words: you only look once(YOLOv3), complex construction environment, helmet wearing, detection algorithm, Focal Loss, spatial pyramid pooling(SPP), attention mechanism, generalized intersection over union (GIoU)