A crack image segmentation method and system based on a multi-branch ATSC-Mamba network
Patent Information
- Application Number
- CN202610556611.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-04-24
AI Technical Summary
[0002]基础设施裂缝巡检是桥梁、道路等土木工程安全评估的核心环节,人工巡检受人力成本高、主观性强、效率低下、漏检率偏高的固有缺陷限制,难以满足大规模、常态化的巡检需求,因此智能化裂缝分割算法成为解决该痛点的关键技术
[0052] This invention provides a crack image segmentation method and system based on a multi-branch ATSC-Mamba network. It extends the SCSegamba dual-branch structure to a multi-branch closed-loop architecture, with parameter-free operation as its core. The calibration branch design improves the segmentation accuracy of fine cracks through local similarity calibration without increasing parameters or computational overhead; simultaneously, it constructs a "long-range SSM modeling - mid-range MLP complementarity - short-range linear enhancement - local" model.
The multi-branch structure of "calibration" achieves a dual improvement in accuracy and efficiency.
Smart Images

Figure CN122115465B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of infrastructure crack inspection technology, and in particular to a crack image segmentation method based on a multi-branch ATSC-Mamba network. Background Technology
[0002] Infrastructure crack inspection is a core part of the safety assessment of civil engineering projects such as bridges and roads. Manual inspection is limited by inherent defects such as high labor costs, strong subjectivity, low efficiency and high missed detection rate, making it difficult to meet the needs of large-scale and routine inspection. Therefore, intelligent crack segmentation algorithm has become a key technology to solve this problem.
[0003] Existing crack segmentation technologies are mainly divided into three categories: traditional manual feature extraction methods, segmentation methods based on convolutional neural networks (CNNs), and segmentation methods based on state-space models (SSMs) and their variants. Each method has significant shortcomings and cannot simultaneously meet the dual requirements of "accuracy" and "edge deployment efficiency" in engineering inspections. Traditional manual feature extraction methods (such as RIND and CTCrackSeg) rely on manually designed features, making it difficult to capture the subtle morphology of narrow and discontinuous cracks. They also have a high false negative rate under complex background interference such as concrete textures and stains, failing to meet the accuracy requirements of safety inspections. While CNN-based segmentation methods (such as DTrCNet and SimCrack) improve segmentation accuracy, they have a large number of parameters and slow inference speed, with FLOPs reaching up to 286.62G and parameters reaching 63.45M, making them unsuitable for the deployment needs of edge inspection devices such as drones and handheld terminals.
[0004] In recent years, state-space models (SSM) and their variants (such as Mamba and SAVSS) have become the mainstream approach for edge deployment due to their long-range modeling capabilities with linear complexity. However, these models still have two major flaws in engineering applications, which restrict their practical implementation: First, there is an imbalance between long-range modeling and local detail capture. The dt gating of existing models such as SAVSS is generated only by global features and lacks local context guidance, resulting in insufficient segmentation accuracy of small cracks and edge cracks and a high rate of missed detection in engineering. Second, local semantic modeling requires the introduction of redundant modules such as convolution and pooling, which increases the number of parameters by about 20%.
[0005] To address the core deficiencies of the existing technologies, this invention proposes a crack image segmentation method and system based on a multi-branch ATSC-Mamba network. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a crack image segmentation method and system based on a multi-branch ATSC-Mamba network. Without increasing parameters and computational overhead, it solves the technical problems of imbalance between long-range modeling and local details, and redundancy in local semantic modeling. It achieves real-time and accurate segmentation of small cracks in complex backgrounds, is compatible with the deployment of edge inspection equipment, and meets the actual needs of crack inspection in civil engineering infrastructure.
[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0008] In a first aspect, the present invention provides a crack image segmentation method based on a multi-branch ATSC-Mamba network, comprising:
[0009] Acquire the crack image to be segmented, and preprocess the crack image to be segmented;
[0010] The preprocessed crack image to be segmented is input into the trained crack image segmentation model to generate the segmentation result;
[0011] The crack image segmentation model is built on an SCSegamba network, which includes a patch embedding module, four cascaded SAVSS modules, and an MFS module. A parameter-free method is introduced in each SAVSS module. Calibration branch, the parameterless branch The calibration branch performs parameterless local similarity calculations based on a defined window, generating pixel-level similarity. Calibration factor, used to optimize the main branch in the SAVSS module. t-gating parameter.
[0012] Optionally, the parameterless The calibration branch includes a sliding window layer, a similarity calculation layer, a mean layer, and an activation function layer;
[0013] The sliding window layer is used to extract local window feature maps from the input feature maps using a sliding window method.
[0014] The similarity calculation layer is used to calculate the cosine similarity of the center pixels of the local window feature map:
[0015]
[0016] In the formula, The center pixel and its first Cosine similarity of neighboring pixels, The coordinates of the center pixel of the local window feature map. The first pixel of the center The coordinates of a neighboring pixel. Coordinates and coordinates In the The characteristic values of each channel, The total number of channels. It is a very small positive constant;
[0017] The mean layer and the activation function layer are used to calculate the mean of the cosine similarity of all neighboring pixels of the center pixel and to perform activation processing, respectively.
[0018]
[0019] In the formula, For the center pixel Calibration factor The total number of pixels in the neighborhood of the center pixel. This is the Sigmoid activation function.
[0020] Optionally, the optimization of the main branch in the SAVSS module The t-gating parameters include:
[0021] Will The calibration factor is flattened from matrix form to sequence form, so that it is consistent with the main branch. The t-gating parameter completes the dimension matching;
[0022] Optimization using soft calibration formula t-gating:
[0023]
[0024] In the formula, For the main branches before and after soft calibration t-gated parameter sequence, for Calibration factor sequence, This is the temperature coefficient.
[0025] Optionally, the preprocessing of the crack image to be segmented includes:
[0026] The crack images to be segmented are uniformly adjusted to the target pixel size and normalized using normalization parameters with a mean and standard deviation of [0.5, 0.5, 0.5].
[0027] Optionally, the SAVSS module includes a backbone network, main branches, auxiliary branches, and short-range linear branches;
[0028] The backbone network includes two cascaded GBC modules, which are used to efficiently capture crack morphology information and generate shallow feature maps.
[0029] The main branch includes cascaded Linear layers, SiLU layers, and SS2D layers; the shallow feature map is processed through the Linear and SiLU layers of the main branch for multi-scale semantic modeling and then input into the SS2D layer, which utilizes the parameterless... Pixel-level calibration branches Calibration factor optimization The t-gating parameter is used to complete long-range SSM dependency modeling and output the calibrated long-range feature map.
[0030] The auxiliary branch includes cascaded Linear layers and SiLU layers; the shallow feature map is used for multi-scale semantic modeling through the Linear layers and SiLU layers of the auxiliary branch to generate a mid-range feature map;
[0031] The short-range linear branch includes cascaded GN layers and Linear layers; the shallow feature map is enhanced by short-range linear enhancement through the GN layers and Linear layers of the short-range linear branch to generate a short-range feature map;
[0032] The long-range feature map and the mid-range feature map are fused by element-wise multiplication to achieve dual-branch feature fusion, and then the fused backbone representation is generated by the Linear layer; the backbone representation and the shallow feature map are fused by the PAF module to obtain a cross-scale fused feature map.
[0033] The cross-scale fused feature map, the short-range feature map, and the pixel-level... The calibration factors are additively fused to obtain the final fused features. :
[0034]
[0035] In the formula, For cross-scale fusion of feature maps, For short-range feature maps, for Calibration factor matrix, For temperature coefficient, This is for element-wise multiplication.
[0036] Optionally, the training process of the crack image segmentation model includes:
[0037] A crack image sample set is obtained, and the crack image samples in the crack image sample set are preprocessed and labeled to generate a training set; the label generation includes binarizing the preprocessed crack image samples to generate a binary mask image, in which 0 represents the background and 1 represents the crack.
[0038] The crack image segmentation model is trained using the training set. The pixel-level classification parameters are optimized using the BCE-Dice hybrid loss function, and the training process is optimized using the AdamW optimizer and PolyLR learning rate decay strategy until the crack image segmentation model converges.
[0039] The BCE-Dice hybrid loss function for:
[0040]
[0041] In the formula, These are the weighting coefficients, This is the cross-entropy loss for binary classification, used to optimize pixel-level classification. for The coefficients are used to optimize the partition boundary and small objectives.
[0042] Secondly, the present invention provides a crack image segmentation system based on a multi-branch ATSC-Mamba network, comprising:
[0043] The preprocessing module is configured to acquire the crack image to be segmented and preprocess the crack image to be segmented.
[0044] The segmentation module is configured to input the preprocessed crack image to be segmented into the trained crack image segmentation model to generate segmentation results;
[0045] The crack image segmentation model is built on an SCSegamba network, which includes a patch embedding module, four cascaded SAVSS modules, and an MFS module. A parameter-free method is introduced in each SAVSS module. Calibration branch, the parameterless branch The calibration branch performs parameterless local similarity calculations based on a defined window, generating pixel-level similarity. Calibration factor, used to optimize the main branch in the SAVSS module. t-gating parameter.
[0046] Thirdly, the present invention provides an electronic device, including a processor and a storage medium;
[0047] The storage medium is used to store instructions;
[0048] The processor is configured to operate according to the instructions to perform the steps according to the method described above.
[0049] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0050] Fifthly, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0051] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0052] This invention provides a crack image segmentation method and system based on a multi-branch ATSC-Mamba network. It extends the SCSegamba dual-branch structure to a multi-branch closed-loop architecture, with parameter-free operation as its core. The calibration branch design improves the segmentation accuracy of fine cracks through local similarity calibration without increasing parameters or computational overhead; simultaneously, it constructs a "long-range SSM modeling - mid-range MLP complementarity - short-range linear enhancement - local" model. The multi-branch structure of "calibration" achieves a dual improvement in accuracy and efficiency. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the framework of the crack image segmentation model provided in an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of the framework of the ATSC mamba module provided in an embodiment of the present invention. Detailed Implementation
[0055] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0056] Example 1
[0057] This invention provides a crack image segmentation method based on a multi-branch ATSC-Mamba network, comprising the following steps:
[0058] Step S1: Obtain the crack image to be segmented and preprocess the crack image to be segmented.
[0059] Specifically, in this embodiment, the preprocessing of the crack image to be segmented includes:
[0060] The crack images to be segmented are uniformly adjusted to the target pixel size, and normalization is performed using normalization parameters with a mean and standard deviation of [0.5, 0.5, 0.5].
[0061] Uniform pixel size meets the model input requirements, ensures batch processing efficiency, and maintains spatial alignment. Normalization accelerates model training convergence, improves model performance and generalization ability, and enhances numerical stability.
[0062] Step S2: Input the preprocessed crack image to be segmented into the trained crack image segmentation model to generate the segmentation result.
[0063] The crack image segmentation model is built on the SCSegamba network, which includes a patch embedding module, four cascaded SAVSS modules, and an MFS module. The input image is first converted into a sequence input through the Patch Embedding module. The four cascaded SAVSS modules extract four feature maps of multi-scale features through progressive downsampling, and these feature maps are then fed into the MFS module. In the MFS module, the feature maps are processed by an MLP and dynamically upsampled before being stitched together. Finally, a high-precision pixel-level segmentation map is generated through GBC and MLP. Specifically, the SAVSS module is a Structure-Aware Visual State Space module, the MFS module is a Multi-scale Feature Segmentation Head, GBC is a Lightweight Gated Bottleneck Convolution, and MLP is a Multilayer Perceptron.
[0064] like Figure 1 As shown, this application introduces parameterless... The calibration branch is constructed as an ATSC Mamba module, where ATSC stands for Adaptive Time-Scale Control. (No parameters) The calibration branch performs parameterless local similarity calculations based on a defined window, generating pixel-level similarity. Calibration factor, used to optimize the main branch in the SAVSS module. The t-gating parameter quantifies the local correlation strength of each pixel.
[0065] like Figure 2 The diagram shown illustrates the framework of the ATSC mamba module, including the SAVSS module and the parameterless module. Calibration branch.
[0066] (1) No parameters The calibration branch includes a sliding window layer, a similarity calculation layer, a mean layer, and an activation function layer.
[0067] The sliding window layer is used to extract local window feature maps from the input feature map, such as sliding windows of 3*3 or 5*5 size.
[0068] The similarity calculation layer is used to calculate the cosine similarity of the center pixels of the local window feature map:
[0069]
[0070] In the formula, The center pixel and its first Cosine similarity of neighboring pixels, The coordinates of the center pixel of the local window feature map. The first pixel of the center The coordinates of a neighboring pixel. Coordinates and coordinates In the The characteristic values of each channel, The total number of channels. It is a very small positive constant.
[0071] The mean layer and activation function layer are used to calculate the mean of the cosine similarity of all neighboring pixels of the center pixel and to perform activation processing, respectively.
[0072]
[0073] In the formula, For the center pixel Calibration factor Let be the total number of neighboring pixels of the center pixel. If a 3x3 sliding window is used, then... , This is the Sigmoid activation function.
[0074] After obtaining each pixel After calibration factors, construct Calibration factor matrix ,use Calibration factor matrix Optimize the main branch in the SAVSS module t-gating parameter: Two-dimensional structure-aware vision state space module integrating four-way structure-aware scanning strategy (SASS). The t-gating is responsible for dynamically adjusting the state update rate of the SSM, and the original structure-aware visual state space module (SAVSS) t-gating is generated only from global features and lacks local information. This invention addresses this by... Calibration factor pair t-gating performs soft calibration, specifically including:
[0075] Will The calibration factor is flattened from matrix form to sequence form, so that it is consistent with the main branch. The t-gating parameter completes the dimension matching;
[0076] Optimization using soft calibration formula t-gating:
[0077]
[0078] In the formula, For the main branches before and after soft calibration t-gated parameter sequence, for Calibration factor sequence, This is the temperature coefficient.
[0079] Temperature coefficient It can be manually set. The "temperature coefficient" is derived from temperature scaling in machine learning, not physical temperature. Its function is to control the strength of the calibration factor's influence. For example... This means we only allow the calibration factor to play a role of about 5%, which can prevent over-calibration from causing model instability.
[0080] (2) The SAVSS module includes a backbone network, main branches, auxiliary branches and short-range linear branches.
[0081] The backbone network consists of two cascaded GBC modules, which are used to efficiently capture crack morphological information and generate shallow feature maps.
[0082] The main branch consists of cascaded Linear layers, SiLU layers, and SS2D layers. Shallow feature maps undergo multi-scale semantic modeling via the Linear and SiLU layers of the main branch before being input into the SS2D layer. The SS2D layer utilizes parameter-free... Pixel-level calibration branches Calibration factor optimization The t-gating parameter completes long-range SSM dependency modeling and outputs the calibrated long-range feature map.
[0083] The auxiliary branch includes cascaded Linear layers and SiLU layers; the shallow feature map is used for multi-scale semantic modeling through the Linear layers and SiLU layers of the auxiliary branch to generate a mid-range feature map.
[0084] The short-range linear branch consists of cascaded GN layers and Linear layers; the shallow feature map is enhanced by short-range linear enhancement through the GN layers and Linear layers of the short-range linear branch to generate a short-range feature map.
[0085] Long-range and mid-range feature maps are fused into dual-branch features by element-wise multiplication, and then the fused backbone representation is generated by a Linear layer. The backbone representation and shallow feature map are fused by the PAF module to obtain a cross-scale fused feature map.
[0086] Cross-scale fusion feature maps, short-range feature maps, and pixel-level fusion The calibration factors are additively fused to obtain the final fused features. :
[0087]
[0088] In the formula, For cross-scale fusion of feature maps, For short-range feature maps, for Calibration factor matrix, For temperature coefficient, This is for element-wise multiplication.
[0089] The ATSC Mamba multi-branch structure employs a hierarchical fusion strategy, integrating feature information at different scales to achieve accurate crack segmentation. The parameterless Δ calibration branch, starting from local feature similarity, dynamically and adaptively enhances the long-range dependency modeling process of the main branch, better aligning global semantic features with local structural information. Long-range features output from the main branch and mid-range auxiliary branch features interact and fuse across scales through the PAF module, further strengthening the complementary representation of global-mid-range context. Finally, combined with the fine-grained details retained by the short-range branch, the module's output features simultaneously possess rich global semantics, reliable mid-range context, and accurate local details, thus providing a more comprehensive and robust feature representation for dense segmentation tasks.
[0090] This invention addresses the issues of traditional State-Space Models (SSMs) where Δt gating lacks local context guidance and cannot adaptively adjust the state update step size by constructing an ATSC mamba module. The module comprises a core feature extraction main branch integrating Lightweight Gated Bottleneck Convolution (GBC) and Structure-Aware Scanning (SASS) strategy; an auxiliary branch consisting of linear layers and SiLU activation functions; a short-range linear branch consisting of group normalization (GN) and linear layers; and a parameter-free branch. The four-branch closed-loop architecture consisting of calibration branches, combined with a pixel-level dual calibration enhancement mechanism, achieves accuracy improvement without additional parameters or computational redundancy.
[0091] After the crack image segmentation model is built, it needs to be trained. The training process of the crack image segmentation model includes:
[0092] Obtain a crack image sample set, preprocess the crack image samples in the crack image sample set and generate a training set by labeling; label generation includes binarizing the preprocessed crack image samples to generate a binary mask image, in which 0 represents the background and 1 represents the crack.
[0093] The crack image segmentation model was trained using the training set. The pixel-level classification parameters were optimized using the BCE-Dice hybrid loss function. The training process was optimized using the AdamW optimizer and the PolyLR learning rate decay strategy until the crack image segmentation model converged.
[0094] BCE-Dice hybrid loss function for:
[0095]
[0096] In the formula, These are the weighting coefficients, which in this embodiment are 0.83 and 0.17 respectively, and can be dynamically adjusted according to the characteristics of the actual dataset. This is the cross-entropy loss for binary classification, used to optimize pixel-level classification. for The coefficients are used to optimize the partition boundary and small objectives.
[0097] After the crack image segmentation model is trained, it is deployed, converted to ONNX format, adapted to the computing power requirements of edge inspection devices such as drones and handheld terminals, and deployed to the engineering inspection system to achieve real-time and accurate segmentation of crack images.
[0098] The crack image segmentation method provided in this embodiment has complexity mainly derived from the main branch and auxiliary branch. The parameterless design of the parameterless Δ calibration branch does not introduce additional computational overhead, thus balancing accuracy and efficiency overall. It is also suitable for deployment on edge devices. A detailed analysis is as follows:
[0099] Time complexity: The local similarity calculation of the parameterless Δ calibration branch can be optimized to linear complexity through vectorization operations, and the overall complexity is consistent with the original SCSegamba network. The FLOPs of this method are only 18.16G, which is much lower than the existing mainstream methods (DTrCNet 123.20G, SimCrack 286.62G) and on par with SCSegamba (18.16G);
[0100] Space complexity: No parameters Calibration branches only store The calibration factor is negligible in size, and the short-range linear branch is derived by changing the connection method of the SCSegamba network without increasing the number of parameters or computation. The parameter count of this method is only 2.80M, comparable to the SCSegamba network and significantly lower than all other comparative methods.
[0101] Model size: The model size of this method is only 35MB, which is the smallest among all the comparison methods. It is smaller than the SCSegamba network (37MB) and can be easily deployed to resource-constrained edge inspection devices.
[0102] To verify the effectiveness, practicality, and engineering adaptability of the crack image segmentation method based on the multi-branch ATSC-Mamba network proposed in this invention, a simulation verification experiment based on a real engineering dataset was designed. The experiment focused on examining the segmentation accuracy, robustness, and edge deployment efficiency of the model in complex engineering contexts, thus verifying the effectiveness of the core innovations.
[0103] The verification results show that the proposed ATSCMamba effectively solves the core defects of existing SSM-type models, such as long-range modeling and local detail imbalance, and local semantic modeling redundancy. While maintaining low complexity and adapting to edge deployment, it significantly improves the crack segmentation accuracy. The specific verification results are shown in Table 1.
[0104] Table 1: Performance comparison of various methods on the Crack500 dataset
[0105]
[0106] In Table 1, bold text indicates the best performance, and underline text indicates the second-best performance. On the Crack500 dataset, ATSCMamba outperforms other methods across the board. It achieves the best results in five key metrics: Object Detection Score (ODS) (0.7394), Object Instance Score (OIS) (0.7518), Precision (P) (0.7686), F1 score (0.7811), and mean Intersection over Union (mIoU) (0.7896) (highlighted in bold). It is only slightly inferior to DTrCNet and SCSegamba in Recall (R) (0.7940). Compared with the closest SCSegamba method, it improves the metrics of ODS, OIS, precision, F1 score and mIoU by 0.0150, 0.0148, 0.0416, 0.0258 and 0.0118 respectively, showing a significant performance advantage.
[0107] The validation results demonstrate that this paper extends the parameterless 2D local similarity. The calibration branch employs a pixel-level dual calibration mechanism and a four-branch fusion strategy, effectively addressing the core issues of traditional SSM-like models, such as long-range modeling imbalance and limited local semantic modeling capabilities. This method significantly improves the segmentation accuracy of fine cracks in complex backgrounds while maintaining no additional parameters or computational redundancy. With the same parameter count and inference speed as the original SCSegamba method, and a model size of only 35MB, it can be directly integrated into engineering inspection systems and adapted for edge device deployment. It provides a feasible algorithmic solution for intelligent crack inspection, demonstrating strong engineering practicality and widespread application value.
[0108] Example 2
[0109] This invention provides a crack image segmentation system based on a multi-branch ATSC-Mamba network, comprising:
[0110] The preprocessing module is configured to acquire the crack image to be segmented and to preprocess the crack image to be segmented.
[0111] The segmentation module is configured to input the preprocessed crack image to be segmented into the trained crack image segmentation model to generate segmentation results;
[0112] The crack image segmentation model is based on the SCSegamba network, which includes a patch bedding module, four cascaded SAVSS modules, and an MFS module. A parameter-free method is introduced into each SAVSS module. Calibration branch, no parameters The calibration branch performs parameterless local similarity calculations based on a defined window, generating pixel-level similarity. Calibration factor, used to optimize the main branch in the SAVSS module. t-gating parameter.
[0113] Example 3
[0114] Based on the crack image segmentation method provided in Embodiment 1, this embodiment of the invention provides an electronic device, including a processor and a storage medium;
[0115] Storage media are used to store instructions;
[0116] The processor is used to perform operations according to instructions to execute the steps according to the method described above.
[0117] Example 4
[0118] Based on the crack image segmentation method provided in Embodiment 1, this embodiment of the invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above method.
[0119] Example 5
[0120] Based on the crack image segmentation method provided in Embodiment 1, this embodiment of the invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described method.
[0121] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0125] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A crack image segmentation method based on a multi-branch ATSC-Mamba network, characterized in that, include: Acquire the crack image to be segmented, and preprocess the crack image to be segmented; The preprocessed crack image to be segmented is input into the trained crack image segmentation model to generate the segmentation result; The crack image segmentation model is constructed based on the SCSegamba network, which includes a patch bedding module, four cascaded SAVSS modules, and an MFS module. A parameterless Δ calibration branch is introduced in each SAVSS module. The parameterless Δ calibration branch performs parameterless local similarity calculation based on a set window to generate a pixel-level Δ calibration factor, which is used to optimize the Δt gating parameter of the main branch in the SAVSS module. The parameterless ∆ calibration branch includes a sliding window layer, a similarity calculation layer, a mean layer, and an activation function layer. The sliding window layer is used to extract local window feature maps from the input feature maps using a sliding window method. The similarity calculation layer is used to calculate the cosine similarity of the center pixels of the local window feature map: ; In the formula, The center pixel and its first Cosine similarity of neighboring pixels, The coordinates of the center pixel of the local window feature map. The first pixel of the center The coordinates of a neighboring pixel. Coordinates and coordinates In the The characteristic values of each channel, The total number of channels. It is a very small positive constant; The mean layer and the activation function layer are used to calculate the mean of the cosine similarity of all neighboring pixels of the center pixel and to perform activation processing, respectively. ; In the formula, The ∆ calibration factor for the center pixel. The total number of pixels in the neighborhood of the center pixel. Use the Sigmoid activation function; The optimization of the ∆t gating parameter of the main branch in the SAVSS module includes: The ∆ calibration factor is flattened from matrix form to sequence form to achieve dimensional matching with the ∆t gate parameter of the main branch; The ∆t gate is optimized using a soft calibration formula: ; In the formula, The sequence of ∆t gated parameters for the main branch before and after soft calibration. For the ∆ calibration factor sequence, Temperature coefficient; The SAVSS module includes a backbone network, main branches, auxiliary branches, and short-range linear branches. The backbone network includes two cascaded GBC modules, which are used to efficiently capture crack morphology information and generate shallow feature maps. The main branch includes a cascaded Linear layer, SiLU layer, and SS2D layer; the shallow feature map is input into the SS2D layer after multi-scale semantic modeling through the Linear layer and SiLU layer of the main branch. The SS2D layer optimizes the Δt gate parameter using the pixel-level Δ calibration factor generated by the parameterless Δ calibration branch, completes long-range SSM dependency modeling, and outputs the calibrated long-range feature map. The auxiliary branch includes cascaded Linear layers and SiLU layers; the shallow feature map is used for multi-scale semantic modeling through the Linear layers and SiLU layers of the auxiliary branch to generate a mid-range feature map; The short-range linear branch includes cascaded GN layers and Linear layers; the shallow feature map is enhanced by short-range linear enhancement through the GN layers and Linear layers of the short-range linear branch to generate a short-range feature map; The long-range feature map and the mid-range feature map are fused by element-wise multiplication to achieve dual-branch feature fusion, and then the fused backbone representation is generated by the Linear layer; the backbone representation and the shallow feature map are fused by the PAF module to obtain a cross-scale fused feature map. The cross-scale fused feature map, the short-range feature map, and the pixel-level ∆ calibration factor are additively fused to obtain the final fused feature. : ; In the formula, For cross-scale fusion of feature maps, For short-range feature maps, For the ∆ calibration factor matrix, For temperature coefficient, This is for element-wise multiplication.
2. The crack image segmentation method based on a multi-branch ATSC-Mamba network according to claim 1, characterized in that, The preprocessing of the crack image to be segmented includes: The crack images to be segmented are uniformly adjusted to the target pixel size and normalized using normalization parameters with a mean and standard deviation of [0.5, 0.5, 0.5].
3. The crack image segmentation method based on a multi-branch ATSC-Mamba network according to claim 1, characterized in that, The training process of the crack image segmentation model includes: A crack image sample set is obtained, and the crack image samples in the crack image sample set are preprocessed and labeled to generate a training set; the label generation includes binarizing the preprocessed crack image samples to generate a binary mask image, in which 0 represents the background and 1 represents the crack. The crack image segmentation model is trained using the training set. The pixel-level classification parameters are optimized using the BCE-Dice hybrid loss function, and the training process is optimized using the AdamW optimizer and PolyLR learning rate decay strategy until the crack image segmentation model converges. The BCE-Dice hybrid loss function for: ; In the formula, These are the weighting coefficients, This is the cross-entropy loss for binary classification, used to optimize pixel-level classification. for The coefficients are used to optimize the partition boundary and small objectives.
4. A crack image segmentation system based on a multi-branch ATSC-Mamba network, characterized in that, include: The preprocessing module is configured to acquire the crack image to be segmented and preprocess the crack image to be segmented. The segmentation module is configured to input the preprocessed crack image to be segmented into the trained crack image segmentation model to generate segmentation results; The crack image segmentation model is constructed based on the SCSegamba network, which includes a patch bedding module, four cascaded SAVSS modules, and an MFS module. A parameterless Δ calibration branch is introduced in each SAVSS module. The parameterless Δ calibration branch performs parameterless local similarity calculation based on a set window to generate a pixel-level Δ calibration factor, which is used to optimize the Δt gating parameter of the main branch in the SAVSS module. The parameterless ∆ calibration branch includes a sliding window layer, a similarity calculation layer, a mean layer, and an activation function layer. The sliding window layer is used to extract local window feature maps from the input feature maps using a sliding window method. The similarity calculation layer is used to calculate the cosine similarity of the center pixels of the local window feature map: ; In the formula, The center pixel and its first Cosine similarity of neighboring pixels, The coordinates of the center pixel of the local window feature map. The first pixel of the center The coordinates of a neighboring pixel. Coordinates and coordinates In the The characteristic values of each channel, The total number of channels. It is a very small positive constant; The mean layer and the activation function layer are used to calculate the mean of the cosine similarity of all neighboring pixels of the center pixel and to perform activation processing, respectively. ; In the formula, The ∆ calibration factor for the center pixel. The total number of pixels in the neighborhood of the center pixel. Use the Sigmoid activation function; The optimization of the ∆t gating parameter of the main branch in the SAVSS module includes: The ∆ calibration factor is flattened from matrix form to sequence form to achieve dimensional matching with the ∆t gate parameter of the main branch; The ∆t gate is optimized using a soft calibration formula: ; In the formula, The sequence of ∆t gated parameters for the main branch before and after soft calibration. For the ∆ calibration factor sequence, Temperature coefficient; The SAVSS module includes a backbone network, main branches, auxiliary branches, and short-range linear branches. The backbone network includes two cascaded GBC modules, which are used to efficiently capture crack morphology information and generate shallow feature maps. The main branch includes a cascaded Linear layer, SiLU layer, and SS2D layer; the shallow feature map is input into the SS2D layer after multi-scale semantic modeling through the Linear layer and SiLU layer of the main branch. The SS2D layer optimizes the Δt gate parameter using the pixel-level Δ calibration factor generated by the parameterless Δ calibration branch, completes long-range SSM dependency modeling, and outputs the calibrated long-range feature map. The auxiliary branch includes cascaded Linear layers and SiLU layers; the shallow feature map is used for multi-scale semantic modeling through the Linear layers and SiLU layers of the auxiliary branch to generate a mid-range feature map; The short-range linear branch includes cascaded GN layers and Linear layers; the shallow feature map is enhanced by short-range linear enhancement through the GN layers and Linear layers of the short-range linear branch to generate a short-range feature map; The long-range feature map and the mid-range feature map are fused by element-wise multiplication to achieve dual-branch feature fusion, and then the fused backbone representation is generated by the Linear layer; the backbone representation and the shallow feature map are fused by the PAF module to obtain a cross-scale fused feature map. The cross-scale fused feature map, the short-range feature map, and the pixel-level ∆ calibration factor are additively fused to obtain the final fused feature. : ; In the formula, For cross-scale fusion of feature maps, For short-range feature maps, For the ∆ calibration factor matrix, For temperature coefficient, This is for element-wise multiplication.
5. An electronic device, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-3.
7. 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 described in any one of claims 1-3.
Citation Information
Patent Citations
Image segmentation method and device based on multi-channel edge superposition, equipment and medium
CN121236388A
Lightweight crack segmentation method based on simulated tunnel illumination environment data set
CN121304691A