Road crack detection method based on multi-scale pooling attention and edge enhancement

By introducing multi-scale pooling attention and edge enhancement modules into the YOLO detector, the problems of missed detection and false detection in road crack detection are solved, achieving higher detection accuracy and robustness, and making it suitable for road crack recognition in complex road surface backgrounds.

CN122200149APending Publication Date: 2026-06-12KUNMING UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2026-03-25
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing YOLO series detectors suffer from missed detections and false detections in road crack detection, especially in identifying minute transverse cracks and complex road surface backgrounds. Furthermore, the non-maximum suppression (NMS) hyperparameter setting affects the accuracy and speed of the detector.

Method used

A road crack detection method based on multi-scale pooling attention and edge enhancement is adopted. By introducing multi-scale pooling attention module and edge enhancement module into the backbone network, the feature response of crack area is enhanced and background interference is suppressed. The detection results are optimized by combining adaptive weighting and loss function.

Benefits of technology

It significantly reduces the false negative and false positive rates, improves detection accuracy and robustness, and can effectively identify small and irregular cracks in complex backgrounds, ensuring real-time performance and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200149A_ABST
    Figure CN122200149A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-scale pooling attention and edge enhancement's road crack detection method, it obtains road damage dataset, and the road image in dataset is washed and supplemented;Crack in the road image in dataset is labeled, and crack is classified according to transverse crack, longitudinal crack, netted crack and pit;The dataset after labeling and classification is used to train road crack target detection network, and the road crack target detection model is obtained;The road image to be detected is obtained, and it is input into road crack target detection model and detected, and crack detection result is obtained;The road crack target detection network includes sequentially connected main network ResNet18, encoder, decoder and detection head;The encoder includes three parallel 3×3 convolution branch, 5×5 convolution branch and 7×7 convolution branch;3×3 / 5×5 / 7×7 convolution branch includes sequentially connected 3×3 pooling attention module, 1×1 convolution layer, 3×3 / 5×5 / 7×7 convolution layer and edge enhancement module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection, and more specifically to a road crack detection method based on multi-scale pooling attention and edge enhancement. Background Technology

[0002] Under the continuous erosion of the natural environment and the repeated load of heavy traffic, the frequency of road surface defects such as cracks and potholes has increased significantly. This not only directly endangers driving safety but also causes maintenance costs to rise continuously. Therefore, the development of efficient and high-precision road defect identification technology has become a core issue that needs to be addressed.

[0003] Deep learning applications in object detection are mainly divided into two categories: two-stage object detection algorithms and one-stage object detection algorithms. Two-stage object detection algorithms, represented by the R-CNN series, require generating region candidate boxes first, followed by sample classification. Single-stage object detection algorithms, represented by the SSD and YOLO series, offer faster detection speeds and are more suitable for applications with high real-time requirements.

[0004] In recent years, significant breakthroughs have been achieved in the field of target detection, with the YOLO series of algorithms renowned for their high accuracy, few parameters, and ease of deployment. However, in practical applications of road crack detection, existing YOLO detectors face serious issues of missed and false detections: on the one hand, minute transverse cracks and network cracks are easily missed due to their small pixel ratio and inconspicuous features; on the other hand, complex road background interference can easily lead to the misidentification of zebra crossings, asphalt repair marks, etc., as cracks.

[0005] However, during the prediction process, these detectors generate redundant predicted bounding boxes, which typically need to be filtered and selected using non-maximum suppression (NMS). The hyperparameter settings of NMS and the number of input predicted boxes significantly affect the accuracy and speed of the detector, which has become a bottleneck restricting the performance improvement of the YOLO detector. Especially in the scenario of road crack detection, inappropriate NMS parameters will further exacerbate the problems of missed detections and false detections, affecting the reliability of practical applications. Summary of the Invention

[0006] To address the aforementioned shortcomings in existing technologies, the road crack detection method based on multi-scale pooling attention and edge enhancement provided by this invention solves the problems of missed detection and false detection in existing road surface crack detection methods.

