Aiming at the problems of excessive parameter quantity, slow detection speed, and low detection accuracy of existing traffic sign recognition models, this paper proposes a traffic sign recognition algorithm with improved YOLOv5s. The algorithm applies depthwise separable convolution to the feature extraction network of YOLOv5s, which significantly reduces the parameters and computation of the backbone network. In the feature fusion stage, the feature maps of different levels obtained by the feature extraction network are input into the weighted bidirectional feature pyramid network structure ( CA-BiFPN ) for multi-scale feature fusion. In the design process of the loss function, ZIoU is used instead of GIoU as the bounding box regression loss function to solve the problem of overlapping the real box and the prediction box. The Focal loss function replaces the binary cross entropy loss function, which solves the problem of an unbalanced number of positive and negative samples in the detection process. The test results on the TT100K dataset show that the average accuracy of the algorithm reaches 77%, which is 4.94% higher than that of YOLOv5s, and the model size is 16MB, which is only 56.7% of YOLOv5s. The algorithm reduces the amount of calculation and model size to a certain extent and brings the improvement of detection speed and accuracy.