中国安全科学学报 ›› 2026, Vol. 36 ›› Issue (10): 167-173.doi: 10.16265/j.cnki.issn1003-3033.2026.10.0319

• 安全技术与工程 • 上一篇    下一篇

基于改进YOLOv5的安全帽佩戴轻量级检测算法

刘铁超(), 孙超, 王博**(), 姚立超   

  1. 哈尔滨理工大学 测控技术与通信工程学院, 黑龙江 哈尔滨 150080
  • 收稿日期:2026-04-22 修回日期:2026-07-10 出版日期:2026-10-28
  • 通信作者:
    **王博(1989—),男,黑龙江哈尔滨人,博士,副教授,主要从事安全检测技术方面的研究。E-mail:。
  • 作者简介:

    刘铁超 (1990—),男,黑龙江哈尔滨人,博士研究生,研究方向为计算机视觉与目标检测、智能传感与信息处理。E-mail:。

    孙 超 副教授

Lightweight detection algorithm for safety helmet wearing based on improved YOLOv5

Liu Tiechao(), Sun Chao, Wang Bo**(), Yao Lichao   

  1. School of Measurement and Communication Engineering, Harbin University of Science and Technology, Harbin Heilongjiang 150080, China
  • Received:2026-04-22 Revised:2026-07-10 Published:2026-10-28

摘要:

为解决当前安全帽检测算法参数量大、内存占用高及推理速度慢等问题,提出一种基于改进YOLOv5的轻量化目标检测算法,首先,采用MobileNetV3-C3模块替换原主干网络中的C3模块,降低算法参数量与计算复杂度;其次,构建双向特征金字塔网络(BiFPN)结构替换原特征融合阶段的路径聚合网络结构,重组多尺度特征融合路径;最后,引入加权交并比(WIoU)替换完整交并比(CIoU),降低劣质锚框对高质量锚框的影响。结果表明:改进后算法的参数量下降至2.750 632 MB,推理时间缩短至1.2 ms,检测精度达95.2%,适用于硬件资源受限场景下的安全帽检测任务。

关键词: YOLOv5, 安全帽佩戴, 轻量级, 检测算法, 双向特征金字塔网络(BiFPN), 加权交并比(WIoU)

Abstract:

To address the problems of large parameter volume, high memory consumption, and slow inference speed in current detection algorithms for safety helmet wearing, a lightweight object detection algorithm based on improved YOLOv5 was proposed. First, the MobileNetV3-C3 module was adopted. It replaced the C3 structure in the original backbone network, reducing the parameter volume and computational complexity of the algorithm. Second, a BiFPN structure was constructed. It replaced the Path Aggregation Network structure in the original feature fusion stage, restructuring the multi-scale feature fusion paths. Finally, a WIoU was introduced. It replaced complete intersection over union (CIoU), reducing the impact of low-quality anchor boxes on high-quality anchor boxes. The results show that the parameter volume of the improved algorithm is decreased to 2.750 632 MB. The inference time is shortened to 1.2 ms, and the detection accuracy reaches 95.2%. The improved algorithm is suitable for safety helmet wearing detection tasks in hardware resource-constrained scenarios.

Key words: YOLOv5, safety helmet wearing, lightweight, detection algorithm, bidirectional feature pyramid network (BiFPN), weighted intersection over union (WIoU)

中图分类号: