A bridge crack segmentation method, system and storage medium

CN122928913APending Publication Date: 2026-10-16Chaoyang Normal University
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611382175.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]鉴于上述现有技术的不足之处,本发明的目的在于提供一种桥梁裂缝分割方法、系统及存储介质,旨在解决所以,现有通用骨干网络缺少针对细长线状裂缝的显式归纳偏置,导致预测不连续和复杂背景中的假阳性的问题

Benefits of technology

本发明中,提出方向感知结构先验分支,利用多方向深度可分离条带卷积学习裂缝的线状形态特征。该分支不需要额外骨架或边缘标注,且仅引入很少的额外参数。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928913A_ABST
    Figure CN122928913A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of bridge crack segmentation, and relates to a bridge crack segmentation method, a system and a storage medium, in the segmentation method, a bridge crack image is collected, multi-scale features are extracted, a four-level feature map is generated, a deep separable strip convolution is used to capture structure response maps in four directions, splicing is performed to generate a structure prior map, then, through bilinear scaling and residual shaping adjustment, a modulation feature map is generated, splicing and fusion are performed to obtain multi-scale fusion features, prior gate bottleneck thinning is performed, and refined features are obtained, the refined features sequentially pass through residual calculation, pixel-level segmentation and mapping to obtain a crack segmentation probability map; in the present application, the line shape feature of a crack is learned by using multi-direction deep separable strip convolution, and additional parameters are reduced; the prior guided multi-scale feature fusion is combined with gate bottleneck thinning, so that the overall lightweight design is maintained while the interference of fine crack fracture and background false positive is relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bridge crack segmentation technology, and in particular to a bridge crack segmentation method, system and storage medium. Background Technology

[0002] Bridge inspection is a crucial component of transportation infrastructure maintenance. Surface cracks are among the most common visible defects in concrete bridges, and their spatial extent, continuity, and distribution provide important information for maintenance prioritization and further structural assessment. Traditional manual visual inspection remains irreplaceable, but it is labor-intensive, subjective, and poses safety risks when conducted at heights or inaccessible locations such as bridge decks, piers, and beam undersides. The development of drones, vehicle-mounted cameras, robotic platforms, and telephoto imaging systems has driven the widespread application of remote inspection images in bridge condition assessment, aligning with the advancements in deep learning technologies in remote sensing image interpretation. In this workflow, automatic crack segmentation does not replace engineering judgment but rather provides pixel-level candidate regions for manual review, thereby reducing the screening burden and improving the consistency of defect records.

[0003] While deep learning-based semantic segmentation techniques have developed rapidly, bridge crack segmentation in real-world remote inspection scenarios still faces challenges. Existing crack pixel density is extremely sparse; in the SegCODEBRIM test set converted in this paper, crack pixels account for only about 0.70% of the image area. Most cracks also exhibit characteristics such as being long and thin, curved, and locally discontinuous, making general segmentation models prone to predicting fractures and missing small branches. Furthermore, complex background interference is prevalent. Concrete surfaces contain numerous crack-like textures, such as aggregate textures, rust stains, watermarks, construction joints, and lighting shadows. These interferences easily lead to false positive predictions and increase the burden of manual verification during actual inspections.

[0004] Therefore, existing general backbone networks lack explicit inductive bias for thin, linear cracks, which can easily lead to discontinuous predictions and false positives in complex backgrounds. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a bridge crack segmentation method, system and storage medium, which aims to solve the problem that existing general backbone networks lack explicit inductive bias for slender linear cracks, resulting in prediction discontinuities and false positives in complex backgrounds.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for segmenting bridge cracks includes: Collect images of bridge cracks, extract multi-scale features from the bridge crack images, and generate a four-level feature map; Analyze the resolution of the four-level feature maps and obtain the first feature map with the highest resolution among the four-level feature maps; A depthwise separable strip convolution is used to capture the structural response maps in four directions corresponding to the first feature map, and the structural response maps in the four directions are spliced ​​along the channel dimension to generate a structural prior map. The prior structure map is bilinearly scaled to the fourth-level feature map to obtain a scaled map. The scaled map is then adjusted by residual shaping to generate a modulation feature map. The modulation feature maps are then spliced ​​and fused to obtain multi-scale fused features. The multi-scale fusion features are refined by prior gating bottleneck to obtain refined features. The refined features are then processed sequentially by residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map.

[0007] Furthermore, the process of acquiring bridge crack images, extracting multi-scale features from the bridge crack images, and generating a four-level feature map includes: Images of bridge cracks are acquired, a downsampling ratio is set, and multi-scale feature extraction is performed on the bridge crack images based on the downsampling ratio to generate... Level 4 feature map; The Level 4 feature map passed Convolutional projection onto a uniform channel dimension; The downsampling ratios were 1 / 4, 1 / 8, 1 / 16, and 1 / 32, respectively.

[0008] Furthermore, the step of employing depthwise separable strip convolution to capture the structural response maps in four directions corresponding to the first feature map, and then concatenating the structural response maps in the four directions along the channel dimension to generate a structural prior map includes: For the first feature map, through Convolution reduces channel dimensions, forming compact bottleneck features. : ; exist Four depthwise separable strip convolutions with different aspect ratios are applied in parallel to capture the structural response maps in four directions: ; ; ; ; in, and The convolutional kernels capture elongated contexts in the horizontal and vertical directions, respectively; and Asymmetric convolution kernels capture a wider local context around horizontally or vertically extended crack structures; The structural response maps in four directions are spliced ​​along the channel dimension and then... Convolutional aggregation yields compact structural features, followed by a second... The prediction layer maps this feature to a single-channel prior map, and then uses sigmoid activation to generate a structure prior map. : ; in, Representation of feature aggregation, This indicates a single-channel prior prediction. This represents the sigmoid activation function.

[0009] Furthermore, the step of bilinearly scaling the structural prior map to the fourth-level feature map to obtain a scaled map, adjusting the scaled map through residual shaping to generate a modulation feature map, and splicing and fusing the modulation feature maps to obtain multi-scale fused features includes: Obtain the resolution of the fourth-level feature map, and based on the resolution, bilinearly scale the structural prior map to obtain the scaled map. : ; The scaled image is adjusted using residual shaping to generate a modulation feature map. : ; in, This represents element-wise multiplication. These are the learnable scale parameters for each level, used to control the prior modulation intensity; The modulation feature maps are upsampled to 1 / 4 resolution and then stitched together. The stitched result is then processed... Convolutional fusion yields multi-scale fused features. : ; in, This is the first-level modulation feature map. This is the second-level modulation feature map. This is the third-level modulation feature map. This is the fourth-level modulation feature map.

[0010] Furthermore, the step of refining the multi-scale fused features through prior gating bottlenecks to obtain refined features, wherein the refined features are sequentially processed through residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map, includes: The multi-scale fusion feature is through Convolutional compression into low-dimensional bottleneck features Using the aforementioned depth, separable strip convolutions are possible. The local morphology is refined to form a directional response. The directional responses are then spliced ​​together, and the spliced ​​result is... Convolutional aggregation yields a refined bottleneck representation. The refined bottleneck characterization is achieved through Projection generates refined features: ( ); in, This indicates a refined transformation of the learnable direction; Introducing prior perception gating, gating value The gate value is jointly estimated from the refined bottleneck characterization and the structural prior graph. Represented as: ( ); in, and for Convolutional mapping layer, It is a sigmoid activation function; Final Refinement Features Calculated using residual form: ; in, For element-wise multiplication, A learnable global scaling factor; Refine features Pixel-level logits are generated using a segmentation classifier: ; After upsampling pixel-level logits to the size of the bridge crack image, a crack segmentation probability map is converted using a sigmoid function: ; in, This represents the predicted crack segmentation probability map.

[0011] Furthermore, the segmentation method also includes: The crack segmentation probability map is trained using weighted binary cross-entropy loss and Tversky loss. The weighted binary cross-entropy loss is expressed as: ; in, Represents the set of valid pixels. It is a positive class weight. It's a real label. It predicts the probability of cracks. These are small constants used for numerical stability; The Tversky loss is expressed as: ; in, , and Representing true positive, false positive, and false negative respectively, setting , .

[0012] Secondly, a bridge crack segmentation system includes: The feature extraction module is used to acquire bridge crack images, extract multi-scale features from the bridge crack images, and generate a four-level feature map; The resolution analysis module is used to analyze the resolution of the four-level feature maps and obtain the first feature map with the highest resolution among the four-level feature maps. The structure prior module is used to capture the structure response maps in four directions corresponding to the first feature map using depthwise separable strip convolution, and to concatenate the structure response maps in the four directions along the channel dimension to generate a structure prior map. The feature fusion module is used to bilinearly scale the structural prior map to the fourth-level feature map to obtain the scaled map, adjust the scaled map through residual shaping to generate a modulation feature map, and stitch and fuse the modulation feature maps to obtain multi-scale fused features. The feature refinement module is used to refine the multi-scale fused features through prior gating bottlenecks to obtain refined features. The refined features are then processed sequentially through residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map.

[0013] Thirdly, a bridge crack segmentation system includes a memory and a processor, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of a bridge crack segmentation method as described above.

[0014] Fourthly, a readable storage medium having a program or instructions stored thereon, which, when executed by a processor, implement the steps of a bridge crack segmentation method as described above.

[0015] The technical solution adopted in this invention has the following beneficial effects: This invention proposes a direction-aware structural prior branch that utilizes multi-directional depth-separable strip convolution to learn the linear morphological features of cracks. This branch requires no additional skeleton or edge annotations and introduces only a few extra parameters.

[0016] This invention designs a structure-guided gating decoding framework that combines prior-guided multi-scale feature fusion with gating bottleneck refinement, mitigating fine crack fractures and background false positive interference while maintaining an overall lightweight design. Attached Figure Description

[0017] Figure 1 One of the flowcharts for a bridge crack segmentation method provided by the present invention; Figure 2 The second flowchart of a bridge crack segmentation method provided by the present invention; Figure 3 This is one of the block diagrams of a bridge crack segmentation system provided by the present invention; Figure 4 A second block diagram of a bridge crack segmentation system provided by the present invention; Figure 5(a) is a comparison of ODS F1-score and model parameter quantity in an embodiment of the present invention; Figure 5(b) is a comparison chart of ODS F1-score and FLOPs in an embodiment of the present invention; Figure 6(a) is a trend diagram of the adaptation performance of ODS F1 under different target domain labeling ratios in the embodiment of the present invention; Figure 6(b) is a trend diagram of the adaptation performance of ODS IoU under different target domain annotation ratios in the embodiments of the present invention; Figure 7(a) shows the test results of fine discontinuous cracks in an embodiment of the present invention; Figure 7(b) shows the test results of a complex background case in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] This invention provides a method for segmenting bridge cracks. The overall architecture of the bridge crack segmentation method is as follows: Figure 1 As shown, the SegFormer-B0 encoder extracts hierarchical multi-scale features from the input image. The structure-guided gated decoder first generates orientation-aware structural priors from the high-resolution shallow features. The prior information was then injected to guide multi-scale fusion and gated bottleneck refinement. The refined features were finally converted into a bridge crack segmentation probability map.

[0020] The overall architecture of SGGD-SegFormer consists of the standard SegFormer-B0 encoder and the proposed Structure-Guided Gated Decoder (SGGD). The SegFormer-B0 MiT-B0 encoder extracts hierarchical multi-scale features from the input image, producing... The four-level feature maps have downsampling ratios of 1 / 4, 1 / 8, 1 / 16, and 1 / 32, respectively. Following the original SegFormer design, the encoder features at each level are first processed... Convolutional projection onto a uniform channel dimension.

