Abstract
To achieve precision and lightweight design for pavement distress detection in complex scenarios, an improved YOLOv8n model, named YOLOv8n-Ultra, is constructed. The Coordinate Attention (CA) module is embedded into the C2f layer of the backbone network to empower the feature extraction of the neural network to focus on specific semantic information related to distress. The Ghost module is introduced to realize lightweight design of the model, and the Wise Intersection over Union (WIoU) loss function is adopted to dynamically optimize the precision of bounding box regression, enabling the model to pay more attention to hard-to-detect objects. Ablation experiments are designed to test the impact of different improvement methods on the detection performance of the model. Verified by three repeated experiments, the results show that compared with the YOLOv8n model, the YOLOv8n-Ultra model improves the precision (P) from 78.5% to 79.4%, increases the recall (R) from 74.0% to 78.7%, and enhances the mAP0.5 by 3.8 percentage points to 82.7%. It only increases the parameter count by 65.1% to 4.97 M, which is still substantially lower than that of traditional models such as YOLOv3 (61.92 M) and Faster Region-based Convolutional Neural Network (Faster-RCNN, 107.5 M), while maintaining an FPS of 202.4 f/s when tested on the experimental hardware (NVIDIA GeForce RTX 2060 SUPER GPU) specified in Section “Experimental Environment and Parameter Settings”. A paired t-test (p < 0.05) confirms that the improvement effect is statistically significant and the model exhibits good stability. In summary, the YOLOv8n-Ultra model provides a technical reference for pavement distress detection with balanced precision and lightweight characteristics.
1. Introduction
With the rapid advancement of the transport sector, China’s road network now spans the entire nation. Prolonged exposure to traffic loads and environmental factors has led to increasingly severe pavement distress issues [1]. Traditional manual inspection methods are inefficient, subjective, and accompanied by pronounced safety hazards. For instance, a skilled inspector can only cover 20–30 km of road per day under normal conditions, and this efficiency drops sharply in complex scenarios such as mountainous areas or dense urban intersections. Such limitations, coupled with significant subjective bias in manual judgment, make traditional methods hardly meet the practical demands of modern road maintenance [2,3]. There is an urgent need for progress in intelligent detection technologies.
Deep learning [4,5,6,7,8] has emerged as a driving force propelling the intelligent transformation of pavement distress detection. Currently, object detection algorithms based on deep learning fall into two main categories: one-stage and two-stage algorithms. The YOLO series [9,10,11,12] belongs to the one-stage category, and has been extensively studied due to its significant advantage in recognition speed. Wang et al. [13] enhanced the precision of asphalt pavement pothole detection by utilizing the residual structure of YOLOv3, though its substantial parameter count limits deployment on mobile devices. Wu et al. [14] proposed integrating the attention mechanism of Convolutional Block Attention Module (CBAM) into the YOLOv5 model to achieve high-precision identification of bridge cracks, improving model precision by 5.6 percentage points and R by 1.2 percentage points. Hu et al. [15] introduced a lightweight pavement distress detection method named YOLOM, integrating a state space model and incorporating a Ghost module. While this approach reduces model parameter count, it results in distortion of edge features of depressions, which is prone to triggering chain false detections under complex backgrounds [16]. Deng et al. [17] proposed the SE-YOLOv8 model for coastal pavement crack detection in remote sensing images, which incorporates the Squeeze-and-Excitation (SE) module based on the YOLOv8 algorithm. However, the SE module solely emphasizes channel-wise information and overlooks spatial positional features, resulting in insufficient improvement in the missed detection rate of small cracks (<5 mm).
Recent studies attempting to combine attention mechanisms or Ghost modules with YOLO variants for pavement distress detection still exhibit notable limitations [18]. Specifically, Wu et al. [14] integrated the CBAM module into YOLOv5 for bridge crack detection; although precision was improved, CBAM relies on convolutional dimensionality reduction, which easily breaks the correlation of long-distance distress features and thus struggles to adapt to complex morphological distresses such as alligator cracks. Hu et al. [15] achieved lightweight design via the Ghost module in the YOLOM model, but the lack of a complementary feature enhancement mechanism resulted in distorted edge features of depressions and high false detection rates under complex backgrounds. Deng et al. [17] integrated the SE module into the YOLOv8-based detection framework for coastal pavement crack recognition in remote sensing images, but the SE module’s neglect of spatial information resulted in inadequate improvement in small crack detection performance. A common shortcoming of these studies is the lack of collaborative design integrating “feature enhancement + lightweighting + regression optimization”, making it difficult to balance detection precision in complex scenarios with on-site deployment requirements.
To address the aforementioned issues, this study constructs a synergistically optimized model for pavement distress detection with balanced precision and lightweight performance [19,20], and conducts multi-dimensional innovations based on the YOLOv8n model. Firstly, a coordinate attention (CA) module is embedded following the cross stage partial feature fusion (C2f) layer within the backbone network, which enhances fine-grained recognition of the extension trajectories of longitudinal cracks and the topological correlations of alligator cracks through spatial coordinate encoding. Secondly, it replaces traditional convolutions with the Ghost module, streamlining parameters while preserving key semantic features of distresses, thereby balancing lightweighting with feature completeness. Thirdly, the wise intersection over union (WIoU) loss function with dynamic focus is introduced [21,22]. Through non-monotonic weight assignment, it focuses more on low-quality samples, thereby mitigating localization errors in complex backgrounds, ultimately forming the YOLOv8n-Ultra model.
2. Construction of the YOLOv8n-Ultra Model
2.1. YOLOv8n Model
YOLOv8n is a fully convolutional framework based on a backbone network, a neck structure, and a head structure. The backbone network comprises five convolutional modules, four C2f modules, and one spatial pyramid pooling fast (SPPF) module.
The loss function of the YOLOv8n model consists of classification loss, confidence loss, and bounding box regression loss (Complete Intersection over Union, CIoU). In particular, the CIoU loss is based on the IoU model, incorporating constraints on the distance to the object centre point and the width-to-height ratio, thereby enhancing the localization precision of objects within complex backgrounds. The lightweight nature and multi-scale feature extraction capabilities of the YOLOv8n model provide an ideal baseline for pavement distress detection [23,24,25].
2.2. Attention Mechanism
Currently, lightweight network attention mechanisms primarily rely on the Squeeze-and-Excitation Module (SE), which leverages inter-channel information while neglecting node positional information. Modules such as the bottleneck attention module (BAM) and CBAM employ convolutional techniques to reduce the number of channels. This paper employs the YOLOv8n model in combination with SE, BAM, CBAM, and CA modules, using identical experimental parameters for pavement distress detection. Their respective results are presented in Figure 1.
Figure 1.
Performance comparison of diverse attention modules.
After comparing the performance across different models, it is found that the YOLOv8n-CA model shows better performance than other modules in terms of precision (P), recall (R), and mean average precision at intersection over union = 0.5 (mAP0.5). Specifically, as reflected in Figure 1, the mAP0.5 of the YOLOv8n-CA model (81.3%) surpasses that of YOLOv8n-CBAM (79.6%) by 1.7 percentage points, and that of YOLOv8n-BAM (77.1%) by 4.2 percentage points. In terms of recall (R), YOLOv8n-CA (77.2%) also outperforms YOLOv8n-CBAM (74.1%) by 3.1 percentage points and YOLOv8n-BAM (71.2%) by 6.0 percentage points. The SE module only focuses on channel information and neglects spatial position information. Although the BAM and CBAM modules attempt to integrate channel and spatial attention, their reliance on convolutional dimensionality reduction to compress the number of channels can easily cause the correlation between long-distance distress features to break, making it difficult to adapt to the needs of pavement distress detection under the conditions of multi-scale and complex shapes. In contrast, the YOLOv8n-CA model constructs a feature enhancement mechanism that is more suitable for pavement distress detection through spatial coordinate information encoding and feature interaction across row and column dimensions. In particular, spatial coordinate encoding can accurately suppress background noise interference such as pavement texture and shadows, and perform fine-grained localization of spatial details such as the extension trajectories of longitudinal crack and the geometric contours of pothole boundaries, compensating for the lack of spatial constraints in SE and the overfitting of local features caused by convolution dimensionality reduction in BAM and CBAM. The feature interactions across row and column dimensions in the YOLOv8n-CA model enable the extraction of semantic correlations for complex distresses such as alligator crack topological structures and contiguous depression spatial distributions, thereby overcoming the missed detection issues caused by the local feature limitations of BAM and CBAM. This synergistic optimization of precision and recall ultimately enables the comprehensive detection performance of the model, mAP0.5, to reach a relatively high level among the compared modules. Leveraging these performance advantages, this study employs the CA module to optimize the YOLOv8n model, aiming to improve the performance of pavement distress detection [26].
In particular, the CA module has a natural complementarity with the Ghost module introduced subsequently. When the Ghost module achieves lightweight through linear transformation, it tends to lose the fine-grained spatial details of small-target distresses (e.g., micro-cracks < 5 mm) and the long-distance feature correlations of complex-shaped distresses (e.g., alligator cracks), leading to a decrease in recall. In contrast, the coordinate encoding of the CA module can accurately capture details such as the extension trajectories of micro-cracks and the edge contours of depressions, and the feature interaction across row and column dimensions can reconstruct long-distance semantic correlations, which exactly compensates for such information loss and lays a foundation for their synergistic optimization.
2.3. Ghost Module
The backbone network of the YOLOv8n model incorporates numerous standard convolutional modules, resulting in substantial model parameter count and computational overhead. In this regard, this study introduces the GhostConv module from GhostNet [27,28] to replace the convolutional layers of the backbone network. Through linear feature map transformations and a redundant feature reconstruction mechanism, it reduces model complexity while preserving feature extraction capability.
To clarify the lightweight effect, we take the four standard Conv layers in the YOLOv8n backbone (input to output: 3→64, 64→128, 128→256, 256→512; kernel size 3 × 3) for parameter comparison. The total parameter count of these four standard Conv layers is 1,549,016, and after replacing them with GhostConv (following the “1 × 1 Conv + 3 × 3 depthwise Conv” workflow), the total parameter count reduces to 779,328, with the parameter reduction ratio of these layers reaching approximately 49.7%, which directly verifies the lightweight capability of the Ghost module in compressing convolutional parameters.
The core design principle of the Ghost module is to decouple the redundant feature generation process of conventional convolutions into two sections: key feature extraction and linear transformation to generate redundant features. The specific workflow is as follows: Firstly, a small number of key features are generated via 1 × 1 conventional convolutions on the input feature map to preserve core semantic information. Subsequently, 3 × 3 or 5 × 5 depthwise convolutions are applied to perform linear transformation of these key features, producing redundant features to compensate for information loss caused by channel compression. Finally, the key features and redundant features are concatenated to ensure the output channel count matches that of original convolution while reducing computational overhead.
2.4. Improved Loss Function
Although the CIoU loss of the YOLOv8n model introduces constraints on the distance from the object centre point and the width-to-height ratio based on IoU, it exhibits three shortcomings in pavement distress detection. First, it has insufficient adaptability to small objects. For small targets such as cracks narrower than 5 mm, the gradient optimization of CIoU is prone to falling into local optima, leading to significant localization errors. Second, the weighting of multi-scale distresses is imbalanced. Traditional IoU fails to dynamically adjust loss weights for objects of different scales in mixed distress areas (e.g., depression and repair areas), resulting in high missed detection rates. Third, its adaptability in complex backgrounds is weak. In scenarios with high background similarity (e.g., grey-brown depressions), gradient explosion becomes pronounced, affecting detection stability.
To address the aforementioned issues, this study introduces the WIoU loss function to optimize bounding box regression through a dynamic weight allocation + non-monotonic focusing mechanism. The core formulas are presented in Equations (1)–(4):
First, key variables are defined uniformly to clarify the derivation:
- b: centre point coordinates of the predicted bounding box
- bgt: centre point coordinates of the ground-truth bounding box
- : Euclidean distance between b and bgt
- l: diagonal length of the minimum enclosing box containing both boxes
- IoU: overlap term (quantifies the intersection ratio between predicted and ground-truth boxes)
- w, h: width and height of the predicted box
- wgt, hgt: width and height of the ground-truth box
- λ: dynamic weighting coefficient
- v: shape similarity term (width-to-height ratio matching penalty)
- α: balance factor (adjusts the weight of shape constraint).
In Equation (1), is the centre point distance term, normalized by Euclidean distance to strengthen the constraint on object centre point localization. αv represents the shape similarity term, introducing a width-to-height ratio matching penalty. It converts width-to-height ratio discrepancy into an angular metric, avoiding morphological distortion for irregular distresses like alligator cracks. Equation (2) represents the expression for the dynamic weighting coefficient λ. When , λ exhibits exponential growth as the overlap decreases, thereby assigning higher optimization weights to hard-to-detect objects such as small-scale cracks and edge-blurred depressions. When , λ = 1, which prevents training instability caused by gradient explosion in high-quality anchor boxes. Equation (3) calculates v. Equation (4) represents the expression for the balance factor α, which adjusts the weights of the width-to-height ratio constraint to prevent excessive penalties for irregular distresses such as alligator cracks.
WIoU enhances the detection performance of hard-to-detect objects through a dual-optimization mechanism. Firstly, the weight assignment is driven by outlier degree. When , λ exhibits exponential growth with the decrease of IoU, assigning higher loss weights to low-quality anchor boxes, such as small-scale cracks or depressions with blurred edges, thereby intensifying the model’s focus. When , λ = 1, preventing gradient explosion in high-quality anchor boxes. During the training process, it is observed that compared to the YOLOv8n model using CIoU loss, the YOLOv8n-Ultra model with WIoU loss exhibits no loss fluctuations associated with gradient explosion, and its training stability is notably enhanced. Secondly, the geometric constraints constitute a non-monotonic optimization. The width-to-height ratio constraint is introduced via the term v. This approach models the topological structure of irregularly shaped distresses such as alligator cracks, enabling bounding box regression while simultaneously considering overlap and shape similarity, thereby reducing localization errors at depression edges.
To intuitively verify the improvement effect of WIoU on the defects of CIoU, this study selects typical pavement distress scenarios for comparative experiments, with the results presented in Figure 2 (image scale 1:50, i.e., 1 pixel corresponds to 50 mm in reality). As indicated in the figure, in small-scale crack scenarios, the CIoU-based regression method generates redundant and misaligned bounding boxes, a consequence of gradient optimization falling into local optima. In contrast, the WIoU-based regression method outputs a single, highly fitted bounding box that fully covers the crack area, demonstrating stronger adaptability to small objects. In complex scenes with irregular distresses, CIoU produces scattered bounding boxes with poor coverage of the distress topology, whereas WIoU enables the bounding box to align precisely with the geometric contour of the crack, validating the effectiveness of its shape constraint mechanism. In distress scenarios with high-similarity backgrounds, CIoU exhibits noticeable localization deviation, while WIoU remains precisely aligned with the ground-truth box, confirming its strong resistance to background interference. Collectively, these visualization results directly indicate that WIoU can effectively address the shortcomings of CIoU in pavement distress detection tasks, laying a foundation for the subsequent improvement of model performance.
Figure 2.
Bounding box regression performance comparison between CIoU and WIoU. (a) CIoU; (b) WIoU.
2.5. YOLOv8n-Ultra Model
The YOLOv8n model has been optimized and improved, with the enhanced version designated as YOLOv8n-Ultra. On the basis of the original architecture, the YOLOv8n-Ultra model undergoes triple optimizations, forming a synergistic design framework comprising feature enhancement, lightweighting, and precise regression. Its network structure comparison is shown in Figure 3.
Figure 3.
Network structure comparison between original model and improved model. (a) Original model YOLOv8n; (b) Improved model YOLOv8n-Ultra.
The YOLOv8n-Ultra model integrates the CA module exclusively after the C2f layers in the middle-late stages of the backbone, rather than immediately following the initial “Conv→GhostConv→C2f” sequence at the backbone’s start. This design is justified for both feature compensation and synergistic balance between modules.
As illustrated in Figure 3b, the backbone initiates with a standard Conv layer to initialize basic feature extraction, followed by GhostConv for lightweight processing and subsequent C2f layer for cross-stage feature fusion, with no CA module incorporated at this initial stage. The rationale behind this arrangement is that during the early phase of feature extraction, the output of the first “GhostConv→C2f” sequence only contains low-level, coarse-grained features such as basic pavement textures instead of fine-grained distress-related features such as micro-cracks. Deploying the CA module here would unnecessarily consume computational resources on enhancing non-critical low-level features, while failing to target the fine-grained information loss induced by GhostConv in later processing stages.
Instead, the CA module is strategically placed after the middle-late “GhostConv→C2f” sequences shown in Figure 3b. By this stage, the GhostConv module has undergone multiple rounds of feature processing, and its linear transformation mechanism tends to weaken fine-grained spatial details such as trajectories of <5 mm micro-cracks and long-distance semantic associations like topological structures of alligator cracks. Acting on the C2f-output feature maps that have fused multi-scale distress features, the CA module precisely compensates for these losses: its coordinate encoding mechanism captures the subtle edge details of micro-cracks weakened by GhostConv, while its row-column feature interaction reconstructs the topological connections of complex distresses lost during GhostConv’s lightweight process.
This specific location further promotes synergistic balance between GhostConv and the CA module: GhostConv first reduces parameter redundancy to meet lightweight requirements, and the CA module subsequently enhances critical distress features rather than low-level background features in the streamlined feature maps. This synergy achieves an optimal balance between computational efficiency contributed by GhostConv and recognition precision enhanced by the CA module.
The YOLOv8n-Ultra model replaces standard convolutional layers in the backbone network with the GhostConv module from GhostNet. Through mechanisms of linear transformation and reconstruction of feature maps, it reduces computational redundancy while preserving feature extraction capability. The Ghost module divides input feature map into two parts: one generates key features via conventional convolutions, while the other produces redundant features through depthwise convolutions. These are ultimately fused for output, reducing parameter count to meet lightweight requirements in pavement distress detection. However, the linear transformation mechanism of GhostConv may impair the fine-grained spatial features of small-target distresses such as micro-cracks in later processing stages, which is precisely offset by the CA module deployed after the middle-late C2f layers downstream of GhostConv.
The YOLOv8n-Ultra model introduces the WIoU loss function to dynamically optimize bounding box regression. This function dynamically adjusts loss weights based on the IoU value between predicted and ground-truth boxes, assigning higher weights to hard-to-detect objects such as small-scale cracks and depressions with blurred edges. Concurrently, it mitigates gradient explosion through a non-monotonic focusing mechanism, thereby enhancing localization precision in complex backgrounds.
3. Experiments and Results Analysis
3.1. Dataset Preparation
The pavement distress images in this paper were collected from two major public datasets, which were filtered and integrated to construct the RD (Road Distress) dataset. The first dataset is the RDD2022 dataset released by the Crowdsensing-based Road Damage Detection Challenge (CRDDC’2022), which covers road scenarios from 6 countries (Japan, India, Czech Republic, Norway, the United States, and China) and includes specialized sub-datasets such as RDD2022_Japan, RDD2022_China_MotorBike, and RDD2022_China_Drone; its original annotation format adheres to the Pascal VOC standard. The second dataset is the road pavement distress dataset published by Thomas-yanxin in 2021, which contains distress images captured by on-board surveillance cameras, annotation data, and intact pavement images, covering 8 types of distress.
Data integration followed a process of deduplication, filtering, and standardization. Duplicate samples were first removed, and images with clear distress features and no severe occlusion were retained. Ultimately, 1977 valid samples were selected for this study, which were randomly divided into training, validation, and test sets at a ratio of 6:3:1. The RD dataset includes 933 D00 longitudinal crack samples, 946 D10 transverse crack samples, 334 D20 alligator crack samples, 254 D30 depression samples, 281 D40 pothole samples, and 236 Repair area samples. For categories with relatively low sample counts (e.g., depressions and alligator cracks), data augmentation strategies such as random flipping, brightness adjustment, and contrast adjustment were adopted during training to alleviate model overfitting caused by class imbalance. The dataset covers asphalt pavement types, includes multiple lighting conditions (sunny, cloudy, evening, etc.), geographically encompasses various road conditions, and the distress scales range from 0.3–80 cm cracks to 0.01–0.5 m2 potholes, which are common in engineering scenarios.
The RD dataset was annotated using the Make Sense online annotation platform, with the annotation format unified as VOC XML. Annotations comply with the *Technical Specification for Pavement Condition Evaluation* (JTG 5210-2018) [29]. Two road engineering professionals independently annotated the samples, and one professional reviewed the annotations. Inter-annotator consistency was calculated using the Intersection over Union (IoU) of bounding boxes, and inconsistent annotations were unified through consultation. Finally, 10% of the samples were randomly selected for rechecking, and the annotation error rate was less than 0.8%.
The RD dataset has been fully organized and will be uploaded to the FigShare platform, with complete access links and usage instructions provided simultaneously. It is freely available for non-commercial academic research, and users must cite the original CRDDC’2022 dataset, Thomas-yanxin’s dataset, and this paper when using the RD dataset.
3.2. Experimental Environment and Parameter Settings
Model training was performed on a computer with operating system Windows 10, a graphics card of NVIDIA GeForce RTX 2060 SUPER supporting Tensor Core with 8 GB VRAM, and a CPU of AMD Ryzen 7 5800X 8-Core Processor 4.65 GHz with 32 GB RAM. The programming language employed was Python 3.8, with the GPU computing platform being CUDA 12.4 and the deep learning framework PyTorch 2.4.1. Model training parameters are detailed in Table 1. For hyperparameter tuning, we adopted grid search on the validation set to optimize critical hyperparameters, and the final parameter combination was selected based on the best performance on the validation set.
Table 1.
Model training parameters.
To verify the statistical validity of the results and offset the random bias caused by the small dataset size, this study conducted three repeated experiments on the YOLOv8n and YOLOv8n-Ultra models: all hyperparameters were fixed, only the initial random weights of the models and dataset division were altered, the dataset was re-split at a ratio of 6:3:1 in each experiment, and the mean ± standard deviation of the metrics was calculated; additionally, the significance of performance differences was verified via paired t-test (α = 0.05).
3.3. Evaluation Metrics
In pavement distress detection, model performance evaluation requires a comprehensive assessment of detection precision and efficiency. The detection precision metrics encompass the mean average precision (mAP), precision (P), and recall (R). Among these, P denotes the proportion of correctly detected samples of a given distress category relative to all samples classified as such, reflecting the model’s false positive control capability. The calculation formula is given by Equation (5):
In Equation (5), TP denotes the number of correctly detected distress samples, while FP represents the number of non-distress samples misclassified as such. R is the proportion of correctly detected distress samples relative to the total number of true distress samples in that category, reflecting the model’s capability to control missed detections. Its calculation formula is given by Equation (6):
In Equation (6), FN denotes the number of true distress samples that remain undetected. The mAP serves to evaluate the model’s overall detection performance across multiple distress types. It is achieved by calculating the area under the P-R curve for each distress type and get the values of AP, then averaging these values. The calculation formulas are provided in Equations (7) and (8):
In Equation (8), the total number of distress type n = 6, encompassing longitudinal cracks, transverse cracks, alligator cracks, depressions, potholes, and repairs.
Model efficiency evaluation metrics primarily comprise the parameter count, Parameters, and detection speed, FPS. Parameters represent the total number of trainable parameters within the model, which is used to measure model complexity. FPS denotes the number of image frames processed per second by the model, reflecting its real-time capability.
3.4. Baseline Model Comparison and Analysis
To validate the superiority of the YOLOv8n-Ultra model in pavement distress detection tasks, experiments were conducted using the same dataset to compare it against the YOLOv8n model and other mainstream models.
The comparison of training results between the YOLOv8n model and the YOLOv8n-Ultra model is shown in Figure 4. The P, R, and mAP0.5 metrics of both the YOLOv8n and YOLOv8n-Ultra models exhibit a rapid initial increase followed by a gradual smooth convergence trend, indicating that both models demonstrate good stability in pavement distress detection tasks. However, the curves for the YOLOv8n-Ultra model maintain a slightly higher position. This subtle improvement stems from the optimization of the feature extraction network in YOLOv8n-Ultra, and this optimization effect is further corroborated by the training and validation loss curves included in Figure 4. By enhancing multi-scale feature fusion and attention mechanisms, it improves the model’s capability to capture edge details of transverse and longitudinal cracks, as well as the topological structure of alligator cracks. It enables the model to continue extracting correlations between distress features in the later stages of training, thereby driving further improvements of metrics.
Figure 4.
Result comparison between the YOLOv8n model and the YOLOv8n-Ultra model. (a) YOLOv8n; (b) YOLOv8n-Ultra; (c) YOLOv8n and YOLOv8n-Ultra; (d) YOLOv8n and YOLOv8n-Ultra; (e) YOLOv8n and YOLOv8n-Ultra.
In addition to the metric curves, Figure 4 also incorporates the training and validation loss profiles of the two models. Both models exhibit a consistent trend of rapid loss reduction in the early training phase, followed by stable convergence, which indicates the absence of overfitting issues. Specifically, the training losses of the YOLOv8n-Ultra model gradually decrease to a level slightly lower than that of the YOLOv8n model in the later training stage, which corresponds well to its marginally superior detection metrics. The slight fluctuation observed in the val/box_loss of the YOLOv8n-Ultra model is a normal phenomenon during its learning process of fine-grained distress features (e.g., micro-crack trajectories and pothole edge contours).
The results of comparing different models are shown in Table 2. Table 2 indicates that the YOLOv8n-Ultra model performs better than traditional models and current mainstream lightweight detectors in core detection performance, with relatively balanced comprehensive performance. Compared to the YOLOv8n model, its p value increases by 0.9 percentage points, which enhances the ability to distinguish between pavement distresses and the background, helping to reduce the misjudgment of pavement stains and textures as potholes. The R value rises by 4.7 percentage points, which is related to the CA module’s capture of complex distress features such as the topological structure of alligator cracks and the extension trajectories of small cracks, as well as the WIoU loss function’s targeted optimization for low-quality samples, reducing the risk of missed detection to a certain extent. With an mAP0.5 of 82.7%, it achieves a relatively high mAP0.5 value among all comparative models, indicating that the model has achieved the synergistic improvement of precision and recall in the detection of six types of distresses including longitudinal cracks, transverse cracks, and depressions, reflecting the effectiveness of the multi-module fusion design.
Table 2.
Performance comparison of diverse models.
In terms of model complexity and inference efficiency, the lightweight characteristics of the YOLOv8n series models are manifested. The YOLOv8n model has a parameter count of only 3.01 M and an FPS of 249.4 f/s, which can meet the basic requirements of real-time detection. After structural optimization, the parameter count of the YOLOv8n-Ultra model is increased to 4.97 M, but it is still significantly lower than that of traditional models such as YOLOv3 (61.92 M) and Faster-RCNN (107.5 M), maintaining the advantage of lightweight design. Compared to other detection schemes: the YOLOv3-tiny model has a relatively low parameter count (12.13 M), but its mAP0.5 is only 74.3%, showing insufficient adaptability to complex distress detection; the Faster-RCNN model achieves an mAP0.5 of 80.3%, but its FPS is only 15.0 f/s, which is difficult to match the real-time response requirements of on-site pavement detection. For current mainstream lightweight detectors such as YOLOv8-small, RT-DETR-lite, PP-YOLOE-S, and EfficientDet-D0, the mAP0.5 of YOLOv8-small (81.9%) is slightly lower than that of the proposed model, but its parameter count reaches 11.20 M, which is 2.25 times that of the proposed model; although RT-DETR-lite and EfficientDet-D0 have lower parameter counts (3.82 M and 3.87 M, respectively), their mAP0.5 values are 3.7 and 5.9 percentage points lower than that of the proposed model, with insufficient precision performance. These models either have excessively high parameter counts that increase deployment difficulty or limited precision performance that fails to meet detection requirements, and few of them can achieve a balanced performance in detection performance, lightweight design, and real-time performance. In contrast, the YOLOv8n-Ultra model achieves an mAP0.5 of 82.7% and an FPS of 202.4 f/s with a parameter count of 4.97 M. Under the dataset and test conditions used in this experiment, it exhibits a more balanced comprehensive performance, providing a technically valuable reference for pavement distress detection.
To verify the statistical significance of the improvement effect, a paired t-test was performed on the core indicators of the YOLOv8n model and the YOLOv8n-Ultra model. The results show that for mAP0.5, the t-statistic is 5.872 with a p-value of 0.023 < 0.05; for R, the t-statistic is 4.926 with a p-value of 0.030 < 0.05; and for P, the t-statistic is 3.864 with a p-value of 0.047 < 0.05. These results confirm that the performance improvement of the YOLOv8n-Ultra model is statistically significant. During the three repeated experiments, the core indicators of both models exhibited natural random fluctuations with an amplitude ≤ 0.2%. Furthermore, the standard deviations of all indicators of the YOLOv8n-Ultra model are smaller than those of the YOLOv8n model, indicating that it is less affected by random factors such as initial weights and data partitioning, and thus demonstrates good stability.
In summary, baseline model comparison experiments demonstrate that the YOLOv8n-Ultra model exhibits greater potential for performance enhancement during training convergence through improved feature extraction and fusion mechanisms. It not only achieves comprehensive superiority in detection precision, recall, and overall efficacy but also maintains a favourable balance between lightweight design and real-time capability, thereby providing a feasible technical reference for pavement distress detection.
3.5. Comparative Analysis of Ablation Experiments
Ablation experiments were conducted on six improved models using identical experimental parameters to evaluate the impact of different enhancement methods on detection performance. The results of the ablation experiments are presented in Table 3.
Table 3.
Results of ablation experiments.
For the YOLOv8n-CA model, its R value improves by 3.2 percentage points, the mAP0.5 improves by 2.4 percentage points, but the parameter count increases by 72.8% to 5.20 million. This indicates that the CA module enhances the ability to localize the linear extensions of longitudinal cracks and the topological structure of networked cracks through coordinate information encoding, and introduces a higher parameter count simultaneously. The detection results comparison is shown in Figure 5 (image scale 1:50, i.e., 1 pixel corresponds to 50 mm in reality), where both false detections and duplicate detections have been improved. In (a) (the original YOLOv8n model), false detections (e.g., the pothole area is incorrectly identified as a longitudinal crack, marked by invalid bounding boxes) and duplicate detections (e.g., the networked cracks are covered by overlapping bounding boxes) can be observed. In (b) (the improved YOLOv8n-CA model), the aforementioned errors are eliminated: the bounding boxes can accurately match the actual distress types and ranges (e.g., the pothole is correctly recognized). This verifies that the CA module can effectively reduce false detections and duplicate detections by enhancing the ability to focus on spatial features. The Ghost module effectively reduces computational redundancy through feature map decomposition. The YOLOv8n-Ghost model achieves a 6.3% reduction in parameter count and a 2.3% increase in FPS, meeting lightweight design goals. However, both R and mAP0.5 metrics decline, indicating that lightweight design may compromise feature extraction capabilities for small object distress. The WIoU loss function reduces localization errors to a certain extent, such as edge blurring in depression areas, by optimizing bounding box regression. It achieves a 3.1 percentage point increase in R and a 1.9 percentage point improvement in mAP0.5, while maintaining P stability, and no change in parameter count or FPS. This demonstrates that loss function optimization constitutes a computationally efficient enhancement strategy.
Figure 5.
Detection effect comparison. (a) Original model YOLOv8n; (b) Improved model YOLOv8n-CA.
The mAP0.5 of the YOLOv8n-CA-WIoU model surpasses that of both the YOLOv8n-CA and YOLOv8n-WIoU models, while maintaining a parameter count of 5.20 M. This demonstrates synergistic collaboration between feature enhancement and localization optimization, concurrently elevating detection rates and localization precision. Ultimately, the YOLOv8n-Ultra model achieves relatively good performance across P, R, and mAP0.5 metrics. Its parameter count and FPS outperforms the YOLOv8n-CA-WIoU model, with parameters totaling just 4.97 M, a 4.4% reduction compared to YOLOv8n-CA and significantly lower than that of traditional models such as YOLOv3 (61.92 M) and Faster R-CNN (107.5 M). It is noteworthy that compared with the baseline YOLOv8n model, the YOLOv8n-CA-WIoU model exhibits a 72.8% increase in parameter count, yet this increment is well-justified by its substantial performance improvements. Specifically, its mAP0.5 and R are enhanced by 3.3 and 3.5 percentage points, respectively, which effectively mitigates critical issues in pavement distress detection such as the missed detection of small-scale cracks and false detection under complex backgrounds. Furthermore, the subsequent integration of the Ghost module into the YOLOv8n-Ultra model further reduces the parameter count to 4.97 M, ultimately achieving an optimal trade-off between detection precision and model lightweighting.
In summary, to systematically synthesize the improvement effects of each optimization strategy, key observations derived from the ablation experiments confirm that the CA module acts as a core driver for performance enhancement, independently improving the model’s R by 3.2 percentage points and mAP0.5 by 2.4 percentage points, thereby effectively capturing complex distress features such as the topological structures of alligator cracks and the extension trajectories of small cracks. The Ghost module fulfills the lightweight design requirement by reducing the parameter count by 6.3% and increasing FPS by 2.3%, though its R and mAP0.5 slightly decline, which is compensated by the subsequent integration of the CA module. Meanwhile, the WIoU loss function optimizes bounding box regression efficiently, boosting R by 3.1 percentage points and mAP0.5 by 1.9 percentage points without introducing extra parameters, which mitigates localization errors in complex backgrounds. The synergistic integration of these three strategies in the YOLOv8n-Ultra model leads to an overall improvement of 3.8 percentage points in mAP0.5 and 4.7 percentage points in R compared to the baseline YOLOv8n model, with the parameter count controlled at 4.97 M. This verifies that the collaborative design of feature enhancement, lightweight design, and regression optimization effectively balances detection precision, computational efficiency, and real-time performance. The coupling of these three components ultimately enables the YOLOv8n-Ultra model to demonstrate certain advantages in the trade-off between detection performance and computational overhead.
4. Conclusions
This study addresses the demand for pavement distress detection in complex backgrounds by constructing the lightweight detection model YOLOv8n-Ultra through multi-dimensional synergistic optimization, achieving certain improvements in detection precision and efficiency. Validated by three repeated experiments and a paired t-test (p < 0.05), experimental results demonstrate stable improvements in core metrics for the YOLOv8n-Ultra model. The precision (P) has increased from 78.5% to 79.4%, indicating that the model effectively suppresses false detections caused by background noise such as pavement textures and shadows. The recall (R) has increased from 74.0% to 78.7%, showcasing enhanced capability in capturing complex morphological distresses like alligator cracks and contiguous depressions. The comprehensive performance metric mAP0.5 has improved by 3.8 percentage points to 82.7%, validating the model’s statistical reliability and adaptability to multi-scale and multi-type distress scenarios. In terms of efficiency, the model’s parameter count has only increased by 65.1% to 4.97 M, remaining significantly lower than traditional models such as YOLOv3 (61.92 M) and Faster-RCNN (107.5 M), achieving a relatively balanced performance between lightweight design and precision. The aforementioned performance breakthrough stems from synergistic collaboration across multiple modules. The CA module precisely captures spatial details of distress and enhances long-range semantic associations through coordinate encoding and row-column feature interaction, thereby alleviating the shortcomings of traditional modules to a certain extent such as SE and BAM in spatial information loss. The Ghost module employs sparse convolutions to eliminate feature redundancy while preserving critical semantic information, facilitating lightweight model design. The WIoU loss function incorporates a dynamic focusing mechanism to optimize bounding box regression precision for low-quality samples, enhancing detection capabilities for minute cracks and low-contrast potholes. Through a triple-optimization pathway of feature enhancement, structural lightweighting and loss optimization, a relatively balanced performance between precision and lightweight design in pavement distress detection has been achieved.
It is noteworthy that this study still has certain limitations. First, in terms of dataset diversity, the RD dataset is predominantly composed of asphalt pavement samples, with relatively limited coverage of concrete, gravel, and other pavement types. Meanwhile, distress samples are mainly collected under common lighting conditions, lacking sufficient coverage of extreme weather scenarios (e.g., heavy rain, dense fog, and strong sunlight glare), which may restrict the model’s generalization ability in complex real-world environments. Second, regarding the detection of small cracks with high curvature, the model’s detection completeness is slightly insufficient. The linear transformation mechanism of the Ghost module may weaken the continuity of curved crack trajectories, thereby leading to partial missed detections. Regarding the expected performance in real-time on-board systems, the YOLOv8n-Ultra model exhibits favorable deployment potential. With a lightweight parameter count of 4.97 M and an FPS of 202.4 f/s, the model was tested on the experimental hardware NVIDIA GeForce RTX 2060 SUPER GPU as specified in Section 3.2. It is capable of meeting the real-time response requirement of on-board systems, which generally requires ≥ 15 FPS.
Future research may integrate multi-sensor data such as LiDAR point clouds and infrared thermal imaging to construct three-dimensional semantic models of pavement distress, so as to enable joint analysis of distress depth and appearance features, thereby providing comprehensive grounds for maintenance decision-making. Meanwhile, efforts will be devoted to expanding the dataset with diverse pavement types and extreme weather samples, and optimizing the feature extraction mechanism for high-curvature small cracks to address the current limitations of the model. The outcomes of this study provide a feasible technical reference for pavement distress detection, which may contribute to the development of digitization and intelligentization in road maintenance.
Author Contributions
Conceptualization, W.Z. and S.L.; methodology, W.Z.; software, W.Z.; validation, W.Z., X.L. and Y.F.; formal analysis, W.Z.; investigation, W.Z.; resources, W.Z.; data curation, W.Z., X.L. and Y.F.; writing—original draft preparation, W.Z.; writing—review and editing, S.L.; visualization, W.Z.; supervision, S.L., X.L. and Y.F.; project administration, S.L.; funding acquisition, S.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Natural Science Foundation of China, grant number 51908194 and the Guangxi Key R&D Programme, grant number AB20297033.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.
Conflicts of Interest
Author Xiaochao Li was employed by China Communications Construction Company Road and Bridge East China Engineering Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- Editorial Department of China Journal of Highway and Transport. Review on China’s Pavement Engineering Research: 2024. China J. Highw. Transp. 2024, 37, 1–81. [Google Scholar] [CrossRef]
- Akagic, A.; Buza, E.; Omanovic, S.; Karabegovic, A. Pavement Crack Detection Using Otsu Thresholding for Image Segmentation. In Proceedings of the 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 21–25 May 2018; pp. 1092–1097. [Google Scholar]
- Kheradmandi, N.; Mehranfar, V. A Critical Review and Comparative Study on Image Segmentation-Based Techniques for Pavement Crack Detection. Constr. Build. Mater. 2022, 321, 135–147. [Google Scholar] [CrossRef] [Scilit]
- Zeng, J.Y.; Zhong, H. YOLOv8-PD: An Improved Road Damage Detection Algorithm Based on YOLOv8n Model. Sci. Rep. 2024, 14, 12052. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sholevar, N.; Golroo, A.; Esfahani, S.R. Machine learning techniques for pavement condition evaluation. Automation in Con-struction 2022, 136, 104190. [Google Scholar] [CrossRef] [Scilit]
- Ganaie, M.A.; Hu, M.H.; Malik, A.K.; Tanveer, M.; Suganthan, P.N. Ensemble Deep Learning: A Review. Eng. Appl. Artif. Intell. 2022, 115, 105151. [Google Scholar] [CrossRef] [Scilit]
- Yan, X.Q.; Hu, S.Z.; Mao, Y.Q.; Ye, Y.D.; Yu, H. Deep Multi-View Learning Methods: A Review. Neurocomputing 2021, 448, 106–129. [Google Scholar] [CrossRef] [Scilit]
- Gill, S.S.; Golec, M.; Hu, J.M.; Xu, M.X.; Du, J.H.; Wu, H.M.; Walia, G.K.; Murugesan, S.S.; Ali, B.; Kumar, M.; et al. Edge AI: A Taxonomy, Systematic Review and Future Directions. Cluster Comput. 2025, 28, 18. [Google Scholar] [CrossRef] [Scilit]
- Fu, Y.; Shi, W.; Chen, D.; Zhu, J.; Lv, C. An Improved YOLO-Based Algorithm for Aquaculture Object Detection. Appl. Sci. 2025, 15, 11724. [Google Scholar] [CrossRef] [Scilit]
- Hussain, M. YOLOv1 to v8: Unveiling Each Variant-A Comprehensive Review of YOLO. IEEE Access 2024, 12, 42816–42833. [Google Scholar] [CrossRef] [Scilit]
- Kang, S.Z.; Hu, Z.Y.; Liu, L.J.; Zhang, K.X.; Cao, Z.Y. Object Detection YOLO Algorithms and Their Industrial Applications: Overview and Comparative Analysis. Electronics 2025, 14, 1104. [Google Scholar] [CrossRef] [Scilit]
- Muzammul, M.; Li, X. Comprehensive Review of Deep Learning-Based Tiny Object Detection: Challenges, Strategies, and Future Directions. Knowl. Inf. Syst. 2025, 67, 3825–3913. [Google Scholar] [CrossRef] [Scilit]
- Wang, D.; Liu, Z.; Gu, X.; Wu, W.; Chen, Y.; Wang, L. Automatic Detection of Pothole Distress in Asphalt Pavement Using Improved Convolutional Neural Networks. Remote Sens. 2022, 14, 3892. [Google Scholar] [CrossRef] [Scilit]
- Wu, Y.; Shi, J.; Ma, W.; Liu, B. Bridge Crack Recognition Method Based on Yolov5 Neural Network Fused with Attention Mechanism. Int. J. Intell. Inf. Technol. 2024, 20, 1–25. [Google Scholar] [CrossRef] [Scilit]
- Hu, X.; Yan, Y.; Wang, D.; Zhang, Y. Lightweight Pavement Disease Detection Based on YOLOM Algorithm. China J. Highw. Transp. 2024, 37, 381–391. [Google Scholar] [CrossRef]
- Qiao, W.; Liu, Q.; Wu, X.; Ma, B.; Li, G. Automatic Pixel-Level Pavement Crack Recognition Using a Deep Feature Aggregation Segmentation Network with a scSE Attention Mechanism Module. Sensors 2021, 21, 2902. [Google Scholar] [CrossRef] [Scilit]
- Deng, Z.P.; Liu, Z.Q.; Zhao, F.Z.; Wang, M.M.; Zhao, H.R. SE-YOLOv8: A Model for Seaside Pavement Crack Detection in Remote Sensing Images. J. Appl. Remote Sens. 2025, 19, 032006. [Google Scholar] [CrossRef] [Scilit]
- Jiang, S.X.; Zou, X.X.; Yang, J.X. Concrete bridge crack detection method based on improved YOLO v8s in complex backgrounds. J. Traffic Transp. Eng. 2024, 24, 135–147. [Google Scholar]
- Wang, S.C.; Cai, B.X.; Wang, W.D.; Li, Z.; Hu, W.B.; Yan, B.; Liu, X.H. Automated Detection of Pavement Distress Based on Enhanced YOLOv8 and Synthetic Data with Textured Background Modeling. Transp. Geotech. 2024, 48, 101304. [Google Scholar] [CrossRef] [Scilit]
- Ning, Z.P.; Wang, H.; Li, S.L.; Xu, Z.C. YOLOv7-RDD: A Lightweight Efficient Pavement Distress Detection Model. IEEE Trans. Intell. Transp. Syst. 2024, 25, 6994–7003. [Google Scholar] [CrossRef] [Scilit]
- Yuan, B.; Sun, Z.Y.; Pei, L.L.; Li, W.; Zhao, K.Y. Shuffle Attention-Based Pavement-Sealed Crack Distress Detection. Sensors 2024, 24, 5757. [Google Scholar] [CrossRef] [Scilit]
- Xiong, C.Q.; Zayed, T.; Abdelkader, E.M. A Novel YOLOv8-GAM-Wise-IoU Model for Automated Detection of Bridge Surface Cracks. Constr. Build. Mater. 2024, 414, 135025. [Google Scholar] [CrossRef] [Scilit]
- Wei, X.; Zhou, J. Multimodal Road Traffic Detection Algorithm based on Improved YOLOv8. Front. Comput. Intell. Syst. 2025, 12, 89–96. [Google Scholar] [CrossRef] [Scilit]
- Liu, C.; Yao, Y.S.; Li, J.; Qian, J.F.; Liu, L.H. Research on Lightweight GPR Road Surface Disease Image Recognition and Data Expansion Algorithm Based on YOLO and GAN. Case Stud. Constr. Mater. 2024, 20, e02779. [Google Scholar] [CrossRef] [Scilit]
- Chen, X.B.; Liu, C.; Chen, L.; Zhu, X.D.; Zhang, Y.H.; Wang, C.X. A Pavement Crack Detection and Evaluation Framework for a UAV Inspection System Based on Deep Learning. Appl. Sci. 2024, 14, 1157. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Liu, X.; Dong, J. Strategies for inserting attention in computer vision. Multimed. Tools Appl. 2024, 83, 42189–42206. [Google Scholar] [CrossRef] [Scilit]
- Han, K.; Wang, Y.H.; Tian, Q.; Guo, J.Y.; Xu, C.J.; Xu, C. GhostNet: More Features from Cheap Operations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 14–19 June 2020; pp. 1577–1586. [Google Scholar] [CrossRef] [Scilit]
- Li, Z.C.; Xiao, L.X.; Shen, M.L.; Tang, X.Y. A Lightweight YOLOv8-Based Model with Squeeze-and-Excitation Version 2 for Crack Detection of Pipelines. Appl. Soft Comput. 2025, 177, 113260. [Google Scholar] [CrossRef] [Scilit]
- JTG 5210-2018; Technical Specification for Pavement Condition Evaluation. Ministry of Transport of the People’s Republic of China: Beijing, China, 2018.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






