An image crack segmentation detection method and system based on AAMC-Net

By fusing fuzzy clustering for ant colony edge detection with CBAM hybrid domain attention mechanism, and combining encoder and decoder, a dual-scale dilated convolution module is used to solve the problems of poor detail and long training time in crack segmentation detection, achieving higher recognition accuracy and shorter training time.

CN116342584BActive Publication Date: 2026-03-31四川吉利学院
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing crack segmentation and detection methods have poor performance in detail segmentation and detection, and require long training times.

Method used

Edge extraction is performed using an ant colony edge detection operator that integrates fuzzy clustering, feature enhancement is performed by combining a CBAM hybrid domain attention mechanism, and feature extraction and decoding are performed through an encoder and decoder. The receptive field is enhanced by a dual-scale dilated convolution module, and finally, dimensionality reduction is performed.

Benefits of technology

It improves the accuracy of crack recognition and segmentation effect, reduces training time, enhances the global texture, local texture and edge detail information of the image, and improves the detail information of the segmentation boundary.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342584B_ABST
    Figure CN116342584B_ABST
Patent Text Reader

Abstract

The application discloses an image crack segmentation detection method and system based on AAMC-Net, relates to the technical field of crack detection, and extracts edges of an image by using an ant colony edge detection operator of fuzzy clustering fusion, strengthens crack image features by using a CBAM mixed domain attention mechanism, and fuses features of the two; features are extracted by using an encoder, and the encoder comprises a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module and a double-scale hollow convolution module. The application extracts edges of a crack image by using an ant colony edge detection operator of fuzzy clustering fusion on an image, strengthens crack image features by using a CBAM mixed domain attention mechanism, and fuses features of the two, so that global texture, local texture and crack edge detail information of a feature image can be enhanced; and the double-scale hollow convolution used can perceive cracks of different sizes, so that the accuracy of crack recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of crack detection technology, specifically to an image crack segmentation and detection method and system based on AAMC-Net. Background Technology

[0002] As a major infrastructure nation, China boasts a total highway mileage of 5.28 million kilometers. Therefore, intelligent detection of road cracks for smart transportation applications has become a key focus. With technological advancements, digital image processing has become increasingly sophisticated in crack detection. For example, Chunbo Xiu et al. proposed an image edge detection method combining the Sobel operator and a CV model to address the poor segmentation effect of images with uneven grayscale; Wei Chuntao et al. employed adaptive thresholding for crack edge extraction, effectively reducing noise interference. While these methods can effectively improve crack feature extraction, they are still affected by complex lighting, background, and other external conditions, resulting in poor extraction of effective feature information and inadequate crack detail processing, thus impacting detection accuracy.

[0003] Artificial intelligence applied to computer vision has become a new direction for development in the "intelligent+" era, primarily using deep learning and convolutional neural networks, with the most classic models being FCN, U-Net, and U-Net++. Among these, Dung et al. proposed an automatic crack recognition algorithm based on FCN. This algorithm uses convolutional layers instead of fully connected layers in a CNN, enabling classification of images at any scale. However, FCN has low computational efficiency and a small receptive field, failing to capture global and detailed information, thus affecting the accuracy of the detection results. Weng Piao et al. used a 4x sampling FCN model for crack recognition. While this algorithm increases the receptive field, the 4x sampling increases the model's computation time and complexity. Wang Dan et al. proposed a multi-scale fully convolutional and CRF-based road crack detection algorithm. This algorithm constructs a multi-scale model by fusing three dilated convolutions with different void ratios. This model effectively increases the receptive field and reduces model computation parameters, but the addition of a Conditional Random Field (CRF) slows down the model's inference speed and increases training time. Zhu Suya et al. proposed a bridge crack detection method based on U-Net convolutional network. This algorithm uses U-Net network to coarsely extract cracks and then uses an improved Dijkstra algorithm to realize crack connection. Although it can effectively improve the crack detection accuracy, the model implementation difficulty increases, the image detail detection effect is not good, and the universality is poor. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that the existing crack segmentation detection method has poor effect on the segmentation detection of details and has a long training time.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0006] Image preprocessing involves using an ant colony edge detection operator with fuzzy clustering to extract edge features from the crack image; then, crack image feature enhancement is performed using a CBAM hybrid domain attention mechanism, and the enhanced feature map is fused with the edge feature map.