[0021] The proposed SGGD decoder processes multi-scale features in three steps. First, the orientation-aware structure prior extraction branch acts on the highest resolution features. First, a spatial prior map reflecting the probability of linear crack structures is learned. Second, prior-guided multi-scale fusion scales the structural prior to the feature size of each encoder level and modulates the features through a residual multiplicative mechanism to enhance crack candidate regions at all levels. All modulated features are then upsampled and stitched together to form high-resolution fused features. Third, a gated bottleneck refinement module further refines the fused features using a prior-aware gating mechanism, selectively enhancing crack regions and suppressing background false positives, ultimately outputting segmentation logits.

[0022] All gap-specific designs are centralized in the decoder, and the encoder weights can be directly initialized using the ImageNet pre-trained SegFormer-B0. This design keeps modifications localized and maintains compatibility with standard segmentation frameworks.

[0023] Combination Figure 2 The present invention provides a more specific method for segmenting bridge cracks, comprising: Step 101: Acquire images of bridge cracks, extract multi-scale features from the bridge crack images, and generate a four-level feature map; Step 102: Analyze the resolution of the four-level feature maps and obtain the first feature map with the highest resolution among the four-level feature maps; Step 103: Use depthwise separable strip convolution to capture the structural response maps in four directions corresponding to the first feature map, and then stitch the structural response maps in the four directions along the channel dimension to generate a structural prior map. Step 104: The prior structure map is bilinearly scaled to the fourth-level feature map to obtain the scaled map. The scaled map is adjusted by residual shaping to generate a modulation feature map. The modulation feature maps are spliced ​​and fused to obtain multi-scale fused features. Step 105: The multi-scale fusion features are refined by prior gating bottleneck to obtain refined features. The refined features are then processed by residual calculation, pixel-level segmentation and mapping to obtain a crack segmentation probability map.

[0024] This invention proposes a direction-aware structural prior branch that utilizes multi-directional depth-separable strip convolution to learn the linear morphological features of cracks. This branch requires no additional skeleton or edge annotations and introduces only a few additional parameters.

[0025] Meanwhile, this invention designs a structure-guided gating decoding framework that combines prior-guided multi-scale feature fusion with gating bottleneck refinement, mitigating fine crack fractures and background false positive interference while maintaining an overall lightweight design.

[0026] In this embodiment, the process of acquiring bridge crack images, extracting multi-scale features from the bridge crack images, and generating a four-level feature map includes: Images of bridge cracks were acquired; these images are RGB bridge inspection images. A downsampling ratio is set, and multi-scale feature extraction is performed on the bridge crack image based on the downsampling ratio to generate a four-level feature map. The fourth-level feature map is passed through Convolution is projected onto a uniform channel dimension for ease of use; The downsampling ratios are 1 / 4, 1 / 8, 1 / 16, and 1 / 32, representing different resolution features.

[0027] The fourth-level feature map includes a first feature map. Second feature map Third feature map and the fourth feature map The four-level feature maps are all extracted by the encoder at different resolutions, with the first feature map being the first feature map. The corresponding resolution feature is 1 / 4, the second feature map The corresponding resolution feature is 1 / 8, the third feature map The corresponding resolution feature is 1 / 16, the fourth feature map The corresponding resolution feature is 1 / 32.

[0028] Then, based on the resolution of the four-level feature maps, the first feature map with the highest resolution among the four-level feature maps is obtained.

[0029] In this embodiment, the step of using depthwise separable strip convolution to capture the structural response maps in four directions corresponding to the first feature map, and then concatenating the structural response maps in the four directions along the channel dimension to generate a structural prior map includes: For the first feature map ,pass Convolution reduces channel dimensions, forming compact bottleneck features. : ; In compact bottleneck features Four depthwise separable strip convolutions with different aspect ratios are applied in parallel to capture the structural response maps in four directions: ; ; ; ; in, and The convolutional kernels capture elongated contexts in the horizontal and vertical directions, respectively; and Asymmetric convolution kernels capture a wider local context around horizontally or vertically extended crack structures; It is by The structural response map of the horizontally elongated context captured by the convolution kernel. It is by The structural response map of the vertically elongated context captured by the convolution kernel. It is by The asymmetric convolution kernel captures a structural response map of a wider local context around the horizontally extended crack structure. It is by The asymmetric convolution kernel captures a structural response map of a wider local context around the horizontally extended crack structure; the use of depthwise separable convolution ensures that this branch introduces only a few additional parameters and computational costs.

[0030] Subsequently, the structural response maps from the four directions were stitched together along the channel dimension, and then... Convolutional aggregation yields compact structural features, followed by a second... The prediction layer maps this feature to a single-channel prior logit map, and then uses sigmoid activation to generate a structure prior map from the single-channel prior logit map. : ; in, Representation of feature aggregation, This indicates a single-channel prior prediction. This represents the sigmoid activation function.

[0031] Through the aforementioned orientation-aware structure prior processing and end-to-end training of the entire segmentation network, only the final crack segmentation target is supervised, without the need for additional skeleton, edge, or vesselness annotations, thereby reducing the annotation burden in actual bridge inspection.

[0032] Crack segmentation requires both fine-grained spatial details from shallow features and semantic context from deep features. Simply concatenating multi-scale features cannot fully utilize structural information, and background noise in shallow features may also interfere with the segmentation results.

[0033] Based on the above, in this embodiment, simultaneously with the orientation-aware structure prior processing, the structure prior map is bilinearly scaled to the fourth-level feature map to obtain a scaled map. The scaled map is then adjusted using residual shaping to generate a modulation feature map. The modulation feature maps are then spliced ​​and fused to obtain multi-scale fused features, specifically including: The resolutions of the four-level feature maps are obtained, with resolutions of 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively, based on the first feature map. Second feature map Third feature map and the fourth feature map The corresponding resolution is used to bilinearly scale the structural prior map to obtain the scaled map. : ; in, This is the resolution corresponding to the fourth-level feature map, which will result in four scaled images with different resolutions.

[0034] For each resolution of the scaled map, the scaled map is adjusted using residual shaping to generate a modulation feature map. : ; in, This represents element-wise multiplication. These are the learnable scale parameters for each level, used to control the prior modulation intensity; This residual design preserves the original semantic feature path. When the prior confidence is low, the model can still rely on the original features to make predictions, avoiding the error amplification caused by hard prior constraints.

