Electronic Science and Technology ›› 2025, Vol. 38 ›› Issue (1): 81-87.doi: 10.16180/j.cnki.issn1007-7820.2025.01.011

Previous Articles     Next Articles

A Vehicle Detection Algorithm Based on Improved YOLOv4

LAI Ying(), JU Zhiyong, YE Yuxin   

  1. School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology,Shanghai 200093,China
  • Received:2023-05-24 Revised:2023-07-04 Online:2025-01-15 Published:2025-01-06
  • Supported by:
    National Natural Science Foundation of China(81101116)

Abstract:

In the process of vehicle detection in traffic monitoring, there are some problems such as vehicles shielding each other and insufficient distance target size, which leads to missing detection and false detection. To solve this problem, this study proposes a traffic vehicle detection algorithm based on YOLOv4(You Only Look Once version 4) multi-scale fusion and attention mechanism. A new feature layer is added to YOLOv4's path aggregation network for multi-scale feature fusion to improve the model's ability to extract underlying texture features. The ECA (Efficient Channel Attention) channel attention module is embedded in front of YOLO Head detection head to reasonably suppress and enhance the aggregated features. The CIoU (Complete Intersection over Union) loss function is replaced by the Soft-CIoU loss function to improve the contribution of small target vehicles to the loss function. The experimental results on the publicly available vehicle data sets UA-DETRAC and KITTI show that compared to the original YOLOv4 algorithm, the average accuracy of the proposed algorithm improves by 2.45 percentage points and 1.14 percentage points, respectively, and the detection speed reaches 41.67 frame·s-1.The proposed algorithm performs well in detection accuracy when compared with other advanced algorithms.

Key words: vehicle detection, multi-scale feature fusion, attention mechanism, Soft-CIOU loss function, YOLOv4, deep learning, target detection, small target

CLC Number: 

  • TP391