[0007] Feature extraction is performed using an encoder based on the VGG_L network model, which includes a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module, and a dual-scale dilated convolution module.

[0008] The extracted features are decoded. The decoder includes a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module, and a fifth deconvolution module. The input features of the second to fifth deconvolution modules include skip connection features from the corresponding layers in the encoder.

[0009] The decoded features are then subjected to dimensionality reduction to obtain the segmentation result.

[0010] The beneficial effects of this invention are as follows: Edge feature maps are obtained by using an ant colony edge detection operator with fuzzy clustering to extract edges from crack images. The crack image is then enhanced using a CBAM hybrid domain attention mechanism, and the two are fused, which enhances the global texture, local texture, and edge detail information of the feature image. The use of dual-scale dilated convolution to perceive cracks of different sizes improves the accuracy of crack recognition. The difficulty in crack image segmentation lies in the details and edges. In existing technologies, the CBAM attention mechanism is applied to the network encoder. This invention creatively uses a CBAM module in preprocessing to enhance the feature map, improving the global and texture features of the image. An ant colony edge operator with fuzzy clustering is used for image edge extraction to enhance edge features. The enhanced feature map and the edge extraction map are fused to obtain a preprocessed enhanced image map, enhancing the detail information of the segmentation boundaries. Edge extraction processes the original image once, and CBAM performs backpropagation through model training, enabling adaptive adjustment of the enhanced feature map processing. This results in superior segmentation performance and detail compared to existing technologies. Specific experimental data can be found in the detailed implementation.

[0011] Furthermore, the first feature extraction module and the second feature extraction module include two convolutional layers and a max pooling layer connected in sequence, and each convolutional layer is followed by a ReLU operation.

[0012] Furthermore, the third and fourth feature extraction modules include three convolutional layers and one max pooling layer connected in sequence, with each convolutional layer followed by a ReLU operation.

[0013] Furthermore, in the dual-scale convolution module, the dilation rates of the two channels are 1 and 2, respectively. Each channel undergoes a dilated convolution operation followed by three convolution operations to normalize the size. For the channel with a dilation rate of 1, the kernel sizes of the three convolutions are selected as 3, 3, and 1, respectively. For the channel with a dilation rate of 2, the kernel sizes of the three convolutions are selected as 3, 1, and 1, respectively. The feature maps of the two channels are fused using feature weighting operations.

[0014] The first feature extraction module, the second feature extraction module, the third feature extraction module, the fourth feature extraction module, the CBAM module, and the dual-scale dilated convolution module together constitute the VGG-L model. As the encoder of the entire network, it simplifies the existing VGG model and adds the CBAM module and the dual-scale dilated convolution module, which enables the model to have a larger receptive field to obtain global information, pay more attention to edge details and other difficult-to-segment areas, and reduce training time.

[0015] To address the aforementioned technical problems, this invention also provides an image crack segmentation and detection system based on AAMC-Net, comprising:

[0016] The image preprocessing module is used to extract edge features from crack images by fusing fuzzy clustering ant colony edge detection operators; it is used to enhance crack images by using CBAM hybrid domain attention mechanism and fuse the enhanced feature map with the edge feature map.

[0017] The feature encoding module is used to encode the fused feature map obtained by the image preprocessing module.

[0018] The feature decoding module is used to decode the encoded features.

[0019] The feature dimensionality reduction module is used to reduce the dimensionality of the decoded features to obtain the output result.

[0020] The feature encoding module adopts a VGG_L network and includes a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module, and a dual-scale dilated convolution module.

[0021] The feature decoding module includes a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module, and a fifth deconvolution module, wherein the input features of the second to fifth deconvolution modules include skip connection features from the corresponding levels in the feature encoding module.

[0022] In the dual-scale dilated convolution module, the dilation rates of the two channels are 1 and 2, respectively. Each channel undergoes a dilated convolution operation followed by three convolution operations to normalize the size. For the channel with a dilation rate of 1, the kernel sizes of the three convolutions are selected as 3, 3, and 1, respectively. For the channel with a dilation rate of 2, the kernel sizes of the three convolutions are selected as 3, 1, and 1, respectively. The feature maps of the two channels are fused using feature weighting operations.

[0023] Preferably, the loss function of the model is the MSELoss function, and it is optimized using the Adam parameter optimization algorithm.

