# Road Obstacle Detection Method Based on Improved YOLOv5
###### Abstract  
Road obstacle detection is essential for ensuring the smooth operation of roads and safeguarding the lives and property of travelers. However, current obstacle detection methods face challenges such as missed detections and false positives. To address these issues, an enhanced obstacle detection algorithm based on YOLOv5 (YOLOv5-EC3F) is proposed. First, an effective multi-scale feature fusion module (EMFF) is introduced to extract multi-scale features from the input feature map, providing richer semantic information and enhancing the perceptual range. Second, the SPPF module is replaced with the C3 SPPF module to improve the model's understanding of contextual information and increase its multi-scale adaptability. Experimental results demonstrate that, on the custom dataset, YOLOv5-EC3F raises the mAP by 3 percentage points to 82% and the recall by 7 percentage points to 78%, without compromising precision. This study offers a valuable optimization strategy for the practical application of road obstacle detection. a 2025 18 300 10.0000-0000-0000-0000-0000-0000-0000-0000-0000-00000-00000-00000-00000-00000-000000-000000000000000000000000000  
provide early warnings. This is essential for ensuring road traffic safety and maintaining the smooth operation of transportation networks. With the development of science and technology, target detection methods based on deep learning have been continuously refined. The current detection algorithms can generally be divided into two categories: two-stage detection methods based on region proposals and single-stage detection methods based on regression. Typical two-stage methods include SPP-Net [2] and Faster R-CNN [3]. SPP-Net (Spatial Pyramid Pooling Network), proposed by [PERSON] et al. in 2014, addresses the limitation of traditional convolutional neural networks (CNNs) that cannot efficiently handle input images of varying sizes. The core innovation of this network is the introduction of a spatial pyramid pooling layer (SPP) between the convolutional and fully connected layers. The SPP layer segments and pools feature maps at different scales to generate fixed-length feature vectors, which are then classified by a classifier. However, SPP-Net introduces some challenges, notably the increased complexity of the network structure and higher computational overhead. Faster R-CNN builds upon R-CNN and Fast R-CNN, with its main innovation being the replacement of the traditional selective search (SS) [4] algorithm with a Region Proposal Network (RPN) for end-to-end target detection. The RPN generates candidate proposals by sharing convolutional features using a sliding window, extracts feature vectors through the ROI pooling layer, and finally classifies and adjusts the bounding boxes in the classifier and regressor. Although Faster R-CNN improves accuracy, it also leads to an increase in computational cost and time overhead. In contrast, single-stage detection methods simplify the computational process by transforming the target detection problem into a regression task, improving efficiency. Typical single-stage detection algorithms include SSD [5] and YOLO [6; 7; 8; 9]. SSD enhances detection speed by directly regressing the location and category of targets. Unlike previous methods, SSD does not rely solely on the result of the final convolution layer but predicts outputs from different convolutional layers as a feature map, generating an early feature pyramid. This approach significantly speeds up detection compared to two-stage methods, offering better real-time performance. The key idea behind YOLOv1 is to divide the input image into a grid of cells, with each cell performing both detection and bounding box regression. This design improves detection speed. YOLOv2, building on the Faster R-CNN framework, introduces the Anchor mechanism to enhance small target prediction.