计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (6): 78-88.DOI: 10.3778/j.issn.1002-8331.2308-0029

• 目标检测专题 • 上一篇    下一篇

基于YOLOv5的轻量级雾天目标检测方法

赖镜安,陈紫强,孙宗威,裴庆祺   

  1. 1.桂林电子科技大学 信息与通信学院,广西 桂林 541000
    2.西安电子科技大学 通信工程学院,西安 710126
  • 出版日期:2024-03-15 发布日期:2024-03-15

Lightweight Foggy Weather Object Detection Method Based on YOLOv5

LAI Jing’an, CHEN Ziqiang, SUN Zongwei, PEI Qingqi   

  1. 1.School of Information and Communication, Guilin University of Electronic Technology, Guilin, Guangxi 541000, China
    2.School of Communication Engineering, Xidian University, Xi’an 710126, China
  • Online:2024-03-15 Published:2024-03-15

摘要: 针对雾天场景下目标检测算法精度较低、模型复杂度较高,提出一种基于YOLOv5的轻量级雾天目标检测方法。采用感受野注意力模块(RFAblock)通过交互感受野特征信息,对感受野添加注意力机制,提高特征提取能力;采用轻量化网络Slimneck作为颈部结构,在保持精度的同时降低模型参数和复杂度;在损失函数中引入真实框与预测框之间的角度向量,提高训练速度和推理的准确性;采用PNMS(precise non-maximum suppression)改进候选框选择机制,降低车辆遮挡情况下的漏检率。在真实雾天数据集RTTS和合成雾天数据集Foggy Cityscapes上进行测试,实验结果表明,与YOLOv5l相比mAP50分别提高了4.9和3.5个百分点,模型参数量仅为YOLOv5l的54.6%。

关键词: 目标检测, 深度学习, 雾天场景, 轻量化, 注意力机制

Abstract: Aiming at the low accuracy and high model complexity of object detection algorithms in foggy scenes, a lightweight foggy object detection method based on YOLOv5 is proposed. Firstly, this paper adopts the receptive field attention module (RFAblock) to add an attention mechanism to the receptive field by interacting with the receptive field feature information to improve the feature extraction ability. Secondly, the lightweight network Slimneck is used as the neck structure to reduce the model parameters and complexity while maintaining the accuracy. The angle vector between the real frame and the predicted frame is introduced in the loss function to improve the training speed and inference accuracy. PNMS (precise non-maximum suppression) is used to improve the candidate frame selection mechanism and reduce the leakage detection rate in the case of vehicle occlusion. Finally, the experimental results are tested on the real foggy day dataset RTTS and the synthetic foggy day dataset Foggy Cityscapes, and the experimental results show that the mAP50 is improved by 4.9 and 3.5 percengtage points, respectively, compared with YOLOv5l, and the number of model parameters is only 54.6% of that of YOLOv5l.

Key words: object detection, deep learning, foggy scenes, lightweight, attention mechanism