[0024] To address the aforementioned technical problems, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the image crack segmentation and detection method based on AAMC-Net as described above.

[0025] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the image crack segmentation and detection method based on AAMC-Net as described above. Attached Figure Description

[0026] Figure 1 This is a schematic flowchart of the image crack segmentation and detection method based on AAMC-Net in this invention;

[0027] Figure 2 This is a diagram of the VGG_L model architecture.

[0028] Figure 3 Here is a structural diagram of the CBAM module;

[0029] Figure 4 This is a structural diagram of channel attention in the CBAM module;

[0030] Figure 5 This is a structural diagram of spatial attention in the CBAM module;

[0031] Figure 6 This is a schematic diagram of the principle of dilated convolution;

[0032] Figure 7 This is an image showing the effect of adding noise to several randomly selected images from the dataset used in Example 1;

[0033] Figure 8 The training process of the AAMC-Net model of this invention and other comparative models is illustrated by the loss function descent graph.

[0034] Figure 9 This is a comparison chart of the segmentation results of the AAMC-Net model of this invention and other comparative models. Detailed Implementation

[0035] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0036] Example 1

[0037] This embodiment provides an image crack segmentation and detection method based on AAMC-Net, the overall process of which is as follows: Figure 1 As shown, it includes the following steps:

[0038] Step S1: Image preprocessing. The crack image is extracted by using the ant colony edge detection operator with fuzzy clustering to obtain the edge feature map. The crack image features are enhanced by the CBAM hybrid domain attention mechanism, and the enhanced feature map is fused with the edge feature map.

[0039] In this embodiment, in step S1, the Hybrid Attention Mechanism (CBAM) processes the input image using global and local feature textures based on channel and spatial features to enhance image features. An ant colony edge detection operator incorporating fuzzy clustering extracts edge features from the crack image. Specifically, the original image is converted into a grayscale feature map, and representative pixels are selected as cluster centers. Fuzzy clustering is used for initialization to address the problem of invalid retrieval caused by the blind and random movement of ants in the ant colony. An ant colony algorithm is used for edge detection. During the detection process, to address the local optimum problem, a global information update strategy is used to update the path of the ant colony traversal results in the region. For boundary ant colony retrieval, a record table is used to record the paths traversed by the ants to avoid long retrieval times caused by repeated searches.

[0040] The overall process of the CBAM hybrid attention mechanism is as follows: Figure 3 As shown in Equation 1, the input feature map is fed into the channel attention mechanism for feature extraction. The processed feature map and the original feature map are then multiplied together to obtain the channel attention mechanism processing result. This result is then multiplied together with the spatial domain attention mechanism processing result to obtain the feature enhancement result. Throughout the entire process, the output feature size is consistent with the input feature map size. The calculation of the CBAM hybrid domain attention mechanism is shown in Equation 1.

[0041]

[0042] Where C and CBAM(A) are both the results of the CBAM hybrid domain attention mechanism operation, A is the original crack image, CAM is the channel domain attention mechanism operation of crack image processing, and SAM is the spatial domain attention mechanism operation of crack image processing. This is a matrix multiplication operation, and the formula for matrix multiplication is shown in Equation 2.

[0043] F ik×jl =A i×j ·A′ k×l (2)

[0044] Among them, A i×j Let A and A′ be matrices of size i×j. k×l Let A' be a matrix of size k×l, and F ik×jl Let F be the result matrix with pixel size ik×jl.

[0045] Channel-domain attention (CAM) is used to extract channel feature maps to determine the importance of each channel, thereby improving global texture feature extraction capabilities. It compresses and reduces the spatial dimension of the feature maps to obtain the channel-domain attention maps. The computation process is as follows: Figure 3 As shown.

[0046] like Figure 4 The original crack image A is fed into a channel attention mechanism model and processed through max pooling and average pooling layers to obtain two different feature maps. These feature maps are then fed into an MLP neural network to assign feature vector weights. The entire process is based on the consistency principle, and the results are fused and then processed using the sigmoid activation function to obtain the global texture enhancement result. The calculation is shown in Equation 3.

[0047] A′=CAM(A)=Sigmoid(MLP(AvgPool(A))+MLP(MaxPool(A))) (3)

