Micro-fissure precise segmentation method integrating feature fusion and convolution attention

By combining feature fusion and convolutional attention to achieve precise microcrack segmentation, this method solves the problems of insufficient long-range dependency modeling, imprecise characterization of extremely fine cracks, and poor robustness in complex backgrounds in existing technologies, and achieves highly sensitive detection and precise segmentation of microcracks.

CN120876869BActive Publication Date: 2025-11-28DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511383286.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-11-28
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

Existing crack detection technologies suffer from insufficient long-range dependency modeling, imprecise characterization of extremely fine cracks, and poor robustness in complex backgrounds. In particular, convolutional neural networks are inadequate in capturing the overall topological structure and detailed information of narrow cracks.

Method used

We employ a micro-crack precision segmentation method that integrates feature fusion and convolutional attention. By constructing an encoder-decoder architecture and introducing a convolutional block attention module (CBAM) and a feature fusion module (FFM), we achieve synergistic optimization of multi-scale feature extraction and attention mechanism, thereby improving the capture of salient crack features and the suppression of complex background interference.

Benefits of technology

It significantly improves the detection sensitivity and overall segmentation consistency of microcracks, reduces the false detection rate, and ensures the continuity and topological integrity of narrow cracks, especially showing remarkable effects in complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876869B_ABST
    Figure CN120876869B_ABST
Patent Text Reader

Abstract

The application provides a micro crack accurate segmentation method integrating feature fusion and convolution attention, and belongs to the field of image processing.The method constructs a crack segmentation network based on an encoder-decoder architecture, introduces a convolution block attention module at the encoder end, suppresses background noise and strengthens crack salient features through a channel and spatial double attention mechanism, improves the sensitivity of the model to micro cracks under the premise of almost no increase in computing overhead, introduces a feature fusion module at the decoder end, realizes the cooperation of low-level details and high-level semantics through cross-layer fusion, effectively fills the semantic gap, avoids the loss of details caused by traditional convolution stacking, and ensures the continuity and complete topological structure of the narrow crack.The application realizes the accurate capture of crack salient features and the effective suppression of complex background interference through multi-scale feature extraction and attention mechanism optimization, and significantly improves the detection sensitivity of micro cracks and the overall segmentation consistency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of computer vision and image processing, and particularly relates to a micro crack accurate segmentation method integrating feature fusion and convolution attention. BACKGROUND

[0002] Cracks are one of the most common damage forms of civil infrastructure and high-end manufacturing materials during service, and their morphology and evolution rules are often directly related to the safety and durability of structures. Therefore, timely detection and accurate identification of cracks have important scientific significance and engineering application value in the health monitoring of large engineering structures such as bridges, roads, tunnels and buildings, and in the high-end manufacturing field such as composite materials and electronic packaging.

[0003] Existing crack detection technologies mainly include two categories: one is traditional manual inspection and image processing methods. Manual inspection relies on the experience of inspectors for judgment, and has inherent defects such as low efficiency, high cost and strong subjectivity, which is difficult to meet the consistency and repeatability requirements of large-scale engineering applications. Although the detection methods based on traditional image processing, such as threshold segmentation and edge detection, are simple to calculate, they are prone to inaccurate detection and insufficient robustness in complex background, light change or small crack scenes.

[0004] The other is an automatic detection method based on deep learning. In recent years, convolutional neural networks (CNN) have become the mainstream solution for crack detection due to their excellent feature extraction capabilities, and have continuously improved accuracy through improvements such as multi-scale feature fusion and attention mechanisms. However, this type of method still has the following shortcomings:

[0005] The convolutional neural network is limited by the local receptive field and has insufficient long-range dependency modeling capability, making it difficult to capture the overall topological structure of narrow cracks; in the process of layer-by-layer downsampling and convolution stacking, the edge and texture information of very fine cracks are easily lost, resulting in incomplete segmentation results; in complex background conditions (such as texture interference, light change, noise pollution), crack features are easily hidden, causing false detection and missed detection. At the same time, some studies attempt to introduce Transformer into the crack detection task to take advantage of its global modeling advantage, but since cracks often only occupy a very small proportion in images, direct use of general Transformer can introduce redundant background information, dilute the discrimination signal, and even affect the detection accuracy.

[0006] In summary, the existing technology still has problems such as insufficient long-range dependency modeling, poor depiction of very fine cracks, and poor robustness in complex backgrounds in the crack detection task. SUMMARY

[0007] In view of the above problems in the prior art, the present application provides a micro crack accurate segmentation method integrating feature fusion and convolution attention, which constructs a new crack segmentation network combining a feature fusion module (FFM) and a convolution block attention module (CBAM). The network is based on an encoder-decoder architecture, introduces a convolution block attention module (CBAM) at the encoder end, and introduces a feature fusion module (FFM) at the decoder end. Through the cooperative optimization of multi-scale feature extraction and attention mechanism, the accurate capture of crack saliency features and the effective suppression of complex background interference are realized, and the detection sensitivity of micro cracks and the overall segmentation consistency are significantly improved.

[0008] In order to achieve the above-mentioned target, the technical scheme adopted by the present application is as follows:

[0009] A micro crack accurate segmentation method integrating feature fusion and convolution attention, comprising the following steps:

[0010] S1, obtaining a crack image and preprocessing, constructing a crack image dataset;

[0011] S2, constructing a crack segmentation network, the crack segmentation network is an encoder-decoder structure as a whole;

[0012] The encoder includes a deep residual network and a convolution block attention module (CBAM); the deep residual network serves as a backbone network to extract multi-scale features of the input image, and the convolution block attention module (CBAM) enhances the saliency of the multi-scale features to obtain enhanced features of each scale feature; the enhanced features of each scale feature include high-level semantic features and low-level detail features;

[0013] The decoder includes a feature fusion module (FFM) and a decoding head; the feature fusion module (FFM) cross-layer fuses and refines the low-level detail features and high-level semantic features output by the encoder to obtain fusion features with global semantics and local details; the decoding head sequentially processes the fusion features through convolution and progressive upsampling to gradually restore the spatial resolution and enhance the edge detail expression, and obtains a crack segmentation prediction result map;

[0014] S3, training the crack segmentation network using the crack image dataset constructed in S1;

[0015] S4, inputting a detection image to be segmented into the trained crack segmentation network, extracting multi-scale features through the encoder and gradually fusing and restoring the resolution in the decoder, and finally outputting a segmentation result of a crack region by the decoding head.

[0016] Further, in the S1, the specific process of constructing the crack image dataset includes:

[0017] Obtain crack images of scenes such as roads, bridges, tunnels, and building outer walls through devices such as cameras or drones, to ensure that different scales and different forms of cracks are included;

[0018] Pixel-level label the crack regions in the collected crack images to generate a binary mask corresponding to the original crack image;

[0019] Preprocess the labeled crack images, including image normalization, cropping, flipping, rotation, scaling, and brightness adjustment, to enhance data diversity and the generalization ability of the model, and form a crack image dataset;

[0020] Divide the crack image dataset into a training set, a validation set, and a test set to ensure the rationality of the scene distribution.

[0021] Further, the deep residual network includes a ResNet50 model, which takes the preprocessed crack image as input, and extracts multi-scale feature maps from shallow to deep through layer-by-layer convolution and downsampling operations , which includes , wherein the shallow features retain detailed information such as edges and textures, and the high-level features contain more abstract global semantic information.

[0022] Further, the convolution block attention module (CBAM) aims to improve the representation ability of the convolutional neural network by explicitly modeling the significance of the channel and spatial dimensions, and is composed of a cascaded channel attention submodule (ChannelAttentionModule, CAM) and a spatial attention submodule (SpatialAttentionModule, SAM). This dual attention mechanism achieves synergistic enhancement of key channels and key spatial positions while suppressing redundant or noisy information, significantly improving the sensitivity and robustness of the model in fine-grained tasks such as crack segmentation, without significantly increasing computational overhead;

[0023] The CAM takes the multi-scale feature maps extracted by the deep residual network as input, and uses global average pooling and global maximum pooling to compress information in the spatial dimension to obtain two channel-level descriptors :

[0024]

[0025]

[0026] wherein, , H and W are the height and width of the input image respectively, C is the number of channels; , h and w are the row and column coordinates of the feature map in spatial dimensions respectively;

[0027] The , input is fed into a shared-parameter multi-layer perception (MLP) to learn the nonlinear interaction; the multi-layer perception is composed of a first fully connected layer, a ReLU activation function, and a second fully connected layer connected in sequence, and the output is activated by an activation function to obtain a channel attention map The process is represented as:

[0028]

[0029] wherein, is an activation function;

[0030] The enhanced feature is obtained by channel-by-channel multiplication:

[0031]

[0032] The SAM performs average pooling and maximum pooling on the channel-enhanced feature in the channel dimension to generate two two-dimensional spatial domain descriptors ;

[0033]

[0034]

[0035] wherein, C represents the number of channels, ;

[0036] The , is concatenated along the channel axis, and then a convolutional layer is used to capture local cross-channel interaction and obtain a spatial attention map through an activation function:

[0037]

[0038] wherein, represents a convolutional layer with a kernel size of ​​;

[0039] Finally, the spatial attention map is multiplied with the enhanced feature to obtain the refined feature tensor ;

[0040] The shallow feature , The feature tensors obtained after feature enhancement by the convolution block attention module , constitute low-level detail features , respectively represent the height, width, and channel number of the low-level detail feature tensor; the high-level feature , The feature tensors obtained after feature enhancement by the convolution block attention module , constitute high-level semantic features , respectively represent the height, width, and channel number of the high-level semantic feature tensor.

[0041] Further, the feature fusion module (FFM) includes a channel alignment module, a channel attention enhancement module, a correlation enhancement module, and a deep convolution refinement module;

[0042] The channel alignment module adjusts the channel number of the high-level semantic feature and the low-level detail feature to a uniform dimension C through 1x1 convolution, and performs upsampling on the high-level semantic feature using bilinear interpolation to make its spatial resolution consistent with that of the low-level detail feature , obtaining the high-level semantic feature and the low-level detail feature after dimension alignment.

[0043] The channel attention enhancement module performs channel enhancement on and respectively, and the formula is as follows:

[0044]

[0045]

[0046] wherein, is the channel weight vector of the high-level semantic feature, ; is the channel weight vector of the low-level detail feature, ; is a global average pooling operation; , are enhanced high-level semantic features and low-level detail features, respectively;

[0047] The correlation enhancement module is used to promote the deep interaction and complementary fusion between the high-level semantic features and the low-level detail features. First, the features and are flattened in the spatial dimension:

[0048]

[0049] The interaction matrix is calculated:

[0050]

[0051] wherein, is the interaction matrix, representing the similarity of the high-level semantic features and the low-level detail features in the channel dimension;

[0052] The interaction matrix is then activated and used as the fusion weight :

[0053]

[0054] The fusion weight is complementarily weighted and fused to obtain the fused features after cross-domain interaction :

[0055]

[0056] wherein, is the matrix shape converted into the feature map shape; is an identity matrix, ensuring that and are complementary;

[0057] The deep convolution refining module refines the fused features through a series of lightweight convolution to obtain the final fused features, which not only maintains the low-level edge information but also takes into account the high-level semantic global information. The process is represented as:

[0058]

[0059] wherein, is the final fused feature; is a depth separable convolution, which expands the receptive field while reducing the parameter amount; is a batch normalization; is a nonlinear activation.

[0060] Further, the decoding head comprises a convolution block attention module (CBAM), an up-sampling module and a prediction head;

[0061] The convolution block attention module (CBAM) is consistent with the convolution block attention module architecture in the encoder to fuse features As input, sequentially processed by a cascaded channel attention sub-module (CAM) and a spatial attention sub-module (SAM) to obtain attention-enhanced features , which is represented as:

[0062]

[0063] The up-sampling module performs two times of 2 times bilinear up-sampling on the attention-enhanced features , and after each up-sampling, a 3x3 convolution is performed for refinement to obtain a prediction head;

[0064] The prediction head is pre-channel compressed (Channel Reduction) to obtain features ;

[0065] The channel number of the features is compressed to 1 using a 1x1 convolution to obtain a two-dimensional tensor ; and the two-dimensional tensor is activated using an activation function to obtain a crack segmentation prediction result map, which is represented as:

[0066]

[0067]

[0068] wherein, is the crack segmentation prediction result map, and the value of each pixel point in the map represents the probability of the pixel being judged as a crack by the model.

[0069] Further, in the crack segmentation network training process, a loss function based on binary cross entropy and Dice loss is used:

[0070]

[0071] wherein, and are hyperparameters for balancing the weights of the binary cross entropy loss and the Dice loss; is the binary cross entropy loss, is the Dice loss, and the formulas are respectively:

[0072]

[0073]

[0074] wherein, is the total number of pixels; is the true label of the i-th pixel, 0 or 1; is the predicted probability of the i-th pixel, i.e. is the corresponding value in the prediction; is a smoothing constant. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor; when the processor executes the computer program, the electronic device performs the micro crack accurate segmentation method integrating feature fusion and convolution attention.

[0075] A storage medium comprising a computer program, which, when executed on an electronic device, causes the electronic device to perform the micro crack accurate segmentation method integrating feature fusion and convolution attention.

[0076] An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor; when the processor executes the computer program, the electronic device performs the micro crack accurate segmentation method integrating feature fusion and convolution attention.

[0077] The crack segmentation network proposed by the present application adopts the encoding-decoding architecture of the convolution block attention module (CBAM) and the feature fusion module (FFM), and through the synergistic effect of the CBAM and FFM modules, the depth integration of local details and global semantics is realized, and significant technical breakthroughs are achieved in the fine segmentation task of micro cracks on the surface of concrete structures (such as roads, bridges, and tunnels): in the encoding stage, the CBAM module suppresses background noise and enhances crack prominent features through a channel and spatial dual attention mechanism, which improves the sensitivity of the model to micro cracks without increasing the computational overhead, and especially in low-contrast or texture interference scenarios, the false detection rate is reduced by about 0.5%; in the decoding stage, the FFM module realizes the synergy of low-level details (such as edge texture) and high-level semantics (such as the overall shape of the crack) through cross-layer fusion, effectively bridging the semantic gap, avoiding the loss of details caused by traditional convolution stacking, and ensuring the continuity and complete topological structure of narrow cracks (width <0.2mm). The performance of the present application is verified on public datasets, and the best balance is achieved in terms of accuracy, recall, and edge consistency, and the generalization ability is strong, and it has high sensitivity in detecting micro cracks in complex scenes, providing a highly reliable and deployable intelligent crack detection tool for health monitoring of large infrastructure such as bridges and tunnels. BRIEF DESCRIPTION OF DRAWINGS

[0078] Figure 1 ​A model framework diagram of the micro crack precise segmentation method integrating feature fusion and convolution attention in the embodiment of the present application.

[0079] Figure 2 A structural schematic diagram of the CBAM module in the embodiment of the present application: the cascade of channel attention and spatial attention is shown, noise is suppressed and key areas of cracks are highlighted, and feature adaptive enhancement is realized.

[0080] Figure 3 A structural schematic diagram of the FFM module in the embodiment of the present application: low-level and high-level features are aligned, weighted, and interactively fused, and enhanced joint representations are output, ensuring crack detail and global consistency.

[0081] Figure 4 A comparison chart of ablation experiments in the embodiment of the present application: the segmentation results of different module combinations and backbone networks are compared to verify that CBAM+FFM collaboration brings the best performance. DETAILED DESCRIPTION

[0082] The technical solutions of the present application will be described in further detail below with reference to the accompanying drawings.

[0083] Crack segmentation is a core task in the field of structural health monitoring, and its goal is to use computer vision methods to automatically and accurately extract and describe the crack area in the image, thereby providing key basis for the service state evaluation and maintenance decision of large concrete structures such as roads, bridges, and tunnel walls. In view of the inherent limitations of traditional convolutional networks in long-range dependency modeling, fine crack information preservation, and complex background suppression, the embodiment of the present application provides a micro crack precise segmentation method integrating feature fusion and convolution attention, which adopts a new encoding and decoding architecture that integrates a feature fusion module (Feature Fusion Module, FFM) and a convolution block attention module (Convolutional Block Attention Module, CBAM). The framework consists of two stages: the encoding stage and the decoder stage. In the encoding stage, the ResNet50 backbone network pre-trained on ImageNet is used to extract multi-level primary features, and then the CBAM is embedded in it. In a cascaded manner of channel attention sub-module and spatial attention sub-module, the feature map is adaptively re-scaled along the channel dimension and the spatial dimension, respectively, thereby enhancing the sensitivity to the crack saliency channel and region, and simultaneously suppressing irrelevant background interference. In the decoding stage, the FFM is used as the core, and after the cross-layer feature dimension alignment is completed by 1x1 convolution, the channel attention mechanism is introduced to further refine the semantic expression, and then the correlation enhancement strategy is used to realize the deep interaction and complementary fusion of high-level and low-level features. Finally, the spatial resolution is gradually restored by progressive upsampling and convolution restoration operations, and the fine crack segmentation result is output. As shown in FIG. 1, the method specifically includes the following steps: Figure 1 ​

[0084] S1, acquire crack images and pre-process, construct crack image dataset.

