计算机技术与发展2023,Vol.33Issue(12) :163-170.DOI:10.3969/j.issn.1673-629X.2023.12.023

基于注意力机制的YOLOv5优化模型

YOLOv5 Optimization Model Based on Attention Mechanism

潘烨新 黄启鹏 韦超 杨哲
计算机技术与发展2023,Vol.33Issue(12) :163-170.DOI:10.3969/j.issn.1673-629X.2023.12.023

基于注意力机制的YOLOv5优化模型

YOLOv5 Optimization Model Based on Attention Mechanism

潘烨新 1黄启鹏 1韦超 1杨哲1
扫码查看

作者信息

  • 1. 苏州大学 计算机科学与技术学院,江苏 苏州 215006;省计算机信息处理技术重点实验室,江苏 苏州 215006
  • 折叠

摘要

目标检测是机器视觉研究中的重要分支.目前在工业生态中应用广泛的YOLOv5 模型经过版本迭代,在预测权重大小以及检测精度方面都有所优化,但模型的处理速度仍然较低,尤其是对于小目标及遮挡目标的检测效果有待改进.该文提出一种基于注意力机制的YOLO v5 改进模型.首先,通过引入维度关联注意力机制模块进行特征融合,提升主干网络的特征提取能力,达到改善小目标与遮挡目标的检测效果;其次,采用SIoU损失函数代替CIoU损失函数,作为新的边界框回归参数的损失函数,提高边界框的定位精度以及检测速度.实验结果显示,优化模型的平均精度均值达到87.8%,相比于YOLOv5 提高了4.7 百分点,在单GPU上模型的检测速度达到83.3 FPS.

Abstract

With the development of machine vision technology,target detection has become an important branch.At present,the YOLOv5 model,which is widely used in the industrial ecology,has undergone version iterations and has been optimized in terms of prediction weight and detection accuracy,but the processing speed of the model is still not high,especially for small targets and occluded objects.The detection effect needs to be improved.We propose an improved model of YOLO v5 based on attention mechanism.First of all,by introducing the dimension related attention mechanism module for feature fusion,the feature extraction ability of the backbone network is improved to improve the detection effect of small targets and occluded objects;secondly,the SIoU loss function is used instead of the CIoU loss function as a new bounding box regression parameter.The loss function improves the positioning accuracy and detection speed of the bounding box.The experimental results show that the average precision of the optimized model reaches 87.8%,which is 4.7 per-centage points higher than that of YOLO v5,and the detection speed of the model on a single GPU reaches83.3 FPS.

关键词

机器视觉/深度学习/目标检测/注意力机制/损失函数

Key words

computer vision/deep learning/object detection/attention mechanism/loss function

引用本文复制引用

基金项目

国家自然科学基金资助项目(62002253)

教育部产学合作协同育人项目(220606363154256)

国家级大学生创新创业训练计划项目(202210285042Z)

出版年

2023
计算机技术与发展
陕西省计算机学会

计算机技术与发展

CSTPCD
影响因子:0.621
ISSN:1673-629X
参考文献量3
段落导航相关论文