A semantic-guided global-local Mamba model and three-dimensional medical image segmentation method
By using a semantically guided global-local Mamba model, the problem of insufficient interaction between local details and global context in multi-organ segmentation of existing methods is solved, and more accurate and stable medical image segmentation results are achieved.
Patent Information
- Application Number
- CN202611038078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-11-20
AI Technical Summary
Existing multi-object segmentation methods for medical images struggle to maintain spatial consistency while taking into account both global contextual information and local details. This is especially true in multi-organ segmentation tasks, where there is insufficient interaction between local spatial consistency, fine-grained boundary information, and semantic hierarchical features.
A semantically guided global-local Mamba model is adopted, including the GLDMamba module, SGA module and SegHead module. It enhances feature representation ability through global-local context fusion, orientation-sensitive channel attention and three-dimensional window multi-head attention, and introduces high-level semantic constraints in the decoding stage to improve boundary recognition ability.
It achieves improved preservation of local fine-grained features while maintaining global dependencies, thereby enhancing the accuracy and robustness of medical image segmentation, especially significantly improving segmentation results in multi-organ segmentation tasks.
Smart Images

Figure CN123140101A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and more specifically, to a semantically guided global-local Mamba model and a three-dimensional medical image segmentation method. Background Technology
[0002] Three-dimensional medical image segmentation can accurately extract organ and lesion regions from three-dimensional medical images such as CT and MRI, providing structured information for subsequent clinical analysis, thus becoming an important task in medical image analysis. High-quality three-dimensional segmentation results can provide doctors with crucial anatomical and lesion information, providing a reliable basis for clinical applications such as quantitative organ assessment, preoperative planning, lesion detection, radiotherapy target delineation, and long-term follow-up, and are of great significance in the precision medicine system.
[0003] Traditional CNN-based 3D medical image segmentation methods, such as 3D U-Net, rely on the inherent local connectivity and translation-invariant inductive bias of convolutional operations. This characteristic makes it difficult to fully model long-distance spatial dependencies in images, limiting the understanding of global structure and contextual information. The Transformer architecture, through its self-attention mechanism, achieves global dependency modeling and, after breakthroughs in visual tasks, has been introduced into the field of medical image segmentation. Models such as TransBTS, Swin-UNETR, UNETR, TransUNet, and UNETR++ have demonstrated relatively good global modeling capabilities in 3D scenes, improving segmentation accuracy while maintaining spatial context consistency. However, the computational complexity of the self-attention mechanism is quadratically related to the number of input voxels (O(N²)), resulting in very high training and inference costs in high-resolution 3D volumetric data. Therefore, while Transformer possesses powerful feature representation capabilities in 3D segmentation tasks, it still has limitations in terms of efficiency and scalability.
[0004] To overcome the computational bottleneck of the Transformer, State Space Models (SSMs) have been introduced into visual modeling tasks, achieving long-range dependency capture with linear complexity. The Mamba model, as a representative example, utilizes a selective state update mechanism to achieve efficient global sequence modeling. In the field of medical image segmentation, VMamba, SegMamba, and SegMamba... Methods such as V2 and M²SegMamba further extend Mamba to 3D scenes, modeling long-range spatial dependencies in the axial, coronal, and sagittal planes through three-directional state scanning, significantly improving the model's global representation capability. CN122066937A, "A Method, System, Device, and Medium for Multi-Target Segmentation of Medical Images Based on Convolution and Mamba Framework," employs a 3D Mamba module to expand the deepest encoded features along three anatomically orthogonal directions (axial, coronal, and sagittal). It uses a selective state-space model with linear computational complexity to model global long-range dependencies, capturing cross-slice spatial correlations and overcoming the modeling bottlenecks caused by the limited receptive field of traditional CNNs and the quadratic complexity of Transformers. By introducing a Monte Carlo attention mechanism into the skip connection path, multi-scale random sampling and attention reweighting are performed on shallow high-resolution features, enhancing the feature response of small-volume or weak-contrast targets such as the optic nerve and optic chiasm, suppressing background noise, and thus improving boundary continuity and small-target recall. The patented network employs a design of convolutional blocks and efficient upsampling convolutional blocks, avoiding the use of heavy attention mechanisms or deep stacked structures. This reduces the number of parameters and memory usage while ensuring segmentation accuracy, thus improving inference speed. The 3D medical image segmentation method used in this patent has made significant progress in feature modeling. However, such methods place too much emphasis on modeling global contextual information. Due to the complexity of tissue and organ structures, the large differences in feature scales, and the blurred boundaries, this method, while maintaining spatial consistency while considering both global contextual information and local details, still falls short in characterizing the interaction between local spatial consistency, fine-grained boundary information, and semantic-level features. Therefore, it is difficult to apply to structurally complex tasks such as multi-organ segmentation. Summary of the Invention
[0005] The main technical problem to be solved by this invention is to address the shortcomings of existing multi-target segmentation methods for medical images in terms of local spatial consistency, interaction between fine-grained boundary information and semantic hierarchical features, and to provide a semantically guided global-local Mamba model and a three-dimensional medical image segmentation method.
[0006] Another technical problem solved by this invention is to provide a three-dimensional medical image segmentation method based on this model.
[0007] The objective of this invention is achieved through the following technical solution: A semantically guided global-local Mamba model, characterized by comprising a GLDMamba module, an SGA module, and a SegHead module, wherein the GLDMamba module includes a global-local context fusion submodule, a three-directional state space modeling submodule, a direction-sensitive channel attention submodule, and a three-dimensional window multi-head attention submodule, wherein: The Global-Local Context Fusion Module (SGMamba) includes a global up-and-down branch unit, a local feature extraction unit, and a feature fusion unit. The global up-and-down branch unit includes pooling layers, convolutional layers, non-linear activation (GELU), and a sigmoid activation function. The local feature extraction unit includes multi-scale convolutional kernels. The feature fusion unit includes depthwise separable convolution, a non-linear activation function, and normalization. The Global-Local Context Fusion Module uses the sampled features... Generate global structural consistency features and local branch features Then, through fusion and residual connection, context-enhanced features are obtained. ; The Tri-Mamba state-space modeling submodule includes a separate Mamba unit in the axial, coronal, and sagittal directions, enhancing features based on context. The directional features in the corresponding axial, coronal, and sagittal directions were obtained respectively. , and ; The Direction-Sensitive Channel Attention (DSCA) submodule includes a multi-directional context extraction unit, an adaptive attention fusion unit, and a residual gated recalibration unit. The multi-directional context extraction unit comprises three parallel branches: forward, backward, and slice, each employing global average pooling, convolution, ReLU nonlinear activation, and sigmoid activation functions. The adaptive attention fusion unit includes channel concatenation, convolution, ReLU nonlinear activation, and softmax normalization. The residual gated recalibration unit includes element-wise feature multiplication, a learnable scaling factor, and residual summation via skip connections. The Direction-Sensitive Channel Attention (DSCA) submodule enhances directional features... , and Obtain in-direction augmentation features After fusion, residual branch summation, and obtaining the directional consistency feature, the following steps are performed. ; The 3D-Win multi-head attention submodule for windows includes a window partitioning and reassembly unit, a multi-head self-attention computation unit, and a window restoration and linear projection unit. The 3D-Win multi-head attention submodule also considers orientation consistency features. The data is divided into parts, and the attention of each part is calculated. Then, the data is recombined, residually connected, and combined with the input features. By adding them together, we obtain the encoded features that fuse direction awareness and local context. ; The SGA module includes a semantic projection branch submodule and a feature fusion branch submodule, wherein: The semantic projection branch submodule, including convolution, GELU, and sigmoid activation functions, applies features... The fused features are obtained by fusing through stepwise upsampling and skip connections. , for fusion features With semantic mask Perform element-wise multiplication to obtain the features after semantic fusion. ; The feature fusion branch submodule includes convolution, normalization, GELU activation, and convolution to process features. Convolution, normalization, and function activation are performed to obtain semantically guided enhanced decoding features. ; The SegHead module, based on decoding features Output the results of multi-organ segmentation.
[0008] In 3D medical image segmentation, as the feature space resolution decreases, the fine-grained information of local geometric structures, organ boundaries, and small-volume target regions gradually diminishes, leading to a significant weakening of the spatial detail representation ability of deep features. This invention employs a parallel Global Context Path + Local Path structured GLCFB module to achieve a bidirectional enhancement mechanism of "semantic consistency + fine-grained structure recovery." Considering the significant morphological differences in organ structures along the axial, coronal, and sagittal directions, this invention uses a Tri-Mamba submodule to rearrange the input features into sequences along three orthogonal directions, and independently performs Mamba state space updates in each direction to capture direction-related structural information in the image. Within the Tri-Mamba submodule, differences exist in sequence length, structural deformation, and local density across directions, resulting in unbalanced feature responses between directions and affecting the discriminative power of the final feature fusion. This invention designs a DSCA submodule in each directional branch of the Tri-Mamba submodule to enhance the direction-specific channel recalibration capability, semantic consistency between directions, and structural recognition capabilities.
[0009] Furthermore, the multi-scale convolution kernels in the local feature extraction unit include 3×3×3, 5×5×5, and 7×7×7 convolution kernels.
[0010] Furthermore, the window partitioning and reorganization unit moves the channel dimension to the end through dimension substitution, and then divides the window into blocks according to the window size along the three dimensions of depth, height, and width.
[0011] Furthermore, the multi-head self-attention computing unit includes linear layer mapping to generate query (Q), key (K), and value (V) triples, and Softmax normalization.
[0012] Furthermore, the window restoration and linear projection unit includes a projection layer for feature transformation, followed by inverse view and permute operations to restore the original spatial dimensional order (B×D×H×W×C), and finally, it is replaced back to the input format (B×C×D×H×W) to complete the window self-attention calculation. C For the number of channels, D For depth dimension, H For height dimension, W B represents the width dimension, and B represents the batch size.
[0013] A three-dimensional medical image segmentation method based on the semantically guided global-local Mamba model, comprising the following steps: S1. Three-dimensional medical images Multi-scale feature extraction and spatial downsampling are performed to obtain features. ; S2. Based on features Global and local features are obtained separately, then fused to obtain global-local features. The global-local features are then concatenated with the residuals of feature X to obtain context-enhanced features. ; S21. Features Global average pooling is used to obtain voxel-level semantic compression. Then, convolution and non-linear activation are used to obtain global dependencies. Finally, activation functions are used to calculate global semantic weights to generate global structural consistency features. , represented as:
[0014] in Use the Sigmoid activation function; S22. Features Local spatial information under different receptive fields is extracted through multi-scale convolution to obtain local branch features. , represented as: ; S23. Element-wise weighted fusion feature With features Then, depthwise separable convolutions are used to further fuse features to obtain global-local features. , represented as:
[0015] Where ⊙ represents element-wise multiplication, and DWConv represents depthwise separable convolution; S24. Features after fusion Normalization and activation function processing are performed, and the result is added to feature X via residual connection to obtain context-enhanced features. , represented as:
[0016] in For learnable scaling parameters; S3. Features The mapping is performed as sequences in three directions: axial, coronal, and sagittal. Mamba state updates are then performed independently in each direction to obtain directional features corresponding to the axial, coronal, and sagittal directions, respectively. directional characteristics and directional features ; S4. Calculate the attention and adaptive weights for the three directional features, normalize them to obtain the intra-directional enhancement features, fuse the intra-directional enhancement features, and add them to the identity residual branch in S2 to obtain the directional consistency features. ; S41. Construct channel attention in three directions , and Generate directional features Directional features and directional features The attention of the concatenated data is then input into a lightweight fusion network to predict adaptive weights in three directions. , and And enhance features within the direction are obtained through normalization. , represented as:
[0017] Where γ is a learnable scaling parameter, ; S42. First, enhance the features in three directions by averaging them element by element. , and It is then added to the identity residual branch of GLCFB to form a directional consistency feature. , represented as: ; S5. Incorporate the orientation consistency feature The system is divided into multiple windows, and the attention of each window is calculated. The attention of all windows is then reassembled back into the overall feature space, and residual connections are made with the features. By adding them together, we obtain the encoded features that fuse direction awareness and local context. , represented as: ; S6. Upsampling is used to gradually restore feature resolution, while multi-scale features passed through skip connections are fused, and high-level semantic guidance is used to enhance the structural consistency and class discriminability of segmentation boundaries; S61. Features By fusing through stepwise upsampling and skip connections, fused features are obtained at the highest resolution scale. , represented as:
[0018] in This indicates that the features originate from the same-scale skip connections in the encoder. This is an element-wise addition; S62. Fusion Features Perform semantic mapping to generate semantic mask , represented as: ; S63. Merging characteristics of the main branch The semantic mask generated by the semantic projection branch Perform element-wise multiplication to obtain the features after semantic fusion. , represented as: ; S64. Refine features through convolution, normalization, function activation, and convolution. Obtain semantically guided enhanced decoding features , represented as: ; S7. Decoding features enhanced with semantic guidance By mapping convolution to the category space, the final voxel-level segmentation prediction result is generated.
[0019] Furthermore, three-dimensional medical images in S1 It was obtained by cropping the original medical image data.
[0020] Furthermore, the output feature dimensions of each level of the multi-scale features in S1 are 1 / 23, 1 / 43, 1 / 83, and 1 / 163, respectively, with corresponding channel numbers of 48, 96, 192, and 384.
[0021] Furthermore, the window size in S5 is... , .
[0022] Furthermore, the formula for calculating the attention of each window is as follows:
[0023] The query Q, key K, and value V are generated by linear projection of the window features.
[0024] Compared with existing technologies, the beneficial effects are: This invention constructs a semantically guided global-local Mamba model comprising two modules: GLDMamba and SGA. Through global-local dynamic encoding, orientation-sensitive channel recalibration, and 3D-Win modeling, it achieves collaborative modeling of global dependencies, orientation-aware structural information, and local fine-grained features. Simultaneously, a semantically guided attention module is introduced to enhance class consistency and improve boundary recognition capabilities during the feature recovery stage using high-level semantic constraints. The SGMamba described in this invention enhances the model's feature representation capabilities across multiple scales, orientations, and semantics. In the encoding stage, the GLDMamba submodule strengthens the bidirectional interaction between local fine-grained features and the global semantic background, the DSCA submodule performs orientation-aware channel recalibration on features in three spatial directions, and the 3D-Win submodule models local geometric structures and neighborhood correlations, thereby constructing a multi-level "global-local" modeling path. In the decoding stage, a strategy combining layer-by-layer upsampling and cross-layer skip connections is employed to deeply fuse deep semantic information with shallow spatial details to recover the structural feature representation of images at high resolution. In the output stage, an SGA semantic guidance module is embedded to utilize the high-level semantic information of the image to perform consistency control on the segmentation boundary and organ contour during feature fusion, thereby improving the stability and robustness of the segmentation module. Attached Figure Description
[0025] Figure 1 This is a flowchart of the SGMamba process of the present invention; Figure 2 A visual comparison chart of SGMamba and seven representative methods. Detailed Implementation
[0026] The following examples further explain and illustrate the invention, but the specific examples do not limit the invention in any way.
[0027] Example 1 This embodiment provides a semantically guided global-local Mamba model, including a dynamic module based on spatial context features (GLDMamba) and a semantically guided attention (SGA) module. The GLDMamba module includes a global-local context fusion submodule, a three-directional state space modeling submodule, a direction-sensitive channel attention submodule, and a three-dimensional window multi-head attention submodule, wherein: The Global-Local Context Fusion (GLCFB) submodule includes a global up-and-down branch unit, a local feature extraction unit, and a feature fusion unit. The global up-and-down branch unit includes a pooling layer, two 1×1×1 convolutional layers, a non-linear activation function (GELU), and a sigmoid activation function. The local feature extraction unit includes multi-scale convolutional kernels (3×3×3, 5×5×5, and 7×7×7). The feature fusion unit includes depthwise separable convolutions, a non-linear activation function (GELU), and normalization (Norm). GLCFB uses the sampled features... Generate global structural consistency features respectively and local branch features Weighted fusion features and characteristics Global-local features are then obtained. Finally, after normalization and activation function processing, the features are connected via residual connections. Adding it to feature X yields context-enhanced features. ; The Tri-Mamba state-space modeling submodule includes a separate Mamba unit in each of the axial, coronal, and sagittal directions. The output features are mapped to sequences in three directions, and Mamba state updates are performed to obtain directional features corresponding to the axial, coronal, and sagittal directions, respectively. , and ; The Direction-Sensitive Channel Attention (DSCA) submodule includes a multi-directional context extraction unit, an adaptive attention fusion unit, and a residual-gated recalibration unit. The multi-directional context extraction unit comprises three parallel branches: forward, backward, and slice. Each branch employs global average pooling (AdaptiveAvgPool3d), two layers of 1×1×1 convolutions (channels are first reduced in dimensionality and then increased in dimensionality), ReLU non-linear activation, and the Sigmoid activation function. The adaptive attention fusion unit includes channel concatenation (Concat), two layers of 1×1×1 convolutions, ReLU non-linear activation, and Softmax normalization. The residual-gated recalibration unit includes element-wise feature multiplication, a learnable scaling factor (γ, initialized to 0), and skip-connection residual addition (IdentityMapping). DSCA enhances directional features. , and Obtain in-direction augmentation features The enhancement features from the three directions are fused and added to the identity residual branch of GLCFB to obtain the directional consistency features. ; The 3D-Win multi-head attention submodule includes a window partitioning and reorganization unit, a multi-head self-attention calculation unit, and a window restoration and linear projection unit. The window partitioning and reorganization unit moves the channel dimension to the end through dimensional permutation, and then partitions the window along the depth, height, and width dimensions according to the window size (window_size). The multi-head self-attention calculation unit includes a linear layer mapping to generate query (Q), key (K), and value (V) triples, followed by Softmax normalization. The window restoration and linear projection unit includes a projection layer (proj) for feature transformation, then restores the original spatial dimensional order (B×D×H×W×C) through inverse view and permute operations, and finally permutes back to the input format (B×C×D×H×W), completing the window self-attention calculation. 3D-Win partitioning direction consistency feature. The attention of each part is calculated, then reassembled back into the overall feature space, and finally connected to the input features via residual connections. By adding them together, we obtain the encoded features that fuse direction awareness and local context. ; The SGA module includes a semantic projection branch submodule and a feature fusion branch submodule, wherein: The Semantic Projection submodule consists of two 3×3×3 convolutional layers and GELU and Sigmoid activation functions to fuse features. Perform semantic mapping generation semantic mask , for fusion features With semantic mask Perform element-wise multiplication to obtain the features after semantic fusion. ; The feature fusion branch submodule includes 3×3×3 convolutions, normalization, GELU activation, and 1×1×1 convolutions for feature fusion. Convolution, normalization, and function activation are performed to obtain semantically guided enhanced decoding features. .
[0028] The SegHead module, based on decoding features Output the results of multi-organ segmentation.
[0029] Example 2 This embodiment provides a three-dimensional medical image segmentation method based on the semantically guided global-local Mamba model described in Embodiment 1, such as... Figure 1 As shown, the steps include: S1. First, the data is randomly cropped to 128×128×128 to obtain the image. This ensures that the model can be correctly input. Then, a multi-level feature extraction structure is used to process the 3D medical images. Multi-scale feature extraction and spatial downsampling are performed to obtain features. ,in C For the number of channels, D For depth dimension, H For height dimension, W Width dimension; In the multi-level feature extraction structure, each level includes a GLDMamba module and a DownConv 3D convolution module with stride=2. As the levels progress, the output feature dimensions of each level are 1 / 23, 1 / 43, 1 / 83, and 1 / 163, respectively, corresponding to 48, 96, 192, and 384 channels.
[0030] S2. Based on features Global and local features are obtained separately, then fused to obtain global-local features. The global-local features are then concatenated with the residuals of feature X to obtain context-enhanced features. ; S21. Features Voxel-level semantic compression is achieved through global average pooling (GAP), followed by two 1×1×1 convolutional layers ( Conv Global dependencies are obtained using GELU (Geometric Optimization Undefined Function), and then global semantic weights are calculated using the Sigmoid activation function to generate global structural consistency features. , represented as:
[0031] in, Use the Sigmoid activation function; S22. Features Multi-scale convolution extracts local spatial information from different receptive fields, compensating for boundary and texture losses caused by deep-stage convolution and sequence modeling, and thus obtaining local branch features. , represented as: ; S23. Element-wise weighted fusion feature With features Then, depthwise separable convolutions are used to further fuse features to obtain global-local features. , represented as: ; S24. Features after fusion Normalization ( Norm The feature is processed by an activation function and then added to feature X via a residual connection to obtain context-enhanced features. , represented as:
[0032] in For learnable scaling parameters; S3. Considering the significant morphological differences in organ structures along the axial, coronal, and sagittal directions, the input features are rearranged into sequences along the three orthogonal directions, and Mamba state space updates are performed independently in each direction to capture orientation-related structural information in the image. Specifically, the features... The mapping is performed as sequences in three directions: axial, coronal, and sagittal. Mamba state updates are then performed independently in each direction to obtain directional features corresponding to the axial, coronal, and sagittal directions, respectively. directional characteristics and directional features ; S4. Construct channel attention in three directions. , and Generate directional features Directional features and directional features The attention of the concatenated data is then input into a lightweight fusion network to predict adaptive weights in three directions. , and Furthermore, a direction-sensitive channel recalibration strategy is established through softmax normalization, and in-direction enhanced features are obtained. , represented as:
[0033] Where γ is a learnable scaling parameter, .
[0034] Finally, the enhanced features in the three directions are fused element-wise on an average basis. , and It is then added to the identity residual branch of GLCFB to form a directional consistency feature. , represented as: ; S5. Incorporate the orientation consistency feature Divided into sizes 3D child window, represented as , Then calculate the attention for each window:
[0035] By calculating attention separately for each window, we can effectively limit the computational cost of attention. Subsequently, the features within the window are linearly projected to generate the query Q, key K, and value V, represented as... ,in These are learnable parameters.
[0036] Finally, the attention of all windows is reorganized back into the overall feature space according to the original 3D layout, and the residual connections are used to connect the features. By adding them together, we obtain the encoded features that fuse direction awareness and local context. , represented as: ; S6. In the decoding stage, UpConv transposed convolution is used to gradually restore feature resolution through spatial upsampling, while multi-scale features passed through skip connections in the encoding stage are fused. Features are input into the SGA module, and high-level semantic guidance enhances the structural consistency and class discriminativeness of segmentation boundaries.
[0037] S61. Features By fusing through stepwise upsampling and skip connections, fused features are obtained at the highest resolution scale. , represented as:
[0038] in This indicates that the features originate from the same-scale skip connections in the encoder. This is an element-wise addition; S62. Fusion Features Semantic mapping is performed by extracting semantic representations through two layers of 3×3×3 convolutions and GELU activation, and then generating semantic representations using the Sigmoid function. semantic mask The semantic relevance of each voxel is represented as:
[0039] S63. Merging characteristics of the main branch The semantic mask generated by the semantic projection branch Perform element-wise multiplication to obtain the features after semantic fusion. , represented as: ; S64. Further refine the features using 3×3×3 convolution, normalization, GELU activation, and 1×1×1 convolution. Obtain semantically guided enhanced decoding features , represented as:
[0040] S7. Decoding features enhanced with semantic guidance The segmentation head is fed in and then... Convolution is mapped to the category space to generate the final voxel-level segmentation prediction result, realizing the end-to-end modeling process of medical images from 3D input to multi-organ segmentation output.
[0041] Example 3 This embodiment is based on the models and methods of Embodiments 1 and 2, and is validated using different datasets, including: BraTS2023: The BraTS2023 dataset was acquired from multiple centers and includes four MRI modalities: T1, T1ce, T2, and FLAIR. It provides fine annotations for three types of tumor structures: Whole Tumor (WT), Tumor Core (TC), and Enhancing Tumor (ET). All data were standardized and resampled to the same spacing.
[0042] The KiTS2023 dataset contains a large number of abdominal CT scan images from different hospitals, with annotations for both kidneys and kidney tumors. Compared to the KiTS19 and KiTS21 datasets, KiTS2023 significantly expands the sample size and introduces more cases with kidney tumor morphology and enhanced scan phases, reflecting the heterogeneity of data in real clinical scenarios to some extent.
[0043] The AMOS2022 dataset contains abdominal CT and MRI scans from 600 patients. All samples have voxel-level labels for 15 abdominal organs, including the spleen, right kidney, left kidney, gallbladder, esophagus, liver, stomach, aorta, inferior vena cava, pancreas, right adrenal gland, left adrenal gland, duodenum, bladder, and prostate / uterus. This dataset covers a wide range of clinical diseases and scanning conditions, making it suitable for evaluating and comparing multi-organ segmentation algorithms.
[0044] This embodiment uses three metrics to quantitatively compare the performance of SGMamba with other representative methods: Dice Similarity Coefficient (Dice), 95% Hausdorff Distance (HD95), and Average Symmetric Surface Distance (ASSD).
[0045] (1) The Dice coefficient is used to measure the degree of overlap between the predicted area and the actual area, and it is defined as:
[0046] in and They represent the first Predicted and true labels for individual elements.
[0047] (2) HD95 measures the 95th percentile of the maximum deviation between the predicted boundary and the true boundary, and is defined as:
[0048] in and The surface point set of the predicted segmentation result and the surface point set of the actual labeled segmentation.
[0049] (3) ASSD is used to measure the average boundary distance between the prediction and the true segment, and its definition is as follows:
[0050] in Represents a point on the prediction surface To the real surface point set The Euclidean distance to the nearest point in the middle. Represents a point on a real surface To predict the surface point set The Euclidean distance to the nearest point in the middle.
[0051] The higher the Dice score, the lower the HD95 and ASSD, the higher the consistency between the model segmentation results and the true target, the more accurate the boundary localization, the lower the overall boundary error, and the stronger the model boundary fitting ability.
[0052] To verify the performance of the SGMamba proposed in this invention, it was compared with seven representative methods, covering architectures based on CNN, Transformer, and Mamba: CNN-based methods: SegresNet and UX-Net are two representative CNN-based methods for 3D medical image segmentation. Both methods employ an encoder-decoder structure for 3D medical image segmentation.
[0053] Transformer-based methods: UNETR, SwinUNETR, and SwinUNETR-V2 are three representative Transformer-based 3D medical image segmentation methods. These methods all employ the Vision Transformer architecture or its variant, the Swin Transformer, as the encoder to learn global features, thereby predicting the segmentation results.
[0054] Mamba-based methods: SegMamba and SegMamba-V2 are two relatively new Mamba-based three-dimensional medical image segmentation methods.
[0055] (1) On the AMOS2022 abdominal multi-organ segmentation dataset, considering that the number of cases corresponding to the bladder and prostate / uterus is extremely limited and only a small number of samples are included, the evaluation results are easily affected by individual differences and data distribution fluctuations, making it difficult to fully reflect the true generalization ability of the model. Therefore, the above organs were not included in the overall statistics. Instead, quantitative analysis was performed on the remaining 13 representative abdominal organs, including the spleen, right kidney, left kidney, gallbladder, esophagus, liver, stomach, aorta, inferior vena cava, pancreas, right adrenal gland, left adrenal gland, and duodenum. The Dice, HD95, and ASSD results of the model are listed in Tables 1-3 below: Table 1
[0056] Table 2
[0057] Table 3
[0058] As shown in Tables 1-3 above, the SGMamba-based method described in this invention demonstrates significant advantages in terms of accurate organ boundary delineation and contour continuity in the AMOS2022 abdominal dataset.
[0059] (2) Quantitative results for glioma segmentation on the BraTS2023 dataset: Dice coefficient, HD95, and ASSD were used to evaluate the three tumor subregions (whole tumor region WT, enhanced tumor region ET, and tumor core region TC). The results are shown in Table 4 below: Table 4
[0060] As shown in Table 4, the method described in this invention achieves the best results on the BraTS2023 dataset, highlighting its advantages in accurately segmenting complex three-dimensional glioma structures.
[0061] (3) Quantitative evaluation results of kidney tumor segmentation task on KiTS2023 dataset. The evaluation uses tumor segmentation performance as the primary indicator and kidney segmentation performance as the secondary indicator. The analysis is performed on cases with only three annotation categories: background, kidney, and tumor. The results are shown in Table 5 below: Table 5
[0062] As shown in Table 5, the SGMamba method proposed in this invention outperforms all compared CNN, Transformer, and Mamba methods across all three metrics. This fully demonstrates the effectiveness of the method in accurately segmenting renal tumors on the KiTS2023 benchmark.
[0063] In summary, compared to the seven existing advanced methods, the SGMamba proposed in this invention demonstrates strong segmentation performance on the BraTS2023, AMOS2022, and KiTS2023 datasets. Figure 2 As shown, the Transformer-based UNETR exhibits slight class redundancy in some cases, while convolutional or hybrid architecture models generally demonstrate more stable prediction results. The SGMamba proposed in this invention can accurately segment relatively small tumor regions on the BraTS2023 and Kits2023 datasets, and effectively segment multiple organs on the AMOS2022 abdominal dataset. These visualization results demonstrate that SGMamba can effectively preserve local detail features while modeling global contextual dependencies, thus achieving more accurate and robust segmentation in complex medical imaging scenarios, validating its advantages in feature representation and spatial modeling capabilities.
[0064] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A semantically guided global-local Mamba model, characterized in that, It includes the GLDMamba module, SGA module, and SegHead module. The GLDMamba module includes a global-local context fusion submodule, a three-directional state space modeling submodule, a direction-sensitive channel attention submodule, and a three-dimensional window multi-head attention submodule, wherein: The global-local context fusion module includes a global up-and-down branch unit, a local feature extraction unit, and a feature fusion unit. The global up-and-down branch unit includes pooling layers, convolutional layers, GELU non-linear activation, and a sigmoid activation function. The local feature extraction unit includes multi-scale convolutional kernels. The feature fusion unit includes depthwise separable convolution, a non-linear activation function, and normalization. The global-local context fusion module performs feature fusion based on the sampled features. Generate global structural consistency features and local branch features Then, through fusion and residual connection, context-enhanced features are obtained. ; The three-directional state-space modeling submodule includes a separate Mamba unit in the axial, coronal, and sagittal directions, and enhances features based on context. The directional features in the corresponding axial, coronal, and sagittal directions were obtained respectively. , and ; The orientation-sensitive channel attention submodule includes a multi-directional context extraction unit, an adaptive attention fusion unit, and a residual gated recalibration unit. The multi-directional context extraction unit comprises three parallel branches: forward, backward, and slice, each employing global average pooling, convolution, ReLU nonlinear activation, and sigmoid activation functions. The adaptive attention fusion unit includes channel concatenation, convolution, ReLU nonlinear activation, and Softmax normalization. The residual gated recalibration unit includes element-wise feature multiplication, a learnable scaling factor, and skip connection residual summation. The orientation-sensitive channel attention submodule enhances directional features. , and Obtain in-direction augmentation features After fusion, residual branch summation, and obtaining the directional consistency feature, the following steps are performed. ; The 3D window multi-head attention submodule includes a window partitioning and reassembly unit, a multi-head self-attention computation unit, and a window restoration and linear projection unit. The 3D window multi-head attention submodule also considers directional consistency features. The data is divided into parts, and the attention of each part is calculated. Then, the data is recombined, residually connected, and combined with the input features. By adding them together, we obtain the encoded features that fuse direction awareness and local context. ; The SGA module includes a semantic projection branch submodule and a feature fusion branch submodule, wherein: The semantic projection branch submodule, including convolution, GELU, and sigmoid activation functions, applies features... The fused features are obtained by fusing through stepwise upsampling and skip connections. , for fusion features With semantic mask Perform element-wise multiplication to obtain the features after semantic fusion. ; The feature fusion branch submodule includes convolution, normalization, GELU activation, and convolution to process features. Convolution, normalization, and function activation are performed to obtain semantically guided enhanced decoding features. ; The SegHead module, based on decoding features Output the results of multi-organ segmentation.
2. The semantically guided global-local Mamba model according to claim 1, characterized in that, The local feature extraction unit includes multi-scale convolutional kernels of 3×3×3, 5×5×5 and 7×7×7.
3. The semantically guided global-local Mamba model according to claim 1, characterized in that, The window partitioning and reorganization unit moves the channel dimension to the end through dimension substitution, and then divides the window into blocks according to the window size along the three dimensions of depth, height, and width.
4. The semantically guided global-local Mamba model according to claim 1, characterized in that, The multi-head self-attention computation unit includes linear layer mapping to generate query (Q), key (K), and value (V) triples, and Softmax normalization.
5. The semantically guided global-local Mamba model according to claim 1, characterized in that, The window restoration and linear projection unit includes a projection layer for feature transformation, followed by inverse view and permute operations to restore the original spatial dimensional order (B×D×H×W×C), and finally, replacement back with the input format (B×C×D×H×W) to complete the window self-attention calculation. C For the number of channels, D For depth dimension, H For height dimension, W B represents the width dimension, and B represents the batch size.
6. A three-dimensional medical image segmentation method based on a semantically guided global-local Mamba model, characterized in that the steps are as follows: include: S1. Three-dimensional medical images Multi-scale feature extraction and spatial downsampling are performed to obtain features. Where C is the number of channels, D is the depth dimension, H is the height dimension, and W is the width dimension; S2. Based on features Global and local features are obtained separately, then fused to obtain global-local features. The global-local features are then concatenated with the residuals of feature X to obtain context-enhanced features. ; S21. Features Global average pooling is used to obtain voxel-level semantic compression. Then, convolution and non-linear activation are used to obtain global dependencies. Finally, activation functions are used to calculate global semantic weights to generate global structural consistency features. , represented as: in Use the Sigmoid activation function; S22. Features Local spatial information under different receptive fields is extracted through multi-scale convolution to obtain local branch features. , represented as: ; S23. Element-wise weighted fusion feature With features Then, depthwise separable convolutions are used to further fuse features to obtain global-local features. , represented as: ; S24. Features after fusion Normalization and activation function processing are performed, and the result is added to feature X via residual connection to obtain context-enhanced features. , represented as: in For learnable scaling parameters; S3. Features The mapping is performed as sequences in three directions: axial, coronal, and sagittal. Mamba state updates are then performed independently in each direction to obtain directional features corresponding to the axial, coronal, and sagittal directions, respectively. directional characteristics and directional features ; S4. Calculate the attention and adaptive weights for the three directional features, normalize them to obtain the intra-directional enhancement features, fuse the intra-directional enhancement features, and add them to the identity residual branch in S2 to obtain the directional consistency features. ; S41. Construct channel attention in three directions , and Generate directional features Directional features and directional features The attention of the concatenated data is then input into a lightweight fusion network to predict adaptive weights in three directions. , and And enhance features within the direction are obtained through normalization. , represented as: Where γ is a learnable scaling parameter, ; S42. First, enhance the features in three directions by averaging them element by element. , and and context-enhanced features Adding them together creates a consistent directional characteristic. , represented as: ; S5. Incorporate the orientation consistency feature The system is divided into multiple windows, and the attention of each window is calculated. The attention of all windows is then reassembled back into the overall feature space, and residual connections are made with the features. By adding them together, we obtain the encoded features that fuse direction awareness and local context. , represented as: ; S6. Upsampling is used to gradually restore feature resolution, while multi-scale features passed through skip connections are fused, and high-level semantic guidance is used to enhance the structural consistency and class discriminability of segmentation boundaries; S61. Features By fusing through stepwise upsampling and skip connections, fused features are obtained at the highest resolution scale. , represented as: in This indicates that the features are skip connections of the same scale from the encoder; S62. Fusion Features Perform semantic mapping to generate semantic mask , represented as: ; S63. Merging characteristics of the main branch The semantic mask generated by the semantic projection branch Perform element-wise multiplication to obtain the features after semantic fusion. , represented as: ; S64. Refine features through convolution, normalization, function activation, and convolution. Obtain semantically guided enhanced decoding features , represented as: ; S7. Decoding features enhanced with semantic guidance By mapping convolution to the category space, the final voxel-level segmentation prediction result is generated.
7. The three-dimensional medical image segmentation method according to claim 6, characterized in that, Three-dimensional medical images in S1 It was obtained by cropping the original medical image data.
8. The three-dimensional medical image segmentation method according to claim 6, characterized in that, In S1, the output feature dimensions of each level of the multi-scale features are 1 / 23, 1 / 43, 1 / 83, and 1 / 163, respectively, with corresponding channel numbers of 48, 96, 192, and 384.
9. The three-dimensional medical image segmentation method according to claim 6, characterized in that, In S5, the window size is... , .
10. The three-dimensional medical image segmentation method according to claim 6, characterized in that, The formula for calculating the attention of each window is: The query Q, key K, and value V are generated by linear projection of the window features.
Citation Information
Patent Citations
Medical image multi-target segmentation method, system and device based on convolution and Mama framework and medium
CN122066937A