[0035] Through modulation processing, four modulation feature maps are generated. These four feature maps are upsampled to 1 / 4 resolution and then stitched together. The stitched result is then processed... Convolutional fusion yields multi-scale fused features. : ; in, This is the first-level modulation feature map. This is the second-level modulation feature map. This is the third-level modulation feature map. This is the fourth-level modulation feature map.

[0036] After multi-scale fusion, features While coarse crack location information is already included, the edges of fine cracks may still be blurred, and background textures resembling cracks may remain. Direct convolutional thinning simultaneously enhances the response to real cracks and false positive regions. Therefore, in this embodiment, the multi-scale fusion features are subjected to prior gating bottleneck thinning to obtain thinned features. These thinned features are then sequentially processed through residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map, including: The multi-scale fusion features are obtained through Convolutional compression into low-dimensional bottleneck features Using the aforementioned depth, separable strip convolutions are possible. The local morphology is refined to form a directional response. The directional responses are then spliced ​​together, and the spliced ​​result is... Convolutional aggregation yields a refined bottleneck representation. The refined bottleneck characterization is achieved through Projection generates refined features: ( ); in, This indicates a refinement of the learnable direction.

[0037] To make the refinement process selective, a priori perception gating is introduced, with the gating value being... The gate value is jointly estimated from the refined bottleneck characterization and the structural prior graph. Represented as: ( ); in, and for Convolutional mapping layer, Use the sigmoid activation function; Final Refinement Features Calculated using residual form: ; in, For element-wise multiplication, A learnable global scaling factor; Refine features Pixel-level logits are generated using a segmentation classifier: ; After upsampling pixel-level logits to the size of the bridge crack image, a crack segmentation probability map is converted using a sigmoid function: ; in, This represents the predicted crack segmentation probability map. Binary crack prediction, used for visualization and evaluation, is achieved through... Obtained by thresholding.

[0038] In this embodiment, crack segmentation is a binary segmentation task with a high class imbalance, where crack pixels typically occupy only a small portion of the image area. To alleviate the imbalance between crack and background pixels and improve crack recall, a weighted binary cross-entropy (WBCE) loss and a Tversky loss are used by default to train the crack segmentation probability map. Among them, the weighted binary cross-entropy (WBCE) loss increases the penalty weight for misclassified crack pixels, and the weighted binary cross-entropy (WBCE) loss is expressed as: ; in, Represents the set of valid pixels. It is a positive class weight. It's a real label. It predicts the probability of cracks. These are small constants used for numerical stability; Tversky loss through control and The parameters allow for flexible adjustment of the trade-off between false positives and false negatives. The Tversky loss is expressed as: ; in, , and These represent true positive, false positive, and false negative, respectively. This paper sets... , Greater emphasis is placed on reducing the rate of missed crack detection, which is especially important for inspection scenarios where the cost of missed detection is high.

[0039] To further verify the effectiveness of the bridge crack segmentation method of the present invention, the following ablation experiment was conducted in this embodiment.

[0040] Experimental setup: 1. Dataset: SegCODEBRIM was used as the primary dataset for experimental and ablation studies. This dataset was constructed based on the CODEBRIM bridge defect classification dataset and provides pixel-level binary crack masks for the segmentation task. In the custom hierarchical partitioning with a fixed random seed, 296 images were used for training, 83 for validation, and 62 for testing. The crack pixel ratio in the test set is approximately 0.70%, constituting a typical highly imbalanced segmentation task. All images were directly scaled to... The pixels are not preserved in terms of the original aspect ratio, in order to follow a unified training and evaluation process.

[0041] DACL10K was used as the target domain benchmark for cross-domain evaluation to verify the model's domain generalization and low-annotation target domain adaptation performance. The original dataset contains multiple damage categories and bridge component categories. This invention extracts and merges the Crack and ACrack (Alligator Crack) categories into a single positive crack category, since both correspond to surface cracking of the structure, and the remaining pixels are considered as background.

[0042] The processed binary subset contains 975 images, of which 286 contain positive crack labels. All zero-sample and low-annotation evaluations use a fixed 587-image holdout test set to ensure fair comparisons between different annotation settings.

[0043] The low-annotation adaptation experiment employs stratified sampling with a fixed random seed on the remaining images: positive sample images are stratified according to crack pixel density, while negative sample images form independent strata. This invention constructs three low-annotation settings with 50, 97, and 194 annotated training images, each accompanied by the same number of validation images, used solely for model selection. These settings roughly correspond to 5%, 10%, and 20% of the processed DACL10K binary subset at the image level, with the proportions calculated solely based on the annotated training images.

[0044] All low-annotation adaptation experiments employed a two-stage protocol: source domain pre-training and target domain fine-tuning. The model based on the method of this invention was first pre-trained on SegCODEBRIM, and then fine-tuned using only DACL10K annotated training images with the corresponding annotation settings.

[0045] 2. Baseline Model: This invention selects four representative baseline models on SegCODEBRIM for comparison, covering classic convolutional segmentation models, lightweight Transformer baselines, and crack-specific Transformer models. All models use the same data partitioning, input resolution, and evaluation metrics.

[0046] U-Net-s5-d16 is a classic encoder-decoder convolutional baseline based on U-Net, implemented with a custom lightweight design using 5 downsampling stages and 16 base channels, and trained using weighted cross-entropy and Dice loss. DeepLabV3+with ResNet-50 is a classic convolutional segmentation baseline with dilated spatial pyramid pooling and decoder refinement, also trained using weighted cross-entropy and Dice loss. SegFormer-B0 is a lightweight Transformer segmentation baseline with a hierarchical MiT encoder and a full MLP decoder, serving as the direct backbone baseline of this invention, and trained using WBCE and Tversky loss consistent with SGGD-SegFormer. CrackFormer-II is a representative crack-specific Transformer segmentation model, using the same WBCE and Tversky loss configuration as SegFormer-B0 and SGGD-SegFormer; AMP is disabled during its training to avoid the mixed-precision numerical instability observed in this experimental environment.