[0007] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: A road crack detection method based on multi-scale pooling attention and edge enhancement is provided, which includes the following steps: Obtain a road damage dataset and clean and supplement the road images in the dataset; Label the cracks in the road images in the dataset and classify the cracks as transverse cracks, longitudinal cracks, network cracks, and potholes; The road crack target detection network was trained using the labeled and classified dataset to obtain the road crack target detection model; Acquire an image of the road to be detected and input it into a road crack target detection model for detection to obtain crack detection results; The road crack target detection network includes a backbone network ResNet18, an encoder, a decoder, and a detection head connected in sequence. The encoder includes three parallel 3×3 convolutional branches, a 5×5 convolutional branch, and a 7×7 convolutional branch. The 3×3 convolutional branch includes a 3×3 pooling attention module, a 1×1 convolutional layer, a 3×3 convolutional layer, and an edge enhancement module connected in sequence. The 5×5 pooling attention module and the 7×7 pooling attention module are obtained by replacing the 3×3 pooling attention module in the 3×3 convolutional branch with a 5×5 pooling attention module and a 7×7 pooling attention module.

[0008] Furthermore, the 3×3 pooling attention module has 16 channels, and the method for processing the feature map F output by the backbone network ResNet18 using the 3×3 pooling attention module includes: The feature map F is input into the max pooling layer, the average pooling layer and the 3×3 convolutional layer respectively. The size of the feature map F is reduced in the X direction to obtain the first pooling feature. The feature is smoothed with the local region average value in the Y direction to reduce noise and obtain the second pooling feature. Convolution operation is then performed to obtain the first convolutional feature. After concatenating the first pooling feature and the second pooling feature, the convolution operation is performed on the 1×1 convolutional layer to obtain the second convolutional feature. The second convolutional features are input into a Sigmoid activation function to generate the first channel attention weights. Then, the two first channel attention weights and the feature map F are weighted to obtain the first weighted feature. After the first weighted feature is processed by the group normalization layer, the group normalized feature is obtained. Then, the group normalized feature is input into the Sigmoid activation function to generate the second channel attention weight. The first convolution feature and the second channel attention weight are multiplied by a matrix to obtain the second weighted feature. After inputting the first convolutional feature into the average pooling layer, the third pooling feature is obtained. Then, the third pooling feature is input into the Sigmoid activation function to generate the third channel attention weight. The group normalized feature and the third channel attention weight are multiplied by a matrix to obtain the third weighted feature. After concatenating the second and third weighted features, the fourth channel attention weight is generated using the Sigmoid activation function. Then, the feature map F is multiplied with the fourth channel attention weight to obtain a multi-scale feature map.

[0009] Furthermore, both the 5×5 pooling attention module and the 7×7 pooling attention module have 16 channels. By replacing the 3×3 convolutional layer in the method of processing the feature map F output by the backbone network ResNet18 with a 5×5 convolutional layer and a 7×7 convolutional layer, respectively, we can obtain the method of processing the feature map F using the 5×5 multi-scale pooling attention module and the 7×7 multi-scale pooling attention module.

[0010] Furthermore, the method by which the edge enhancement module processes the convolutional feature A output by the 3×3 convolutional layer of its respective convolutional branch includes: The convolutional feature A output from the 3×3 convolutional layer is input into the CBR module for feature extraction to obtain the first feature. Then, it is input into a 3×3 depth classifiable convolutional layer and a first 1×1 convolutional layer in sequence to obtain the second feature. The Sobel operator is used to calculate the gradients of the second feature in the X and Y directions respectively, and the gradient magnitudes in the X and Y directions are obtained. The two gradient magnitudes are then fused and compressed into a single-channel spatial attention map. A second 1×1 convolutional layer is used to convolve the single-channel spatial attention map, and then the ReLU activation function is used to activate the output of the second 1×1 convolutional layer to obtain the third feature. The third feature is input into the third 1×1 convolutional layer for convolution operation. Then, the Sigmoid activation function is used to map the output of the third 1×1 convolutional layer to the [0, 1] interval to obtain the attention weight map. Combine attention weight map with learnable weights Perform matrix multiplication to obtain the fourth feature, and then perform element-wise multiplication of the fourth feature with the convolutional feature A to obtain the fifth feature; The fifth feature map is fused with convolutional feature A to obtain the enhanced feature map.

[0011] Furthermore, the CBR module includes a 3×3 convolutional layer that performs convolution operations on convolutional feature A, a batch normalization layer that performs batch normalization operations on the output of the 3×3 convolutional layer, and a ReLU activation function that performs ReLU activation operations on the features after batch normalization.

[0012] Furthermore, the loss function of the road crack target detection network The expression is: , in, and All are adaptive weights that change as the training process progresses; For regression loss; Preset safety threshold; Based on The loss; For shape regularization; The global weights for the shape regularization term; and These are all weight hyperparameters for the shape regularization term; and These represent the width and height of the target scale feature, respectively; and These represent the width and height, respectively, of the real target's scale features. This is for absolute value operations.

