Concrete pavement crack detection method based on progressive context interaction
By introducing a detection method of progressive context interaction and attention mechanism in the crack detection of concrete pavement, the problem of time-consuming and inaccurate detection in traditional methods is solved, and the crack detection effect with high accuracy and continuity is achieved.
Patent Information
- Application Number
- CN202411761988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Traditional manual detection methods are time-consuming and susceptible to environmental noise, making it difficult to effectively identify concrete pavement cracks. The existing algorithms have problems such as poor segmentation and discontinuous crack detection when dealing with thin cracks and low-contrast backgrounds.
A concrete pavement crack detection method based on progressive context interaction and attention mechanism is proposed. The progressive encoding-decoding structure is adopted, including feature extraction, feature enhancement and feature fusion stages. Through technical means such as the ACRB module, the progressive context interaction mechanism, the triple attention module and the multi-semantic attention dynamic fusion module, the accuracy of feature extraction and fusion is improved.
High accuracy detection of concrete pavement cracks is achieved, the continuity and detail retention ability of crack detection are improved, and the robust performance of the model is significantly improved.
Smart Images

Figure CN119559156A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a concrete pavement crack detection method based on progressive context interaction. Background Art
[0002] In recent years, the rapid growth of the number of concrete roads has made crack detection more important. Under the influence of foundation settlement and temperature and pressure changes, concrete road pavement is extremely prone to cracking, thus forming various cracks. The appearance of cracks will affect the strength, durability and availability of concrete structures, leading to road damage. Therefore, timely detection and repair of cracks can prevent small cracks from gradually developing into more difficult to repair large cracks, potholes and other types of more complex road pavement damage, thereby effectively extending the service life of the road, reducing maintenance costs, helping to reduce driving risks and maintaining road flatness. However, traditional manual detection methods are time-consuming and susceptible to environmental noise interference, making it difficult to effectively identify cracks. At the same time, due to the diversity, anisotropy, topological complexity, low contrast, and noisy texture background of cracks, coupled with the fact that current algorithms still have problems such as inaccurate segmentation and discontinuous crack detection when dealing with thin cracks and low-contrast backgrounds, detecting road cracks from images is still challenging.
[0003] In summary, it is necessary to deepen the research on crack detection technology to overcome the limitations of existing algorithms and improve the accuracy of crack detection. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a concrete pavement crack detection method based on progressive context interaction, the method comprising: obtaining a pavement image to be processed, inputting the pavement image into a trained concrete pavement crack detection model for processing, and obtaining a concrete pavement crack detection result; the concrete pavement crack detection model adopts a progressive encoding-decoding structure, and the model is divided into three stages, namely, a feature extraction stage, a feature enhancement stage and a feature fusion stage; the feature extraction stage includes an ACRB module and a progressive context interaction mechanism; the feature enhancement stage includes a triple attention module, a vertical attention and horizontal attention hybrid module; the feature fusion stage includes a convolutional layer and a MADFM module.
[0005] Preferably, the data processing process in the feature extraction stage includes:
[0006] The road image is processed by the ACRB module and down-sampling to obtain feature A; feature A is then processed by the ACRB module to obtain feature B; feature B is processed by up-sampling and then processed with the first shallow side output by a progressive context interaction mechanism to obtain the second shallow side input; the second shallow side input is processed by the ACRB module to obtain the second shallow side output;
[0007] The feature B and the first shallow side output are processed by the progressive context interaction mechanism after downsampling to obtain feature C; feature C is then processed by the ACRB module to obtain feature D; feature D is processed by the progressive context interaction mechanism after upsampling and the second shallow side output to obtain the third shallow side input; the third shallow side input is processed by the ACRB module to obtain the third shallow side output;
[0008] Feature B is downsampled to obtain feature I; feature I is processed by the ACRB module to obtain feature J; the features of the second shallow side output after downsampling, feature D, and feature J after upsampling are processed by the progressive context interaction mechanism to obtain feature E; feature E is processed by the ACRB module to obtain feature F; feature F is upsampled and then processed with the third shallow side output by the progressive context interaction mechanism to obtain the fourth shallow side input; the fourth shallow side input is processed by the ACRB module to obtain the fourth shallow side output;
[0009] After downsampling, feature D is processed with feature J through a progressive context interaction mechanism to obtain feature K; feature K is processed by the ACRB module to obtain feature L; the features after downsampling of the third shallow side output, feature F, and feature L after upsampling are processed through a progressive context interaction mechanism to obtain feature G; feature G is processed by the ACRB module to obtain feature H; feature H is upsampled and then processed with the fourth shallow side output through a progressive context interaction mechanism to obtain a fifth shallow side input; the fifth shallow side input is processed by the ACRB module to obtain a fifth shallow side output.
[0010] Furthermore, the ACRB module includes 3×3 convolution, ACBlock block, batch normalization layer, LeakyReLU activation function and residual connection.
[0011] Furthermore, the data processing process of the progressive contextual interaction mechanism includes:
[0012] Add the input features to obtain a fused feature map;
[0013] The fused feature map is transformed nonlinearly through the GeLU activation function and then passed through a 3×3 convolution layer and a GroupNorm layer to obtain the first intermediate feature;
[0014] The first intermediate feature is passed through another set of 3×3 convolution and GroupNorm normalization layers, and finally a mask is generated through the Sigmoid activation function;
[0015] After the fused feature map is element-wise multiplied with the mask, it undergoes a 1×1 convolution, a 3×3 convolution, and a 3×3 convolution with a dilation rate of 2 respectively. The three convolution results are added together and finally passed through a batch normalization layer to complete the progressive context interaction mechanism processing.
[0016] Preferably, the data processing process in the feature enhancement stage includes:
[0017] The first shallow side output is processed by the triple attention module to obtain the first middle side output;
[0018] The second shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the second middle side output;
[0019] The third shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the third middle side output;
[0020] The fourth shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the fourth middle side output;
[0021] The fifth shallow side output is processed by the triple attention module to obtain the fifth middle side output.
[0022] Preferably, the data processing process in the feature fusion stage includes: the first middle-layer side output is processed by 1×1 convolution to obtain the first deep-layer side output; the second middle-layer side output is processed by 1×1 convolution to obtain the second deep-layer side output; the first to third middle-layer side outputs are processed by the MADFM module to obtain the third deep-layer side output; the fourth middle-layer side output is processed by 1×1 convolution to obtain the fourth deep-layer side output; the fifth middle-layer side output is processed by 1×1 convolution to obtain the fifth deep-layer side output; the first to fifth deep-layer side outputs are spliced and processed by 1×1 convolution to obtain the concrete pavement crack detection result.
[0023] Furthermore, the data processing process of the MADFM module is expressed as:
[0024] X concat =Concat(X side1 ,X side2 ,X side3 )
[0025] X height =AAP height (X concat )
[0026] X width =AAP width (X concat )
[0027] X global=HSwish(BN(C 1×1 (Concat(X height ,X width ))))
[0028] X global_height ,X global_width =Split(X global )
[0029] A height =Sigmoid(C 1×1 (X global_height ))
[0030] A width =sigmoid(C 1×1 (X global_width ))
[0031] W dynamic =FC(GAP(X concat ))
[0032] A′ height =W dynamic ·A height
[0033] A′ width =W dynamic ·A width
[0034] Y=SiLU(BN(C 3×3 (X concat ·A′ height +X concat ·A′ width )))
[0035] Among them, X concat represents the splicing feature, X side1 ,X side2 ,X side3 Respectively represent the first, second and third middle-level outputs, Concat represents the concatenation operation; AAP height and AAP width Respectively represent the adaptive average pooling in height and width directions; X height and X width Represents height and width pooling features respectively; C 1×1 represents 1×1 convolution, C 3×3 represents 3×3 convolution, BN represents batch normalization layer, HSwish represents HSwish activation function, X global represents the global feature; Split represents the segmentation operation; X global_height and X global_widthRepresent the height and width global features respectively; Sigmoid represents the Sigmoid activation function; A height and A width denotes the height and width attention weights respectively, GAP denotes global average pooling, FC denotes the fully connected layer, and W dynamic represents dynamic weight; A′ height and A′ width They represent the adjusted height and width attention weights respectively, SiLU represents the SiLU activation function, and Y represents the output features of the MADFM module.
[0036] Preferably, the loss function in the concrete pavement crack detection model training process is the sum of the side output total loss and the fusion output loss.
[0037] Furthermore, the total side output loss is expressed as:
[0038]
[0039]
[0040] Among them, L side (I, G, W, w) represents the total side output loss, I represents the total pixels of the original input image, G represents the total pixels of the label image, W represents the total model parameters, w represents the corresponding weight of each side output layer, N represents the number of side output layers, α n represents the loss weight of the n-th side output layer, represents the side output loss of the nth side output layer, w 0 With w 1 denote the weights of crack and non-crack pixels respectively, G + With G _ P represents crack pixels and non-crack pixels respectively; j represents the prediction result of the jth pixel, g j represents the true label of the pixel; w (n) Represents the parameters of the n-th side output layer.
[0041] Furthermore, the fusion output loss is expressed as:
[0042]
[0043] Among them, L fuse (I, G, W) represents the fusion output loss, I represents the total pixels of the original input image, G represents the total pixels of the label image, and W represents the total parameters of the model; N represents the number of side output layers, w 0 With w 1 denote the weights of crack and non-crack pixels respectively, G + With G _P represents crack pixels and non-crack pixels respectively; j represents the prediction result of the jth pixel, g j represents the true label of the pixel.
[0044] The beneficial effects of the present invention are as follows: The present invention proposes a concrete pavement crack detection method based on progressive contextual interaction and attention mechanism. A concrete crack detection network based on progressive contextual interaction and attention mechanism is proposed. First, with the optimized UNet++ as the backbone, asymmetric convolution blocks are used to enhance the feature extraction capability; secondly, a progressive contextual interaction mechanism is introduced to efficiently capture and fuse multi-scale features of adjacent stages, and then in the feature enhancement stage, the triple attention module is combined to use the attention combination method to improve the feature expression capability; finally, in the feature fusion stage, a multi-semantic attention dynamic fusion module is used to enhance the detail recovery and retention effect; the present invention achieves improvement in crack detection accuracy, while showing excellent robust performance, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a structural schematic diagram of the concrete pavement crack detection model in the present invention;
[0046] Figure 2 This is a structural diagram of the progressive context interaction mechanism in the present invention;
[0047] Figure 3 This is a structural diagram of the multi-semantic attention dynamic fusion module in the present invention;
[0048] Figure 4 The figure is a comparison result diagram of the present invention and the comparative method. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] The present invention proposes a concrete pavement crack detection method based on progressive context interaction, the method comprising:
[0051] The road surface image to be processed is obtained, and is input into the trained concrete pavement crack detection model for processing to obtain the concrete pavement crack detection result.
[0052] like Figure 1As shown, the concrete pavement crack detection model designed by the present invention adopts a progressive encoding-decoding structure, in which the decoding input of each stage is the output of its corresponding encoding layer. It can be mainly divided into four parts: (1) The optimized UNet++ network is used as the backbone to achieve efficient feature extraction. (2) Different types of attention modules are embedded in the five side outputs of the first stage of the backbone network to improve the ability to capture the complex structural features of cracks. (3) The shallow side output adopts a multi-semantic attention dynamic fusion module to enhance and reconstruct the features to better retain the crack detail information. (4) The five feature maps are fused to obtain the final crack prediction map. In the feature extraction stage, an asymmetric convolution block is integrated into the original 3×3 convolution block to form a new convolution unit, namely ACRB, which is specifically composed of 3×3 convolution, ACBlock block, batch normalization, LeakyReLU activation function and corresponding residual connection. At the same time, the Progressive Context Interaction Mechanism (PCIM) is introduced to continuously integrate high-level context information. In the feature enhancement stage, the attention combination (AC) is used. By introducing the triplet attention module (TA), which consists of vertical attention (CWAttention, CWA), horizontal attention (HCAttention, HCA), and spatial attention (HWAttention, HWA), the vertical attention and horizontal attention are used in the first and fifth side outputs to capture vertical and horizontal features, retain details and strengthen semantic information, and reduce computational complexity; spatial attention is also added to the middle side output to fully capture complex spatial features and ensure accurate recognition of irregular structures such as cracks. This combination method can maximize the segmentation effect while maintaining computational efficiency. In the feature fusion stage, in order to help the network better restore and retain the detailed information of the cracks, a multi-semantic attention dynamic fusion module (MADFM) is proposed to make full use of the features of the shallow and middle layers for detail enhancement. Finally, the side outputs are spliced and the number of channels is adjusted through 1×1 convolution to generate the final prediction map.
[0053] The structure of the concrete pavement crack detection model designed by the present invention specifically includes:
[0054] The first stage of the network continuously integrates higher-level context information while maintaining the original resolution. Unlike the traditional encoding-decoding structure, the encoding and decoding processes of the network of the present invention are carried out in parallel, rather than encoding first and then decoding. Specifically, the network performs gradual feature fusion during feature extraction and feature recovery through a progressive context interaction mechanism.
[0055] Under this mechanism, the shallow layers (lower resolution stages) of the network are mainly responsible for extracting fine-grained semantic information, while the deep layers (higher resolution stages) provide richer contextual information while expanding the local receptive field of the feature map. Unlike the traditional architecture that compresses the features extracted by the encoder and then restores them through the decoder, the network avoids the problem of spatial information loss by directly fusing feature maps of adjacent stages (including downsampled feature maps in the encoding stage and upsampled feature maps in the decoding stage).
[0056] The road image is processed by the ACRB module and down-sampling to obtain feature A; feature A is then processed by the ACRB module to obtain feature B; feature B is processed by up-sampling and then processed with the first shallow side output by a progressive context interaction mechanism to obtain the second shallow side input; the second shallow side input is processed by the ACRB module to obtain the second shallow side output;
[0057] The feature B and the first shallow side output are processed by the progressive context interaction mechanism after downsampling to obtain feature C; feature C is then processed by the ACRB module to obtain feature D; feature D is processed by the progressive context interaction mechanism after upsampling and the second shallow side output to obtain the third shallow side input; the third shallow side input is processed by the ACRB module to obtain the third shallow side output;
[0058] Feature B is downsampled to obtain feature I; feature I is processed by the ACRB module to obtain feature J; the features of the second shallow side output after downsampling, feature D, and feature J after upsampling are processed by the progressive context interaction mechanism to obtain feature E; feature E is processed by the ACRB module to obtain feature F; feature F is upsampled and then processed with the third shallow side output by the progressive context interaction mechanism to obtain the fourth shallow side input; the fourth shallow side input is processed by the ACRB module to obtain the fourth shallow side output;
[0059] After downsampling, feature D is processed with feature J through a progressive context interaction mechanism to obtain feature K; feature K is processed by the ACRB module to obtain feature L; the features after downsampling of the third shallow side output, feature F, and feature L after upsampling are processed through a progressive context interaction mechanism to obtain feature G; feature G is processed by the ACRB module to obtain feature H; feature H is upsampled and then processed with the fourth shallow side output through a progressive context interaction mechanism to obtain a fifth shallow side input; the fifth shallow side input is processed by the ACRB module to obtain a fifth shallow side output.
[0060] Progressive Contextual Interaction Mechanism (PCIM):
[0061] In order to solve the problem of spatial information loss caused by multiple downsampling, inspired by the high-resolution network HRNet, the original dense connection operation in each stage was removed from the UNet++ network, and the progressive context interaction mechanism designed by the present invention was introduced instead. Unlike HRNet, the proposed mechanism does not use full parallel connection, but only fuses the feature maps of adjacent stages, thereby reducing feature redundancy and improving operation efficiency. The mechanism gradually expands in the horizontal and vertical directions through upsampling, downsampling and convolution, and progressively fuses context information.
[0062] like Figure 2 As shown in the figure, the progressive contextual interaction mechanism first adds the feature map from the previous residual block with the upsampled and / or downsampled feature maps of the adjacent stage to fuse them into a comprehensive feature map. Then, the fused feature map is nonlinearly transformed by the GeLU activation function to enhance the expressiveness of the features. Next, the feature map passes through a 3×3 convolution layer to change the number of channels, and the convolved feature map is normalized by GroupNorm. Subsequently, the processed feature map passes through another set of 3×3 convolution and GroupNorm normalization layers, and finally a mask is generated by the Sigmoid activation function to perform weighted operations on the feature map, highlight important areas, suppress secondary information, and realize the application of the local attention mechanism. Then, after the previously fused comprehensive feature map is multiplied element-by-element with the mask, it is finally subjected to a 1×1 convolution, a 3×3 convolution, and a 3×3 convolution with a dilation rate of 2 to further enhance the expressiveness of the features and the fusion of contextual information. Finally, the three convolution results are added together and passed through a batch normalization layer to complete the progressive contextual interaction mechanism processing.
[0063] Through the progressive context interaction mechanism, multi-resolution feature information is progressively enhanced and fused, while maintaining detailed information, the receptive field is expanded, a wider range of context information is captured, and finally a richer and more expressive feature map is output; assuming that the three inputs are X 1 , X 2 , X 3 , they come from the features of different network layers. This process can be expressed by the following formula:
[0064] X fused =U(X 1 )+ACB(X 2 )+D(X 3 )
[0065] A=Sigmoid(G(C 3×3 (G(C 3×3 (X fused )))))
[0066]
[0067] Among them, A, G, and C represent attention weight, GeLU, and convolution respectively.
[0068] The decoder structure of the concrete pavement crack detection model designed by the present invention specifically includes:
[0069] The output of the first decoding layer is processed by the triple attention module to obtain the first middle layer output; the first middle layer output is processed by 1×1 convolution to obtain the first deep layer output;
[0070] The output of the second decoding layer is processed by the vertical attention and horizontal attention hybrid modules to obtain the second middle layer output; the second middle layer output is processed by 1×1 convolution to obtain the second deep layer output;
[0071] The output of the third decoding layer is processed by the vertical attention and horizontal attention hybrid modules to obtain the third middle layer side output; the first to third middle layer side outputs are processed by the MADFM module to obtain the third deep layer side output;
[0072] The output of the fourth decoding layer is processed by the vertical attention and horizontal attention hybrid modules to obtain the fourth middle layer output; the fourth middle layer output is processed by 1×1 convolution to obtain the fourth deep layer output;
[0073] The output of the fifth decoding layer is processed by the triple attention module to obtain the fifth middle layer output; the fifth middle layer output is processed by 1×1 convolution to obtain the fifth deep layer output;
[0074] The output features of the decoder are obtained by concatenating the outputs of the first to fifth deep layers and performing 1×1 convolution processing.
[0075] Semantic Attention Dynamic Fusion Module (MADFM):
[0076] To solve the problem that the middle-level output side3 is prone to feature redundancy and semantic ambiguity, the present invention proposes a multi-semantic attention dynamic fusion module, whose structure is as follows: Figure 3 As shown in the figure. The core idea of this module is multi-semantic feature fusion and dynamic feature enhancement. Specifically, since the first three side outputs come from different network levels, they contain multi-level feature information. The shallower side outputs often contain more details and edge information, while the deeper side outputs contain more semantic information. By fusing these feature maps, information at different scales can be integrated to ensure that the model can capture details and understand the global context. This module generates a comprehensive feature representation by fusing these features. This unified feature representation can more comprehensively describe the complex morphology of cracks. At the same time, this dynamic weighting mechanism enables the model to pay more attention to the key feature areas of cracks, such as the edges and slender structures of cracks.
[0077] The specific operation of this module is as follows: First, the three side outputs, namely side1, side2 and side3, are concatenated to obtain a new input feature map. Then, the feature map is adaptively average pooled along the height and width directions to generate two global feature maps. The two feature maps are then concatenated and channel compressed by a 1×1 convolution layer, followed by batch normalization, and then non-linearity is introduced by the HSwish activation function. After completing the above steps, the concatenated feature map is split into two directions, namely the height and width directions. The feature map in each direction is first processed by a 1×1 convolution layer, and then the Sigmoid activation function is applied to the two feature maps to generate the corresponding attention weights. These attention weights are designed to enhance the areas in the feature map that are important for a specific direction (height or width). At the same time, the original input feature map is also subjected to a global average pooling operation to reduce it to a global representation and input into a fully connected layer to generate dynamic weights. These dynamic weights adaptively adjust the importance of the attention weights in the height and width directions to ensure that the model can focus on the most critical spatial information. Finally, the original input feature map is element-wise multiplied with the generated attention weights in the height and width directions, and the attention weights are applied to the feature map. These weighted feature maps are further processed by a 3×3 convolution layer for channel integration, and then batch normalization and SiLU activation function are performed to generate the final output feature map, thereby obtaining the optimized side output side3. The whole process not only retains multi-scale features, but also strengthens the key feature areas through the dynamic attention mechanism, significantly improving the model's ability to segment complex crack structures.
[0078] Assume that the three side outputs are X side1 , X side2 , X side3 , then this process can be expressed by the following formula:
[0079] X concat =Concat(X side1 ,X side2 ,X sid )
[0080] X height =AAP height (X concat )
[0081] X width =AAP width (X concat )
[0082] X global =HSwish(BN(C 1×1 (Concat(X height ,Xwidth ))))
[0083] X global_height ,X global_width =Split(X global )
[0084] A height =Sigmoid(C 1×1 (X global_height ))
[0085] A width =Sigmoid(C 1×1 (X global_width ))
[0086] W dynamic =FC(GAP(X concat ))
[0087] A′ height =W dynamic ·A height
[0088] A′ width =W dynamic ·A width
[0089] Y=SiLU(BN(C 3×3 (X concat ·A′ height +X concat ·A′ width )))
[0090] Among them, X concat represents the splicing feature, X sid ,X side ,X side3 Respectively represent the first, second and third middle-level outputs, Concat represents the concatenation operation; AAP height and AAP width Respectively represent the adaptive average pooling in height and width directions; X height and X width Represents height and width pooling features respectively; C 1×1 represents 1×1 convolution, C 3×3 represents 3×3 convolution, BN represents batch normalization layer, HSwish represents HSwish activation function, X global represents the global feature; Split represents the segmentation operation; X global_height and X global_width Represent the height and width global features respectively; Sigmoid represents the Sigmoid activation function; A height and A widthdenotes the height and width attention weights respectively, GAP denotes global average pooling, FC denotes the fully connected layer, and W dynamic represents dynamic weight; A′ height and A′ width They represent the adjusted height and width attention weights respectively, SiLU represents the SiLU activation function, and Y represents the output features of the MADFM module.
[0091] Binary cross entropy loss function:
[0092] The present invention applies deep supervision to supervise each side output layer and assigns different weights to each side output layer, and the corresponding weight is w={(w (1) ,…,w (N) )}, where N is the number of side output layers. Meanwhile, W is used to represent all parameters of the network proposed in the present invention.
[0093] Then, the total loss function formula of the side output layer is as follows:
[0094]
[0095] Among them, G represents the total pixels of the label image, I represents the total pixels of the original input image, G represents the total pixels of the label image, W represents the total parameters of the model, α n is a hyperparameter representing the loss weight of each side output layer; represents the side output loss of the n-th side output layer, expressed as:
[0096]
[0097] Since the input images in the data set have uneven distribution of crack pixels and non-crack pixel samples, the loss function of the present invention requires different weighted losses. Therefore, different weights are assigned to positive and negative samples to achieve category balance. 0 With w 1 denote the weights of crack and non-crack pixels respectively, G + With G - represent crack (positive) pixels and non-crack (negative) pixel sets, respectively, P j represents the prediction result of the jth pixel, g j represents the true label of the pixel, w (n) Represents the parameters of the n-th side output layer.
[0098] Since each side output layer can generate a crack prediction map, the network model proposed in the present invention finally connects the prediction maps obtained by the five side output layers together and fuses them to form the final fused prediction map. The resulting fusion loss is as follows:
[0099]
[0100] The total network loss function proposed in the present invention, namely the binary cross entropy loss function, is the sum of the fusion loss and the side output total loss, expressed as:
[0101] L=L side (I,G,W,w)+L fuse (I,G,W)
[0102] During the model training process, the model parameters are adjusted according to the total loss. When the total loss converges or reaches the maximum preset number of iterations, the training is stopped, the model parameters are saved, and the trained concrete pavement crack detection model is obtained. The pavement image to be processed is obtained and input into the trained concrete pavement crack detection model for processing to obtain the concrete pavement crack detection result.
[0103] Evaluation of the present invention:
[0104] In order to verify the effectiveness of the proposed model, the present invention is compared with other deep learning crack detection technologies (UNet, UNet++, HED, DeepCrack, CrackFormer, CrackW-Net, HACNe, PAF-Net). To ensure fairness, all methods use the same training parameters and are fully trained on the DeepCrack dataset. The comparison results are shown in Figure 2. Figure 4 As shown, from Figure 4 It can be seen that the detection results of the present invention are clearer, with less noise, and can better identify small cracks and capture more key details. In summary, the present invention designs a concrete pavement crack detection network based on progressive contextual interaction and attention mechanism. The study optimizes the three stages of feature extraction, enhancement and fusion. In the feature extraction stage, by introducing asymmetric convolution blocks and residual structures, not only the effective receptive field is expanded, but also the stability of gradient propagation is enhanced; the progressive contextual interaction mechanism realizes the exchange and fusion of features of different resolutions, comprehensively integrates multi-scale contextual information, and helps to more accurately capture the global and local features of cracks. In the feature enhancement stage, different types of attention modules are embedded in multiple side outputs, and the feature representation ability is improved through the combination of vertical, horizontal and spatial attention. In the feature fusion stage, a multi-semantic attention dynamic fusion module is used to realize the dynamic fusion of shallow and intermediate layer features, thereby enhancing the ability to restore and retain details. On the whole, the present invention shows significant improvement in feature capture and detail restoration of crack detection, providing an effective and innovative solution for crack detection tasks.
[0105] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A concrete pavement crack detection method based on progressive contextual interaction, characterized in that: include: Obtain a road surface image to be processed, input it into a trained concrete road surface crack detection model for processing, and obtain a concrete road surface crack detection result; The concrete pavement crack detection model adopts a progressive encoding-decoding structure. The model is divided into three stages, namely, feature extraction stage, feature enhancement stage and feature fusion stage; The feature extraction stage includes the ACRB module and the progressive context interaction mechanism; The feature enhancement stage includes a triple attention module, a vertical attention and a horizontal attention hybrid module; The feature fusion stage includes convolutional layers and MADFM modules.
2. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 1, characterized in that: The data processing process in the feature extraction stage includes: The road image is processed by the ACRB module and down-sampling to obtain feature A; feature A is then processed by the ACRB module to obtain feature B; feature B is processed by up-sampling and then processed with the first shallow side output by a progressive context interaction mechanism to obtain the second shallow side input; the second shallow side input is processed by the ACRB module to obtain the second shallow side output; The feature B and the first shallow side output are processed by the progressive context interaction mechanism after downsampling to obtain feature C; feature C is then processed by the ACRB module to obtain feature D; feature D is processed by the progressive context interaction mechanism after upsampling and the second shallow side output to obtain the third shallow side input; the third shallow side input is processed by the ACRB module to obtain the third shallow side output; Feature B is downsampled to obtain feature I; feature I is processed by the ACRB module to obtain feature J; the features of the second shallow side output after downsampling, feature D, and feature J after upsampling are processed by the progressive context interaction mechanism to obtain feature E; feature E is processed by the ACRB module to obtain feature F; feature F is upsampled and then processed with the third shallow side output by the progressive context interaction mechanism to obtain the fourth shallow side input; the fourth shallow side input is processed by the ACRB module to obtain the fourth shallow side output; After downsampling, feature D is processed with feature J through a progressive context interaction mechanism to obtain feature K; feature K is processed by the ACRB module to obtain feature L; the features after downsampling of the third shallow side output, feature F, and feature L after upsampling are processed through a progressive context interaction mechanism to obtain feature G; feature G is processed by the ACRB module to obtain feature H; feature H is upsampled and then processed with the fourth shallow side output through a progressive context interaction mechanism to obtain a fifth shallow side input; the fifth shallow side input is processed by the ACRB module to obtain a fifth shallow side output.
3. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 2, characterized in that: The ACRB module includes 3×3 convolution, ACBlock block, batch normalization layer, LeakyReLU activation function and residual connection.
4. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 2, characterized in that: The data processing process of the progressive contextual interaction mechanism includes: Add the input features to obtain a fused feature map; The fused feature map is transformed nonlinearly through the GeLU activation function and then passed through a 3×3 convolution layer and a GroupNorm layer to obtain the first intermediate feature; The first intermediate feature is passed through another set of 3×3 convolution and GroupNorm normalization layers, and finally a mask is generated through the Sigmoid activation function; After the fused feature map is element-wise multiplied with the mask, it undergoes a 1×1 convolution, a 3×3 convolution, and a 3×3 convolution with a dilation rate of 2 respectively. The three convolution results are added together and finally passed through a batch normalization layer to complete the progressive context interaction mechanism processing.
5. The method for concrete pavement crack detection based on progressive contextual interaction according to claim 1, characterized in that: The data processing process in the feature enhancement stage includes: The first shallow side output is processed by the triple attention module to obtain the first middle side output; The second shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the second middle side output; The third shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the third middle side output; The fourth shallow side output is processed by the vertical attention and horizontal attention hybrid modules to obtain the fourth middle side output; The fifth shallow side output is processed by the triple attention module to obtain the fifth middle side output.
6. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 1, characterized in that: The data processing process in the feature fusion stage includes: the first middle-layer side output is processed by 1×1 convolution to obtain the first deep-layer side output; the second middle-layer side output is processed by 1×1 convolution to obtain the second deep-layer side output; the first to third middle-layer side outputs are processed by the MADFM module to obtain the third deep-layer side output; the fourth middle-layer side output is processed by 1×1 convolution to obtain the fourth deep-layer side output; the fifth middle-layer side output is processed by 1×1 convolution to obtain the fifth deep-layer side output; the first to fifth deep-layer side outputs are spliced and processed by 1×1 convolution to obtain the concrete pavement crack detection result.
7. The method for concrete pavement crack detection based on progressive contextual interaction according to claim 6, characterized in that: The data processing process of the MADFM module is expressed as: X concat =Concat(X side1 ,X side2 ,X side3 ) X height =AAP height (X concat , X width =AAP width (X concat , X global =HSwish(BN(C 1×1 (Concat(X height ,X width )))) X global_height ,X global_width =Split(X global ) A height =Sigmoid(C 1×1 (X global_height )) A width =Sigmoid(C 1×1 (X global_width )) W dynamic =FC(GAP(X concat )) A′ height =W dynamic ·A height A′ width =W dynamic ·A width Y=SiLU(BN(C 3×3 (X concat ·FLUENT' height +X concat ·FLUENT' width ))) Among them, X concat represents the splicing feature, X side1 , X side2 , X side3 Respectively represent the first, second and third middle-level outputs, Concat represents the concatenation operation; AAP height and AAP width Respectively represent the adaptive average pooling in height and width directions; X height and X width Represents height and width pooling features respectively; C 1×1 represents 1×1 convolution, C 3×3 represents a 3×3 convolution; BN represents a batch normalization layer, HSwish represents the HSwish activation function, and X global represents the global feature; Split represents the segmentation operation; X global_height and X global_width Represent the height and width global features respectively; Sigmoid represents the Sigmoid activation function; A height and A width denotes the height and width attention weights respectively, GAP denotes global average pooling, FC denotes the fully connected layer, and W dynamic represents dynamic weight; A′ height and A′ width They represent the adjusted height and width attention weights respectively, SiLU represents the SiLU activation function, and Y represents the output features of the MADFM module.
8. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 1, characterized in that: The loss function in the training process of the concrete pavement crack detection model is the sum of the total side output loss and the fusion output loss.
9. The method for detecting cracks in a concrete pavement based on progressive contextual interaction according to claim 8, characterized in that: The total side output loss is expressed as: Among them, L side (I, G, W, w) represents the total side output loss, I represents the total pixels of the original input image, G represents the total pixels of the label image, W represents the total model parameters, w represents the corresponding weight of each side output layer, N represents the number of side output layers, α n represents the loss weight of the n-th side output layer, represents the side output loss of the nth side output layer, w0 and w1 represent the weights of crack and non-crack pixels respectively, G + With G - P represents crack pixels and non-crack pixels respectively; j represents the prediction result of the jth pixel, g j represents the true label of the pixel; w(n) represents the parameter of the n-th side output layer.
10. The method for concrete pavement crack detection based on progressive contextual interaction according to claim 8, characterized in that: The fusion output loss is expressed as: Among them, L fuse (I, G, W) represents the fusion output loss, I represents the total pixels of the original input image, G represents the total pixels of the label image, and W represents the total parameters of the model; N represents the number of side output layers, w0 and w1 represent the weights of crack and non-crack pixels respectively, G represents the total pixels of the label image, and W represents the total parameters of the model; + With G - P represents crack pixels and non-crack pixels respectively; j represents the prediction result of the jth pixel, g j represents the true label of the pixel.
Citation Information
Patent Citations
High-precision crack detection method
CN111222580A
Concrete dam surface crack detection method based on pixel-level deep learning
CN116485717A
Bridge concrete crack detection method under complex background based on deep learning
CN116823800A
Colorectal polyp image segmentation method based on regional self-attention
CN117237636A
CT image segmentation method based on context fusion perception
CN117745745A
Cited By
MSTKAN model ENSO prediction method based on attention mechanism
CN120105016A