Pavement crack segmentation method based on adaptive feature extraction and attention fusion

By introducing dynamic snake convolution and content-guided attention fusion mechanism into the pavement crack segmentation method, the convolution and attention fusion mechanism is constructed, which solves the problem of poor performance of existing deep learning methods in complex backgrounds and small crack detection. , achieving higher segmentation accuracy and robustness.

CN119444768APending Publication Date: 2025-02-14NORTHEAST DIANLI UNIVERSITY
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411395753.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Existing deep learning methods have poor performance when dealing with complex backgrounds, irregular crack distribution, and detection of fine cracks, making it difficult to accurately identify road cracks.

Method used

Using the pavement crack segmentation method based on adaptive feature extraction and attention fusion, the convolution and attention fusion mechanism (CAFMFusion) is constructed by introducing dynamic snake convolution (DSConv) and content-guided attention fusion mechanism (CGAFusion), and the convolution and attention fusion mechanism (CAFMFusion) are constructed to Improve the segmentation performance and robustness of the model for pavement cracks.

Benefits of technology

It significantly improves the performance and robustness of road crack segmentation, can capture complex topological structures and fine crack features more accurately, and enhances the model's adaptive feature extraction ability and segmentation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444768A_ABST
    Figure CN119444768A_ABST
Patent Text Reader

Abstract

