A lightweight traffic-light detection algorithm based on improved YOLOv5s
is proposed to solve the issue of numerous network model parameters and poor real-time
performance of current traffic-light detection algorithms. First, a lightweight network, Mo-
bileNetv3, is used to replace the original backbone network, and the attention mechanism
is introduced to reduce the number of model parameters on the premise of minimal impact
on detection accuracy. Next, the depth separable convolution is used to replace the traditional standard convolution in the neck network to further reduce the number of model
parameters. Subsequently, the detection layer for detecting large targets is deleted based
on the small scale of traffic lights. Finally, the frame regression loss function is improved to
improve the frame detection accuracy. The network is pruned to compress and accelerate
the model to be deployed on the embedded platform in real time. The experimental results show that the proposed algorithm can achieve a detection speed of 48.1 frame/s on the
embedded platform NVIDIA Jetson Xavier NX, which sacrifices 1.5% mAP compared with
the original YOLOv5s. However, the model size is compressed by 54.3%, and the detection
speed is increased by 2.6 times, which can satisfy the needs of real-time traffic-light detection on traffic roads.
CAI Guanhong, LI Guoping, WANG Guozhong, TENG Guowei
. Lightweight traffic-light detection algorithm
based on improved YOLOv5s[J]. Journal of Shanghai University, 2024
, 30(1)
: 94
-105
.
DOI: 10.12066/j.issn.1007-2861.2411