[0085] This embodiment adopts the DeepCrack dataset, which was proposed by Liu et al. in 2019 for crack segmentation tasks, and is one of the most representative and widely cited public benchmarks to date. The collection scenarios cover typical concrete structures such as urban asphalt pavement, high-speed railway bridge body, tunnel lining, and building facade, and the imaging conditions span various working conditions such as natural light, indoor artificial light, backlight, and shadow interference; crack types include not only fine hairline cracks with a width of less than 0.2 mm, but also main cracks that run through the entire field of view, resulting in a rich difference in scale and topological morphology. A total of 537 high-resolution RGB images are officially released, with original sizes ranging from 1600x1200 to 2000x1500 pixels, all taken vertically by professional DSLR cameras to ensure clear and distinguishable texture details. Each image is equipped with a pixel-by-pixel annotated binary mask, with crack areas annotated as 255 and backgrounds annotated as 0. The annotation consistency is cross-verified by three experienced annotators, ensuring that the edge error is controlled within 2 pixels. In addition, the dataset is pre-divided into training, validation, and test sets in a ratio of 8:1:1 to avoid evaluation bias caused by different scene distributions.

[0086] S2, construct and train crack segmentation network.

[0087] The experiment was completed on a workstation equipped with Intel® Xeon® Gold 6248R CPU (20 cores 2.50 GHz), 64 GB DDR4 memory, and an NVIDIA RTX 4090 24 GB GPU; the operating system was Ubuntu 22.04LTS, CUDA version 11.8, cuDNN 8.7, and PyTorch 2.0 framework. The network model was trained using the SGD optimizer with a momentum of 0.9 and a weight decay of 0.0001; the initial learning rate was set to 0.01 and was smoothly decayed to 0.00001 within 200 epochs using the cosine annealing strategy; the batch size was set to 8 (4 512x512 random crops per GPU), and the gradient clipping norm was 5. The loss function used a combination of weighted binary cross-entropy and Dice loss . In the inference stage, the original resolution was maintained, horizontal flip TTA was used, and the mean value was output; the evaluation indicators included accuracy Precision, recall, harmonic mean F1-score, and intersection over union mIoU.

[0088] To comprehensively and objectively verify the superiority of the crack segmentation network model proposed in the present application, systematic comparative experiments were conducted on the DeepCrack public benchmark with the current most representative eleven crack segmentation algorithms. The reference models include both the classic architectures (UNet-ResNet34, DeepLabv3+, CENet, DeepCrack) in 2018-2020 and the latest Transformer and CNN hybrid paradigm (TransFuse, UTNet, FAT-Net, DscNet, DTrC-Net, DECS-Net) proposed in 2021-2024, as well as the variant (Attn-UNet) introducing attention mechanism, ensuring the wide representativeness of the comparison results in terms of age, structure and methodology. All experiments were reproduced under the same hardware environment and uniform hyperparameter configuration to exclude the interference caused by implementation differences.

[0089] Table 1 Comparison results

[0090]

[0091] From the quantitative results in Table 1, it can be seen that the present application method achieves the best performance in the four core indicators of Precision, Recall, F1-score and mIoU, reaching 99.45%, 99.38%, 99.41% and 80.64% respectively. Compared with the suboptimal DECS-Net (mIoU 75.23%), the mIoU is improved by 5.41 percentage points; compared with the Transformer structure representative TransFuse (mIoU 60.76%), the improvement is 19.88 percentage points; and compared with the classic DeepLabv3+ (mIoU 68.18%), the advantage is further expanded to 12.46 percentage points. This significant gain fully indicates that the present application is superior to existing mainstream solutions in overall coverage and edge consistency of crack regions.

[0092] Further analysis of the balance between Precision and Recall can find that most of the comparison algorithms tend to have a significant decrease in Precision when the recall rate is high (such as DECS-Net, although the Recall reaches 92.70%, the Precision is only 82.87%, resulting in a limited F1 of 87.51%). In contrast, the present application method maintains a Precision of 99.45% while keeping the Recall close to 99%, achieving dual suppression of errors and omissions. This advantage directly translates into the integrity of the crack topological structure: the visualization results show that the present application can effectively avoid fragmentation and artifacts in long and weak cracks and complex texture backgrounds, significantly reducing the number of missed pixels and fragmented error regions.

[0093] In summary, the experimental results verify the advancement of the network model from both quantitative and qualitative dimensions. The performance improvement is mainly due to the precise enhancement of the CBAM attention module on the crack salient features and the synergistic use of local details and global semantics by the FFM multi-scale feature fusion strategy. The combined effect of the two makes the model still robustly capture the subtle structure of the slender crack in complex scenes, achieving the best balance of precision, recall and regional consistency, further consolidating its leading position in the crack segmentation task.

[0094] To systematically analyze the contribution of the convolution block attention module CBAM and the feature fusion module FFM to the overall performance of the network, the present invention designs and performs multiple sets of controlled ablation experiments on the DeepCrack benchmark, and the results are summarized in Table 2.