[0048] Where A' represents the global texture feature map of the crack in the channel attention processing, Sigmoid represents the Sigmoid activation function, AvgPool represents average pooling, MaxPool represents max pooling, and MLP represents the MLP neural network, i.e., a multilayer perceptron. The MLP neural network plays a role in attention map extraction in the CAM operation; its essence is to perform a convolution operation between two convolutional layers with kernels of 1 and a ReLU activation layer, as shown in Equation 4.

[0049] MLP(pool)=Conv(ReLU(Conv(pool)) (4)

[0050] Where pool represents pooling input, Conv represents convolution operation, and ReLU represents ReLU activation function.

[0051] The crack global texture feature map processed by channel attention is convolved with the original feature image to obtain feature map F.

[0052] Spatial Domain Attention (SAM) is used to determine the importance of different regions in a feature map, thereby enhancing the model's ability to extract local texture features. Its principle involves compressing and reducing the channel dimension of the feature map to obtain the spatial domain attention map. The computation process is as follows: Figure 5 As shown.

[0053] like Figure 5 The feature map F is input into the spatial attention mechanism and processed through max pooling and average pooling layers to obtain two feature maps with the same width, height, and number of channels. The two feature maps are then concatenated according to their width and height, and then processed through a 7×7 convolutional kernel followed by a Sigmoid activation function to obtain a feature map B with better local texture. Its calculation formula is shown in Equation 5.

[0054] B = SAM(F) = Sigmoid(Conv) 7×7 ([AvgPool(F)+MaxPool(F)])) (5)

[0055] Among them, Conv 7×7 This represents a convolution operation with a kernel size of 7×7, and F represents the result image of the channel attention mechanism, i.e., the input of the spatial attention mechanism.

[0056] Step S2, feature extraction is performed using an encoder based on a VGG_L network model, such as... Figure 2 As shown, it includes a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module, and a dual-channel multi-scale dilated convolution module; the VGG_L network model is as follows. Figure 2 As shown in the figure, DConv represents dilated convolution, and ADD represents addition operation. In the encoder, the first feature extraction module and the second feature extraction module operate in the same way, consisting of two convolutional layers and one max pooling layer. The processing first goes through two convolution operations with a kernel size of 3×3 and a ReLU activation operation, and then goes through a pooling operation with a kernel size of 3×3 and a stride of 2, as shown in Equation 6.