[0013] Furthermore, the regression loss The expression is: , , , in, For normalized Wasserstein distance; It is an exponential function; The squared second-order Wasserstein-2 distance between the predicted and ground truth bounding boxes after modeling them as Gaussian distributions; For scale-aware normalization constants; is the baseline normalization constant related to the target scale feature s; t is the number of training iterations or time steps. Let be the temperature annealing scheduling function for the t-th training iteration; The distance of the central term after robust nuclear contraction; The distance of the scale term after robust kernel shrinkage; and These are the Gaussian means of the predicted bounding box and the ground truth bounding box, respectively. It is an L2 norm; and For robust kernel shrinkage functions, the distances of the central term and the scale term are handled separately; These are the covariance matrices of the predicted bounding box and the ground truth bounding box, respectively. It is an L2 norm; It is the Frobenius norm.

[0014] The beneficial effects of this invention are as follows: The encoder in this scheme uses three parallel branches: a 3×3 convolutional branch to focus on high-frequency details to enhance microcrack or spot features, a 5×5 convolutional branch to capture mesoscale features, maintaining feature expressiveness while ensuring computational efficiency, and a 7×7 convolutional branch to expand the field of view to extract long-range shape priors. By combining the modules of each convolutional branch with 3×3 / 5×5 / 5×5 pooling attention modules, more expressive and discriminative feature representations can be output, supporting the model to understand complex data patterns and thus solving the problems of missed detection and false detection in current road crack detection.

[0015] Following this, the edge enhancement module recalibrates using an adaptive weighting method: first, it obtains channel-level descriptors through global average pooling; then, it generates 0-1 weight vectors using a double-layer 1×1 convolution and a Sigmoid activation function; and finally, it recalibrates the feature map channel by channel to highlight key information and suppress redundant responses. This can solve the problem that small targets are easily ignored or weakened during feature extraction due to their small pixel proportion, especially in complex backgrounds where their features are difficult to capture effectively.

[0016] This solution introduces regression loss into the loss function, which can solve the problem that current monitoring only focuses on overlapping areas or geometric distances, is not sensitive to the distribution differences between predicted and true bounding boxes, and causes redundancy in predicted bounding boxes.

[0017] Existing single-stage target detection algorithms, such as the YOLO series, generally suffer from severe false negatives and false positives in road crack detection tasks. Specifically, because road cracks typically have extremely narrow widths, low contrast, and varied shapes, existing algorithms struggle to effectively distinguish cracks from background textures, shadows, and other interfering factors in complex road surface backgrounds. This leads to the missed detection of small cracks, while textures and stains are falsely detected as cracks. To address this, this invention proposes a road crack detection method based on a multi-scale pooling attention mechanism and edge enhancement. By introducing a multi-scale pooling attention module into the backbone network to enhance the feature response to crack regions, and combining this with an edge enhancement module to strengthen the gradient information at crack edges, this method effectively reduces both the false negative and false positive rates while suppressing background interference and improving crack feature representation.

[0018] Compared with existing technologies, this invention significantly reduces the false negative and false positive rates in road crack detection tasks, and improves overall detection accuracy and robustness while ensuring real-time performance. The multi-scale pooling attention module, by setting pooling branches of different scales in parallel and adaptively weighting the features of each branch, effectively enhances the network's response to small, blurry, and irregular cracks, while suppressing background interference such as road textures, water stains, and shadows, thus significantly reducing the false positive rate. The edge enhancement module, by introducing edge gradient information and learnable attention weights, specifically strengthens crack edge features, effectively improving the continuity and integrity of cracks, reducing false negatives caused by edge fractures, and improving the localization accuracy of the detection results. Through the synergistic effect of the multi-scale pooling attention module and the edge enhancement module, this invention achieves simultaneous suppression of false negatives and false positives, exhibiting stable and reliable detection performance under various lighting conditions and road surface types, and has good prospects for engineering applications. Attached Figure Description

[0019] Figure 1 This is a flowchart of a road crack detection method based on multi-scale pooling attention and edge enhancement.

[0020] Figure 2 This is a schematic diagram of the principle of a road crack target detection network.

[0021] Figure 3 This is a block diagram illustrating the principle of a 3×3 / 5×5 / 5×5 pooling attention module.

[0022] Figure 4 This is a block diagram of the edge enhancement module.

