计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (2): 191-199.DOI: 10.3778/j.issn.1002-8331.2307-0223

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

改进YOLOv5s的无人机视角下小目标检测算法

吴明杰,云利军,陈载清,钟天泽   

  1. 1.云南师范大学 信息学院,昆明 650500
    2.云南省教育厅计算机视觉与智能控制技术工程研究中心,昆明 650500
  • 出版日期:2024-01-15 发布日期:2024-01-15

Improved YOLOv5s Small Object Detection Algorithm in UAV View

WU Mingjie, YUN Lijun, CHEN Zaiqing, ZHONG Tianze   

  1. 1.School of Information, Yunnan Normal University, Kunming 650500, China
    2.Yunnan Provincial Department of Education Computer Vision and Intelligent Control Technology Engineering Research Center, Kunming 650500, China
  • Online:2024-01-15 Published:2024-01-15

摘要: 针对无人机飞行时与目标距离较远,被拍摄的目标大小有明显的差异且存在被物体遮挡等问题,提出一种基于YOLOv5s的无人机视角下小目标检测改进算法BD-YOLO。在特征融合网络中采用双层路由注意力(bi-level routing attention,BRA),其以动态稀疏的方式过滤特征图中最不相关的特征,保留部分重要区域特征,从而提高模型特征提取的能力;由于特征图经过多次下采样后会丢失大量位置信息和特征信息,因此采用一种结合注意力机制的动态目标检测头DyHead(dynamic head),该检测头通过尺度感知、空间感知和任务感知的三者统一,以实现更强的特征表达能力;使用Focal-EIoU损失函数,来解决YOLOv5s中CIoU Loss计算回归结果不准确的问题,从而提高模型对小型目标的检测精度。实验结果表明,在VisDrone2019-DET数据集上,BD-YOLO模型较YOLOv5s模型在平均精度(mAP@0.5)指标上提高了0.062,对比其他主流模型对于小目标的检测都有更好的效果。

关键词: 无人机视角, YOLOv5s, 小目标, 注意力机制, 损失函数

Abstract: Aiming at the problems such as the long distance between UAV and object in flight, the obvious difference in the size of the photographed object and the existence of object occlusion, an improved algorithm BD-YOLO based on YOLOv5s for small object detection under UAV perspective is proposed. In the feature fusion network, bi-level routing attention (BRA) is used to filter the least relevant features in the feature map in a dynamic sparse way, and retain some important regional features, so as to improve the feature extraction ability of the model. Since the feature map will lose a lot of location and feature information after multiple subsampled, a dynamic object detection head (DyHead) combining attention mechanism is adopted. The DyHead integrates scale perception, space perception and task perception to achieve stronger feature representation capability. Focal-EIoU Loss function is used to solve the problem of inaccurate regression results of CIoU Loss calculation in YOLOv5s, so as to improve the detection accuracy of the model for small object. The experimental results show that on the VisDrone2019-DET dataset, the BD-YOLO model has increased the mean average precision (mAP) index by 0.062 compared with the YOLOv5s model, and has better results for small object detection than other mainstream models.

Key words: unmanned aerial vehicle perspective, YOLOv5s, small object, attention mechanism, loss function