[0047] 3. Implementation details: All experiments were conducted on workstations equipped with NVIDIA RTX 3080 GPUs (10GB VRAM). Except for CrackFormer-II, the model implementations were based on MMSegmentation and MMEngine; CrackFormer-II was adapted from its official open-source implementation for a single-GPU training process.

[0048] For the MMSegmentation-based model, the ResNet and MiT backbone networks were initialized using ImageNet pre-trained weights, and a custom lightweight U-Net was trained from scratch. The optimizer was AdamW with a weight decay of 0.01. In the main SegCODEBRIM experiments, the initial learning rate was set to 6 × 10⁻⁶. -5 Training employed a 500-iteration linear warmup, followed by scheduling with a multinomial learning rate of power 1.0. The model was trained for 15,000 iterations with a single GPU batch size of 2, gradient accumulation steps of 4, and an effective batch size of 8. Unless otherwise specified, models based on MMSegmentation enabled Automatic Mixed Precision (AMP). Evaluation was performed on the validation set every 500 iterations, and the model with the best validation mIoU was selected for final testing.

[0049] CrackFormer-II was trained for 15,000 iterations using AdamW, the same initial learning rate and weight decay, a single GPU batch size of 1, and the same WBCE and Tversky loss configuration as SegFormer-B0. Since AMP would result in non-finite loss values ​​in this experimental training environment, AMP was disabled in CrackFormer-II. Finally, the CrackFormer-II checkpoint was selected using the validation ODS F1 choice.

[0050] To accommodate the differences in implementation of different methods, this experiment uses different validation metrics for checkpoint selection, but all models are evaluated on the same reserved test set using a unified metric to ensure comparability of test results.

[0051] For MMSegmentation-based models, training data augmentation includes direct scaling to... Pixel count, aspect ratio not preserved, random horizontal flip, and photometric perturbation. The adapted CrackFormer-II workflow uses the same input resolution and random horizontal flip. All experiments use a fixed random seed 20260802 to ensure reproducibility.

[0052] The DACL10K low-label fine-tuning experiments only evaluated SegFormer-B0 and SGGD-SegFormer to focus on the adaptive gains brought by the proposed decoders. Both models were initialized with weights trained from SegCODEBRIM and with 1×10⁻⁶ weights. -5 The training was fine-tuned for 3000 iterations with a low initial learning rate. The warmup was 200 iterations long, followed by a polynomial scheduler with the same power of 1.0. The rest of the training configuration remained consistent with the main MMSegmentation experiment.

[0053] 4. Evaluation indicators: This experiment evaluates the model from three dimensions: segmentation accuracy, structural continuity, and deployment efficiency. The metrics used include: 4.1 ODS F1-score: The optimal dataset-scale F1-score is obtained by scanning a single global threshold from 0.01 to 0.99 with a step size of 0.01 across the entire test set. This metric reflects the best dataset-level F1 score achievable with the chosen global threshold.

[0054] 4.2 ODS IoU: Calculate the crossover ratio of crack classes under the same threshold obtained for ODS F1.

[0055] 4.3 Fixed Threshold Indicators: Calculate the crack class F1-score, Precision, and Recall at a fixed threshold of 0.5 to reflect the performance under the general binarization setting.

[0056] 4.4 clDice (fixed threshold): The centerline Dice coefficient is calculated at a fixed threshold of 0.5. It is used to measure the structural continuity of the fine crack prediction and is a supplement to the regional index.

[0057] 4.5 Parameter Quantity and FLOPs: In The total number of parameters and floating-point operations in the statistical model at the input resolution are used to measure model complexity. FLOPs are estimated using the MMEngine complexity analysis tool when applicable.

[0058] 4.6 FPS: Average single-graph inference speed on the test set using a unified evaluation script on an NVIDIA RTX 3080 GPU. Warm-up iterations were used during measurement to exclude cold-start overhead, and only pure model inference time was counted.

[0059] 5. Experimental Results: 5.1 SegCODEBRIM Main Result: Table 1 summarizes the performance of all models on the SegCODEBRIM test set and the unified... Quantitative comparison results under the evaluation protocol.

[0060] Table 1: SegCODEBRIM Test Set Master Comparison Results

[0061] All models were evaluated on the SegCODEBRIM test partition used in this experiment, with an input resolution of (512 x 512) and according to the same evaluation protocol and metric definitions. ODS represents the optimal dataset scale threshold obtained through threshold scanning. All fixed threshold metrics were calculated at a threshold of 0.5. IoU represents the intersection-over-union ratio, FLOPs represents floating-point operations, and FPS represents frames per second. Bold text indicates the optimal value for each column; lower Params and FLOPs are better, while higher values ​​for other metrics are better. The FLOPs for CrackFormer-II are approximate values ​​because its implementation differs from the complexity statistics process of MMSegmentation.

[0062] Table 1 shows that SGGD-SegFormer achieves the highest ODS F1-score and ODS IoU among all evaluated models. Compared with the SegFormer-B0 baseline, the ODS F1 score is improved by 1.52 percentage points and the ODS IoU by 1.31 percentage points, while the proposed decoder only introduces approximately 0.11M parameters and 1.76G FLOPs. The fixed threshold clDice index is also slightly improved, indicating better structural continuity in crack prediction under the same binarization threshold.

[0063] Compared to the heavier convolutional baselines U-Net and DeepLabV3+, SGGD-SegFormer achieves a higher ODS F1 score using only about 13.2% and 8.8% of their parameters, respectively. While U-Net has a higher fixed-threshold F1 score, its parameter count and FLOPs are significantly larger. Under the ODS setting, i.e., when a single global threshold is selected on the test set, the method of this invention achieves optimal crack class F1 and IoU.

[0064] CrackFormer-II is incorporated into the same data and evaluation protocol as a crack-specific reference baseline. Its results provide a cross-architecture reference for this experimental setup, but should not be construed as the upper limit of the architecture's performance after specialized parameter tuning.