[0023] Figure 5 The image shows a comparison of crack detection in image A using RT-DETR-R18 and the road crack target detection model of this scheme. The left and right images are the detection results of RT-DETR-R18 and the road crack target detection model, respectively.

[0024] Figure 6 The image shows a comparison of crack detection in image B using RT-DETR-R18 and the road crack target detection model of this scheme. The left and right images are the detection results of RT-DETR-R18 and the road crack target detection model, respectively.

[0025] Figure 7 The image shows a comparison of crack detection in image C using RT-DETR-R18 and the road crack target detection model of this scheme. The left and right images are the detection results of RT-DETR-R18 and the road crack target detection model, respectively. Detailed Implementation

[0026] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0027] refer to Figure 1 , Figure 1 A flowchart of a road crack detection method based on multi-scale pooling attention and edge enhancement is shown; as follows: Figure 1 As shown, the method S includes steps S1 to S4.

[0028] In step S1, a road damage dataset is obtained, and the road images in the dataset are cleaned and supplemented. The road damage dataset is the RDD2022 dataset.

[0029] In step S2, cracks in road images within the dataset are labeled, and the cracks are classified as transverse cracks, longitudinal cracks, network cracks, and potholes. In step S3, the road crack target detection network is trained using the labeled and classified dataset to obtain the road crack target detection model; the road crack target detection network includes a backbone network ResNet18, an encoder, a decoder and a detection head connected in sequence.

[0030] The backbone network ResNet-18 first performs joint extraction of shallow texture and deep semantics from the input road image. Its hierarchical residual connection mechanism provides multi-level feature information for subsequent modules while maintaining gradient fluidity. The features are then input into the encoder, which captures global contextual dependencies through a self-attention mechanism, effectively suppressing noise interference in complex backgrounds. The decoder, located after the encoder, is mainly responsible for upsampling the feature maps and restoring spatial information. The detection head adopts a dual-branch design of classification and regression to classify cracks.

[0031] In step S4, the road image to be detected is acquired and input into the road crack target detection model for detection to obtain the crack detection result. That is, the crack is outlined in the road image to be detected using a detection box, and the crack type and detection confidence level are marked in the detection box.

[0032] like Figure 2As shown, the encoder includes three parallel 3×3 convolutional branches, 5×5 convolutional branches, and 7×7 convolutional branches. The 3×3 convolutional branch includes a 3×3 pooling attention module, a 1×1 convolutional layer, a 3×3 convolutional layer, and an edge enhancement module connected in sequence. The 5×5 pooling attention module and the 7×7 pooling attention module are obtained by replacing the 3×3 pooling attention module in the 3×3 convolutional branch with a 5×5 pooling attention module and a 7×7 pooling attention module.

[0033] like Figure 3 As shown, the 3×3 pooling attention module has 16 channels. The method for processing the feature map F output by the backbone network ResNet18 using the 3×3 pooling attention module includes: The feature map F is input into the max pooling layer, the average pooling layer and the 3×3 convolutional layer respectively. The size of the feature map F is reduced in the X direction to obtain the first pooling feature. The feature is smoothed with the local region average value in the Y direction to reduce noise and obtain the second pooling feature. Convolution operation is then performed to obtain the first convolutional feature. After concatenating the first pooling feature and the second pooling feature, the convolution operation is performed on the 1×1 convolutional layer to obtain the second convolutional feature. The second convolutional features are input into a Sigmoid activation function to generate the first channel attention weights. Then, the two first channel attention weights and the feature map F are weighted to obtain the first weighted feature. After the first weighted feature is processed by the group normalization layer, the group normalized feature is obtained. Then, the group normalized feature is input into the Sigmoid activation function to generate the second channel attention weight. The first convolution feature and the second channel attention weight are multiplied by a matrix to obtain the second weighted feature. After inputting the first convolutional feature into the average pooling layer, the third pooling feature is obtained. Then, the third pooling feature is input into the Sigmoid activation function to generate the third channel attention weight. The group normalized feature and the third channel attention weight are multiplied by a matrix to obtain the third weighted feature. After concatenating the second and third weighted features, the fourth channel attention weight is generated using the Sigmoid activation function. Then, the feature map F is multiplied with the fourth channel attention weight to obtain a multi-scale feature map.