[0095] Table 2 Ablation experiment results

[0096]

[0097] Firstly, the "Base" model based on ResNet50 has shown a highly competitive baseline level without introducing any additional modules: Precision is 99.42 %, Recall is 99.39 %, F1-score is 99.40 %, and mIoU is 80.23 %, fully demonstrating that the pre-trained convolutional backbone itself has strong representation ability.

[0098] On this basis, after embedding CBAM alone (denoted as Base_cb), Precision and Recall are slightly increased to 99.42 % and 99.41 % respectively, and mIoU is increased to 80.43 %, although the improvement is only 0.20 percentage points, but it still shows statistical significance in the high baseline interval of 80 %. Visual analysis shows that the channel-spatial dual attention mechanism not only suppresses the complex texture background, but also enhances the high-frequency response to the narrow crack edge, effectively compressing the false detection pixels.

[0099] Further, only FFM (1) is enabled, denoted as Base_ffm (1), mIoU reaches 80.55 %, which is the highest value among all single module settings. This result confirms that the cross-layer feature fusion strategy can bridge the semantic gap between low-level details and high-level semantics, enabling the model to maintain edge fineness while obtaining more complete crack region perception. It is worth noting that FFM (2) falls back to 80.17 % mIoU due to different fusion weight initialization, suggesting that the design of the fusion path needs to be optimized in coordination with parameter initialization.

[0100] When CBAM is cooperatively embedded with FFM, namely Base_cb_ffm-resnet50 model, the four indicators are all optimal: Precision is 99.45 %, Recall is 99.38 %, F1-score is 99.41 %, and mIoU is 80.64 %. Compared with Base, mIoU is additionally improved by 0.41 percentage points; although the absolute increment seems limited, in the high platform area of 99 % level Precision and Recall, the gain reflects the complementary effect between attention selection and multi-scale fusion, significantly enhancing the topological continuity of crack edges and reducing fragmented false detections.

[0101] The backbone network sensitivity experiment further verifies the above conclusion: when ResNet18 is used as the backbone, mIoU drops to 78.95 %, indicating that the insufficient capacity limits the potential of the attention and fusion module; ResNet34 achieves 80.02 %, which is close to the result of ResNet50; however, continuing to deepen to ResNet101 leads to overfitting due to the explosive growth of parameters, and mIoU drops to 75.32 %. In summary, ResNet50 achieves the best compromise between representation ability and training stability, and also provides the most suitable backbone support for the synergistic gain of CBAM and FFM. The specific comparison effects are shown in Table 2. Figure 4

[0102] In summary, the lightweight coding and decoding network integrating CBAM and FFM proposed in the present application, through system experiments on the DeepCrack dataset, verifies that the network can still achieve the current best performance with 99.41 % F1-score and 80.64 % mIoU under complex light and texture interference; the ablation results further show that the spatial-channel dual attention of the CBAM module can effectively suppress background noise, and the cross-layer fusion mechanism of the FFM module significantly improves the topological integrity of narrow cracks. Comprehensive comparison and visual analysis show that the present application achieves the best balance in precision, recall and edge consistency, and provides a highly reliable and deployable intelligent crack detection tool for health monitoring of large infrastructure such as bridges and tunnels.

[0103] Finally, it should be noted that: the above embodiments are intended to illustrate the technical solutions of the present application and do not constitute any form of limitation on the present application. Those skilled in the art should fully understand that it is entirely feasible to modify the technical solutions described in the foregoing embodiments or to equivalently replace any part or all of the technical features. These modifications or replacements, as long as they do not deviate from the protection scope determined by the claims of the present application, should be considered as reasonable extensions of the present application.​

Claims

