吉林大学学报(信息科学版) ›› 2025, Vol. 43 ›› Issue (3): 591-597.

• • 上一篇    下一篇

改进的YOLOv5s 模型及应用

任伟建1, 李子昊1, 任  璐2, 张永丰3   

  1. 1. 东北石油大学 电气信息工程学院,黑龙江大庆163318;2. 海洋石油工程股份有限公司海洋工程技术中心, 天津300450; 3. 大庆油田有限责任公司 第二采油厂,黑龙江大庆163414
  • 收稿日期:2024-05-13 出版日期:2025-06-19 发布日期:2025-06-19
  • 作者简介:任伟建(1963— ), 女, 黑龙江泰来人, 东北石油大学教授, 博士生导师, 主要从事油气集输过程故障诊断研究, (Tel) 86-15765988699(E-mail)1064619284@ qq. com。
  • 基金资助:
    国家自然科学基金资助项目(61933007); 河北省自然科学基金面上资助项目(D2022107001)

Improved YOLOv5s Model and Its Application

REN Weijian1, LI Zihao1, REN Lu2, ZHANG Yongfeng3   

  1. 1. School of Electrical and Information Engineering, Northeast Petroleum University, Daqing 163318, China; 2. Marine Engineering Technology Center, Offshore Oil Engineering Company Limited, Tianjin 300450, China; 3. No.2 Oil Production Plant, Daqing Oilfield Company Limited, Daqing 163414, China
  • Received:2024-05-13 Online:2025-06-19 Published:2025-06-19

摘要: 针对电动自行车头盔佩戴检测存在小目标漏检、 准确率低的问题, 提出一种基于YOLOv5s(You Only Look Once version 5 small)的改进电动车头盔检测算法。 在主干网络中引入CBAM(Convolutional Block Attention Module)卷积注意力机制, 以提升对聚集目标的关注, 解决因遮挡导致的检测效果差的问题; 将颈部网络中的 FPN(Feature Pyramid Network)+PAN(Path Aggregation Network)结构改为结合了跨尺度特征融合方法思想的特征 融合结构,增强模型不同方向上的多尺度融合能力,使目标多尺度特征有效融合,提升对小目标的识别能力; 使用SIoU(Structured Intersection over Union)定位损失函数代替CIoU(Complete Intersection over Union)损失函数, 以提高边框回归精度。 实验结果表明,改进后的YOLOv5s模型准确率P和召回率R分别为94.7%91.2%, 平均精度值mAP95.6%, 相较于原始YOLOv5s模型分别提升6%7%6.5%。 该方法使电动自行车头盔 佩戴检测准确率得到了明显提升。

关键词: 电动车头盔, YOLOv5s, 目标检测, CBAM注意力机制, BiFPN网络

Abstract: A modified detection algorithm of electric bicycle helmet based on YOLOv5s(You Only Look Once version 5 small) is proposed to address the issues of small target missed detection and low accuracy in electric bicycle helmet wearing detection. CBAM ( Convolutional Block Attention Module) is introduced into the backbone network enhancing attention to clustered targets and effectively solving the problem of poor detection performance caused by occlusion. The PANet structure in the neck network is changed to a feature fusion structure that combines the idea of cross-scale feature fusion network (BiFPN: Bidirectional Feature Pyramid Network) enhances the multi-scale fusion ability of the model in different directions and effectively fuses multi- scale features of the target. Using SIoU(Structured Intersection over Union)localization loss function instead of CIoU(Complete Intersection over Union)loss function improves the accuracy of bounding box regression. The experimental results show that the accuracy P and recall R of the improved YOLOv5s model are 94. 7% and 91. 2%, respectively, and the average accuracy value mAP is 95. 6%, which is 6%,7%, and 6. 5% higher than that of the original YOLOv5s model, respectively. The method has significantly improved the accuracy of electric bicycle helmet wearing detection.

Key words: electric bicycle helmet, YOLOv5s, object detection, convolutional block attention module (CBAM)attention mechanism, bidirectional feature pyramid network (BiFPN)

中图分类号: 

  • TP391