[0034] In this scheme, the first pooling feature obtained by the max pooling layer can retain the key features of the feature map F. The average pooling layer smooths the features in the Y direction with the local average value, which can reduce noise and resist overfitting. Then, the 3×3 convolutional layer can extract extensive spatial information such as edges and textures. Then, the multi-source features are fused by "feature concatenation + 1×1 convolution" and the channels and dimensions are adjusted. Multiple "Sigmoid activation functions" introduce nonlinearity to enhance the model expression. "Reweighting" highlights important features based on the activation output. "Group normalization" stabilizes training, accelerates convergence and improves generalization. Multiple "matrix multiplications" realize feature transformation and fusion. Finally, the "cross-space learning" module strengthens features in different spatial dimensions.

[0035] In this scheme, both the 5×5 pooling attention module and the 7×7 pooling attention module have 16 channels. By replacing the 3×3 convolutional layer in the method of processing the feature map F output by the 3×3 pooling attention module with a 5×5 convolutional layer and a 7×7 convolutional layer, respectively, we can obtain the methods of processing the feature map F using the 5×5 multi-scale pooling attention module and the 7×7 multi-scale pooling attention module.

[0036] The entire 3×3 / 5×5 / 7×7 pooling attention module extracts, fuses, and enhances features at multiple levels through pooling, convolution, normalization, activation, and matrix operations. It can output more expressive and discriminative feature representations, supporting the model's understanding of complex data patterns.

[0037] like Figure 4 As shown, the method by which the edge enhancement module processes the convolutional feature A output by the 3×3 convolutional layer of its convolutional branch includes: The convolutional feature A output from the 3×3 convolutional layer is input into the CBR module for feature extraction to obtain the first feature. Then, it is sequentially input into a 3×3 depthwise separable convolutional layer and a first 1×1 convolutional layer to obtain the second feature. The CBR module can reduce the number of channels and extract basic edge information. Subsequently, depthwise separable convolution (DWConv 3×3) is used to further enhance the directional representation of the edge features, making the features more discriminative. Finally, a 1×1 convolution is used to restore the channels to their original dimensions to ensure the integrity and usability of subsequent stacking operations.

[0038] The Sobel operator is used to calculate the gradients of the second feature in the X and Y directions, respectively, and the gradient magnitudes in the X and Y directions are obtained. The two gradient magnitudes are then fused and compressed into a single-channel spatial attention map. By introducing edge gradients, the network can be guided to focus on the target boundary.

[0039] A second 1×1 convolutional layer is used to convolve the single-channel spatial attention map, and then the ReLU activation function is used to activate the output of the second 1×1 convolutional layer to obtain the third feature. The third feature is input into the third 1×1 convolutional layer for convolution operation. Then, the Sigmoid activation function is used to map the output of the third 1×1 convolutional layer to the [0, 1] interval to obtain the attention weight map. The Sigmoid function allows the network to learn "which positions are more important (output close to 1) and which positions are not important (output close to 0)".

[0040] Combine attention weight map with learnable weights Perform matrix multiplication to obtain the fourth feature, and then perform element-wise multiplication of the fourth feature with the convolutional feature A to obtain the fifth feature; The fifth feature map is fused with convolutional feature A to obtain the enhanced feature map.

[0041] The edge enhancement module provided in this solution processes the input features using the methods described above. Its output retains both the original important information and fully integrates edge features, significantly improving the model's detection performance for small targets in complex scenes. To further enhance adaptability, the attention map also introduces learnable weights. It can dynamically adjust the contribution ratio of edge information according to different input features, and continuously optimize the edge capture capability of small targets.

[0042] In implementation, the preferred CBR module of this scheme includes a 3×3 convolutional layer that performs convolution operation on convolutional feature A, a batch normalization layer that performs batch normalization operation on the output of the 3×3 convolutional layer, and a ReLU activation function that performs ReLU activation operation on the features after batch normalization operation.

[0043] In one embodiment of the present invention, the loss function of the road crack target detection network is... The expression is: , in, and All are adaptive weights that change as the training process progresses; For regression loss; Preset safety threshold; Based on The loss; For shape regularization; The global weights for the shape regularization term; and These are all weight hyperparameters for the shape regularization term; and These represent the width and height of the target scale feature, respectively; and These represent the width and height, respectively, of the real target's scale features. This is for absolute value operations.

[0044] Wherein, the regression loss The expression is: , , , in, For normalized Wasserstein distance; It is an exponential function; The squared second-order Wasserstein-2 distance between the predicted and ground truth bounding boxes after modeling them as Gaussian distributions; For scale-aware normalization constants; is the baseline normalization constant related to the target scale feature s; t is the number of training iterations or time steps. Let be the temperature annealing scheduling function for the t-th training iteration; The distance of the central term after robust nuclear contraction; The distance of the scale term after robust kernel shrinkage; and These are the Gaussian means of the predicted bounding box and the ground truth bounding box, respectively. It is an L2 norm; and For robust kernel shrinkage functions, the distances of the central term and the scale term are handled separately; These are the covariance matrices of the predicted bounding box and the ground truth bounding box, respectively. It is an L2 norm; It is the Frobenius norm.