1. A method for micro crack precise segmentation integrating feature fusion and convolution attention, characterized in that, The method comprises the following steps: S1, acquiring a crack image and pre-processing to construct a crack image dataset; S2, constructing a crack segmentation network, which is an encoder-decoder structure as a whole; The encoder comprises a deep residual network and a convolution block attention module; the deep residual network extracts multi-scale features of the input image as a backbone network, and the convolution block attention module enhances the significance of the multi-scale features to obtain enhanced features of each scale feature; The enhanced features of each scale feature comprise high-level semantic features and low-level detail features; The decoder comprises a feature fusion module and a decoding head; the feature fusion module cross-layer fuses and refines the low-level detail features and the high-level semantic features output by the encoder to obtain fused features with global semantics and local details; and the decoding head sequentially processes the fused features through convolution and progressive upsampling to gradually restore the spatial resolution and enhance the expression of edge details, so as to obtain a crack segmentation prediction result map; S3, training the crack segmentation network by using the crack image dataset constructed in S1; S4, inputting a detection image to be segmented into the trained crack segmentation network, extracting multi-scale features through the encoder, gradually fusing and restoring the resolution in the decoder, and finally outputting a segmentation result of a crack region by the decoding head; The convolution block attention module is composed of cascaded channel attention sub-modules and spatial attention sub-modules; The channel attention sub-module compresses the multi-scale feature maps extracted by the deep residual network in the spatial dimension As input, global average pooling and global maximum pooling are used to compress information in the spatial dimension, respectively, to obtain two channel-level descriptors , A shared parameter multi-layer perceptron is used, which is connected by a first fully connected layer, a ReLU activation function, and a second fully connected layer in sequence, and the output is activated by an activation function to obtain a channel attention map , The enhanced features are obtained by channel-by-channel multiplication ;​​​ The spatial attention submodule enhances the features of the channel. Perform average pooling and max pooling along the channel dimension to generate two two-dimensional spatial descriptors. ;Will , After being spliced ​​along the channel axis, via a Convolutional layers capture local cross-channel interactions and are then processed... Spatial attention map is obtained by activation function. ; spatial attention map enhanced features element-wise multiplication, resulting in refined feature tensor ; The low-layer detail feature is constituted by feature tensors obtained respectively after feature enhancement of shallow features extracted by the deep residual network through the convolution block attention module The high-layer semantic feature is constituted by feature tensors obtained respectively after feature enhancement of high-layer features extracted by the deep residual network through the convolution block attention module ​ The feature fusion module comprises a channel alignment module, a channel attention enhancement module, a correlation enhancement module and a deep convolution refining module; The channel alignment module aligns high-level semantic features and low-level detail features by adjusting the number of channels to a unified dimension through a 1x1 convolution C , up-sampling the high-level semantic features using bilinear interpolation to make their spatial resolution consistent with that of the low-level detail features , and obtaining high-level semantic features and low-level detail features that are dimensionally aligned; The channel attention enhancement module respectively performs channel enhancement on and to obtain enhanced high-level semantic features and low-level detail features ; The relevance enhancement module first transforms the features with a spatial dimension flattening and computes an interaction matrix where is the flattened vector, , respectively represent the height and width of the low-level detail features . After the activation processing of the interaction matrix is taken as the fusion weight ; the fusion weight is complementarily weighted and fused to obtain the fused feature after cross-domain interaction ; wherein, is the conversion from the matrix shape to the feature map shape; is the unit matrix; The deep convolution refining module refines the fusion feature After a series of light convolution refining, the fusion feature is obtained .

2. The method according to claim 1, wherein, The specific process of constructing the crack image dataset comprises: acquiring a crack image to ensure that the crack image contains cracks of different scales and different morphologies; performing pixel-level labeling on the crack region in the collected crack image to generate a binary mask corresponding to the original crack image; pre-processing the labeled crack image, including image normalization, cropping, flipping, rotating, scaling and brightness adjustment, to enhance data diversity and the generalization ability of the model, and forming a crack image dataset; dividing the crack image dataset into a training set, a validation set and a test set.

3. The method according to claim 1, wherein, The deep residual network comprises a ResNet50 model, and takes the preprocessed crack image as input, and extracts a multi-scale feature map from shallow to deep through layer-by-layer convolution and down-sampling operation on the crack image , comprising , wherein the shallow layer feature retains the detail information, and the high layer feature contains global semantic information.