The invention discloses a pavement crack segmentation method based on adaptive feature extraction and attention fusion, and relates to the technical field of image recognition, and the method comprises the steps: S1, obtaining a pavement crack data set which comprises a pavement crack training set, a pavement crack verification set and a pavement crack test set; and S2, performing data expansion on the pavement crack training set in the S1, not performing data expansion on the pavement crack verification set and the pavement crack test set to obtain a pavement crack sample set, and selecting a training crack detection network by using the pavement crack verification set obtained in the S1. A content-guided attention mechanism (CGA) is improved by using a convolution and attention fusion module (CAFM), the CGA is added into a content-guided attention fusion module (CGAFUS), a convolution and attention fusion mechanism (CAFMFUSon module is proposed, the model can adaptively focus on a complex topological structure of the crack, the adaptive feature extraction capability of the model on the pavement crack is enhanced, and the pavement crack feature extraction efficiency is improved. Moreover, the features of different levels can be fused more effectively, and the precision and robustness of crack detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a road surface crack segmentation method based on adaptive feature extraction and attention fusion. Background Art

[0002] In the field of pavement crack detection, traditional image processing techniques and machine learning methods are mainly relied on. These methods include histogram transformation, threshold segmentation, edge detection, etc., as well as the use of preprocessing steps such as median filters and morphological filters to improve the reliability of crack detection. However, these traditional methods are often not accurate enough in crack detection under complex backgrounds and it is difficult to identify crack features. In addition, although machine learning methods can consider a variety of factors that affect crack shape, they usually require a large amount of training data and computing resources, rely on manual feature extraction, and are sensitive to environmental changes.

[0003] Deep learning methods have made significant progress in the field of crack detection, such as hierarchical semantic segmentation strategies based on improved U-Net, window-based hybrid self-attention schemes, and deep supervision networks combining FCN and DSN. These methods can effectively identify and assess the degree of damage of pavement cracks. However, existing deep learning methods still face challenges in dealing with complex backgrounds, irregular crack distribution, and small crack detection. These challenges include interference from background noise, irregular crack shapes, and small pixel areas occupied by cracks. Summary of the invention

[0004] The purpose of this application is to provide a pavement crack segmentation method based on adaptive feature extraction and attention fusion to solve the problem that the existing deep learning method proposed in the above background technology has poor pavement crack segmentation performance when dealing with complex backgrounds, irregular crack distribution, and small crack detection.

[0005] To achieve the above objectives, the present application provides the following technical solution: a pavement crack segmentation method based on adaptive feature extraction and attention fusion, comprising the following method steps:

[0006] S1. Obtain a pavement crack dataset, wherein the pavement crack dataset includes a pavement crack training set, a pavement crack verification set, and a pavement crack test set;

[0007] S2, perform data expansion on the pavement crack training set in S1, and do not perform data expansion on the pavement crack verification set and the pavement crack test set, to obtain a pavement crack sample set, and then use the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, and then use the pavement crack test set to test the network performance;

[0008] S3. Construct a U-Net model that introduces the content-guided attention fusion mechanism (CGAFusion) to fuse shallow and deep features, and improve the model's segmentation performance for pavement cracks in a coarse-to-fine manner. In the downsampling process, dynamic snake convolution (DSConv) is introduced, so that the model can adaptively focus on the complex topological structure of cracks, enhance the model's adaptive feature extraction capability for pavement cracks, and use a depth-separable convolution module in upsampling.

[0009] S4. Construct a convolution and attention fusion module (CAFM) to further improve the content-guided attention mechanism (CGA) to obtain the SCAFM module, which improves the segmentation performance and robustness of the model for pavement cracks. By introducing SCAFM into the content-guided attention fusion mechanism, the convolution and attention fusion mechanism (CAFMFusion) is obtained, which captures more crack feature information while achieving the purpose of comprehensive denoising, thereby improving the segmentation accuracy and robustness of the model.

[0010] S5, inputting the pavement crack training set images annotated in S2 into the U-Net model based on the content-guided attention fusion mechanism (CGAFusion) constructed in S3 for training to obtain a trained model;

[0011] S6, using the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, input the pavement crack test set into the trained model for testing, and further obtain the pavement crack test results;

[0012] S7. Compare the pavement crack test result obtained in step S6 with the crack position in the label image corresponding to the pavement crack test set, calculate the evaluation index, and evaluate the test result.

[0013] Furthermore, the pavement crack dataset collected in S1 includes real pictures of pavement cracks and corresponding label pictures.

[0014] Furthermore, the specific use of the content-guided attention fusion mechanism (CGAFusion) in S3 includes the following method steps:

[0015] S31, adaptively fusing the low-level features of the encoder part and the corresponding high-level features through the learned spatial weight modulation features;

[0016] S32. The spatial weights of feature modulation are calculated by using the content-guided attention mechanism (CGA). The low-level features of the encoder part and the corresponding high-level features are input into the content-guided attention mechanism (CGA) to calculate the weights, and then the weighted summation method is used to combine them. At the same time, the input features are increased through jump connections to alleviate the gradient vanishing problem and simplify the learning process. Finally, the fused features are projected by the convolution layer to obtain the final features.

[0017] Furthermore, the S2 specifically includes the following method steps:

[0018] S21, expanding the data of the pavement crack training set by rotating, translating and flipping all training samples in the pavement crack training set, while not expanding the data of the pavement crack verification set and the pavement crack test set;

[0019] S22, resizing the training samples and label samples in the pavement crack training set augmented with data in S21 to facilitate loss calculation;

[0020] S23, using the training samples in S22 to train the network, using the pavement crack validation set to select the best performing model, and using the pavement crack test set to test the network model performance.

[0021] Furthermore, the rotation refers to randomly rotating the image to a number of specified angles to change the orientation of the image content, and the translation refers to horizontally or vertically translating the image on the image plane.

[0022] In summary, the technical effects and advantages of the present invention are as follows:

[0023] In the present invention, by introducing dynamic snake convolution (DSConv), content-guided attention fusion mechanism (CGAFusion) and convolution and attention fusion module (CAFM), a convolution and attention fusion mechanism (CAFMFusion) is proposed. The model can adaptively focus on the complex topological structure of cracks, enhance the model's adaptive feature extraction capability for pavement cracks, and can more effectively fuse features at different levels, improve the accuracy and robustness of crack detection, and achieve the purpose of comprehensive denoising while capturing more crack feature information, significantly improving the performance of pavement crack segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below.

[0025] Figure 1 This is the workflow diagram of this application;

[0026] Figure 2 This is the model structure diagram of this application;

[0027] Figure 3 This is the operation diagram of the dynamic snake convolution (DSConv) in this application;

[0028] Figure 4 This is the structural diagram of the content-guided attention mechanism (CGA) in this application;

[0029] Figure 5 It is the structural diagram of SCAFM in this application;

[0030] Figure 6 This is the structural diagram of the convolution and attention fusion mechanism (CAFMFusion) in this application;

[0031] Figure 7 This is a structural diagram of the convolution and attention fusion module (CAFM) in this application;

[0032] Figure 8 This is a comparison chart of the accuracy between the original model and the improved model in this application;

[0033] Fig. 9 This is a schematic diagram of the test results of the comparative experiment part in this application. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0035] Example: Reference Figure 1-9 A pavement crack segmentation method based on adaptive feature extraction and attention fusion is shown, comprising the following method steps:

[0036] S1. Obtain a pavement crack dataset, wherein the pavement crack dataset includes a pavement crack training set, a pavement crack verification set, and a pavement crack test set, and the collected pavement crack dataset includes real images of pavement cracks and corresponding labeled images;

[0037] S2, perform data expansion on the pavement crack training set in S1, and do not perform data expansion on the pavement crack verification set and the pavement crack test set, to obtain a pavement crack sample set, and then use the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, and then use the pavement crack test set to test the network performance;

[0038] The specific steps include the following:

[0039] S21, performing data expansion on the pavement crack training set by rotating, translating, and flipping all training samples in the pavement crack training set, while no data expansion is performed on the pavement crack verification set and the pavement crack test set, wherein the rotation refers to randomly rotating the image to a number of specified angles to change the orientation of the image content, and the translation refers to translating the image horizontally or vertically on the image plane;

[0040] S22, resizing the training samples and label samples in the pavement crack training set augmented with data in S21 to facilitate loss calculation;

[0041] S23, using the training samples in S22 to train the network, using the pavement crack validation set to select the best performance model, and using the pavement crack test set to test the performance of the network model;

[0042] S3. Construct a U-Net model that introduces the content-guided attention fusion mechanism (CGAFusion) to fuse shallow and deep features, and improve the model's segmentation performance for pavement cracks in a coarse-to-fine manner. In the downsampling process, dynamic snake convolution (DSConv) is introduced, so that the model can adaptively focus on the complex topological structure of cracks, enhance the model's adaptive feature extraction capability for pavement cracks, and use a depth-separable convolution module in upsampling.

[0043] The specific use of the content-guided attention fusion mechanism (CGAFusion) includes the following method steps:

[0044] S31, adaptively fusing the low-level features of the encoder part and the corresponding high-level features through the learned spatial weight modulation features;

[0045] S32, by using the content-guided attention mechanism (CGA) to calculate the spatial weight of feature modulation, the low-level features of the encoder part and the corresponding high-level features are input into the content-guided attention mechanism (CGA) to calculate the weights, and then the weighted summation method is used to combine them. At the same time, the input features are increased through jump connections to alleviate the gradient disappearance problem and simplify the learning process. Finally, the fused features are projected by the convolution layer to obtain the final features;

[0046] S4. Construct a convolution and attention fusion module (CAFM) to further improve the content-guided attention mechanism (CGA) to obtain the SCAFM module, which improves the segmentation performance and robustness of the model for pavement cracks. By introducing SCAFM into the content-guided attention fusion mechanism, the convolution and attention fusion mechanism (CAFMFusion) is obtained, which captures more crack feature information while achieving the purpose of comprehensive denoising, thereby improving the segmentation accuracy and robustness of the model.

[0047] S5, inputting the pavement crack training set images annotated in S2 into the U-Net model based on the content-guided attention fusion mechanism (CGAFusion) constructed in S3 for training to obtain a trained model;

