计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (10): 196-203.DOI: 10.3778/j.issn.1002-8331.2211-0017

• 图形图像处理 • 上一篇    下一篇

运动场景下改进YOLOv5小目标检测算法

朱瑞鑫,杨福兴   

  1. 北京邮电大学 人工智能学院,北京 100876
  • 出版日期:2023-05-15 发布日期:2023-05-15

Improved YOLOv5 Small Object Detection Algorithm in Moving Scenes

ZHU Ruixin, YANG Fuxing   

  1. School of Artificial Intelligence, Beijing University of Posts and Telecommunications, Beijing 100876, China
  • Online:2023-05-15 Published:2023-05-15

摘要: 针对运动场景下由于设备移动、相机散焦,导致采集到的图像模糊,图像质量低,以及目标体积小,使目标检测困难的问题,提出了一种改进YOLOv5x目标实时检测模型。采用可变形卷积网络替换部分原始YOLOv5x中传统的卷积层,增强模型在运动场景中细粒度特征提取和小目标检测能力;增加SE注意力机制,解决在卷积过程中,因丢失图像全局上下文信息,造成特征损失的问题,提高了模型在图像模糊情况下小目标的检测精度;引入一种新的边界框回归损失函数SIoU Loss,解决了预测框在回归时随意匹配的问题,提高了模型鲁棒性和泛化能力,加快网络的收敛速度。实验结果表明,相比于YOLOv5x模型,将改进后的算法应用在水下移动机器人生物检测中,模型准确率[P、]召回率[R、]各类平均精度mAP分别提升了5.90个百分点、5.85个百分点、4.38个百分点,有效增强了小目标检测模型的检测性能。

关键词: 可变形卷积网络, 注意力机制, SIoU Loss, YOLOv5x

Abstract: For the problems of blurred images and low image quality due to the movement of devices and camera scattering in motion scenes, as well as the small size of the object, which make object detection difficult, an improved YOLOv5x object detection model in real time is proposed. Firstly, deformable convolutional network is used to replace part of the traditional convolution layer in the original YOLOv5x to enhance the model’s ability of fine-grained feature extraction and small object detection in motion scenes. Secondly, the SE attention mechanism is added to solve the problem of feature loss caused by the loss of global context information in the process of convolution, which improves the detection accuracy of small objects in the case of image blur. Finally, a new bounding box regression loss function, SIoU Loss, is introduced to solve the problem of random matching of prediction boxes in regression, improve the robustness and generalization ability of the model, and accelerate the convergence speed of the network. The experimental results show that compared with the YOLOv5x model, the improved algorithm is applied to underwater mobile robot biological detection, and the improved model accuracy [P,] recall rate [R] and average accuracy mAP are improved by 5.90 percentage points, 5.85 percentage points and 4.38 percentage points, respectively, which effectively enhances the detection performance of the small object detection model.

Key words: deformable convolutional network, attention mechanism, SIoU Loss, YOLOv5x