Autonomous driving relies on vehicles autonomously gathering semantic information from the traffic environment. The traffic sign recognition algorithm is pivotal in advanced driver assistance systems. Addressing challenges like small sign detection accuracy, vertical text recognition, and a lack of Chinese text-based datasets, we propose an improved YOLOv7 algorithm with BiFormer attention. This boosts small target detection. To counter BiFormer's speed impact, we prune the model for size. For text recognition, we improve the CRNN network for vertical text. Additionally, we create a Chinese text-based traffic sign dataset with annotations for both object detection and text recognition.