[0057] C i =MaxPool(ReLU (Conv(ReLU(Conv(C i-1 )))) i∈(1,2) (6)

[0058] Among them, C i-1 The input crack dataset image represents the number of feature extraction processes, and C represents the number of times the feature extraction process has been performed. i The result represents the feature extraction result. MaxPool represents the maximum pooling calculation, Conv represents the convolution operation, and ReLU represents the ReLU activation function. When i=1, C0 is C, which represents the crack image fused from the edge image and CBAM feature enhancement.

[0059] The feature extraction calculation process of the third and fourth feature extraction modules is the same, consisting of 3 convolutional layers and 1 max pooling layer. The processing involves three convolutional operations with a kernel size of 3×3 and ReLU activation operations, followed by max pooling with a kernel size of 3×3 and a step size of 2 to obtain the feature extraction result, as shown in Equation 7.

[0060] C i =MaxPool(ReLU(Conv(ReLU(Conv(ReLU(Conv(C i-1 )))(i∈(3,4))(7)

[0061] The obtained crack map feature processing results C1, C2, C3 and C4 are respectively connected to the deconvolution layer in the network in 4 skip connections to achieve feature fusion.

[0062] C4 is further enhanced using the CBAM hybrid domain attention mechanism module to obtain feature map E.

[0063] The structure of dilated convolution is as follows: Figure 6 As shown, a and b are dilated convolutions with dilation rates of 1 and 2, respectively. The dilated convolution processing is shown in Equation 8.

[0064]

[0065] Where DConv represents dilated convolution operation, x and y are the length and width of the input image, respectively; n is the side length of the convolution kernel; w is the dilated filter, I is the input image, r is the dilation rate, and during processing, the dilation rate r determines the sampling interval of the convolution kernel, and r-1 (r≥1) represents the number of holes.

[0066] Dilated convolution enhances the image extraction effect by increasing the receptive field of the convolution process without increasing the parameters. The receptive field calculation is shown in Equation 9.

[0067] G=(m+1)×(m-1)+m (9)

[0068] Where m represents the kernel size and G represents the receptive field size. The study on image crack detection uses dual-scale dilated convolutions with dilation rates of 1 and 2 for feature extraction.

[0069] The processing of the dual-scale dilated convolution module is shown in Equation 10.

[0070] DC r (x,y,n,r)=Conv(Conv(Conv(DConv(x,y,n,r)))) (10)

[0071] Where DC(x,y,n,r) represents the multi-scale dilated convolution processing function, DConv represents the dilated convolution operation, and r is the dilation rate, r∈(1,2). Each channel undergoes one dilated convolution operation followed by three convolution operations to normalize the dimensions. x and y represent the length and width of the input crack image, respectively; n is the side length of the convolution kernel. For channels with a dilation rate of 1, the kernel sizes for the three convolutions are selected as 3, 3, and 1, respectively; for channels with a dilation rate of 2, the kernel sizes for the three convolutions are selected as 3, 1, and 1, respectively. The processed crack image is then obtained as DC. r .

[0072] Use feature weighting operations on feature map DC r The width and height are fused to obtain the dilated convolution feature extraction result, and the processing is shown in Equation 11.

[0073]

[0074] Among them, MDC is a feature fusion diagram of crack results after processing with different void ratios.

[0075] Step S3 involves decoding the extracted features. The decoder includes a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module, and a fifth deconvolution module. The input features of the second to fifth deconvolution modules include skip connection features from the corresponding layers in the encoder. The deconvolution operation uses a 3×3 kernel and a stride of 2 to obtain the output results Y1, Y2, Y3, Y4, and Y5. The output size of the deconvolution is calculated as shown in Equation 12.

[0076] o=s(i-1)+2p-k+2 (12)

[0077] Where i represents the input size, k represents the kernel size, p represents the boundary expansion, s represents the kernel stride, and o represents the output size.

[0078] After deconvolution, the size and channel dimension of the feature map are the same as those of the hierarchical output in the feature extraction stage. Then, the feature map after deconvolution and the hierarchical output feature map of the feature extraction stage are fused using a width-to-height addition method. The fused results are then serially fused to obtain the feature extraction result Y.

[0079] Step S4 involves dimensionality reduction of the decoded features to obtain the segmentation result. Although the feature map Y has the same resolution as the input image, its channel dimension is much higher, requiring consistency in channel dimension. This study employs convolutional dimensionality reduction to reduce the high-dimensional feature map to three dimensions. The processing assumes that the number of convolutional kernels is equal to the dimension of the output low-dimensional image, i.e., the width and height of the convolutional kernels are set to 1. After processing, the image crack segmentation result is obtained.

[0080] In the above method, during model training, edge feature extraction is a preprocessing step for the image, performed only once and without backpropagation. The CBAM module, however, requires backpropagation. In this embodiment, the fusion of the MSELoss and Adam methods is used for optimization, and its calculation is shown in Equation 13.

[0081] MSELoss(x,y)=(xy) 2 (13)

[0082] Where x represents the prediction result and y is the label. During model training, the MSELoss loss value is calculated for each iteration, and the result is used to iterate the learning rate using the Adam adaptive learning rate algorithm. The processing steps are as follows:

[0083] 1) Initialization. Initialize the learning rate to θ, and set the step size to α. Initialize the exponential decay rate of the moment estimate to β1,β2,β1,β2, with values ​​in [0,1). Initialize the numerical stability constant δ, initialize the number of updates t=0, and calculate MSELoss.

[0084] 2). Gradient Calculation. Calculate the gradient of MSELoss to obtain the current loss gradient, as shown in Equation 14.

[0085]

[0086] Where g represents the MSELoss gradient, This is the symbol for gradient calculation.

[0087] 3) Partial Moment Estimation Calculation. The partial first-order moment estimate of the gradient will be calculated using the partial first-order moment estimate to obtain the second-order moment estimate, as shown in Equation 15.

[0088] s=β1s+(1-β1)g (15)

[0089] Where s represents the partial first moment estimate of the gradient, g represents the gradient of MSELoss, and β1 represents the exponential decay rate of the partial first moment estimate of the gradient. The calculated partial first moment estimate of the gradient is fed into the formula for calculating the partial second moment estimate to correct the influence factor. The calculation is shown in Equation 16.

[0090] r=β2r+(1-β2)g⊙g (16)

[0091] Where r represents the partial second moment estimate of the gradient, g represents the MSELoss gradient, and β2 represents the exponential decay rate of the partial second moment estimate of the gradient.

[0092] 4) Bias Correction. The first-order moment estimation results are corrected to obtain the bias coefficient. The calculation is shown in Equation 17.

[0093]

[0094] Where s represents the partial first moment estimate of the gradient, β1 represents the correction for the bias of the partial first moment of the gradient, β1 represents the exponential decay rate of the partial first moment estimate of the gradient, and t represents the number of learning rate iterations.

[0095] The second-order moment estimate is corrected to obtain the second-order partial positive coefficients, which are calculated as shown in Equation 18.

[0096]

[0097] Where r represents the partial first moment estimate of the gradient, β2 represents the correction for the bias of the partial second moment of the gradient, β2 represents the exponential decay rate of the partial second moment of the gradient estimate, and t represents the number of learning rate iterations.

[0098] 5) Update the learning rate. Incorporate the first-order moment estimation correction coefficient and the second-order moment estimation correction coefficient into the learning rate update formula, calculate and update the learning rate, as shown in Equation 19.

