Improved YOLOv8 object detection method based on P2 detection head and ECA attention mechanism for autonomous driving scenarios
Abstract
Motivated by the reduced detection accuracy of small targets, including traffic lights and traffic signs, in autonomous driving scenes with complex background interference, this work presents an improved YOLOv8-P2-ECA target detection method that integrates a P2 small target detection head with an Efficient Channel Attention (ECA) mechanism. A P2 shallow detection branch is incorporated into the original multi-scale detection structure of You Only Look Once version 8 (YOLOv8), allowing the model to retain more spatial detail for small targets. Meanwhile, the ECA channel attention mechanism adaptively reweights the fused features to strengthen the representation of informative target cues. Experiments are conducted on the CARLA autonomous driving simulation dataset, detecting ten types of road targets including vehicles, pedestrians, bicycles, motorcycles, traffic lights, and traffic signs. Tests on the CARLA autonomous driving simulation dataset yield macro-averaged Precision, Recall, mAP50, and mAP50-95 scores of 0.957, 0.933, 0.961, and 0.723, respectively, for the proposed model on the test set.