[0045] The road crack target detection network in this scheme adopts the above loss function and uses a hybrid criterion of "NWD as the main criterion and IoU as the safety threshold" in the training and inference stages for label allocation and non-maximum suppression, so as to obtain more robust gradients and more accurate sample matching in dense and small target scenarios.

[0046] The effectiveness of this road crack detection method will be illustrated below with specific examples: The hardware configuration in this embodiment is as follows: a 13th generation Intel Core i5-13600K processor, an NVIDIA GeForce RTX 3090 graphics card, and 16GB of RAM. The operating system is Windows 10, the programming language is Python 3.8, and the development is based on the PyTorch framework.

[0047] Based on the RDD-2022 road crack dataset, this embodiment compares 11 existing detection models (YOLOv3-tiny, YOLOv5s, YOLOv6s, YOLOv7-tiny, YOLOv8s, YOLOv9t, YOLOv10s, YOLOv11s, YOLOv12s, YOLOv13, and RT-DETR-R18) with the road crack target detection network / model involved in this scheme. The evaluation metrics used are mAP@0.5, precision, recall, and mAP50-95. The comparison of the 12 models in these four metrics can be found in Table 1.

[0048] Table 1. Evaluation results of 12 models trained on the RDD-2022 road crack dataset. As shown in Table 1, YOLOv3-tiny, as an early lightweight network, has extremely low parameters and computational cost. However, due to its weak feature description ability, it produces a large number of false negatives and false positives when processing tiny cracks, resulting in its lowest ranking across all four metrics. YOLOv5s, after focus structure optimization and PANet enhancement, improves upon YOLOv3-tiny by approximately 8%, but it still struggles to accurately describe the fine edges of cracks, and its recall rate remains low.

[0049] YOLOv6s improved mAP50-95 by 2.7 points through Rep-PAN and decoupled detectors, but the recall rate decreased by 1.2%, indicating that there are still issues with missing detection of extremely fine cracks. After YOLOv7-tiny introduced the E-ELAN module, the channel pruning was severe, resulting in overall accuracy being on par with YOLOv5s, with an even lower mAP50-95 value, and a mediocre balance between speed and accuracy.

[0050] YOLOv9t further improved mAP50-95 through programmable gradient information, but deep compression led to a drop in recall to 61.4%, with significant missed detections. YOLOv10s partially adopted RepVGG-style convolutions to achieve higher inference speed, but the accuracy improvement was limited and it was prone to losing details at the fracture edges. YOLOv11s expanded the receptive field based on YOLOv8, achieving mAP@0.5 exceeding 69% for the first time, but the mAP50-95 only improved by 1.4 points, indicating that fracture geometric modeling is still imperfect.

[0051] YOLOv12s introduced separable large-kernel convolutions to expand the receptive field, but due to the limited number of channels, its metrics were slightly lower than YOLOv11s. YOLOv13, by integrating attention mechanisms and multi-scale FPN, significantly improved recall to 65.6%, becoming the best-performing single-stage YOLO solution overall. RT-DETR-R18, based on the DETR architecture and employing Transformer global modeling, achieved a recall of 66.2%. However, its small crack size made it difficult to accurately return to the original location query, resulting in a lower mAP50-95 metric than YOLOv13.

[0052] The road crack target detection network / model used in this solution achieves 71.9% mAP@0.5, 74.5% accuracy, 68.4% recall, and 41.3% mAP50-95. All four metrics are leading: mAP@0.5 and accuracy rank first, recall is second only to RTDETR with a small difference, and mAP50-95 is on par with YOLOv13 and significantly better than other methods.

[0053] The above comparative experiments verified the effectiveness of the collaborative optimization of the 3×3 / 5×5 / 5×5 pooling attention module (hereinafter referred to as MPGA), edge enhancement module (hereinafter referred to as EGA), and loss function (hereinafter referred to as SAR-NWD) constructed in this scheme, enabling the road crack detection method of this scheme to achieve an overall improvement in road crack detection performance under the condition of limited computational gain.

[0054] In addition, this embodiment also conducted ablation experiments on MPGA, EGA and SAR-NWD, and the experimental results can be found in Table 2.