[0065] 5.2 Study on SGGD decoder ablation: To verify the independent contributions of each component of the proposed decoder, a system ablation experiment was conducted on the SegCODEBRIM test set. All variants used the same training and evaluation protocol, and the results are shown in Table 2.

[0066] Table 2: Ablation Experiment of SGGD Decoder Component

[0067] This table verifies the contribution of each decoder component to the SegCODEBRIM test partition. Precision, Recall, and clDice are all calculated at a fixed threshold of 0.5. Bold text indicates the optimal value for each column; lower Params are better, and higher values ​​for the other metrics are better. The direction-aware prior branch adds approximately 0.03M parameters, the gating bottleneck refinement module adds approximately 0.07M parameters, and the complete decoder adds approximately 0.11M parameters in total. The clDice-loss row evaluates the impact of adding clDice loss as a topology regularization term to the complete SGGD decoder.

[0068] Ablation results show that adding only the orientation-aware structural prior branch slightly improves ODS F1 and ODS IoU, indicating that the learned morphological prior can provide useful inductive biases for crack structure modeling. However, using the prior alone has limited benefits because it mainly provides coarse-grained spatial structure cues and lacks fine-grained local refinement. Adding only the gated bottleneck refinement module achieves consistent improvements in ODS F1, ODS IoU, fixed-threshold Precision, Recall, and clDice, proving its effectiveness in refining segmentation details and suppressing background noise. Combining both yields the best ODS F1 and ODS IoU, indicating that the structural prior and gated refinement have complementary effects: the structural prior provides guidance for crack regions, while gated refinement translates this guidance into more accurate pixel-level predictions. Adding the clDice loss improves clDice and crack recall, but leads to a slight decrease in ODS F1, ODS IoU, and Precision.

[0069] 5.3 Accuracy-Efficiency Trade-off Analysis: This experiment compares the ODS F1-score with the number of model parameters and FLOPs to verify whether the accuracy improvement is based on acceptable computational overhead. Lightweight real-time segmentation is an important requirement for resource-constrained infrastructure inspection and remote sensing interpretation scenarios. As shown in Figures 5(a) and 5(b), the two subplots illustrate the relationship between the ODS F1-score and the number of model parameters and FLOPs, respectively. Models closer to the top left corner exhibit a better accuracy-efficiency balance.

[0070] This experiment presents a precision-efficiency trade-off analysis of the SegCODEBRIM test partitioning. Figure 5(a) compares the ODS F1-score with the number of model parameters, and Figure 5(b) compares the ODS F1-score with FLOPs. For ease of reading, both horizontal axes use logscale. The closer to the top left corner, the better the precision-efficiency balance. Due to the different complexity statistics process of CrackFormer-II compared to MMSegmentation, its FLOPs values ​​are approximate.

[0071] Among the evaluated models, SGGD-SegFormer and SegFormer-B0 both rank on the Pareto front in terms of both parameter count and FLOPs. Specifically, SGGD-SegFormer achieves the highest ODS F1-score by introducing only a small number of parameters and computational cost compared to SegFormer-B0, making it a competitive choice in the lightweight model range. In contrast, U-Net and DeepLabV3+ require significantly larger model sizes and computational costs; U-Net's ODS F1-score is close to that of the method described in this invention, but its parameter count and FLOPs are much higher; DeepLabV3+ has significantly lower segmentation accuracy. CrackFormer-II still has a parameter count below 5M in the lightweight range, but its ODS F1-score is lower, and its FLOPs are significantly higher than those of SGGD-SegFormer.

[0072] Compared to SegFormer-B0, the proposed decoder adds only 0.11M parameters and 1.76G FLOPs, yet delivers a 1.52 percentage point improvement in ODS F1, demonstrating its parameter efficiency advantage. Compared to U-Net, SGGD-SegFormer achieves a higher ODS F1 using only about 13.2% of the parameters. For infrastructure inspection scenarios with limited edge computing resources, such as UAV-equipped imaging platforms and portable inspection terminals, SGGD-SegFormer (the method of this invention) can improve segmentation performance without expanding the backbone network or introducing heavy modules.

[0073] 5.4 Cross-domain migration and low-annotation adaptation on DACL10K: To evaluate the cross-domain migration performance and low-label target domain adaptability of the method of this invention, zero-sample migration and low-label fine-tuning experiments were conducted on the DACL10K binary crack subset. All results were evaluated on the same 587-frame holdout test set. Quantitative results are shown in Table 3, and performance trends under different labeling ratios are shown in Figures 6(a) and 6(b).

[0074] Table 3: DACL10K Zero-Sample and Low-Label Adaptation Results on the Test Set with Reservation Required

[0075] Wherein: DACL10K is converted into a binary crack segmentation benchmark by merging the Crack and ACrack categories. All rows are evaluated on the same 587-pixel holdout test set. In low-annotation fine-tuning, the target domain training and validation subsets are hierarchically sampled according to crack pixel density using a fixed random seed. ODS metrics are calculated via threshold scan, and Precision and Recall are calculated at a fixed threshold of 0.5. Bold text indicates the best results within each annotation scale group.

[0076] Figures 6(a) and 6(b) show the adaptation performance trends of DACL10K under different target domain annotation ratios. The two subplots display the ODS F1-score and ODS IoU for target domain annotation ratios of 0%, 5%, 10%, and 20%, respectively. The shaded area highlights the low annotation range of 5%–10%, in which SGGD-SegFormer consistently achieves higher ODS F1 and ODS IoU compared to SegFormer-B0.

[0077] Zero-shot results show that both models have limited direct transfer performance, with ODS F1 scores below 16%. This indicates a significant domain difference between SegCODEBRIM and DACL10K, possibly related to differences in imaging equipment, bridge type, surface material, and annotation standards. Therefore, direct cross-dataset deployment without target domain adaptation may not meet practical application requirements. In the zero-shot setting, SGGD-SegFormer's ODS F1 is slightly lower than SegFormer-B0, but its Precision and Recall are higher, indicating that the two models have different precision-recall balances during direct transfer.

