计算机与现代化 ›› 2023, Vol. 0 ›› Issue (05): 100-105.

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

基于改进YOLOv5的小目标检测方法

  

  1. (1.四川轻化工大学自动化与信息工程学院,四川 宜宾 644000; 2.人工智能四川省重点实验室,四川 宜宾 644000)
  • 出版日期:2023-06-06 发布日期:2023-06-06
  • 作者简介:王艺成(1998—),男,四川邛崃人,硕士研究生,研究方向:计算机视觉,E-mail: 2397096061@qq.com; 张国良(1970—),男,四川金堂人,教授,博士,研究方向:先进控制理论,组合导航,机器人技术,E-mail: zhgl@sohu.com; 张自杰(1996—),男,四川自贡人,硕士研究生,研究方向:机器人技术,E-mail: 1270060287@qq.com。
  • 基金资助:
    四川省应用基础研究项目(2019YJO413); 四川轻化工大学基础研究项目(E10402733)

Small Object Detection Method Based on Improved YOLOv5

  1. (1. School of Automation and Information Engineering, Sichuan University of Science & Engineering, Yibin 644000, China;
    2. Artificial Intelligence Key Laboratory of Sichuan Province, Yibin 644000, China)
  • Online:2023-06-06 Published:2023-06-06

摘要: 为了解决传统YOLOv5目标检测算法在检测小目标时存在检测精度不高和漏检的问题,提出一种基于改进YOLOv5的小目标检测方法。首先,为了使Anchor Box能更好地适应小目标,在K-means聚类过程中,使用IOU(Interp Over Union)替换原始使用的欧几里得距离公式,重新定义Anchor Box和Ground Truth之间的距离;其次,在空间金字塔池化(Spatial Pyarmid Pooling, SPP)上增加一个池化核大小为3×3的最大池化,提高对小目标的检测精度;最后,制作一个包含多种小型目标的数据集以验证算法性能。实验结果表明:改进YOLOv5算法的验证平均精度(mean Average Precision, mAP)达到76.92%,与经典YOLOv5算法相比提升了3.56个百分点,检测效果有所提升且能检测出漏检目标。

关键词: 小目标检测, YOLOv5, K-means聚类, 空间金字塔池化, 平均精度

Abstract: In order to solve the problems of low detection accuracy and missing detection in traditional YOLOv5 object detection algorithm, a small object detection method based on improved YOLOv5 was proposed. Firstly, to make anchor box better adapt to small targets, IOU (interp over union) is used to replace the Euclidean distance formula originally used in the K-means clustering process to redefine the distance between anchor box and ground truth. Secondly, a maximum pooling of 3×3 kernel size is added to spatial pyarmid pooling (SPP) to improve the detection accuracy of small targets. Finally, a data set containing a variety of small object is designed to verify the algorithm performance. Experimental results show that the mean average precision (mAP) of the improved YOLOv5 algorithm reaches 76.92%, which is 3.56 percentage points higher than that of the classical YOLOV5 algorithm. The detection performence is improved and missed object can be detected.

Key words: small object detection, YOLOv5, K-means clustering, spatial pyramid pooling, mean average precision