[0055] Table 2 Comparison of ablation experiments in the three parts The MPGA, EGA, and SAR-NWD modules in this solution are three lightweight modules that can effectively improve accuracy without significantly increasing the number of parameters and computational cost (requiring only 2.7 MB of parameters and 3.2 GFLOPs). Specifically: the MPGA module achieves a 1.8% mAP gain, significantly suppressing background noise; the EGA module improves mAP by 2.0%, focusing on small target edge processing; and SAR-NWD achieves a 0.9% mAP gain at zero parameter cost, enhancing geometric localization capabilities.

[0056] As shown in Table 2, the three paired combinations further validated the complementarity between modules: MPGA+EGA (Group 5) approached the 71.7% mAP limit through "noise reduction + edge sharpening" technology; MPGA+SAR-NWD (Group 7) achieved 71.3% mAP with a computational power of 60.4 GFLOPs, demonstrating the high cost-effectiveness of "noise reduction + fine regression"; EGA+SAR-NWD (Group 6) also achieved 70.9% mAP, consolidating the consistency of small target boundaries. The final three-module parallel scheme (Group 8) required only 22.9 MB of parameters and 63.2 GFLOPs to achieve 71.9% mAP, a 3.1% improvement over the benchmark, achieving the best balance between accuracy and efficiency.

[0057] Figures 5-7 The image shows a comparison of crack detection on image AC using RT-DETR-R18 (hereinafter referred to as Model A) and the road crack target detection model of this scheme (hereinafter referred to as Model B). The left and right images show the detection results of RT-DETR-R18 and the road crack target detection model, respectively. In the image, the four categories are represented as D00 transverse cracks, D10 longitudinal cracks, D20 reticular cracks, and D40 potholes.

[0058] exist Figure 5 Model A detected a longitudinal crack in the green box as two cracks and the network of cracks on the right as transverse cracks; while Model B in this scheme accurately detected these cracks and had a higher confidence level than Model A.

[0059] exist Figure 6 In the model, because the overall cracks are relatively simple and have a certain spacing, both models A and B accurately identified these cracks, but model B had a relatively higher confidence level in its detection. Figure 7 In the model A, for the longer crack at the bottom, the left side of the crack is detected as a network crack and the simpler crack on the right side is detected as a longitudinal crack. The model A also divides the two cracks into a single network crack. In contrast, the model B in this scheme accurately identifies this crack, and the confidence level of each detection box is higher than that of model A. Therefore, the model in this scheme has higher detection accuracy.

[0060] pass Figure 5-7 Overall, the road crack target detection model in this solution effectively reduces missed detections and false detections, and is more sensitive to cracks on small targets and in complex backgrounds. The detection bounding box fits the target outline better, significantly improving positioning accuracy. The model's robustness and generalization ability are enhanced, the detection results are more stable and reliable, and it is more suitable for real-world engineering scenarios.

Claims

1. A road crack detection method based on multi-scale pooling attention and edge enhancement, characterized in that, Including the following steps: Obtain a road damage dataset and clean and supplement the road images in the dataset; Label the cracks in the road images in the dataset and classify the cracks as transverse cracks, longitudinal cracks, network cracks, and potholes; The road crack target detection network was trained using the labeled and classified dataset to obtain the road crack target detection model; Acquire an image of the road to be detected and input it into a road crack target detection model for detection to obtain crack detection results; The road crack target detection network includes a backbone network ResNet18, an encoder, a decoder, and a detection head connected in sequence. The encoder includes three parallel 3×3 convolutional branches, a 5×5 convolutional branch, and a 7×7 convolutional branch. The 3×3 convolutional branch includes a 3×3 pooling attention module, a 1×1 convolutional layer, a 3×3 convolutional layer, and an edge enhancement module connected in sequence. The 5×5 pooling attention module and the 7×7 pooling attention module are obtained by replacing the 3×3 pooling attention module in the 3×3 convolutional branch with a 5×5 pooling attention module and a 7×7 pooling attention module.