[0099]

[0100] Where θ1 is the updated learning rate, θ is the previous learning rate, δ is a numerically stable constant, and α represents the step size. This represents the correction for the partial first moment deviation of the gradient. This represents the correction for the partial second moment deviation of the gradient.

[0101] After processing, the learning rate corresponding to the iteration is obtained for the next learning cycle, and the training is repeated until the training ends.

[0102] This embodiment will use a self-built dataset to demonstrate the effects of the present invention. The self-built dataset includes 1000 crack images, covering different lighting conditions and scenes. The basic dataset is scale-normalized, and then labeled using LabelMe. The labeling information includes two types of labels: background and crack.

[0103] Since the self-built dataset has a small number of images, this invention uses image augmentation to expand the existing dataset to improve segmentation results. Image augmentation is performed by rotating, mirroring, adding salt-and-pepper noise, adding Gaussian noise, and adding random noise, expanding the original dataset to 12,800 images, and setting the size of all images to 224×224 pixels.

[0104] Data augmentation uses salt-and-pepper noise and random noise to add noise points at percentages of 1.5% and 1%, respectively. Noise augmentation uses random Gaussian noise, and the processing is shown in formula (20).

[0105]

[0106] Where μ represents the mean and σ represents the standard deviation, μ = 0, σ = 0.05. The processed dataset is the experimental dataset, and the dataset samples are as follows: Figure 7 As shown.

[0107] The parameter settings for this embodiment are shown in Table 1.

[0108] Table 1 Training Parameter Configuration Table

[0109]

[0110] The comparison models are U-Ne network, U-Net++ network, FCN network, and multi-scale CRF network. The loss curves of the training process of the comparison models and the model of this invention are shown below. Figure 8 As shown in the figure, the horizontal axis represents the number of iterations, and the vertical axis represents the loss value. During training, the overall loss value of the five algorithm models initially decreases rapidly, but as the number of iterations increases, the decreasing trend of the loss value gradually flattens out, eventually approaching convergence.

[0111] The AAMC-Net model, employing a dual-domain attention mechanism, has the lowest initial loss function value compared to the other four algorithms. While the initial loss functions of the other four algorithms are close to 1, the initial loss function of the AAMC-Net model is only 0.29. Furthermore, the AAMC-Net model converges its loss value faster during training. In addition, the classic U-Net and multi-scale CRF algorithms stabilize their loss values ​​after 50,000 iterations, fluctuating around 0.05; the classic FCN and U-Net++ algorithms stabilize their loss values ​​after 80,000 iterations. The AAMC-Net model, using MSELoss with an adaptive Adam learning rate algorithm, allows Adam to continuously and adaptively update the learning rate during iterations, resulting in near-convergence of its loss value after 10,000 training iterations. AAMC-Net effectively reduces model training time.

[0112] Furthermore, under the same experimental environment, this embodiment uses the improved Sobel operator, adaptive thresholding algorithm, U-Net network, U-Net++ network, FCN8s network, multi-scale CRF network, and AAMC-Net network for image segmentation, and the segmentation results are as follows: Figure 9 As shown.

