计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (1): 74-83.DOI: 10.3778/j.issn.1002-8331.2305-0312

• YOLO系列改进及应用专题 • 上一篇    下一篇

改进YOLOv7-tiny的轻量级红外车辆目标检测算法

许晓阳,高重阳   

  1. 西安科技大学 计算机科学与技术学院,西安 710054
  • 出版日期:2024-01-01 发布日期:2024-01-01

Improved YOLOv7-tiny Lightweight Infrared Vehicle Target Detection Algorithm

XU Xiaoyang, GAO Chongyang   

  1. School of Computer Science and Technology, Xi’an University of Science and Technology, Xi’an 710054, China
  • Online:2024-01-01 Published:2024-01-01

摘要: 为了解决红外场景下车辆检测算法参数量与计算量大、识别精度低、小目标检测难度大的问题,提出了一种改进YOLOv7-tiny的轻量级红外车辆目标检测算法:KD-YOLO-DW。通过融合深度可分离卷积提出了ELAN-DW模块,极大地降低了网络参数量与计算量。通过在特征融合层引入GhostNet V2模块,提高了不同尺度特征的融合能力。采用动态非单调FM的WIoU损失函数,解决了红外数据集难易样本不平衡的问题,提高了轻量级算法对红外弱小目标的检测能力。联合残差思想提出跨尺度融合策略,提高了轻量级算法对不同尺度目标的检测效果,降低了小目标的漏检率。通过知识蒸馏对轻量化模型再次浓缩,进一步提高了模型对检测红外目标的准确性。实验结果表明,KD-YOLO-DW模型在参数量与计算量方面分别较YOLOv7-tiny模型下降了24.6%和16.7%,模型大小仅为9.2 MB,mAP分别提高了3.27和3.15个百分点,拥有更小的模型体积与更好的检测效果。

关键词: 红外目标检测, 轻量级, 知识蒸馏, 损失函数, YOLOv7-tiny, GhostNet V2

Abstract: In order to solve the problems of large number of parameters and computation, low recognition accuracy, and difficult small target detection in infrared scene, a lightweight infrared vehicle target detection algorithm with improved YOLOv7-tiny is proposed: KD-YOLO-DW. Firstly, the ELAN-DW module is proposed by merging deep separable convolution, which greatly reduces the number of network parameters and the amount of computation. Secondly, by introducing GhostNet V2 module in the feature fusion layer, the fusion ability of different scale features is improved. The WIoU loss function of dynamic non-monotone FM is used to solve the problem of imbalanced samples in the infrared data set, and the detection ability of the lightweight algorithm is improved. Then, a cross-scale fusion strategy is proposed in combination with residual idea, which improves the detection effect of lightweight algorithm on different scale targets and reduces the missing rate of small targets. Finally, the lightweight model is reconcentrated by knowledge distillation, which further improves the accuracy of the model for detecting infrared targets. The experimental results show that compared with the YOLOv7-tiny model, KD-YOLO-DW model has 24.6% and 16.7% fewer parameters and 16.7% less computation, the model size is only 9.2 MB, and mAP is increased by 3.27 and 3.15 percentage points, respectively, with smaller model volume and better detection effect.

Key words: infrared target detection, lightweight, knowledge distillation, loss function, YOLOv7-tiny, GhostNet V2