[0078] As the labeled proportion of the target domain increases, the performance of both models improves significantly. At low labeled settings of 5% and 10%, SGGD-SegFormer outperforms SegFormer-B0 in ODS F1, ODS IoU, and Precision. At a 10% labeled proportion, the ODS F1 advantage reaches 1.89 percentage points. This indicates that the structural inductive bias introduced by the SGGD decoder helps the model adapt more effectively to new domains when labeled target domains are scarce.

[0079] When the annotation ratio increases to 20%, SegFormer-B0 narrows the gap and slightly outperforms SGGD-SegFormer in ODS F1 and ODS IoU. This indicates that as more target domain labeled data becomes available, the performance gain from explicit structural priors tends to decrease. Under stronger target domain supervision, the baseline Transformer model can learn scene-specific crack appearance patterns more directly from the data, thereby reducing the marginal benefit of additional structural guidance. This further illustrates that the method of this invention is more suitable for low-annotation, rapid adaptation scenarios commonly encountered in actual bridge inspections.

[0080] 5.5 Qualitative Evaluation: Figures 7(a) and 7(b) show the qualitative comparison results on the SegCODEBRIM test set, including two representative cases: Figure 7(a) shows a small discontinuous crack, and Figure 7(b) shows a case with a complex background.

[0081] Figure 4. Caption: Qualitative example of the SegCODEBRIM test set. Row (a) shows a small, discontinuous crack, and row (b) shows a case with a complex background. The columns, in order, represent the original image, ground truth annotations, SegFormer-B0 prediction, U-Net prediction, SGGD-SegFormer prediction, and the corresponding SGGD-SegFormer error plot. In the error plot, dark gray represents true positives (TP), blue represents false negatives (FN), and red represents false positives (FP).

[0082] In the case of fine cracks, the main visual challenge is maintaining the continuity of the narrow, weak crack structure. U-Net exhibits significant breaks and missed detections in fine crack segments, and SegFormer-B0 also loses some fine branches. In contrast, SGGD-SegFormer preserves a more continuous crack response and finer branching structure. In the case of complex backgrounds, stains, shadows, and concrete textures introduce crack-like interference. SegFormer-B0 produces more obvious false positive responses in background areas, while SGGD-SegFormer suppresses some of these responses through structure-guided gating refinement. The corresponding SGGD-SegFormer error map visualizes the prediction error distribution, and these visual results are consistent with the quantitative improvements in ODS F1, ODS1oU, and fixed threshold clDice on SegCODEBRIM.

[0083] The above experiments lead to the conclusion that: First, introducing structural inductive bias on the decoder side is a cost-effective optimization path for lightweight split segmentation. Based on the same SegFormer-B0 encoder, SGGD-SegFormer increases the ODSF1 by 1.52 percentage points with only a 2.9% increase in total parameters. For practical deployment, this means that existing lightweight backbone networks can be upgraded by replacing the decoder module without having to expand the encoder.

[0084] Second, explicit structural inductive bias yields the most significant benefits in low-annotation target domain adaptation. On the DACL10K benchmark, SGGD-SegFormer outperforms the baseline at 5% and 10% target domain annotation ratios. This aligns with real-world bridge inspection scenarios, as annotating dense pixel-level masks for each new bridge scene is costly. Models with embedded structural priors can provide a more competitive starting point with limited target domain annotation budgets.

[0085] Third, the benefits of structural prior are affected by the target domain annotation range. When the target domain annotation ratio increases to 20%, the ordinary SegFormer-B0 baseline slightly outperforms SGGD-SegFormer in ODS F1 and ODS IoU. This indicates that explicit structural guidance is most valuable when labeled data is scarce, while sufficient target domain supervision allows the general Transformer encoder to directly learn scene-specific crack features from the data. This further clarifies that the core application value of the method in this invention lies in rapid adaptation to low-annotation environments.

[0086] In summary, the core of this invention is a structure-guided gated decoder, employing direction-aware prior branching, prior-guided multi-scale fusion, and gated bottleneck refinement. This design injects learnable crack morphology priors into the decoding process without altering the SegFormer-B0 encoder or requiring custom operators, thus maintaining good deployment compatibility.

[0087] In this embodiment, the present invention also proposes a bridge crack segmentation system 200, combined with Figure 3 It includes a feature extraction module 210, a resolution analysis module 220, a structure prior module 230, a feature fusion module 240, and a feature refinement module 250, wherein: Feature extraction module 210 is used to acquire bridge crack images, extract multi-scale features from the bridge crack images, and generate a four-level feature map; The resolution analysis module 220 is used to analyze the resolution of the four-level feature map and obtain the first feature map with the highest resolution among the four-level feature maps. The structure prior module 230 is used to capture the structure response maps in four directions corresponding to the first feature map by using depthwise separable strip convolution, and to stitch the structure response maps in the four directions along the channel dimension to generate a structure prior map. The feature fusion module 240 is used to bilinearly scale the structural prior map to the fourth-level feature map to obtain the scaled map, adjust the scaled map through residual shaping to generate a modulation feature map, and stitch and fuse the modulation feature maps to obtain multi-scale fused features. The feature refinement module 250 is used to refine the multi-scale fused features through prior gating bottlenecks to obtain refined features. The refined features are then processed sequentially through residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map.

[0088] In this embodiment, the present invention also provides a bridge crack segmentation system 300, combined with Figure 4 The system includes a memory 320 and a processor 310. The memory 320 stores programs or instructions that can run on the processor 310. When the program or instructions are executed by the processor 310, they implement the steps of the bridge crack segmentation method described above. Therefore, this bridge crack segmentation system 300 possesses all the beneficial effects of the bridge crack segmentation method of any of the above embodiments, which will not be elaborated further here.

[0089] In this embodiment, the present invention also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of a bridge crack segmentation method as described above. Therefore, this readable storage medium possesses all the beneficial effects of a bridge crack segmentation method according to any of the above embodiments, and will not be elaborated further here.

[0090] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the solutions disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

Claims

