A crack image segmentation method based on double-pooling fusion
Patent Information
- Application Number
- CN202511557804.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-10-29
AI Technical Summary
然而,目前基于CNN、Transformer及其混合架构的方法,在性能与计算成本之间仍难以实现有效平衡,尚缺乏一种能够在像素层面动态引导并轻量化融合全局与局部信息的通用解决方案
[0043] (1) The present invention proposes a DGM module, which has better structural continuity characterization and boundary integrity maintenance for thin, long, tortuous and discontinuous cracks.
Smart Images

Figure CN121708027B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of crack detection and evaluation technology, specifically relating to a crack image segmentation method based on dual pooling fusion. Background Technology
[0002] Cracks are among the most common and dangerous defects. They weaken the load-bearing capacity and durability of structures, increase maintenance costs, and pose public safety risks. Cracks are widely present in various materials and scenarios, including asphalt pavements, bricks, and ceramic tiles. Accurate crack identification is challenging due to factors such as irregular shapes, large-scale variations, and complex textures. Traditional detection methods still largely rely on manual inspection, which is slow, costly, and highly subjective, prone to missed detections and inconsistencies, and difficult to meet the needs of large-scale applications. Early segmentation methods mainly employed digital image processing, such as edge detection, clustering, thresholding, and morphological operations, but their performance is limited under noise interference.
[0003] To overcome the above problems, researchers have introduced convolutional neural networks (CNNs) into crack segmentation. However, CNNs are limited by their finite receptive field and have performance bottlenecks. To enhance global modeling capabilities, a pyramid pooling method was proposed to extract multi-scale contextual information; subsequently, deformable convolutions were used to make the network more flexible in focusing on target-related regions; in addition, convolutional attention mechanisms were introduced in SegNeXt to further highlight local features and reduce computational overhead. Nevertheless, CNN-based methods are still limited by local receptive fields and are difficult to effectively capture long-range dependencies and complex semantic relationships. Therefore, the Transformer structure has also been introduced into crack segmentation tasks: a structure combining a hierarchical encoder and an MLP decoder has achieved cross-layer feature fusion; another method has designed a dual-path network that integrates CNNs and Transformers to fully utilize the complementary advantages of the two architectures. However, Transformers often have a large number of parameters and high computational overhead, which limits their deployment on resource-constrained devices. In order to enable visual Transformers to have inductive bias capabilities, some research has explored hybrid models of CNNs and Transformers. These models can be mainly divided into two categories: (1) connecting CNNs and Transformers in series or in parallel. (2) Integrating the locality of convolution into the self-attention mechanism to form a token mixer. For example, UNet-2022 combines the self-attention mechanism with DWConv in parallel to form a token mixer. These methods attempt to balance local and global information, but the performance improvement is still limited. The main reason lies in the characteristics and computational mechanisms of CNN and Transformer. Standard convolutional kernels are independent of the input and cannot adapt to different inputs, while the self-attention mechanism dynamically calculates the attention matrix based on the input. This inherent difference leads to a difference in the representational ability of convolutional operations and self-attention mechanisms, thereby weakening the modeling ability of self-attention mechanisms and mixed tokens.
[0004] The current mainstream trend in crack segmentation has gradually shifted from relying solely on local or global single representations to achieving collaborative modeling of global and local information at the pixel level. This requires both explicitly modeling the global context and long-range dependencies and robustly maintaining the continuity of edge details, texture features, and topological structures. However, current methods based on CNNs, Transformers, and their hybrid architectures still struggle to achieve an effective balance between performance and computational cost, lacking a universal solution that can dynamically guide and lightweightly fuse global and local information at the pixel level. Addressing these shortcomings is a key technical challenge in this field. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and propose a crack image segmentation method based on dual pooling fusion. A DGM module is designed and a DP-PAM module is built in to realize global and local collaborative modeling of pixel attention and pooling gating, thereby achieving high-precision pixel-level crack segmentation.
[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0007] S1. Collect images of road cracks and perform preprocessing operations;
[0008] S2. The preprocessed image is fed into the dual-branch orientation perception module DBDA to model local details and orientation textures respectively.
[0009] S3. Input the output of the dual-branch direction sensing module DBDA and the original features into the dual-gated module DGM;
[0010] S4. Design a dual-pooling pixel attention gating fusion module DP-PAM in the dual-channel gating module DGM, combining pixel attention and pooling operations to simultaneously characterize global and local information.
[0011] S5. After applying residual connections to the output of the dual-gate module DGM, a pixel-level segmentation map is obtained through a multilayer perceptron, and evaluation indicators and visualization results are output.
[0012] Preferably, step S1 involves acquiring images of road cracks and performing preprocessing operations, including the following steps:
[0013] S1.1 Adjust all image sizes to 512×512 pixels, and then divide the dataset into training, validation and test sets in a ratio of 7:1:2;
[0014] S1.2 Divide the input image into n image blocks using a convolutional block.
[0015] Preferably, step S2 involves feeding the preprocessed image into the dual-branch orientation sensing module DBDA to model local details and orientation textures, including the following steps:
[0016] S2.1. Divide the preprocessed image into two branches;
[0017] S2.2 The left branch expands the channel dimension through a linear layer and is processed by the SiLU activation function to preserve the original features;
[0018] S2.3 The right branch is processed by the same linear layer and SiLU activation function, and then input into the two-dimensional scanning module to extract the directional features of the image;
[0019] S2.4 Finally, the outputs of the two branches are multiplied and fused, and the fused features are restored to the original number of channels through a linear layer.
[0020] Preferably, step S3 inputs the output of the dual-branch direction sensing module DBDA and the original features into the dual-gated module DGM, including the following steps:
[0021] S3.1, Features passing through the dual-branch direction sensing module DBDA The system first performs dimensionality reduction using 1×1 convolutions, then processes the data using the ReLU activation function, and finally restores the original number of channels using 1×1 convolutions. Finally, it performs batch normalization to output the features. ;
[0022] S3.2. Input feature X and the original feature Y together into the dual-pooling pixel attention-gated fusion module DP-PAM for fusion, and then similarly process them through 1×1 convolution, ReLU activation function, 1×1 convolution and batch normalization to output the feature. ;
[0023] S3.3, Features and characteristics Element-wise summation is performed, and channel attention weights generated by the Sigmoid activation function are used to weight and fuse features X and Y.
[0024] Preferably, step S4 involves designing a dual-pooling pixel attention gating fusion module DP-PAM within the dual-gate module DGM, combining pixel attention and pooling operations to simultaneously characterize global and local information, including the following steps:
[0025] S4.1: Max pooling and average pooling operations are performed on the input features X and Y respectively. Then, a pixel attention mechanism is introduced. First, convolution and batch normalization are performed on the pixels in the two feature maps respectively. Then, information interaction is achieved through element-wise multiplication, and feature transformation is completed through convolution and batch normalization.
[0026] S4.2: Obtain the gating coefficient through Sigmoid activation. This is used to characterize the dynamic preference for different branches during fusion;
[0027] S4.3: The generated pixel attention weights are applied to the max pooling and average pooling features respectively, and the fusion is completed through weighted multiplication and element-wise addition.
[0028] Preferably, step S5 involves applying residual connections to the output of the dual-gated module (DGM) and then passing it through a multilayer perceptron to obtain a pixel-level segmentation map, and outputting evaluation metrics and visualization results, including the following steps:
[0029] S5.1: The fused features obtained by the dual-gated module DGM are transformed sequentially through group normalization and linear layers, and then added element-wise with the original features to form a residual output, thereby preserving the original information flow;
[0030] S5.2: The residual output is fed into a multilayer perceptron to obtain a pixel-level segmentation map;
[0031] S5.3: Calculate the evaluation metrics. Obtain the optimal dataset scale ODS by scanning the threshold at the dataset scale, and obtain the optimal image scale OIS by taking the optimal threshold at the image scale and averaging them. At the same time, calculate the precision P, recall R, F1 score, and average intersection-union ratio mIoU.
[0032] S5.4: Output pixel-level segmentation map, quantitative evaluation indicators and corresponding visual comparison results.
[0033] Furthermore, this invention proposes a dual-branch segmentation system for road surface crack images, the system comprising:
[0034] The image acquisition and preprocessing module is configured to perform the following process: acquire images of road cracks and perform preprocessing operations;
[0035] The local detail and orientation texture modeling module is configured to perform the following process: feeding the preprocessed image into the dual-branch orientation awareness module DBDA to model local details and orientation textures respectively;
[0036] The dual-path pixel fusion module is configured to perform the following process: inputting the output of the dual-branch orientation sensing module DBDA and the original features into the dual-path gating module DGM;
[0037] The global and local information characterization module is configured to perform the following process: a dual-pooling pixel attention gating fusion module DP-PAM is designed in the dual-gating module DGM to combine pixel attention and pooling operations to characterize global and local information simultaneously.
[0038] The output module is configured to perform the following process: apply residual connections to the output of the dual-gated module (DGM), pass it through a multilayer perceptron to obtain a pixel-level segmentation map, and output evaluation metrics and visualization results.
[0039] Meanwhile, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed, it implements the steps of the method described in the present invention.
[0040] Furthermore, the present invention proposes a computer-readable storage medium having a computer program stored thereon, the computer program being configured to implement the steps of the method described in the present invention when invoked by a processor.
[0041] Finally, the present invention proposes a computer program product, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the method described in the present invention.
[0042] The crack image segmentation method based on dual pooling fusion described in this invention has the following technical advantages compared with existing technologies:
[0043] (1) The present invention proposes a DGM module, which has better structural continuity characterization and boundary integrity maintenance for thin, long, tortuous and discontinuous cracks.
[0044] (2) The present invention integrates the DP-PAM module into the DGM module, which combines pixel attention with max and average pooling gates to generate pixel-level gate coefficients. Dynamically weighting branch features enhances the discriminativeness and robustness of feature representation.
[0045] (3) Through ablation experiments and comparison with other models, this invention verifies the effectiveness of the proposed DGM module and DP-PAM module, which fully demonstrates that the two have made clear contributions to global and local collaborative modeling, feature redundancy suppression and structural continuity characterization. Attached Figure Description
[0046] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0047] Figure 1 This invention relates to a flowchart of a crack image segmentation method based on dual pooling fusion.
[0048] Figure 2 This is a network architecture diagram of the DBDA module in an embodiment of the present invention.
[0049] Figure 3 This is a network architecture diagram of the DGM module in an embodiment of the present invention.
[0050] Figure 4 This is a network architecture diagram of the DP-PAM module in an embodiment of the present invention.
[0051] Figure 5 This is a visual comparison chart of the model in this embodiment of the invention with other segmentation models. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0053] Example 1: As Figure 1 The diagram shows the overall flowchart of a crack image segmentation method based on dual pooling fusion, which includes the following steps:
[0054] S1. Collect images of road cracks and perform preprocessing operations;
[0055] S2. The preprocessed image is fed into the dual-branch orientation perception module DBDA to model local details and orientation textures respectively.
[0056] S3. Input the output of the dual-branch direction sensing module DBDA and the original features into the dual-gated module DGM;
[0057] S4. Design a dual-pooling pixel attention gating fusion module DP-PAM in the dual-channel gating module DGM, combining pixel attention and pooling operations to simultaneously characterize global and local information.
[0058] S5. After applying residual connections to the output of the dual-gate module DGM, a pixel-level segmentation map is obtained through a multilayer perceptron, and evaluation indicators and visualization results are output.
[0059] The specific procedures for each step are as follows:
[0060] S1. Acquire images of road cracks and perform preprocessing operations:
[0061] S1.1: The dataset used in this embodiment is CRACK500, which was collected from road scenes on the main campus of Temple University. It contains 500 color images of approximately 2000×1500 pixels, with corresponding pixel-level binary annotations. The original official dataset is divided into: 250 training images, 50 validation images, and 200 test images. Given the limited number of images, high resolution per image, and computational resource constraints, this invention, without changing the semantic meaning of the annotations, crops each original image into 16 non-overlapping sub-regions, retaining only sub-images with cracks exceeding 1000 pixels to improve the effective sample density. The validation set is used for model selection and overfitting suppression during training. After determining the optimal weights, the model is evaluated on the test set and external data to verify its generalization ability and stability. The above processing flow ensures full utilization of fine-grained pixel annotations under limited computing power, while also considering sample validity and evaluation comparability.
[0062] S1.2: In the preprocessing stage, all images are first uniformly adjusted to 512×512 pixels. Then, the dataset is divided into a training set of 2358 images, a validation set of 337 images, and a test set of 673 images in a ratio of 7:1:2. This ratio ensures the scientific nature and reliability of model training and performance evaluation.
[0063] S1.3: The preprocessed RGB crack image is introduced into a convolutional block to simultaneously complete block segmentation and local representation extraction.
[0064] S2: The preprocessed image is fed into the dual-branch orientation awareness module DBDA to model local details and orientation textures respectively;
[0065] like Figure 2 The diagram shown is a network architecture diagram of the DBDA module in an embodiment of the present invention. The specific process of this module is as follows:
[0066] S2.1: Copy the preprocessed image into two parallel branches;
[0067] S2.2: The left branch is directly activated with SiLU after linear layer expansion, focusing on preserving and enhancing fine-grained characterization;
[0068] S2.3: After the same linear and SiLU activation processing, the right branch is input into the two-dimensional scanning module to perform learnable state updates and information aggregation on the block sequence along the preset direction, so as to explicitly capture the directional continuity and topological extension of the crack.
[0069] S2.4: The features output by the two branches are fused element-wise to achieve point-to-point coupling.
[0070] S3: Input the output of the dual-branch orientation sensing module DBDA and the original features into the dual-gated module DGM; for example... Figure 3 The diagram shown is a network architecture diagram of the DGM module in an embodiment of the present invention. The specific process of this module is as follows:
[0071] S3.1: Configure this module with two parallel processing branches;
[0072] S3.2: In the left branch, the input feature X is first reduced in dimensionality using a 1×1 convolution to decrease computational complexity. Then, a ReLU activation function is used to introduce non-linearity to enhance the feature's representational power. Afterward, another 1×1 convolution restores the channel count to the original dimension, and a batch normalization layer normalizes the output, thereby improving the stability of the training process and the model's generalization ability, ultimately outputting the feature. :
[0073]
[0074] S3.3: In the right branch, to supplement the modeling capability of global structural information such as crack continuity, a DP-PAM module is introduced to fuse feature X with the original feature Y. This fused feature is also processed through a sequence consisting of 1×1 convolution, ReLU activation function, 1×1 convolution, and batch normalization, ultimately outputting the feature... :
[0075]
[0076] S3.4: Finally, output the features from the two branches. and Element-wise summation is performed, and channel attention weights are generated using the Sigmoid activation function. These weights adaptively evaluate the importance of different feature channels and are used to weight and fuse the input features X and Y accordingly, thereby achieving effective complementarity between local details and global information. The calculation process can be formally represented as follows:
[0077]
[0078] in, and These represent input feature 1 and input feature 2, respectively. Represents a 1×1 convolution. This represents the activation function. Indicates batch normalization, This represents the Sigmoid activation function.
[0079] S4. Design a dual-pooling pixel attention gating fusion module DP-PAM in the dual-channel gating module DGM, combining pixel attention and pooling operations to simultaneously characterize global and local information.
[0080] like Figure 4 The diagram shown is a network architecture diagram of the DP-PAM module in an embodiment of the present invention. The specific process of this module is as follows:
[0081] S4.1: This module adopts a dual-path parallel structure, applying max pooling and average pooling operations to the input features respectively to extract complementary spatial information representations: one path focuses on the most salient local features, while the other path captures the overall context of the region.
[0082] S4.2: To achieve adaptive fusion of two feature streams at the pixel level, this paper introduces a pixel attention mechanism. This mechanism first processes the output features of the two pooling branches through a shared convolutional and batch normalization layer, then promotes information interaction between the two streams through element-wise multiplication. The interacted features are then transformed and integrated through another convolutional and batch normalization layer, and finally, a dynamic gating coefficient map is generated through the Sigmoid activation function. :
[0083]
[0084] in, and These are the pixels of the feature maps for the two branches, respectively. It is batch normalization and 1×1 convolution. For activation functions;
[0085] S4.3: Finally, the two pooled features are weighted and fused using the generated pixel attention weights. The process is formally represented as follows:
[0086]
[0087] in, and These are the feature maps generated by max pooling and average pooling, respectively. Through this design, the network can not only fuse significant local features with global contextual information, but also adaptively adjust the contribution of different spatial locations at the pixel level, thereby significantly enhancing its ability to model complex crack structures.
[0088] S5: After applying residual connections to the output of the dual-gated module DGM, a pixel-level segmentation map is obtained through a multilayer perceptron, and evaluation metrics and visualization results are output.
[0089] S5.1: First, batch normalization is applied to the output of the DGM module to stabilize the data distribution. Then, feature transformation is performed through a linear layer. The transformed features are added to the original features to form a residual structure. The summation result is finally fed into a multilayer perceptron and mapped to the final pixel category prediction, thus obtaining a high-precision segmentation map.
[0090] S5.2: All models in this invention are implemented based on the PyTorch 2.0.1 framework, and the training hardware platform is an Intel(R) Xeon(R) CPU E5-2680 v4 and an NVIDIA RTX 3090 GPU. The training strategy uses the AdamW optimizer, with an initial learning rate set to 5×10⁻. 4 The weight decay coefficient was set to 0.01, and the learning rate was dynamically adjusted using a Poly learning rate scheduling strategy. All experiments used a fixed random seed of 42 to ensure reproducibility of results. A total of 50 training epochs were conducted, and the model with the best performance on the validation set was selected for final testing.
[0091] The model performance was comprehensively evaluated using six widely used image segmentation metrics, including ODS, OIS, precision (P), recall (R), F1 score, and mean intersection-over-union ratio (mIoU). ODS assesses the model's generalization ability across datasets; OIS measures the model's adaptability across image scales; precision, recall, and F1 score measure classification accuracy from different perspectives; and mean intersection-over-union ratio evaluates the average overlap between segmented regions and ground truth regions. The calculation formulas are as follows:
[0092]
[0093] in, Let be the number of classes, here we set , Indicates the predicted value. Represents the true value. Indicates that the category belongs to But belongs to The number of pixels.
[0094] To systematically evaluate the contributions of the DGM module and DP-PAM module proposed in this invention, this embodiment provides an ablation experiment, the results of which are shown in Table 1:
[0095] Table 1
[0096]
[0097] The baseline architecture, without incorporating any of the proposed modules, achieved an mIoU of 0.7321 on the validation set. This result indicates a significant deficiency in the basic architecture's ability to collaboratively model local details and global contextual information. Introducing the DGM module alone significantly improved model performance, increasing the mIoU to 0.7386, demonstrating the effectiveness of the DGM module in preserving local details and adaptively weighting features. Finally, integrating both the DGM and DP-PAM modules simultaneously achieved optimal performance, with comprehensive improvements across all metrics, including a further increase in mIoU to 0.7760. This series of incremental performance gains fully validates the effectiveness of each component and their complementarity: the DGM module focuses on feature extraction and fusion, while the DP-PAM module enhances the capture of global structure and local details; their collaborative efforts drive the boundary of the model's segmentation performance.
[0098] To objectively evaluate the overall performance of this method, this embodiment compares it with several cutting-edge segmentation models on the CRACK500 dataset, as shown in Table 2:
[0099] Table 2
[0100]
[0101] Our method achieves scores of 0.7104, 0.7101, 0.7587, 0.7333, 0.7860, and 0.7760 on six metrics: ODS, OIS, F1, P, R, and mIoU, respectively, surpassing existing methods in all metrics. Specifically, compared to the second-best performing plain_mamba method, mIoU is improved by 2.39%; compared to CNN and Transformer methods, the improvement is even greater, especially in F1 and mIoU, indicating that our proposed method is more robust to the overall crack structure and regional consistency.
[0102] like Figure 5 The image shows a visual comparison between the model of this invention and other segmentation models. The red boxes highlight easily missed crack pixel areas, the green boxes represent falsely detected non-crack areas, and the Ground Truth is the labeled image. In complex backgrounds and with significant texture interference, CNN and Transformer models (such as SegNeXt and SegFormer) are prone to false detections or spurious cracks (first and fifth rows). When crack morphology is complex, Mamba-based methods also exhibit over-segmentation or blurred boundaries (second row). In contrast, our method accurately extracts the main crack structure in most cases, maintaining clear edges and overall continuity, and avoiding excessive false detections even in high-noise or low-contrast environments. It should be noted that although our method still struggles to completely recover all micro-cracks, the overall results are closer to the true annotations, and noise interference is significantly reduced.
[0103] To further verify the effectiveness of the method of this invention, we conducted a comparative study on its system complexity. The complexity of different methods on the standard test set is shown in Table 3:
[0104] Table 3
[0105]
[0106] The computational complexity of the method presented in this invention is 24.22 G, with 6.01 M parameters and an inference speed of 42 FPS. Compared to the lightweight network Crackmer, the proposed method has slightly higher complexity and parameter count, but achieves a significant improvement in segmentation accuracy, indicating a better balance between performance and efficiency. Meanwhile, compared to networks with large parameter counts and higher complexity, such as CSMamba and SegFormer, the proposed method not only maintains lower computational and parameter counts but also significantly faster inference speed. Overall, the proposed method demonstrates good efficiency advantages by maintaining high segmentation accuracy while possessing lower computational overhead and faster inference speed. This suggests that the method is not only suitable for academic research scenarios but also provides greater feasibility for practical deployment.
[0107] Example 2: This example proposes an electronic system, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method steps of the present invention.
[0108] Example 3: This example proposes a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the method described in this invention, which will not be repeated here.
[0109] Example 4: This example proposes a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the steps of the method described in this invention, which will not be repeated here.
[0110] It should be noted that the processing flow of embodiments 2-4 corresponds to the specific steps of the method provided in embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the method provided in embodiment 1 of the present invention.
[0111] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0112] The specific implementation schemes described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific implementation schemes of the present invention and are not intended to limit the scope of the present invention. Any equivalent changes and modifications made by those skilled in the art without departing from the concept and principles of the present invention should fall within the scope of protection of the present invention.
Claims
1. A crack image segmentation method based on double-pooling fusion, characterized in that, Includes the following steps: S1. Collect images of road cracks and perform preprocessing operations; S2. The preprocessed image is fed into the dual-branch orientation awareness module (DBDA) to model local details and orientation textures respectively. This includes the following steps: S2.
1. Divide the preprocessed image into two branches; S2.2 The left branch expands the channel dimension through a linear layer and is processed by the SiLU activation function to preserve the original features; S2.3 The right branch is processed by the same linear layer and SiLU activation function, and then input into the two-dimensional scanning module to extract the directional features of the image; S2.4 Finally, the outputs of the two branches are multiplied and fused, and the fused features are restored to the original number of channels through a linear layer; S3. Input the output of the dual-branch direction sensing module DBDA and the original features into the dual-gated module DGM; S4. Design a dual-pooling pixel attention gating fusion module DP-PAM in the dual-channel gating module DGM, combining pixel attention and pooling operations to simultaneously characterize global and local information. The specific steps include: S4.1: Max pooling and average pooling operations are performed on the input feature X and the original feature Y respectively. Then, a pixel attention mechanism is introduced. First, the pixels in the two feature maps are processed by convolution and batch normalization respectively. Then, information interaction is achieved through element-wise multiplication, and feature transformation is completed through convolution and batch normalization. S4.2: Get gating coefficients by sigmoid activation , to characterize the dynamic preference for different branches when fusing. S4.3: The generated pixel attention weights are applied to the max pooling and average pooling features respectively, and the fusion is completed through weighted multiplication and element-wise addition; S5. After applying residual connections to the output of the dual-gated module DGM, a pixel-level segmentation map is obtained through a multilayer perceptron, and evaluation indicators and visualization results are output.
2. The crack image segmentation method based on dual-pooling fusion according to claim 1, characterized in that, Step S1 involves acquiring images of road cracks and performing preprocessing operations, including the following steps: S1.
1. Adjust all image sizes to 512×512 pixels, and then divide the dataset into training, validation and test sets in a ratio of 7:1:
2. S1.2 Divide the input image into n image blocks using a convolutional block.
3. The crack image segmentation method based on dual pooling fusion according to claim 2, characterized in that, Step S3 inputs the output of the dual-branch orientation sensing module DBDA and the original features into the dual-gated module DGM, including the following steps: S3.1, Features passing through the dual-branch direction sensing module DBDA The system first performs dimensionality reduction using 1×1 convolutions, then processes the data using the ReLU activation function, and finally restores the original number of channels using 1×1 convolutions. Finally, it performs batch normalization to output the features. ; S3.
2. Input feature X and the original feature Y together into the dual-pooling pixel attention-gated fusion module DP-PAM for fusion, and then similarly process them through 1×1 convolution, ReLU activation function, 1×1 convolution and batch normalization to output the feature. ; S3.3, Features and characteristics Element-wise summation is performed, and channel attention weights generated by the Sigmoid activation function are used to weight and fuse feature X and the original feature Y.
4. The crack image segmentation method based on dual pooling fusion according to claim 3, characterized in that, Step S5 applies residual connections to the output of the dual-gated module (DGM) and then passes it through a multilayer perceptron to obtain a pixel-level segmentation map. It also outputs evaluation metrics and visualization results, including the following steps: S5.1: The fused features obtained by the dual-gated module DGM are transformed sequentially through group normalization and linear layers, and then added element-wise with the original features to form a residual output, thereby preserving the original information flow; S5.2: The residual output is fed into a multilayer perceptron to obtain a pixel-level segmentation map; S5.3: Calculate the evaluation metrics. Obtain the optimal dataset scale ODS by scanning the threshold at the dataset scale. Obtain the optimal image scale OIS by taking the optimal threshold at the image scale and averaging them. At the same time, calculate the precision P, recall R, F1 score, and mean intersection-union ratio mIoU. S5.4: Output pixel-level segmentation map, quantitative evaluation indicators and corresponding visual comparison results.
5. A dual-branch segmentation system for road surface crack images, characterized in that, The system includes: The image acquisition and preprocessing module is configured to perform the following process: acquire images of road cracks and perform preprocessing operations; The local detail and orientation texture modeling module is configured to perform the following process: The preprocessed image is fed into the dual-branch orientation awareness module (DBDA) to model local details and orientation textures separately, specifically including the following steps: S2.
1. Divide the preprocessed image into two branches; S2.2 The left branch expands the channel dimension through a linear layer and is processed by the SiLU activation function to preserve the original features; S2.3 The right branch is processed by the same linear layer and SiLU activation function, and then input into the two-dimensional scanning module to extract the directional features of the image; S2.4 Finally, the outputs of the two branches are multiplied and fused, and the fused features are restored to the original number of channels through a linear layer; The dual-path pixel fusion module is configured to perform the following process: inputting the output of the dual-branch orientation sensing module DBDA and the original features into the dual-path gating module DGM; The global and local information characterization module is configured to perform the following process: A dual-pooling pixel attention gating fusion module (DP-PAM) is designed within the dual-gating module (DGM) to combine pixel attention and pooling operations to simultaneously characterize global and local information. Specifically, this includes the following steps: S4.1: Max pooling and average pooling operations are performed on the input feature X and the original feature Y respectively. Then, a pixel attention mechanism is introduced. First, the pixels in the two feature maps are processed by convolution and batch normalization respectively. Then, information interaction is achieved through element-wise multiplication, and feature transformation is completed through convolution and batch normalization. S4.2: Obtain the gating coefficient through Sigmoid activation. This is used to characterize the dynamic preference for different branches during fusion; S4.3: The generated pixel attention weights are applied to the max pooling and average pooling features respectively, and the fusion is completed through weighted multiplication and element-wise addition; The output module is configured to perform the following process: apply residual connections to the output of the dual-gated module (DGM), pass it through a multilayer perceptron to obtain a pixel-level segmentation map, and output evaluation metrics and visualization results.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it implements the steps of the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is configured to implement the steps of the method described in any one of claims 1 to 4 when invoked by a processor.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 4.