# Pavement Disease Visual Detection by Structure Perception and Feature Attention Network
## 2 Preliminaries  
In modern transportation systems, the detection and maintenance of road surface defects are critical to ensuring road safety and extending the lifespan of road infrastructure. With the expansion of road networks and the increasing intensity of road usage, various types of road surface defects, such as cracks, potholes, and surface spalling, have become more frequent. These defects vary significantly in size and type, ranging from small cracks to severe structural damage. Consequently, the development of technologies capable of accurately detecting defects across multiple scales has become an urgent task in current research. However, the collection of road surface defect images faces numerous challenges due to differences in equipment and environmental conditions. Various data collection devices, such as high-resolution cameras, smartphones, and drones, produce images with varying quality, resolution, and perspectives. Moreover, the environments in which road defect images are captured are highly diverse, including varying weather conditions, lighting changes, different road surface materials, and traffic patterns. These differences result in significant variability in the visual characteristics of defects, further complicating the detection task. Therefore, there is a strong demand for robust detection methods that can handle multi-scale, cross-device, and cross-environmental scenarios in practical applications. In this context, leveraging advanced deep learning techniques for the automated, multi-scale detection of road surface defects not only enhances detection efficiency but also addresses the challenges posed by the diversity of data sources and environmental conditions. This ensures accurate defect recognition across various data collection settings. As an improved version of YOLO series, YOLOv8 mainly consists of three essential components, namely, the backbone, neck and head. The backbone part employs a series of convolution and transposed-convolution layers for feature extraction, while residual connections and bottleneck structures are introduced to optimize the network architecture, reduce the model size and improve the feature extraction performance. The neck part adopts the technique of multi-scale feature fusion, which fuses feature maps from different stages of Backbone to effectively improve the detection accuracy of the model for targets in different scales and complex scenes. The head part uses a decoupled head to accomplish the detection and classification tasks through two parallel branches, which not only improves the computational efficiency of the model, but also enables more accurate target location and classification, thus significantly improving the overall detection performance. The overall network structure of YOLOv8n is shown in Figure 1.  
More specifically, YOLOv8 basically follows the architecture design of YOLOv5, but adopts the C2f module in the backbone instead of three convolutional modules and a bottleneck (C3). In other words, it remains the spatial pyramid pooling fast (SPPF) module as adopted in YOLOv5. In the path aggregation network with feature pyramid network (PAN-FPN) part, it still employs the idea of path aggregation network (PAN), but modified the structure by deleting the convolutional structure in PAN-FPN upsampling stage and replacing C3 with C2f. All these improvements make YOLOv8 maintain the advantages of the YOLOv5 network structure and can optimize the performance of the model in different scenarios with fine-grained adjustments. Although YOLOv8 has shown certain advantages in detection speed and accuracy, it still faces many challenges when applied in complex and uncontrollable real-world scenarios such as pavement disease visual detection. The parameter number of the customized model and the computation cost often increase significantly, which not only affects the deployment and efficiency of the model, but also leads to high consumption of computational resources, especially in resource-constrained environments.