[0113] As shown in the figure, the classic U-Net algorithm fuses high-resolution and low-resolution feature maps, preserving almost all crack details in the output image. However, the output image contains too much useless or erroneous detail information, resulting in poor accuracy. The multi-scale CRF algorithm also produces results with many useless or erroneous details, leading to poor accuracy. The classic FCN algorithm fuses Pool4 and Pool3 layers sequentially, effectively preserving crack details, but some detail redundancy remains, making accurate crack segmentation impossible. While the U-Net++ algorithm filters out most redundancy, it also filters crack detail information, resulting in poor detail handling in the output. The improved Sobel algorithm is insensitive to crack perception, and the adaptive threshold segmentation algorithm performs well in identifying larger cracks in buildings, but it is poor at capturing details and cannot accurately identify cracks. The AAMC-Net of this invention effectively avoids the loss of crack detail information caused by pooling operations; effectively avoids interference from non-crack information in crack image segmentation; and exhibits strong robustness and good segmentation performance for information perception of cracks of different sizes.

[0114] Furthermore, this embodiment also performs a quantitative analysis on the segmentation results of the model of the present invention and the comparison model, and the results are retained to 3 decimal places, as shown in Table 2.

[0115] Table 2. Test set performance metrics for the seven algorithms

[0116]

[0117] As shown in Table 2, AAMC-Net exhibits the best intersection-over-union (IoU), precision, precision, and recall, at 96.250%, 96.351%, 96.382%, and 99.532%, respectively. Compared to the two digital image processing algorithms, AAMC-Net improves IoU, precision, precision, and recall by an average of 6.442%, 5.876%, 5.633%, and 1.595%, respectively; compared to the four deep learning algorithms, it improves IoU, precision, precision, and recall by an average of 2.707%, 2.143%, 0.705%, and 2.529%, respectively. AAMC-Net demonstrates better segmentation performance for crack images, better detail preservation, and higher crack recognition accuracy.

[0118] To verify the real-time detection performance of the algorithm of this invention, the real-time performance of road crack processing was evaluated using the crack segmentation time of a single image, as shown in Equation 21.

[0119]

[0120] Where T represents the average time for segmenting a single image, n represents the number of images processed in a batch, and t n This represents the time taken to segment the nth image.

[0121] The study trained U-Net, U-Net++, FCN, multi-scale CRF, and AAMC-Net networks under the same experimental environment, analyzed the training time, and analyzed the average segmentation time of a single crack image after training, retaining 3 decimal places, as shown in Table 3.

[0122] Table 3 Average segmentation time for a single image

[0123]

[0124]

[0125] Table 3 shows that the AAMC-Net model has the shortest training time at 242 minutes, representing an average reduction of 21.281% compared to other deep learning algorithms. The AAMC-Net model also has the shortest average time for single-image segmentation at 0.258 seconds, a reduction of 12.597% compared to other deep learning algorithms. The AAMC-Net model has certain advantages in real-time crack detection in images.

[0126] Example 2

[0127] Following the same principle as the image crack segmentation and detection method based on AAMC-Net in Embodiment 1 above, this embodiment provides an image crack segmentation and detection system based on AAMC-Net. It includes:

[0128] The image preprocessing module is used to extract edge features from crack images by fusing fuzzy clustering ant colony edge detection operators;

[0129] The image fusion module is used to enhance the features of the crack image through the CBAM hybrid domain attention mechanism and fuse the enhanced feature map with the edge feature map;

[0130] The feature encoding module is used to encode the fused feature map obtained by the image preprocessing module;

[0131] The feature decoding module is used to decode the encoded features;

[0132] The feature dimensionality reduction module is used to reduce the dimensionality of the decoded features to obtain the output result.

[0133] The feature encoding module is processed by VGG_L and includes a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module, and a dual-channel multi-scale dilated convolution module.

[0134] The feature decoding module includes a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module, and a fifth deconvolution module, wherein the input features of the second to fifth deconvolution modules include skip connection features from the corresponding levels in the feature encoding module.

[0135] In the dual-scale dilated convolution module, the dilation rates of the two channels are 1 and 2, respectively. Each channel undergoes a dilated convolution operation followed by three convolution operations to normalize the size. For the channel with a dilation rate of 1, the kernel sizes of the three convolutions are selected as 3, 3, and 1, respectively. For the channel with a dilation rate of 2, the kernel sizes of the three convolutions are selected as 3, 1, and 1, respectively. The feature maps of the two channels are fused using feature weighting operations.

