Aiming at the problems of misdetection and missed detection in traffic signal detection tasks in current traffic scenes, this paper proposes an improved YOLO v3 traffic signal recognition algorithm YOLO v3-SimAM. First, introduce the new attention mechanism SimAM to enhance the features; secondly, add the SSH network structure after the feature layer extracted by the FPN feature pyramid to expand the deep network receptive field to further strengthen the feature extraction; finally, the last convolution of YOLO Head is replaced with dynamic convolution to improve the accuracy of target frame detection. At the same time, in the loss function design, the original intersection ratio (IoU) loss function is replaced with the DIoU loss function, and finally the YOLO v3-SimAM algorithm is formed. The algorithm is applied to traffic signal detection tasks. On the public TTTL (Tsinghua-Tencent Traffic Light) data set, the average accuracy of the algorithm (mAP) index reached 67.67%, which is an increase of 1.2% compared with the YOLO v3 algorithm. The results show that compared with the original YOLO v3 algorithm, the YOLO v3-SimAM algorithm proposed in this paper can detect traffic lights more accurately.