4. The method according to claim 3, wherein, The convolution block attention module is composed of cascaded channel attention sub-modules and spatial attention sub-modules; The channel attention sub-module compresses the multi-scale feature maps extracted by the deep residual network in the spatial dimension As input, global average pooling and global maximum pooling are used to compress information in the spatial dimension, respectively, to obtain two channel-level descriptors : wherein, , are height and width of the input image, respectively, is the number of channels; , are the row and column coordinates of the feature map in spatial dimensions, respectively. Will , A multilayer perceptron (MLP) with shared parameters is fed into the machine to learn nonlinear interaction relationships; the MLP is then subjected to dimensionality reduction scaling. To control the bottleneck structure, the multilayer perceptron consists of a first fully connected layer, a ReLU activation function, and a second fully connected layer connected sequentially. Its output is then processed... After activation by the activation function, the channel attention map is obtained. The process is represented as: wherein is activation function; The enhanced features are obtained by multiplying each channel in turn : The spatial attention sub-module performs average pooling and maximum pooling on the channel-enhanced feature In the channel dimension, average pooling and maximum pooling are performed to generate two two-dimensional spatial domain descriptors ; wherein represents the number of channels, ; Will , After concatenation along the channel axis, via a convolutional layer captures local cross-channel interactions, and is activated by an activation function to obtain a spatial attention map : wherein, denotes a convolutional layer with a kernel size of ; Finally, the spatial attention map with the enhanced features element-wise multiplication, resulting in the refined feature tensor ; The shallow feature , The feature tensor obtained after feature enhancement by the convolution block attention module , The low-level detail feature , Height, width, and channel number of the low-level detail feature tensor respectively; the high-level feature , The feature tensor obtained after feature enhancement by the convolution block attention module , The high-level semantic feature , Height, width, and channel number of the high-level semantic feature tensor respectively.

5. The method according to claim 4, wherein, The feature fusion module comprises a channel alignment module, a channel attention enhancement module, a correlation enhancement module and a deep convolution refining module; The channel alignment module aligns high-level semantic features and low-level detail features by adjusting the number of channels to a unified dimension through 1x1 convolution C , up-samples the high-level semantic features by using bilinear interpolation, so that the spatial resolution is consistent with that of the low-level detail features , and obtains high-level semantic features and low-level detail features that are dimensionally aligned; The channel attention enhancement module respectively performs channel enhancement on and The formula is as follows: wherein, is a channel weight vector for high-level semantic features, ; is a channel weight vector for low-level detail features, ; is a global average pooling operation; 、 are enhanced high-level semantic features and low-level detail features, respectively. The correlation enhancement module is used to promote deep interaction and complementary fusion between high-level semantic features and low-level detail features; first, features With In the spatial dimension: The interaction matrix is calculated as follows: wherein, is an interaction matrix representing the similarity of high-level semantic features and low-level detail features in the channel dimension; Again, the interaction matrix After activation processing as fusion weight : complementary weighting fusion complementary weighting fusion, to obtain the fused features after cross-domain interaction : wherein, to convert the matrix shape into the feature shape; to identity matrix; The deep convolution refining module refines the fusion feature After a series of light convolution refining, the final fusion feature is obtained, which not only maintains the low-level edge information, but also takes into account the high-level semantic global information, and the process is represented as: wherein, is a final fused feature; is a depthwise separable convolution; is a batch normalization; is a non-linear activation.

6. The method according to claim 5, wherein, The decoding head comprises a convolution block attention module and an upsampling module; The convolution block attention module in the decoding head is consistent with the convolution block attention module in the encoder in architecture to fuse features As input, sequentially processed by the cascaded channel attention submodule and the spatial attention submodule to obtain attention-enhanced features The process is represented as: The up-sampling module is configured to up-sample the attention-enhanced feature Two times of 2 times bilinear up-sampling are performed, and after each up-sampling, a 3*3 convolution is performed for refinement to obtain a prediction head. pre-channel compressing the prediction head to obtain features ; The features are processed using a 1×1 convolution. The number of channels is compressed to 1, resulting in a two-dimensional tensor. Then, for two-dimensional tensors... use Activation function activation yields crack segmentation prediction result map, which can be represented as follows: wherein, is a crack segmentation prediction result map, in which the value of each pixel point represents the probability of the pixel being judged as a crack by the model.

7. The method according to claim 6, wherein, In the training process of the crack segmentation network, a loss function based on binary cross entropy and Dice loss is used: wherein, and are hyperparameters for balancing the weights of binary cross-entropy loss and Dice loss, respectively; is the binary cross-entropy loss, is the Dice loss, whose formulae are respectively: where, is the total number of pixels; is the true label of the th pixel, 0 or 1; is the predicted probability of the th pixel, i.e. the corresponding value in is a smoothing constant.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor; characterized in that, When the computer program runs on the electronic device, the electronic device executes the micro crack precise segmentation method integrating feature fusion and convolution attention as claimed in any one of claims 1-7.

9. A storage medium, the storage medium comprising a computer program, characterized in that, When the computer program runs on the electronic device, the electronic device executes the micro crack precise segmentation method integrating feature fusion and convolution attention as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Crack image segmentation method based on high-resolution network

    CN117455933A

  • Unmanned aerial vehicle image pavement crack segmentation method fusing multi-scale feature extraction and attention mechanism

    CN118247690A