[0136] Example 3

[0137] To address the aforementioned issues, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the image crack segmentation and detection method based on AAMC-Net as described in Embodiment 1.

[0138] Example 4

[0139] To address the aforementioned issues, this embodiment provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the image crack segmentation and detection method based on AAMC-Net as described in Embodiment 1.

[0140] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0141] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0142] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. An AAMC-Net-based image crack segmentation detection method, characterized in that, Comprising the following steps: Image preprocessing, edge extraction of crack image is carried out by using the edge detection operator of ant colony fusion fuzzy clustering to obtain edge feature map; the CBAM mixed domain attention mechanism is used for crack image feature enhancement, and the enhanced feature map is fused with the edge feature map; Feature extraction is performed using an encoder, the encoder is based on a VGG_L network, comprising a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module and a double-scale hollow convolution module; The extracted features are decoded, and the decoder comprises a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module and a fifth deconvolution module, wherein the input features of the second deconvolution module to the fifth deconvolution module comprise the skip layer connection features from the corresponding levels in the encoder; Dimension reduction is performed on the decoded features to obtain a segmentation result.

2. The image crack segmentation detection method based on AAMC-Net according to claim 1, characterized in that, The first feature extraction module and the second feature extraction module comprise two convolution layers and a maximum pooling layer connected in sequence, and each convolution layer further comprises a ReLU operation.

3. The image crack segmentation detection method based on AAMC-Net according to claim 1, characterized in that, The third feature extraction module and the fourth feature extraction module comprise three convolution layers and a maximum pooling layer connected in sequence, and each convolution layer further comprises a ReLU operation.

4. The image crack segmentation detection method based on AAMC-Net according to claim 1, characterized in that, In the double-scale hollow convolution module, the hollow rates of the two channels are 1 and 2 respectively, and after one hollow convolution operation in each channel, three convolution operations are performed to normalize the size, wherein for the channel with a hollow rate of 1, the convolution kernel sizes of the three convolution operations are selected as 3, 3 and 1 in sequence, for the channel with a hollow rate of 2, the convolution kernels of the three convolution operations are selected as 3, 1 and 1 in sequence, and the feature maps of the two channels are fused using feature weighting operation.

5. The image crack segmentation detection method based on AAMC-Net according to claim 1, characterized in that, The loss function of the model adopts MSELoss function, and Adam parameter optimization algorithm is used for self-adaptation.

6. An AAMC-Net based image crack segmentation detection system, characterized in that, Comprising: An image preprocessing module is used for edge extraction of crack image by using the edge detection operator of ant colony fusion fuzzy clustering to obtain edge feature map, and is also used for feature enhancement of crack image by using CBAM mixed domain attention mechanism, and fusion of the enhanced feature map and the edge feature map; A feature encoding module is used for encoding the fused feature map obtained by the image preprocessing module; A feature decoding module is used for decoding the encoded features; A feature dimension reduction module is used for dimension reduction of the decoded features to obtain an output result; The feature encoding module adopts a VGG_L network model, comprising a first feature extraction module, a second feature extraction module, a third feature extraction module, a fourth feature extraction module, a CBAM module and a double-scale hollow convolution module; The feature decoding module comprises a first deconvolution module, a second deconvolution module, a third deconvolution module, a fourth deconvolution module and a fifth deconvolution module, wherein the input features of the second deconvolution module to the fifth deconvolution module comprise the skip layer connection features from the corresponding levels in the feature encoding module.

7. The AAMC-Net based image crack segmentation detection system of claim 6, wherein, In the double-scale hollow convolution module, the two channels have a hollow rate of 1 and 2 respectively, and after one hollow convolution operation in each channel, three convolution operations are performed to normalize the size, wherein for the channel with a hollow rate of 1, the convolution kernel sizes of the three convolution operations are selected as 3, 3 and 1 in turn, and for the channel with a hollow rate of 2, the convolution kernels of the three convolution operations are selected as 3, 1 and 1 in turn, and the feature maps of the two channels are fused by using feature weighting operation.

8. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the AAMC-Net-based image crack segmentation detection method in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the AAMC-Net-based image crack segmentation detection method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Shale electron microscope scanning graph crack extraction method based on deep learning segmentation network

    CN115240041A