This paper presents an enhanced YOLOv8 model designed to address multi-target detection challenges in complex traffic scenarios. The model integrates the Squeeze-and-Excitation attention mechanism, the deformable convolution C2f module, and the smooth IoU loss function, achieving significant improvements in detection accuracy and robustness in various complex environments. Experimental results show that the enhanced YOLOv8 model outperforms existing YOLO solutions across multiple metrics, particularly in precision and recall. Specifically, the enhanced model achieves 83.8% precision and 82.7% recall, improving 1.05 times in precision and 1.1 times in recall compared to the average precision (79.7%) and recall (75.4%) of other YOLO series models. In terms of mAP_0.5, the enhanced model achieves 89%, representing a 1.05-fold improvement over the average mAP_0.5 (84.4%) of YOLO series models. For mAP_0.5:0.95, the enhanced model reaches 76.5%, which is a 1.1-fold improvement over the average mAP_0.5:0.95 (69.7%) of YOLO series models. These improvements demonstrate the superior performance of the proposed model in multi-scale and complex scenarios, providing strong support for intelligent transportation systems and autonomous driving.