The invention discloses a method for detecting and identifying
traffic signal lamps in real time, and belongs to the field of traffic
light detection and identification. The method is provided for solving the problem that the YOLOv4
algorithm is insensitive to
small target detection, so that the
traffic signal lamp detection precision is low. A shallow feature enhancement mechanism is provided, two shallow features in different stages in a
feature extraction network are fused with high-level semantic features obtained after two times of up-sampling respectively, so that the scale of two detection
layers is increased, and the positioning and color determining capability of the network for small targets are improved. A bounding box uncertainty prediction mechanism is introduced, output coordinates of a prediction bounding box are modeled, a
Gaussian model is added to calculate the uncertainty of coordinate information, and the reliability of the prediction bounding box is improved. A LISA
traffic signal lamp
data set is used for carrying out detection and identification experiments, and the AUC value of an improved YOLOv4
algorithm in the detection experiments is 97.58% and is increased by 7.09% compared with VVA. The mean value of the average precision of the improved YOLOv4
algorithm in the recognition experiment is 82.15%, which is 2.86% higher than that of the original YOLOv4algorithm. The improved YOLOv4 algorithm improves the detection and identification precision of the traffic
signal lamp.