1. Introduction
The ongoing intelligent transformation of the automotive industry has positioned autonomous driving at the forefront of global technological competition. Traffic sign detection, a critical component of environmental perception in autonomous driving, plays a pivotal role in ensuring vehicle safety [
1]. Its accuracy and real-time performance directly influence the vehicle’s understanding of traffic regulations and the reliability of its driving decisions [
2].
Compared with general object detection tasks, traffic sign detection exhibits unique challenges. First, target scales vary dramatically: distant signs may occupy as few as 10 pixels, while nearby signs may exceed 200 pixels. Second, the category distribution follows a long-tail pattern, with significant sample size disparities across different types of traffic signs. Third, environmental factors such as illumination changes, adverse weather (e.g., rain and fog), and partial occlusion substantially degrade sign visibility [
3]. Furthermore, in mass-production autonomous driving solutions, perception algorithms must be deployed on onboard computing platforms with strict constraints on power consumption, heat dissipation, and cost. Given that onboard cameras continuously capture video streams at over 30 fps, real-time and lightweight algorithm design becomes imperative [
4].
In recent years, deep learning-based object detectors have achieved significant progress in traffic sign recognition. One-stage detectors, especially the YOLO series, have become mainstream due to their balance between accuracy and speed [
5,
6]. YOLOv8n, a lightweight version released by Ultralytics in 2023 [
7], employs an optimized CSPDarknet53 backbone, a C2f feature extraction module, and an anchor-free detection head. However, when applied to traffic sign detection, YOLOv8n shows limitations: the C2f module has limited multi-scale feature capture capability, the feature enhancement network inadequately fuses shallow detail features with deep semantic features, leading to high miss rates for small signs, and the model lacks effective background interference suppression [
3,
8].
To address these issues, researchers have proposed various improvements. Dewi et al. [
3] developed a YOLOv4-based model incorporating synthetic training data. Wang et al. [
8] modified YOLOv5 for real-time multi-scale detection. Wang et al. [
9] proposed YOLO-AEF for complex illumination conditions. He et al. [
10] introduced NTS-YOLO for nighttime detection. Ji et al. [
11] improved YOLOv8 for small-target detection in complex environments. Du et al. [
12] presented ES-YOLO, achieving a 10.4% mAP50 improvement on the TT100K dataset. Despite these contributions, there remains room for improvement in balancing feature representation and computational efficiency [
8].
In this paper, we propose an improved algorithm integrating the VoVGSCSP module with a Multi-scale Contextual Attention mechanism. The main contributions are threefold: (1) introducing VoVGSCSP to replace the C2f module in the feature enhancement network, enhancing feature representation through parallel residual branches and cross-stage connections; (2) designing MCA mechanism with multi-branch global average pooling and max pooling operations to extract features at different receptive fields, while dynamic weight fusion adaptively combines spatial and channel-wise attention to capture geometric features and color semantics effectively; and (3) optimizing the PAN-FPN feature fusion path by incorporating learnable weight concatenation (LWConcat), which assigns adaptive weights to different feature levels during multi-scale fusion, enabling the model to dynamically balance information from various feature maps. Experiments on the CTSDB and TT100K datasets validate the advantages of the proposed algorithm in accuracy, speed, and model lightweighting.
4. Results and Analysis
To demonstrate the traffic sign detection capability of the improved YOLOv8n model in real-world scenarios, this section first presents the results of comparative experiments. Subsequently, the effectiveness of the proposed improvements is comprehensively validated through ablation experiments, generalization experiments, and visualization of detection results.
4.1. Comparative Experiments
In the comparative experiments of traffic sign detection, this study evaluates the proposed algorithm against six state-of-the-art object detection models, including RT-DETR-ResNet50, YOLOv5n, YOLOv8n (baseline), YOLOv10n, YOLO11n, and YOLO26n. All models are evaluated using seven metrics: Precision (P), Recall (R), mAP0.5, mAP0.5:0.95, Parameters, GFLOPs and FPS. As presented in
Table 2, the proposed algorithm achieves the highest accuracy among all compared methods, with a precision of 89.5%, a recall of 99.9%, a mAP0.5 of 99.4%, and a mAP0.5:0.95 of 98.6%. However, its FPS (96.29) is lower than that of some lightweight models, indicating a trade-off where accuracy is prioritized over inference speed.
Compared with the baseline YOLOv8n, the proposed algorithm improves precision by 3.5 percentage points, recall by 7.2 percentage points, mAP0.5 by 3.2 percentage points, and mAP0.5:0.95 by 3.8 percentage points. Compared with YOLOv10n, the proposed algorithm achieves a precision improvement of 1.8 percentage points, a recall improvement of 4.7 percentage points, a mAP0.5 improvement of 2.0 percentage points, and a mAP0.5:0.95 improvement of 3.4 percentage points. Notably, the recall of the proposed algorithm reaches 99.9%, demonstrating exceptional capability in detecting traffic signs with minimal missed detections. In terms of computational efficiency, the inference speed of the proposed model was 96.29 FPS. Although it was slightly lower than the 103.6 FPS of the baseline YOLOv8n, it still met the requirements for real-time detection. It is worth noting that the proposed model achieved significant performance improvement while maintaining only 2.9 M parameters and 7.4 GFLOPs. This slight sacrifice in speed resulted in an all-round improvement in Precision, Recall, mAP0.5, and mAP0.5:0.95. In contrast, although YOLOv5n achieved the highest 129.03 FPS, its accuracy metrics were significantly lower than those of the proposed model. The proposed model maintains a lightweight architecture with only 2.9 M parameters and 7.4 GFLOPs, striking an effective balance between detection accuracy and computational efficiency.
4.2. Ablation Experiments
To evaluate the impact of the proposed improvements on the YOLOv8n model, ablation experiments are conducted on the traffic sign detection dataset. These improvements include VoVGSCSP, MCALayer, and LWConcat, demonstrating their effectiveness and necessity. “√” indicates that the corresponding module is employed in the model, while “-” indicates the use of the original YOLOv8n module.
The ablation experiment results are presented in
Table 3. Compared with the baseline YOLOv8n, the introduction of VoVGSCSP module improves mAP0.5 from 96.2% to 99.1% and mAP0.5:0.95 from 94.8% to 98.6%, while reducing GFLOPs from 8.1 to 7.4. This indicates that VoVGSCSP effectively enhances feature representation through parallel residual branches and cross-stage connections, improving gradient flow and extracting complementary features. However, the computational efficiency slightly decreases from 103.6 FPS to 95.59 FPS due to the increased model complexity.
The YOLOv8n model with MCALayer achieves a mAP0.5 of 97.9% and mAP0.5:0.95 of 97.0%, with a marginal reduction in computational cost (7.4 GFLOPs). The multi-scale contextual attention mechanism effectively captures geometric features and color semantics through dual-path attention and multi-branch pooling, leading to improved detection accuracy. The FPS slightly decreases to 99.35 due to the additional attention computation.
The LWConcat module alone improves mAP0.5 to 95.3% and mAP0.5:0.95 to 93.3%, while maintaining the original computational complexity (8.1 GFLOPs) and achieving the highest FPS of 105.3. This demonstrates that LWConcat enables adaptive multi-scale feature fusion through learnable weights, improving detection efficiency without additional computational burden.
The combination of VoVGSCSP and LWConcat achieves a mAP0.5 of 99.2% and a mAP0.5:0.95 of 98.6% at 100.12 FPS. These results demonstrate that VoVGSCSP enhances feature representation while LWConcat reduces fusion redundancy, thereby achieving a better accuracy–speed trade-off than using VoVGSCSP alone. The combination of VoVGSCSP and MCALayer achieves a mAP0.5 of 99.0% and mAP0.5:0.95 of 98.8%, significantly outperforming individual modules. The combination of MCALayer and LWConcat achieves a mAP0.5 of 99.2%, demonstrating the complementary nature of these modules. The full model with all three improvements (VoVGSCSP + MCALayer + LWConcat) achieves the best performance with mAP0.5 of 99.4%, mAP0.5:0.95 of 98.6%, 7.4 GFLOPs, and 96.29 FPS.
In summary, each proposed improvement contributes to the detection accuracy of the original network. In particular, VoVGSCSP provides the most significant improvement in mAP0.5 (+2.9 percentage points), while LWConcat maintains the highest inference speed (105.3 FPS). The full combination achieves the optimal balance between accuracy and efficiency, demonstrating the effectiveness of the proposed algorithm for traffic sign detection.
4.3. Generalization Experiment
To further validate the generalization capability of the proposed algorithm, experiments are conducted on the TT100K dataset, which is a large-scale Chinese traffic sign detection dataset with more diverse scenarios and categories.
Table 4 presents the comparative experimental results on the TT100K dataset.
As shown in
Table 4, the proposed algorithm achieves the best detection performance among all compared models on the TT100K dataset. Specifically, the proposed model achieves a precision of 59.3%, a recall of 58.5%, a mAP0.5 of 61.9%, and a mAP0.5:0.95 of 46.5%, outperforming all other compared algorithms.
Compared with the baseline YOLOv8n, the proposed algorithm improves mAP0.5 by 1.7 percentage points (from 60.2% to 61.9%) and mAP0.5:0.95 by 1.6 percentage points (from 44.9% to 46.5%). Compared with YOLOv5n, the proposed algorithm achieves improvements of 2.7 percentage points in mAP0.5 and 2.2 percentage points in mAP0.5:0.95. Notably, compared with the latest YOLO variants such as YOLOv10n, YOLO11n, and YOLO26n, the proposed algorithm consistently achieves superior performance across all metrics, demonstrating its effectiveness and robustness in handling diverse traffic sign detection scenarios.
Furthermore, with only 2.89 M parameters and 7.4 GFLOPs, the proposed model is as lightweight as other YOLO variants yet achieves the highest detection accuracy among all compared models. Notably, on the TT100K dataset, the model achieves an FPS of 34.01, slightly higher than the baseline YOLOv8n (33.04 FPS), demonstrating that the accuracy gains do not come at the cost of inference speed. This balance of high accuracy and competitive inference speed further validates the algorithm’s practical applicability for real-world traffic sign detection.
The proposed method achieves substantial gains on CTSDB but only modest improvements on TT100K (e.g., +1.7% vs. +3.2% in mAP0.5). We attribute this discrepancy primarily to the sampling bias of CTSDB. Specifically, the CTSDB subset used in this work is a random sample of the original dataset, which likely under-represents challenging cases such as small, occluded, or poorly illuminated signs. This makes the CTSDB subset an easier benchmark where performance saturation is easier to achieve. In contrast, TT100K is used in its full form and explicitly includes difficult scenarios (adverse weather, tunnels, occlusions) along with a long-tail category distribution across 45 classes. It is worth noting that the proposed model consistently outperforms the baseline in detection accuracy across both datasets, achieving particularly substantial gains on the more challenging TT100K dataset. The relatively smaller margin of improvement on CTSDB does not indicate a weakness of the proposed method; rather, it reflects the inherent difficulty gap between a relatively simpler benchmark (CTSDB) and a more realistic, challenging one (TT100K). This finding suggests that future work should focus on domain adaptation and data augmentation to further enhance robustness under diverse real-world conditions.
4.4. Visualization and Analysis
To demonstrate the detection performance of the proposed algorithm, comparative experiments were conducted on the TT100K dataset. The four metrics of our improved model, including mAP0.5, mAP0.5–0.95, P, and R, are illustrated in
Figure 8. Our model converges smoothly during training, and all four metrics achieve improvements compared to the baseline YOLOv8n, with P increasing by 3.47%, R by 3.35%, mAP0.5 by 2.24%, and mAP0.5–0.95 by 0.87%, respectively. These results validate the effectiveness of the proposed VoVGSCSP, MCALayer, and LWConcat modules in enhancing the detection performance for traffic signs.
Figure 9 compares the detection effectiveness between YOLOv8n and our proposed method.
Figure 9a shows the detection results using the baseline YOLOv8n algorithm, while
Figure 9b presents the results using our improved algorithm. By comparing eight pairs of detection results from the same traffic sign scenes, it is evident that our proposed method can detect a greater number of targets compared to YOLOv8n, particularly for densely packed small traffic signs and partially occluded signs. Our algorithm also improves overall detection accuracy. The comparison of detection results demonstrates that our improved method excels in detecting traffic signs in complex road scenes, effectively addressing missed detections of small targets and enhancing the detection precision.
5. Conclusions
To address the limitations of YOLOv8n in traffic sign detection—namely insufficient multi-scale feature representation, high false negatives for small targets, and poor robustness in complex environments—this paper proposes an improved lightweight detection algorithm that integrates the VoVGSCSP module, Multi-scale Contextual Attention (MCA) mechanism, and LWConcat. The original C2f module is replaced with VoVGSCSP to enhance feature representation while reducing computational complexity. MCA employs multi-branch pooling with dynamic weight fusion to capture geometric features and color semantics. LWConcat enables adaptive multi-scale feature fusion. Experimental results on the CTSDB dataset show that our model improves P by 3.5%, R by 7.2%, mAP0.5 by 3.2%, and mAP0.5:0.95 by 3.8%, while reducing parameters by 4.0% and computational cost by 8.6%. On the TT100K dataset, our model improves P by 1.0%, R by 0.9%, mAP0.5 by 2.8%, and mAP0.5:0.95 by 3.6%, with parameters reduced by 4.0% and GFLOPs reduced by 8.6%. These results confirm the effectiveness of the proposed improvements in balancing detection accuracy and efficiency.
Future work will focus on improving cross-scenario robustness under extreme weather and illumination conditions, as well as exploring knowledge distillation for further model compression.