2. The road crack detection method according to claim 1, characterized in that, The 3×3 pooling attention module has 16 channels. The method for processing the feature map F output by the backbone network ResNet18 using the 3×3 pooling attention module includes: The feature map F is input into the max pooling layer, the average pooling layer and the 3×3 convolutional layer respectively. The size of the feature map F is reduced in the X direction to obtain the first pooling feature. The feature is smoothed with the local region average value in the Y direction to reduce noise and obtain the second pooling feature. Convolution operation is then performed to obtain the first convolutional feature. After concatenating the first pooling feature and the second pooling feature, the convolution operation is performed on the 1×1 convolutional layer to obtain the second convolutional feature. The second convolutional features are input into a Sigmoid activation function to generate the first channel attention weights. Then, the two first channel attention weights and the feature map F are weighted to obtain the first weighted feature. After the first weighted feature is processed by the group normalization layer, the group normalized feature is obtained. Then, the group normalized feature is input into the Sigmoid activation function to generate the second channel attention weight. The first convolution feature and the second channel attention weight are multiplied by a matrix to obtain the second weighted feature. After inputting the first convolutional feature into the average pooling layer, the third pooling feature is obtained. Then, the third pooling feature is input into the Sigmoid activation function to generate the third channel attention weight. The group normalized feature and the third channel attention weight are multiplied by a matrix to obtain the third weighted feature. After concatenating the second and third weighted features, the fourth channel attention weight is generated using the Sigmoid activation function. Then, the feature map F is multiplied with the fourth channel attention weight to obtain a multi-scale feature map.

3. The road crack detection method according to claim 2, characterized in that, Both the 5×5 pooling attention module and the 7×7 pooling attention module have 16 channels. By replacing the 3×3 convolutional layer in the method of processing the feature map F output by the backbone network ResNet18 with a 5×5 convolutional layer and a 7×7 convolutional layer, respectively, we can obtain the method of processing the feature map F using the 5×5 multi-scale pooling attention module and the 7×7 multi-scale pooling attention module.

4. The road crack detection method according to claim 1, characterized in that, The method by which the edge enhancement module processes the convolutional feature A output by the 3×3 convolutional layer of its convolutional branch includes: The convolutional feature A output from the 3×3 convolutional layer is input into the CBR module for feature extraction to obtain the first feature. Then, it is input into a 3×3 depth classifiable convolutional layer and a first 1×1 convolutional layer in sequence to obtain the second feature. The Sobel operator is used to calculate the gradients of the second feature in the X and Y directions respectively, and the gradient magnitudes in the X and Y directions are obtained. The two gradient magnitudes are then fused and compressed into a single-channel spatial attention map. A second 1×1 convolutional layer is used to convolve the single-channel spatial attention map, and then the ReLU activation function is used to activate the output of the second 1×1 convolutional layer to obtain the third feature. The third feature is input into the third 1×1 convolutional layer for convolution operation. Then, the Sigmoid activation function is used to map the output of the third 1×1 convolutional layer to the [0, 1] interval to obtain the attention weight map. Combine attention weight map with learnable weights Perform matrix multiplication to obtain the fourth feature, and then perform element-wise multiplication of the fourth feature with the convolutional feature A to obtain the fifth feature; The fifth feature map is fused with convolutional feature A to obtain the enhanced feature map.

5. The road crack detection method according to claim 4, characterized in that, The CBR module includes a 3×3 convolutional layer that performs convolution operations on convolutional feature A, a batch normalization layer that performs batch normalization operations on the output of the 3×3 convolutional layer, and a ReLU activation function that performs ReLU activation operations on the features after batch normalization.

6. The road crack detection method according to any one of claims 1-5, characterized in that, The loss function of the road crack target detection network The expression is: , in, and All are adaptive weights that change as the training process progresses; For regression loss; Preset safety threshold; Based on The loss; For shape regularization; The global weights for the shape regularization term; and These are all weight hyperparameters for the shape regularization term; and These represent the width and height of the target scale feature, respectively; and These represent the width and height, respectively, of the scale features of the real target. This is for absolute value operations.

7. The road crack detection method according to claim 6, characterized in that, The regression loss The expression is: , , , in, For normalized Wasserstein distance; It is an exponential function; The squared second-order Wasserstein-2 distance between the predicted and ground truth bounding boxes after modeling them as Gaussian distributions; For scale-aware normalization constants; is the baseline normalization constant related to the target scale feature s; t is the number of training iterations or time steps. Let be the temperature annealing scheduling function for the t-th training iteration; The distance of the central term after robust nuclear contraction; The distance of the scale term after robust kernel shrinkage; and These are the Gaussian means of the predicted bounding box and the ground truth bounding box, respectively. It is an L2 norm; and For robust kernel shrinkage functions, the distances of the central term and the scale term are handled separately; These are the covariance matrices of the predicted bounding box and the ground truth bounding box, respectively. It is the Frobenius norm.