计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (20): 189-197.DOI: 10.3778/j.issn.1002-8331.2312-0100

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

改进YOLOv7的航拍图像目标检测

崔丽群,曹华维   

  1. 辽宁工程技术大学 软件学院,辽宁 葫芦岛 125105
  • 出版日期:2024-10-15 发布日期:2024-10-15

Object Detection Based on Improved YOLOv7 for UAV Aerial Image

CUI Liqun, CAO Huawei   

  1. College of Software, Liaoning Technical University, Huludao, Liaoning 125105, China
  • Online:2024-10-15 Published:2024-10-15

摘要: 针对无人机航拍图像中尺度变化、小目标且密集遮挡情况导致检测精度降低的问题,提出一种改进YOLOv7的航拍图像目标检测算法。设计一种联合动态卷积的加权采样模块,从多个维度捕捉特征,提高模型特征提取能力;增加浅层特征检测头,保留更多的细节信息,增强对小目标特征的利用能力;在特征融合部分构建一种具有残差结构的多尺度特征聚合模块(C2-Res2Block),使模型融合丰富的多尺度信息。使用MPDIoU度量替换传统IOU计算边界回归损失,提高模型对密集遮挡目标的定位能力。通过在无人机航拍数据集VisDrone2019上进行实验表明,改进后的算法较原模型mAP@0.5提高了4.3个百分点,mAP@0.5:0.95提高了2.4个百分点,参数量减少了6.81×106,与目前主流的目标检测算法相比也取得更高的检测精度,有效提高了对无人机航拍图像的检测精度,并明显改善对航拍目标的误检和漏检情况。

关键词: 目标检测, YOLOv7, 动态卷积, 检测头, C2-Res2Block, MPDIoU

Abstract: An improved YOLOv7 aerial image object detection algorithm is proposed to solve the problems of low detection accuracy caused by mesoscale changes, small targets and dense occlusion in UAV aerial images. Firstly, a weighted sampling module with joint dynamic convolution is designed to capture features from multiple dimensions and improve the feature extraction ability of the model. Secondly, add a shallow feature detection head to retain more detailed information and enhance the ability to utilize small target features. Then, a multi-scale feature aggregation module (C2-Res2Block) with residual structure is constructed in the feature fusion part to make the model fuse rich multi-scale information. Finally, the MPDIoU measure is used to replace the traditional IOU to calculate the boundary regression loss and improve the localization ability of the model to the densely occluding target. Experiments on UAV aerial photography data set VisDrone2019 show that the improved algorithm is 4.3 percentage points higher than the original model on mAP@0.5, 2.4 percentage points on mAP@0.5:0.95, the number of parameters is reduced by 6.81×106, and the detection accuracy is higher than the current mainstream object detection algorithms. It effectively improves the detection accuracy of UAV aerial images, and obviously improves the false detection and missing detection of aerial objects.

Key words: object detection, YOLOv7, dynamic convolution, detection head, C2-Res2Block, MPDIoU