Enhanced YOLOv5 for Traffic Object Detection: Combined Channel Attention and Spatial Attention Mechanism
Xianqin Yan, Yu Zhu · 2024
Autonomous driving technology has brought the challenge of efficient and accurate detection to the forefront. To address this, this paper presents an improved YOLOv5 model by incorporating channel attention and spatial attention to stabilize the detection of pedestrians, vehicles, traffic lights, and traffic signs. Attention mechanism has been proven beneficial in improving many networks. The traditional YOLOv5 network lacks attention mechanisms, this research focuses on how to add appropriate attention mechanisms at relevant positions. This allows the network to learn channel importance weights and attend to spatial locations that require attention. In this research, the improved YOLOv5 model was performed in a rearranged BDD100k dataset, with the first 20,000 images of the original dataset as the training set and the first 6,000 images of the original dataset as the validation set. Results demonstrates that the proposed model significantly outperforms the baseline in several aspects. Notably, it achieves an increase of 5.1% in precision and an improvement of 1.3% and 0.1% in [email protected] and [email protected] respectively. Comparison experiment on the VOC2007 dataset indicates that the model can improve 0.4% in recall and 0.2% in [email protected] with the maintaining of precision. Experimental results validate the combination of various attention mechanisms could enhance model precision and mAP with the performance in the scene of complex traffic object detection.