在交通监控中进行车辆检测过程时,存在车辆互相遮挡和远距离目标尺寸不足的问题,导致在检测中存在漏检和误检情况.针对此问题,文中提出一种基于YOLOv4(You Only Look Once version 4)的多尺度融合与注意力机制的交通车辆检测算法.在YOLOv4 的路径聚合网络中增加一个新的特征层进行多尺度特征融合,提升模型对底层纹理特征的提取能力.在YOLO Head检测头前嵌入ECA(Efficient Channel Attention)通道注意力模块,对聚合后的特征进行合理的抑制和增强,将CIoU(Complete Intersection over Union)损失函数替换为Soft-CIoU损失函数,提高小目标车辆对损失函数的贡献度.在公开车辆数据集UA-DETRAC与KITTI中的实验结果表明,相较于原YOLOv4 算法,所提算法的平均精度分别提升了2.45 百分点和1.14 百分点,检测速度达到41.67 frame·s-1.相较于其他先进算法,所提算法在检测精度上表现良好.
A Vehicle Detection Algorithm Based on Improved YOLOv4
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 reason-ably suppress and enhance the aggregated features.The CIoU(Complete Intersection over Union)loss function is re-placed 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.
vehicle detectionmulti-scale feature fusionattention mechanismSoft-CIOU loss functionYOLOv4deep learningtarget detectionsmall target