计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (10): 203-213.DOI: 10.3778/j.issn.1002-8331.2405-0393

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

改进YOLOv7的小目标检测方法

冯泰梾,张雪松,宋存利,李光宇,金花   

  1. 大连交通大学 软件学院,辽宁 大连 116052
  • 出版日期:2025-05-15 发布日期:2025-05-15

Improved Small Object Detection Method of YOLOv7

FENG Tailai, ZHANG Xuesong, SONG Cunli, LI Guangyu, JIN Hua   

  1. School of Software, Dalian Jiaotong University, Dalian, Liaoning 116052, China
  • Online:2025-05-15 Published:2025-05-15

摘要: 针对小目标检测领域中的尺度变化、复杂背景干扰、漏检和误检等挑战性问题,提出了改进YOLOv7的小目标检测方法。在YOLOv7目标检测框架的基础上,加入了新的自适应特征收集再分配模块(adaptive feature collection and redistribution,AFCR)。该模块能够实现对多尺度特征的有效融合,从而增强模型对小目标的检测能力,并丰富输出特征的上下文信息。进一步地,运用特征蒸馏技术,使得学生模型能够从教师模型中学习关键特征表示,避免跨阶段的语义差异带来的负面影响,从而显著提升模型的泛化性和鲁棒性。在CCTSDB、FloW-Img和TinyPerson三个公开小目标检测数据集上的实验结果表明,提出的方法分别实现了96.4%、84.9%和33.0%的检测准确率,相较于原始YOLOv7方法,mAP@0.5分别提升了6.5、3.9和2.9个百分点。

关键词: 小目标检测, YOLOv7, 知识蒸馏, 多尺度特征融合

Abstract: Aiming at the challenging problems of scale variation, complex background interference, missed detection, and false detection in the field of small object detection, an improved YOLOv7 small object detection method is proposed. Based on the YOLOv7 object detection framework, a new adaptive feature collection and redistribution module (AFCR) is added, which can effectively fuse multi-scale features, enhance the detection ability of the model for small objects, and enrich the contextual information of output features. By utilizing feature distillation techniques, the student model can learn key feature representations from the teacher model, avoiding the negative impact of semantic differences across stages, thereby significantly improving the generalization and robustness of the model. The experimental results on three publicly available small object detection datasets, CCTSDB, FloW-Img and TinyPerson, show that the proposed method achieves detection accuracies of 96.4%, 84.9% and 33.0%, respectively. Compared with the original YOLOv7 method, mAP@0.5 increases by 6.5, 3.9 and 2.9 percentage points, respectively.

Key words: small object detection, YOLOv7, knowledge distillation, multi-scale feature fusion