1. A method for segmenting bridge cracks, characterized in that, include: Collect images of bridge cracks, extract multi-scale features from the bridge crack images, and generate a four-level feature map; Analyze the resolution of the four-level feature maps and obtain the first feature map with the highest resolution among the four-level feature maps; A depthwise separable strip convolution is used to capture the structural response maps in four directions corresponding to the first feature map, and the structural response maps in the four directions are spliced ​​along the channel dimension to generate a structural prior map. The prior structure map is bilinearly scaled to the fourth-level feature map to obtain a scaled map. The scaled map is then adjusted by residual shaping to generate a modulation feature map. The modulation feature maps are then spliced ​​and fused to obtain multi-scale fused features. The multi-scale fusion features are refined by prior gating bottleneck to obtain refined features. The refined features are then processed sequentially by residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map.

2. The bridge crack segmentation method according to claim 1, characterized in that, The process of acquiring bridge crack images, extracting multi-scale features from the bridge crack images, and generating a four-level feature map includes: Images of bridge cracks are acquired, a downsampling ratio is set, and multi-scale feature extraction is performed on the bridge crack images based on the downsampling ratio to generate... Level 4 feature map; The Level 4 feature map passed Convolutional projection onto a uniform channel dimension; The downsampling ratios were 1 / 4, 1 / 8, 1 / 16, and 1 / 32, respectively.

3. The bridge crack segmentation method according to claim 1, characterized in that, The step of employing depthwise separable strip convolution to capture the structural response maps in four directions corresponding to the first feature map, and then concatenating the structural response maps in the four directions along the channel dimension to generate a structural prior map includes: For the first feature map, through Convolution reduces channel dimensions, forming compact bottleneck features. : ; exist Four depthwise separable strip convolutions with different aspect ratios are applied in parallel to capture the structural response maps in four directions: ; ; ; ; in, and The convolutional kernels capture elongated contexts in the horizontal and vertical directions, respectively; and Asymmetric convolution kernels capture a wider local context around horizontally or vertically extended crack structures; The structural response maps in four directions are stitched together along the channel dimension and then... Convolutional aggregation yields compact structural features, followed by a second... The prediction layer maps this feature to a single-channel prior map, and then uses sigmoid activation to generate a structure prior map. : ; in, Representation of feature aggregation, This indicates a single-channel prior prediction. This represents the sigmoid activation function.

4. The bridge crack segmentation method according to claim 1, characterized in that, The step of bilinearly scaling the prior structure map to the fourth-level feature map to obtain a scaled map, adjusting the scaled map through residual shaping to generate a modulation feature map, and splicing and fusing the modulation feature maps to obtain multi-scale fused features includes: Obtain the resolution of the fourth-level feature map, and based on the resolution, bilinearly scale the structural prior map to obtain the scaled map. : ; The scaled image is adjusted using residual shaping to generate a modulation feature map. : ; in, This represents element-wise multiplication. These are the learnable scale parameters for each level, used to control the prior modulation intensity; The modulation feature maps are upsampled to 1 / 4 resolution and then stitched together. The stitched result is then processed... Convolutional fusion yields multi-scale fused features. : ; in, This is the first-level modulation feature map. This is the second-level modulation feature map. This is the third-level modulation feature map. This is the fourth-level modulation feature map.

5. The bridge crack segmentation method according to claim 1, characterized in that, The step of refining the multi-scale fused features through prior gating bottlenecks to obtain refined features, and then sequentially performing residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map, includes: The multi-scale fusion feature is through Convolutional compression into low-dimensional bottleneck features Using the aforementioned depth, separable strip convolutions are possible. The local morphology is refined to form a directional response. The directional responses are then spliced ​​together, and the spliced ​​result is... Convolutional aggregation yields a refined bottleneck representation. The refined bottleneck characterization is achieved through Projection generates refined features: ( ); in, This indicates a refined transformation of the learnable direction; Introducing prior perception gating, gating value The gate value is jointly estimated from the refined bottleneck characterization and the structural prior graph. Represented as: ( ); in, and for Convolutional mapping layer, It is a sigmoid activation function; Final Refinement Features Calculated using residual form: ; in, For element-wise multiplication, A learnable global scaling factor; Refine features Pixel-level logits are generated using a segmentation classifier: ; After upsampling pixel-level logits to the size of the bridge crack image, a crack segmentation probability map is converted using a sigmoid function: ; in, This represents the predicted crack segmentation probability map.

6. The bridge crack segmentation method according to claim 1, characterized in that, The segmentation method further includes: The crack segmentation probability map is trained using weighted binary cross-entropy loss and Tversky loss. The weighted binary cross-entropy loss is expressed as: ; in, Represents the set of valid pixels. It is a positive class weight. It's a real label. It predicts the probability of cracks. These are small constants used for numerical stability; The Tversky loss is expressed as: ; in, , and Representing true positive, false positive, and false negative respectively, setting , .

7. A bridge crack segmentation system, characterized in that, include: The feature extraction module is used to acquire bridge crack images, extract multi-scale features from the bridge crack images, and generate a four-level feature map; The resolution analysis module is used to analyze the resolution of the four-level feature maps and obtain the first feature map with the highest resolution among the four-level feature maps. The structure prior module is used to capture the structure response maps in four directions corresponding to the first feature map using depthwise separable strip convolution, and to concatenate the structure response maps in the four directions along the channel dimension to generate a structure prior map. The feature fusion module is used to bilinearly scale the structural prior map to the fourth-level feature map to obtain the scaled map, adjust the scaled map through residual shaping to generate a modulation feature map, and stitch and fuse the modulation feature maps to obtain multi-scale fused features. The feature refinement module is used to refine the multi-scale fused features through prior gating bottlenecks to obtain refined features. The refined features are then processed sequentially through residual calculation, pixel-level segmentation, and mapping to obtain a crack segmentation probability map.

8. A bridge crack segmentation system, characterized in that, It includes a memory and a processor, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of a bridge crack segmentation method as described in any one of claims 1-6.

9. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or the instructions are executed by the processor, they implement the steps of a bridge crack segmentation method as described in any one of claims 1-6.