[0048] S6, using the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, input the pavement crack test set into the trained model for testing, and further obtain the pavement crack test results;

[0049] S7. Compare the pavement crack test result obtained in step S6 with the crack position in the label image corresponding to the pavement crack test set, calculate the evaluation index, and evaluate the test result.

[0050] 1. About Dynamic Snake Convolution (DSConv)

[0051] Feature extraction is an important process in convolutional neural networks. Its purpose is to extract important feature information from the input image as input for subsequent tasks such as segmentation and detection. Cracks have various shapes, and the detection of tiny cracks often requires higher sensitivity and precise feature extraction technology. Standard convolution is one of the basic operations used for feature extraction in deep learning. Although standard convolution is very effective and widely used in various deep learning and computer vision tasks, it also has some limitations. For example, the receptive field of a fixed size is completely determined by the size of the convolution kernel, which means that it can only capture local feature information of a fixed size. For the characteristics of cracks, since the pixel area occupied by cracks in the image is small, too much irrelevant information is often introduced in the process of feature extraction, affecting the accuracy of the final model. At the same time, standard convolution lacks spatial flexibility and uses the same convolution kernel weight for each position of the input feature map, resulting in the inability to adapt to the spatial changes of the data set.

[0052] To solve these problems, dynamic snake convolution (DSConv) is introduced in the downsampling process of the U-Net model, such as Figure 3 As shown in the figure, a continuity constraint is introduced in the design of the convolution kernel, allowing each convolution position to select its oscillation direction based on the previous position, and can adaptively focus on slender and curved local structures to accurately capture the characteristics of cracks;

[0053] In order to give the convolution kernel more flexibility and enable it to focus on the complex topological structure of the crack, the deformation offset Δ is introduced, inspired by the deformable convolution. However, when dealing with cracks with slender topological structures, if the model learns the deformation offset completely freely, the receptive field will often deviate from the target. Therefore, in the dynamic snake convolution (DSConv), an iterative strategy is also adopted to select the next position of each target to be processed for observation in turn, so as to ensure the continuity of attention and prevent the perception range from being spread too far due to excessive deformation offset.

[0054] In dynamic snake convolution (DSConv), the standard convolution kernel is linearized in both the x-axis and y-axis directions; consider a convolution kernel of size 9, taking the x-axis direction as an example, the specific position of each grid in K is expressed as: Ki±c=(xi±c,yi±c), where c=0, 1, 2, 3, 4 represents the horizontal distance from the center grid; the selection of each grid position Ki±c in the convolution kernel K is a cumulative process; starting from the center position Ki, the position away from the center grid depends on the position of the previous grid: Ki±1 increases the offset Δ={δ|δ∈[-1,1]} relative to Ki; therefore, the offset needs to be accumulated Σ to ensure that the convolution kernel conforms to the linear morphological structure;

[0055] The change in the x-axis direction is shown in the formula:

[0056]

[0057] The change in the y-axis direction is shown in the formula:

[0058]

[0059] Since the offset Δ is usually a decimal, but the coordinates are usually in integer form, bilinear interpolation is used, as shown in the formula:

[0060] K=∑ K' B(K',K)·K'

[0061] Among them, K represents the decimal position of equation 1 and equation 2, K' lists all integer spatial positions, and B is the bilinear interpolation kernel, which can be decomposed into two one-dimensional kernels as shown in the formula:

[0062] B(K,K')=b(K x ,K' x )·b(K y ,K' y )

[0063] 2. About the Content-Guided Attention Fusion Mechanism (CGAFusion)

[0064] Initially, the content-guided attention mechanism (CGA) was proposed to solve the problem of single image dehazing and improve the performance of neural networks in image restoration tasks; however, its excellent coarse-to-fine processing also plays a good role in the segmentation of road cracks. The detailed process of the content-guided attention mechanism (CGA) is as follows: Figure 4 As shown in the figure, the exclusive SIM of each input feature channel is obtained in a coarse-to-fine manner, and the channel attention weight and spatial attention weight are fully mixed to ensure information interaction; the input feature is used to obtain the output feature W through spatial attention. s , while obtaining the output feature W through channel attention c , as shown in the formula:

[0065]

[0066]

[0067] Among them, max(0,x) is the ReLU activation function, C 1×1 (·) is a convolutional layer with a kernel size of k×k, [·] is a channel-level connection operation, Respectively represent the global average pooling operation across spatial dimensions, the global average pooling operation across channel dimensions, and the global maximum pooling operation across channel dimensions to process features; then simply add W s and W c Fuse together to get W coa , such as:

[0068] W coa =W c +W s

[0069] Then connect it with the original input features at the channel level; W coa Each channel of and X is rearranged in an alternating manner through a channel shuffle operation and output through a group convolutional layer, as shown in the formula:

[0070]

[0071] Among them, σ represents the sigmoid operation, CS(·) represents the channel shuffle operation, A group convolutional layer with a kernel size of k×k is used to represent the k×k kernel size. By assigning a unique spatial importance map SIM to each channel, the model is guided to focus on the important areas of each channel, thereby improving its performance in segmenting pavement cracks.

[0072] However, the above schemes all have the problem of receptive field mismatch; the encoded information in the shallow features is very different from the encoded information in the deep features because they have different receptive fields; a single pixel in the deep features comes from a pixel area in the shallow features, and simple addition or concatenation operations or mixing operations cannot solve the mismatch problem before fusion; therefore, a fusion scheme based on the content-guided attention mechanism (CGA) is proposed, which adaptively fuses the low-level features of the encoder part and the corresponding high-level features through the learned spatial weight modulation features; by using the content-guided attention mechanism (CGA) to calculate the spatial weights of feature modulation, the low-level features of the encoder part and the corresponding high-level features are input into the content-guided attention mechanism (CGA) to calculate the weights, and then the weighted summation method is used to combine them; at the same time, the input features are added through jump connections to alleviate the gradient vanishing problem and simplify the learning process; finally, the fused features are projected by a 1×1 convolution layer to obtain the final features, and the results are shown in the formula;

[0073] F fuse =C 1×1 (F low ·W+F high (1-W)+F low +F high )

[0074] 3. About Convolution and Attention Fusion Mechanism (CAFMFusion)

[0075] Although the content-guided attention fusion mechanism (CGAFusion) has been shown to have a relatively good improvement in crack detection, it still has a great impact on crack segmentation under complex backgrounds. Therefore, we introduce the convolution and attention fusion module (CAFM) to further improve the content-guided attention mechanism (CGA) and obtain the SCAFM module to improve the model's segmentation performance and robustness for pavement cracks. The specific SCAFM structure is as follows: Figure 5 As shown in Figure 2, we introduce SCAFM into the attention fusion mechanism to obtain the content-guided attention fusion mechanism (CGAFusion) as shown in Figure 2. Figure 6 As shown in the figure, it can capture more crack feature information while achieving the purpose of comprehensive denoising, thus improving the segmentation accuracy and robustness of the model;

[0076] The specific structure diagram of the convolution and attention fusion module (CAFM) is as follows Figure 7As shown in the figure, it is mainly divided into two parts. One part is composed of local branches, which use convolution and channel transformation for local feature extraction, and the other part is the global branch. The attention mechanism is used to model long-range feature dependencies. In the local branch structure, in order to enhance cross-channel interaction and promote information integration, 1×1 convolution is first used to adjust the channel information; then the channel information is further mixed by performing channel transformation operations; channel shuffling divides the input tensor into groups along the channel dimension, where depth-separable convolution is used in each group to induce channel shuffling; then, the output tensors of each group are connected along the channel dimension to generate a new output tensor; finally, 3×3×3 convolution is used to extract features; among them, the local branch can be expressed as:

[0077] F conv =W 3×3×3 (CS(W 1×1 (Y)))

[0078] Among them, F conv is the output of the local branch, CS is the shuffle operation, and Y is the input feature;

[0079] In the global branch, we first generate the query (Q), key (K), and value (V) through 1×1 convolution and 3×3 depthwise convolution, resulting in a shape of Three tensors of ; Q is then reconstructed into Reconstruct K as Then, by and The interaction of The output F of the global branch att Defined as:

[0080]

[0081]

[0082] Among them, α is a learnable scaling parameter used to control the size of the matrix multiplication of K and Q before applying the softmax function; Finally, the computation output of the attention fusion module (CAFM) is:

[0083] F out =F att +F conv

[0084] The advantages of the present invention are:

[0085] 1. Improve segmentation accuracy

[0086] By introducing dynamic snake convolution (DSConv), the model can capture the characteristics of pavement cracks more accurately, especially when the cracks have complex shapes, small sizes and complex backgrounds.

[0087] 2. Feature Fusion

[0088] The introduction of the content-guided attention fusion mechanism (CGAFusion) enables the model to more effectively fuse features at different levels and improve the expressiveness of features; this fusion mechanism not only improves the accuracy of crack segmentation, but also enhances the model's ability to recognize small cracks.

[0089] 3. Optimize feature fusion

[0090] By introducing the attention fusion module (CAFM) and improving it into the content-guided attention fusion mechanism (CGAFusion), a convolution and attention fusion mechanism (CAFMFusion) is proposed. By introducing this module, the model can capture more crack feature information while achieving the purpose of comprehensive denoising, thereby improving the segmentation accuracy and robustness of the model.

[0091] 4. Enhanced robustness

[0092] The introduction of the convolution and attention fusion mechanism (CAFMFusion) makes the model more robust when dealing with different lighting conditions, crack types and road materials.

[0093] Experimental data support:

[0094] In order to observe the effectiveness of the improved method, the present invention conducted an ablation experiment; the contribution of each part to the overall performance of the model was evaluated through the ablation experiment, which is very helpful for improving the model network design and optimizing the algorithm; the present invention conducted an ablation experiment based on U-Net as the benchmark model, and added experiments in the order of DSConv, DSConv+CGAFusion and DSConv+CAFMFusion to obtain relevant evaluation index data; the ablation experiment data of this section is specifically shown in the following table:

[0095]

[0096] From the data in the table, we can see that although the recall rate is reduced by introducing DSConv, its Rrecision, Accuracy and F1 scores are improved by 3.6%, 0.35% and 1% respectively; after adding the attention fusion mechanism, although the Recall is not greatly improved, its Rrecision, Accuracy and F1 scores have a higher index; finally, by improving the attention fusion mechanism CGAFusion and introducing CAFMFusion, not only the Precision and Accuracy are improved by 5% and 0.65% compared with the baseline model, but also the F1 score is improved by 2.6%; In general, the improved SCFU-Net model exceeds the original U-Net model in terms of accuracy; For the accuracy comparison between the original model and the improved model, please refer to Figure 8 ;

[0097] In order to further verify the improvement effect of the present invention, the model is trained and tested using CFD, AsphaltCrack300 and DeepCrack data sets, and the results are shown in the table:

[0098]

[0099] According to the data in the table, the proposed model has higher accuracy than the original model on different data sets, which further verifies the superiority of the present invention;

[0100] Some test results are as follows Fig. 9 As shown, the present invention enhances the segmentation capability of the original model U-Net. Thanks to the flexible receptive field of the dynamic snake convolution and the fusion of low-level feature maps and high-level feature maps, the present invention has better segmentation accuracy than other models.

[0101] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A pavement crack segmentation method based on adaptive feature extraction and attention fusion, characterized in that: The method comprises the following steps: S1. Obtain a pavement crack dataset, wherein the pavement crack dataset includes a pavement crack training set, a pavement crack verification set, and a pavement crack test set; S2, perform data expansion on the pavement crack training set in S1, and do not perform data expansion on the pavement crack verification set and the pavement crack test set, to obtain a pavement crack sample set, and then use the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, and then use the pavement crack test set to test the network performance; S3. Construct a U-Net model that introduces a content-guided attention fusion mechanism to fuse shallow and deep features, improve the model's segmentation performance for pavement cracks in a coarse-to-fine manner, introduce dynamic snake convolution in the downsampling process, and the model can adaptively focus on the complex topological structure of cracks, enhance the model's adaptive feature extraction capability for pavement cracks, and use a depth-separable convolution module in upsampling; S4. Construct and introduce convolution and attention fusion modules to further improve the content-guided attention mechanism, obtain the SCAFM module, and improve the segmentation performance and robustness of the model for pavement cracks. By introducing SCAFM into the content-guided attention fusion mechanism, the convolution and attention fusion mechanism is obtained, which can capture more crack feature information while achieving the purpose of comprehensive denoising, thereby improving the segmentation accuracy and robustness of the model; S5, inputting the pavement crack training set images annotated in S2 into the U-Net model based on the content-guided attention fusion mechanism constructed in S3 for training, thereby obtaining a trained model; S6, using the pavement crack verification set obtained in S1 to select a training crack detection network, obtain the optimal model in the training crack detection network, input the pavement crack test set into the trained model for testing, and further obtain the pavement crack test results; S7. Compare the pavement crack test result obtained in step S6 with the crack position in the label image corresponding to the pavement crack test set, calculate the evaluation index, and evaluate the test result.

2. The pavement crack segmentation method based on adaptive feature extraction and attention fusion according to claim 1, characterized in that: The S1 collects a pavement crack dataset including real pictures of pavement cracks and corresponding labeled pictures.

3. The pavement crack segmentation method based on adaptive feature extraction and attention fusion according to claim 1, characterized in that: The specific use of the content-guided attention fusion mechanism in S3 includes the following method steps: S31, adaptively fusing the low-level features of the encoder part and the corresponding high-level features through the learned spatial weight modulation features; S32. The spatial weights of feature modulation are calculated by using the content-guided attention mechanism. The low-level features of the encoder part and the corresponding high-level features are input into the content-guided attention mechanism to calculate the weights, and then the weighted summation method is used to combine them. At the same time, the input features are increased through jump connections to alleviate the gradient vanishing problem and simplify the learning process. Finally, the fused features are projected by the convolution layer to obtain the final features.

4. The pavement crack segmentation method based on adaptive feature extraction and attention fusion according to claim 1, characterized in that: The S2 specifically includes the following method steps: S21, expanding the data of the pavement crack training set by rotating, translating and flipping all training samples in the pavement crack training set, while not expanding the data of the pavement crack verification set and the pavement crack test set; S22, resizing the training samples and label samples in the pavement crack training set augmented with data in S21 to facilitate loss calculation; S23, using the training samples in S22 to train the network, using the pavement crack validation set to select the best performing model, and using the pavement crack test set to test the network model performance.

5. The pavement crack segmentation method based on adaptive feature extraction and attention fusion according to claim 4 is characterized in that: The rotation refers to randomly rotating the image to a number of specified angles to change the orientation of the image content, and the translation refers to translating the image horizontally or vertically on the image plane.

Citation Information

Cited By

  • Water body extraction system and method based on dilated convolution and dynamic snakelike convolution

    CN121330516A

  • Water body extraction system and method based on a hollow convolution and a dynamic snake convolution

    CN121330516B

  • Ground penetrating radar image crack identification method and system based on frequency domain enhanced YOLOv11

    CN121837191A

  • Crack pattern detection method and system in image based on attention enhancement

    CN122737514A