Journal of Frontiers of Computer Science and Technology ›› 2024, Vol. 18 ›› Issue (1): 138-150.DOI: 10.3778/j.issn.1673-9418.2301034

• Graphics·Image • Previous Articles     Next Articles

Improved YOLOv4-Tiny Lightweight Target Detection Algorithm

HE Xiangjie, SONG Xiaoning   

  1. Jiangsu Engineering Laboratory of Pattern Recognition and Computational Intelligence, School of Artificial Intelligence and Computer Science, Jiangnan University, Wuxi, Jiangsu 214122, China
  • Online:2024-01-01 Published:2024-01-01

YOLOv4-Tiny的改进轻量级目标检测算法

何湘杰,宋晓宁   

  1. 江南大学 人工智能与计算机学院 江苏省模式识别与计算智能工程实验室,江苏 无锡 214122

Abstract: Object detection is an important branch of deep learning. A large number of edge devices need lightweight object detection algorithms, but the existing lightweight universal object detection algorithms have problems of low detection accuracy and slow detection speed. To solve this problem, an improved YOLOv4-Tiny algorithm based on attention mechanism is proposed. The structure of the original backbone network of YOLOv4-Tiny algorithm is adjusted, the ECA (efficient channel attention) attention mechanism is introduced, the traditional spatial pyramid pooling (SPP) structure is improved to DC-SPP structure by using void convolution, and the CSATT (channel spatial attention) attention mechanism is proposed. The neck network of CSATT-PAN (channel spatial attention path aggregation network) is formed with the feature fusion network PAN, which improves the feature fusion capability of the network. Compared with the original YOLOv4-Tiny algorithm, the proposed YOLOv4-CSATT algorithm is significantly more sensitive to information and accurate in classification when the detection speed is basically the same. The accuracy is increased by 12.3 percentage points on VOC dataset and 6.4 percentage points is increased on COCO dataset. Moreover, the accuracy is 3.3,5.5,6.3,17.4,10.3,0.9 and 0.6 percentage points higher than the Faster R-CNN, SSD, Efficientdet-d1, YOLOv3-Tiny, YOLOv4-MobileNetv1, YOLOv4-MobileNetv2 and PP-YOLO algorithms respectively on VOC dataset, and 2.8, 7.1, 4.2, 18.0, 12.2, 2.1 and 4.0 percentage points higher in recall rate, respectively, with an FPS of 94. In this paper, the CSATT attention mechanism is proposed to improve the model’s ability to capture spatial channel information, and the ECA attention mechanism is combined with the feature fusion pyramid algorithm to improve the model’s feature fusion ability and target detection accuracy.

Key words: object detection, YOLOv4-Tiny algorithm, attention mechanism, lightweight neural network;feature fusion

摘要: 目标检测是深度学习的重要分支领域,大量的边缘设备需要轻量级的目标检测算法,但现有的轻量级的通用目标检测算法存在检测精度低、检测速度慢的问题。针对这一问题,提出了一种基于注意力机制的YOLOv4-Tiny的改进算法。调整了原有的YOLOv4-Tiny算法的主干网络的结构,引入了ECA注意力机制,使用空洞卷积改进了传统的SPP结构为DC-SPP结构,并提出了CSATT注意力机制,与特征融合网络PAN形成CSATT-PAN的颈部网络,提高了网络的特征融合能力。提出的YOLOv4-CSATT算法和原始YOLOv4-Tiny算法相比,在检测速度基本持平的情况下,对于信息的敏感程度以及分类的准确程度有了明显的提高,在VOC数据集上精度提高了12.3个百分点,在COCO数据集上高出了6.4个百分点。在VOC数据集上,相比Faster R-CNN、SSD、Efficientdet-d1、YOLOv3-Tiny、YOLOv4-MobileNetv1、YOLOv4-MobileNetv2、PP-YOLO算法在精度上分别高出3.3、5.5、6.3、17.4、10.3、0.9和0.6个百分点,在召回率上分别高出2.8、7.1、4.2、18.0、12.2、2.1和4.0个百分点,FPS达到94。通过提出CSATT注意力机制提高了模型对于空间的通道信息的捕捉能力,并结合ECA注意力机制和特征融合金字塔算法,提高了模型的特征融合的能力以及目标检测精度。

关键词: 目标检测, YOLOv4-Tiny算法, 注意力机制, 轻量级神经网络, 特征融合