Traffic Light Recognition Based on Improved YOLOv5l
摘要
Accurate recognition of traffic lights is essential for ensuring the safety of passengers and pedestrians, especially in the context of self-driving car technology. However, traffic lights present challenges due to their small size and limited recognition accuracy. This paper proposes an enhanced version of the YOLOv5l algorithm specifically designed for traffic light recognition. First, the K-means++ clustering algorithm is employed to generate the prior frame. Second, the SiLU activation function in the basic convolution module is replaced with the adaptive Meta-ACONC activation function, significantly improving the model’s detection accuracy. Third, the coordinate attention mechanism is integrated into the trunk feature extraction network to incorporate coordinate information into the channel, thereby enhancing the network’s sensitivity to small target positions and mitigating the ambiguity caused by increased network depth. Finally, the network’s detection scale is improved by removing the original 20 × 20 large target detection head, leading to an improved accuracy and speed for detecting small targets. The proposed approach is evaluated on self-created traffic light datasets, and compared with the original YOLOv5l model; the improved YOLOv5l model achieves a 7.1% increase in mAP@0.5, reaching 83.3%, effectively meeting the requirements for traffic light detection and recognition.