With the development of autonomous driving technology, as a part of the intelligent transportation system, traffic sign recognition (TSR) has attracted more and more attention from intelligent transportation researchers. Most of the existing TSR methods are based on deep learning, but most of those are limited by the contradiction between the reliability and the real-time performance of the model, and it is difficult to be widely used in TSR. In the automatic driving system, the accuracy and real-time requirements of target recognition are strict. In particular, the proportion of traffic signs in the image is small, which will greatly increase the difficulty of recognition. Detection errors and untimely information acquisition can easily lead to traffic accidents. Meanwhile, to meet the needs of network deployment on in-vehicle devices, there are also higher requirements for model size and calculation. Therefore, designing a lightweight neural network with fast detection speed and high recognition accuracy is particularly important for the development of autonomous driving technology. In this paper, we proposed an improved YOLOv5 for traffic sign recognition, and conducted experiments on the traffic sign dataset named TT100K. The results show that our method exhibits excellent performance in TSR, and the overall accuracy has been improved, especially for the small-sized targets recognition. The mAP is 6.68% higher than that before the improvement. Moreover, the proposed network can meet the requirements of recognition speed on vehicle-mounted equipment, and the recognition speed can reach 91 FPS, which has a great application value.