MRI (Magnetic Resonance Imaging) image segmentation method based on symmetric multidirectional Mama and double attention

By employing a symmetric multi-directional Mamba and dual-attention MRI image segmentation method, the problem of insufficient segmentation accuracy for gliomas was solved, enabling accurate identification of complex tumor structures and effective handling of blurred boundaries, thereby improving segmentation accuracy and robustness.

CN121505260APending Publication Date: 2026-02-10SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511668966.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Current technologies are insufficient in MRI image segmentation accuracy when dealing with the high heterogeneity and blurred boundaries of gliomas, making it difficult to accurately identify complex tumor structures.

Method used

An MRI image segmentation method based on symmetric multi-directional Mamba and dual attention is adopted. By enhancing features through multi-scale adaptive attention, combined with symmetric scanning strategy and adaptive edge detection, dynamic feature fusion and edge enhancement are achieved.

Benefits of technology

It significantly improves the segmentation accuracy of gliomas, and demonstrates excellent robustness and clinical application potential, especially in cases with unclear boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505260A_ABST
    Figure CN121505260A_ABST
Patent Text Reader

Abstract

The invention discloses an MRI (Magnetic Resonance Imaging) image segmentation method based on symmetric multidirectional Mama and double attention, which comprises the following steps: firstly, establishing an image segmentation model based on a ResUNet backbone network, taking a standard image as input, mapping the standard image to a multi-scale semantic feature space through down-sampling, enhancing attention features of the image by adopting multi-scale self-adaptive attention, and obtaining an image segmentation result; and features are weighted and dynamically fused, collaborative optimization of channel-space dimensions and dynamic balance of local-global information are realized, multi-scale heterogeneity challenges of glioma are effectively handled, the perceptual performance of the network on tumor features of different scales is enhanced, four groups of symmetric scanning strategies are adopted to scan enhanced images, and the accuracy of the network is improved. The MRI image segmentation method comprises the following steps of: firstly, extracting a tumor image, enhancing feature expression of the image, improving the understanding ability of a model on a tumor global structure, and finally, sequentially adopting multi-operator edge detection, edge feature coding, adaptive intensity adjustment and gating residual fusion, fusing image features through symmetric up-sampling, outputting a segmented image, completing MRI image segmentation, and improving segmentation precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical image segmentation, in particular to a MRI image segmentation method based on symmetric multi-direction Mamba and double attention. BACKGROUND

[0002] Glioma is the most common and most aggressive malignant tumor in the primary central nervous system, but its complex structure and ambiguous boundary bring challenges to clinical diagnosis and treatment. Therefore, accurate segmentation of glioma is crucial for determining tumor range, developing individualized treatment plans, and improving patient prognosis.

[0003] Early diagnosis of glioma relies on clinical symptoms and pathological biopsy, but symptoms lack specificity, pathological examination is risky, and it is difficult to reflect tumor heterogeneity. With the development of medical imaging technology, MRI has gradually become the main means of glioma diagnosis and grading. MRI can provide information on tumor morphology, blood supply, and infiltration range, but its diagnosis still relies on the experience of radiologists, and there are strong subjectivity and inaccurate boundary recognition. In recent years, with the development of deep learning, automatic segmentation and diagnosis methods based on deep learning have rapidly emerged in the study of glioma. Convolutional neural networks (CNN), Transformers and other models can automatically extract high-dimensional features from multi-modal MRI, achieve accurate tumor region segmentation and grading, and greatly improve the accuracy and consistency of diagnosis.

[0004] Although automatic methods based on deep learning have become the mainstream paradigm for solving this task, they still face many problems: first, when faced with the complex characteristics of glioma heterogeneity and ambiguous boundaries, the segmentation accuracy of these methods is severely insufficient. Second, traditional convolutional neural networks are limited by local receptive fields and are difficult to capture global context. Third, there is a lack of multi-scale feature perception. Existing attention mechanisms focus on single-dimensional features, making it difficult to effectively capture different scales of spatial and channel information, affecting accurate recognition of complex tumor structures.

[0005] Therefore, the above technical problems still need to be further solved. SUMMARY

[0006] In view of the deficiencies of the prior art described above, the purpose of the present application is to provide a MRI image segmentation method based on symmetric multi-direction Mamba and double attention, which aims to solve the problem of low segmentation accuracy of existing segmentation methods when faced with the complex characteristics of glioma heterogeneity and ambiguous boundaries, affecting accurate recognition of complex tumor structures.

[0007] In order to achieve the above purpose, the present application adopts the following technical solutions: In a first aspect, a MRI image segmentation method based on symmetric multi-direction Mamba and double attention, comprising: Step 1, acquire multi-modal MRI images and pre-process to form standard images; Step 2, establish an image segmentation model based on the ResUNet backbone network, input the standard image, map the standard image to a multi-scale semantic feature space through downsampling, enhance the attention features of the image using multi-scale adaptive attention, and dynamically fuse the features with weighting, and output the enhanced image; Step 3, use four sets of symmetric scanning strategies to scan the enhanced image to strengthen the feature representation of the image, and output the feature map; Step 4, input the feature map output in step 3, successively use multi-operator edge detection, edge feature coding, adaptive intensity adjustment and gated residual fusion, and finally fuse the image features through symmetric upsampling, output the segmentation image, and complete the MRI image segmentation; Step 5, collect data samples to establish a data set, use the AdamW optimizer to train the image segmentation model in steps 1-4, input the image into the trained image segmentation model, output the segmentation image, and realize MRI image segmentation.

[0008] Further, in step 2, the multi-scale adaptive attention realizes the cooperative optimization of channel-space dimensions through a parallel double-branch architecture. The channel attention branch uses a three-way parallel pooling strategy to capture complementary information, and the spatial attention branch models the spatial dependency at the pixel level, using a dual-core parallel mechanism to capture multi-scale spatial patterns. Then, a channel-space weight balancing strategy is used to dynamically balance the channel and spatial attention features through learnable weight parameters to realize the dynamic fusion of the two types of attention enhanced features, and finally output using a scaling residual connection strategy to prevent excessive feature enhancement.

[0009] Further, in step 2, the channel attention branch uses a three-way parallel pooling strategy to capture complementary information: global average pooling extracts overall statistical features, 3x3 adaptive pooling preserves local structure, global max pooling emphasizes salient regions, and the three features are integrated through a weighted fusion strategy, represented as: ; where: , is the fused channel feature, which is then nonlinearly transformed through a compression-activation structure to generate normalized channel attention weights: : ; where are the weight matrices of the dimension reduction and dimension increase full connection layers, respectively, and the compression ratio is set to 1:16; ReLU is a nonlinear activation function, The Sigmoid activation function outputs normalized attention weights. This is the final channel attention weight matrix.

[0010] Furthermore, in step 2, the spatial attention branch employs a dual-core parallel mechanism, first acquiring the input features. The channel statistics are obtained by concatenating the mean and maximum values ​​of each channel dimension to generate channel features containing rich spatial information. : ; in This means calculating the average value along the channel dimension to obtain a 1×H×W feature map, capturing overall spatial information. This represents calculating the maximum value along the channel dimension, resulting in a 1×H×W feature map that highlights salient regions. For splicing operations, The spliced ​​2-channel spatial features; Based on this feature representation, 3×3 and 7×7 dual-kernel parallel convolutions are used to capture local details respectively. and global space dependency : Then, the spatial features at both scales are weighted by learnable weights. Adaptive fusion is performed to achieve a dynamic balance between local and global spatial information: ; in, For the generated spatial attention weights, The weight parameters are learnable, dynamically balancing local and global information. This is the Sigmoid activation function.

[0011] Furthermore, in step 3, four sets of symmetrical scanning strategies are used to scan the enhanced image, strengthen the feature representation of the image, and output a feature map. The four sets of symmetrical scanning strategies include bidirectional row scanning, bidirectional column scanning, bidirectional diagonal scanning, and bidirectional spiral scanning. Among them, spiral scanning generates a spiral sorting key by calculating the radial distance and angle parameters of each pixel in the feature map, realizing radial path scanning from the outside to the inside and from the inside to the outside.

[0012] Furthermore, the formulas for calculating the radial distance and angular parameters of the helical scan are as follows: ; ; Among them, radial distance The Euclidean distance of each pixel to the center directly reflects the spatial range of glioma infiltration, and the angle parameter The azimuth angle of each pixel relative to the center is determined, The function returns a value range of , is the geometric center coordinate of the feature map, and (i, j) is the coordinate of the pixel in the feature map. Then the spiral ordering keys are generated for the forward order and the reverse order where is the maximum radial distance of the feature map, and the ordering key adopts a hierarchical weight strategy: the radial distance term weight is 100, ensuring that the distance is the dominant ordering factor; the angle term weight is 10, as a secondary ordering factor, to ensure the continuity of the spiral in the same radial layer; and the offset ensures that the ordering key is positive. After completing the multi-directional serialization, the two-dimensional feature map of each scanning direction is flattened into a one-dimensional sequence; a selective state space model is used for sequence processing, and the state update follows the following dynamic transition equation: ; where represents the hidden state of the dth scanning direction at time step t, and represent the input and output features, respectively, , , represent the direction-specific discretized state transition matrix, input weight matrix and output weight matrix, respectively, and the state transition behavior is adaptively adjusted according to the current input feature. The outputs of the last four groups of symmetric scanning directions are fused through an adaptive weight distribution strategy; a learnable parameter is used to dynamically adjust the contribution of each direction: ; where represents the complete output sequence of the dth scanning direction, and the Reshape operation restores the one-dimensional sequence to two-dimensional.

[0013] Further, in step 4, the feature map output in step 3 is input, and a plurality of operator edge detection and edge feature encoding are successively used to process the feature map, including: Based on the feature map, the input feature is first averaged along the channel dimension to generate a grayscale feature map , then four complementary edge detection operators are used in parallel to extract boundary features:​ Sobel operator by horizontal and vertical gradient convolution and Detecting directional boundary, edge response is calculated as: where represents the convolution operation; Sobel edge strength is obtained by gradient amplitude: where Prevent division by zero; Laplacian operator as a second-order differential operator captures the subtle changes in the boundary: ; Diagonal detection operator supplements the oblique edge information: ; where, is the input feature channel mean gray feature map, is the Laplacian operator, which detects the curvature change of the boundary, is the diagonal detection operator, which supplements the oblique edge information; The four operators depict the edge characteristics from different dimensions such as gradient direction, curvature change, and diagonal texture, forming complementary boundary descriptions. After detection, the four edge responses are spliced in the channel dimension to construct a unified multi-dimensional edge feature: ; ; After obtaining the original edge response, Through compression-expansion network for deep feature refinement, the first layer 1×1 convolution compresses the 4-channel edge feature to C / 4 dimension, and the second layer expands back to C dimension, represented as: ; Then, in order to integrate the extracted edge information into the original feature, an element-level multiplication strategy is adopted to generate edge-enhanced features: ; Next, the enhanced feature is concatenated with the original feature in the channel dimension to form a 2C-channel fusion feature and sent to the adaptive fusion network. First, 3×3 deep convolution is used to extract local context, and then 1×1 pointwise convolution is used for channel fusion and dimension reduction. Finally, the fusion feature is output: .

[0014] Further, in step 4, based on adaptive intensity adjustment, the global distribution characteristics of the input features are learned to realize dynamic control of the edge enhancement intensity; first, the global statistical information of the input features is extracted through global average pooling: ; Then, a double-layer 1x1 convolutional network is used to generate adaptive weight coefficients : The generated adaptive weight is used to modulate the fused edge enhancement features : ; According to the global characteristics of the input features, the edge enhancement amplitude of each channel is dynamically adjusted, and finally the result is obtained by using a learnable residual connection strategy.

[0015] Further, the AdamW optimizer is used, the initial learning rate is 0.0001, the weight decay coefficient is 0.0001, and the training is performed for 120 epochs, and the batch size is 32.

[0016] The technical scheme adopted by the present application has the following beneficial effects: 1. Design a multi-scale adaptive attention, the present application adopts a three-way parallel pooling and double-core spatial convolution strategy, realizes the collaborative optimization of channel-space dimension and the dynamic balance of local-global information, effectively deals with the multi-scale heterogeneity challenge of glioma, and enhances the perception ability of the network to different scale tumor features.

[0017] 2. Compared with the traditional segmentation model, the present application introduces the symmetric multi-direction scanning strategy of SQD-Mamba, especially the designed bidirectional spiral scanning mechanism, which can effectively capture the radial infiltration mode and long-range spatial dependence relationship of glioma with linear complexity, and significantly improve the understanding ability of the model to the global structure of the tumor.

[0018] 3. The adaptive edge attention proposed by the present application effectively solves the problem of fuzzy glioma boundary by fusing four complementary edge detection operators and intensity adaptive adjustment mechanism. Even in the complex case test with highly blurred boundary, the segmentation performance of the present application still decreases significantly less than other methods, showing excellent robustness and clinical application potential. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The MAEM-ResUNET model structure diagram provided by the embodiment of the present application is shown in the figure; Figure 2 The MAA module structure diagram provided by the embodiment of the present application is shown in the figure; Figure 3This is a schematic diagram of the SQD-Mamba module provided in an embodiment of the present invention; Figure 4 This is a structural diagram of the AEAM module provided in an embodiment of the present invention; Figure 5 A comparison of qualitative segmentation results of different models on the BraTS2020 dataset provided in this embodiment of the invention; Figure 6 A comparison of qualitative segmentation results of different models on the BraTS2021 dataset provided in this embodiment of the invention; Figure 7 This is a visualization of ablation experiments on the BraTS2020 dataset provided in this embodiment of the invention; Figure 8 The ablation experiment visualization results on the BraTS2021 dataset provided in this embodiment of the invention. Detailed Implementation

[0020] 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.

[0021] This invention provides an MRI image segmentation method based on symmetric multidirectional Mamba and dual attention, comprising: Step 1: Acquire multimodal MRI images and preprocess them using a "3D preprocessing → 2D training" workflow: First, adaptive brain region cropping (192×152×146) is performed, combined with 1%–99% quantile truncation and slice-level Z-score (background is denoted as −9), and normalization is performed according to modality to maintain contrast; then, slices are extracted along the axis, and 128×128 patches are randomly sampled in the effective brain region and light geometric / intensity enhancement is performed. To adapt to large-scale data and memory limitations, small-batch incremental processing (5–8 cases / batch) and memmap loading are used, and the batch size is automatically reduced when memory usage is >85% to ensure stable and efficient data supply and generate standard images; Step 2: Establish an image segmentation model based on the ResUNet backbone network. Take the standard image as input, downsample and map the standard image to a multi-scale semantic feature space, use multi-scale adaptive attention to enhance the attention features of the image, and dynamically fuse the features by weighting to output the enhanced image. Step 3: Use four sets of symmetrical scanning strategies to scan the enhanced image, enhance the image's feature representation, and output the feature map; Step 4: Using the feature map output in Step 3 as input, multi-operator edge detection, edge feature encoding, adaptive intensity adjustment and gated residual fusion are successively applied. Finally, the image features are fused through symmetrical upsampling to output the segmented image and complete the MRI image segmentation. Step 5: Collect data samples to establish a dataset. Use the AdamW optimizer to train the image segmentation model from Steps 1-4. Input the image into the trained image segmentation model and output the segmented image to achieve MRI image segmentation.

[0022] Specifically, refer to Figure 1 , Figure 1 This is a diagram of the overall model structure of the present invention. The model adopts a classic encoder-decoder structure with ResUNet as the backbone. The encoder performs hierarchical feature extraction through layer-by-layer downsampling, mapping the input four-modal MRI data (T1, T1CE, T2, FLAIR) to a multi-scale semantic feature space. The bottleneck layer is responsible for global context modeling, capturing long-range spatial dependencies. The decoder gradually reconstructs the spatial resolution through a symmetrical upsampling path and uses skip connections to fuse the multi-scale features of the encoder, finally outputting the segmentation result.

[0023] Multi-scale Adaptive Attention Module (MAA) Reference Figure 2 It achieves collaborative optimization of the channel-space dimensions through a parallel dual-branch architecture, effectively addressing the multi-scale heterogeneity problem of gliomas. For the semantic features of gliomas at different levels, the channel attention branch references… Figure 2 As shown in Figure a, a three-way parallel pooling strategy is adopted to capture complementary information: global average pooling ( Extract overall statistical features, and use 3×3 adaptive pooling. Preserve local structure, global max pooling ( Highlighting salient regions. The three features are integrated using a weighted fusion strategy: in: . The fused channel features are then subjected to a nonlinear transformation using a compression-excitation (SE) structure to generate normalized channel attention weights. : in Here are the weight matrices of the fully connected layers for dimensionality reduction and dimensionality enhancement, respectively, with a compression ratio of 1:16. ReLU is the non-linear activation function. The sigmoid activation function outputs normalized attention weights. This is the final channel attention weight matrix. For the spatial attention branch reference... Figure 2As shown in Figure b, the aim is to model pixel-level spatial dependencies, employing a dual-core parallel mechanism to capture multi-scale spatial patterns. This branch first computes the input features. The channel statistics are used to concatenate the mean and maximum values ​​of each channel dimension to generate a 2-channel feature containing rich spatial information. : in, This means that the average value is calculated along the channel dimension to obtain a 1×H×W feature map, which captures the overall spatial information. This indicates that the maximum value is calculated along the channel dimension, resulting in a 1×H×W feature map that highlights salient regions. For splicing operations, The spliced ​​2-channel spatial features.

[0024] Based on this feature representation, 3×3 and 7×7 dual-kernel parallel convolutions are used to capture local details respectively. and global space dependency : Then, the spatial features at both scales are weighted by learnable weights. Adaptive fusion is performed to achieve a dynamic balance between local and global spatial information: in, For the generated spatial attention weights, These are learnable weight parameters that dynamically balance local and global information. This is the Sigmoid activation function.

[0025] The final output employs a channel-spatial weight balancing strategy. First, the channel attention enhancement features are calculated separately. and spatial attention enhancement features Then, through learnable weight parameters Enhanced features achieved by dynamically fusing two types of attention : Final output A scaling residual connection strategy is employed to prevent over-enhancement of features: Here, β is a scaling factor used to ensure the appropriateness of feature enhancement and avoid excessive distortion of the original feature information. Through the above design, the MAA module can adaptively capture tumor features at different scales, enhancing the network's ability to model the multi-scale heterogeneity of gliomas.

[0026] SQD-Mamba module reference Figure 3To address the problem that traditional convolutional neural networks are limited by their local receptive fields and struggle to capture global context, this invention proposes the SQD-Mamba module. The core idea of ​​the SQD-Mamba module is to introduce a bidirectional spiral scanning algorithm as a fourth set of scanning directions, building upon bidirectional row scanning, bidirectional column scanning, and bidirectional diagonal scanning. Through radial paths from the outside in and from the inside out, it can more accurately model the radial invasion pattern of tumors.

[0027] The spiral scan employs a bidirectional symmetrical design. The clockwise spiral starts from the center of the feature map and expands outwards along the spiral trajectory to sort pixels, naturally capturing the radial growth characteristics of gliomas infiltrating from the core to the periphery. The counter-clockwise spiral converges from the periphery to the center, capturing boundary information from the edematous region to the tumor core; the two approaches form a complementary symmetrical representation.

[0028] First, calculate the coordinates of the geometric center of the feature map. Then, for each pixel position (i,j) in the feature map, the radial distance and angle parameters are calculated: Among them, radial distance Measuring the Euclidean distance from each pixel to the center directly reflects the spatial extent of glioma infiltration. Angular parameters. Determine the azimuth angle of each pixel relative to the center. The function return value range is . Let (i,j) be the geometric center coordinates of the feature map, and (i,j) be the coordinates of a pixel in the feature map. Then, for the sequence ( ) and reverse order ( Generate spiral sort keys respectively: in This represents the maximum radial distance of the feature map. The sorting key employs a hierarchical weighting strategy: the radial distance term has a weight of 100, ensuring distance is the dominant sorting factor; the angle term has a weight of 10, serving as a secondary sorting factor to guarantee spiral continuity within the same radial layer. The offset ensures the sorting key is a positive value.

[0029] After multi-directional serialization, the two-dimensional feature map for each scan direction is flattened into a one-dimensional sequence. A selective state-space model is used for sequence processing, and the state update follows the dynamic transition equation: in This represents the hidden state of the d-th scan direction at time step t. and These represent the input and output features, respectively. , , These represent the direction-specific discretized state transition matrix, input weight matrix, and output weight matrix, respectively. These parameter matrices are dynamically modulated based on the input content, enabling the model to adaptively adjust its state transition behavior according to the current input features.

[0030] The outputs of the last four symmetrical scanning directions are fused using an adaptive weight allocation strategy. Learnable parameters are employed. Dynamically adjust contributions in each direction: in This represents the complete output sequence in the d-th scan direction. The Reshape operation restores the one-dimensional sequence to two dimensions. Through the above symmetric multi-directional scanning design, the SQD-Mamba module effectively captures the radial invasion pattern and long-range spatial dependencies of gliomas with linear complexity, providing a more comprehensive global context representation for the bottleneck layer.

[0031] Adaptive Edge Attention Module (AEAM) Reference Figure 4 To effectively address the blurred boundaries of gliomas, this invention proposes an Adaptive Edge Attention (AEAM) module. It comprises four core components: multi-operator edge detection, edge feature encoding, adaptive intensity adjustment, and gated residual fusion.

[0032] Given input features This module first averages the data along the channel dimension to generate a grayscale feature map. Subsequently, four complementary edge detection operators are used in parallel to extract boundary features: the Sobel operator extracts features through gradient convolution in both the horizontal and vertical directions. and Detect directional boundaries, and calculate the edge response as follows: ,in This represents a convolution operation. Sobel edge strength is obtained through gradient magnitude: ,in Preventing division by zero. The Laplacian operator, as a second-order differential operator, captures subtle changes in the boundary conditions: The diagonal detection operator supplements the information about oblique edges: .in, The grayscale feature map of the input features (after channel meaning). The Laplacian operator is used to detect changes in boundary curvature. To supplement the diagonal detection operator, information on oblique edges is added. Four operators characterize edge features from different dimensions such as gradient direction, curvature change, and diagonal texture, forming a complementary boundary description.

[0033] After detection, the four edge responses are concatenated along the channel dimension to construct a unified multidimensional edge feature. : After obtaining the original edge response Deep feature refinement is performed using a compression-expansion network. The first 1×1 convolutional layer compresses the 4-channel edge features to C / 4 dimensions, and the second layer then expands them back to C dimensions. The entire encoding process can be formalized as follows: Subsequently, in order to integrate the extracted edge information into the original features, an element-wise multiplication strategy was used to generate edge enhancement features: Next, enhance features. With original features The fusion features of 2C channels are concatenated along the channel dimension and fed into an adaptive fusion network. First, local context is extracted through 3×3 depthwise convolution, and then channel fusion and dimensionality reduction are performed through 1×1 pointwise convolution. Finally, the fusion features are output. .

[0034] Although the aforementioned steps have achieved effective extraction of edge information, fixed edge enhancement strategies are difficult to adapt to the intensity variations and noise interference prevalent in glioma imaging. Therefore, AEAM introduces an intensity adaptive regulator to dynamically control the edge enhancement intensity by learning the global distribution characteristics of the input features. First, global average pooling is used to extract global statistical information of the input features. Then, a two-layer 1×1 convolutional network is used to generate adaptive weight coefficients. : The generated adaptive weights enhance the fused edge features. Perform channel-level modulation: The edge enhancement magnitude of each channel is dynamically adjusted based on the global characteristics of the input features. The final output is obtained using a learnable residual connection strategy.

[0035] This invention utilizes the BraTS2020 and BraTS2021 brain tumor segmentation datasets. BraTS2020 contains data from 369 glioma patients, while BraTS2021 contains 1251 training samples. Each case includes four MRI sequences: T1, T1ce, T2, and T2-FLAIR, with image dimensions of 240×240×155 voxels and a resolution of 1 mm³. The dataset annotations include three tumor regions: total tumor (WT), tumor core (TC), and enhanced tumor (ET).

[0036] To comprehensively evaluate the performance and structural advantages of the segmentation method in this invention, several mainstream methods were compared with the method of this invention, and the results are shown in Tables 1 and 2. The models can be divided into three categories: the first category is traditional convolutional structure models, including U-Net, AttentionU-Net, AGRESU-Net, nnU-Net, and SegresNet; the second category is convolutional-Transformer enhanced hybrid models, including TransUnet and Swin-UNETR; and the third category is fusion-enhanced models based on state space modeling, including SegMamba and CDA-Mamba. These three types of models differ significantly in feature modeling methods and structural designs, representing the evolutionary trend of segmentation networks from local convolutional feature extraction to hybrid global modeling, and then to efficient state space fusion, thus possessing strong representativeness and comparative value.

[0037] Table 1: Quantitative comparison of different models on the BraTS2020 dataset Table 2: Quantitative comparison of different models on the BraTS2021 dataset A higher Dice score is better, and a lower HD score is better. Tables 1 and 2 show that the method proposed in this invention achieved the best average Dice and HD scores. Although it did not perform best in Core, the method proposed in this invention achieved the highest Dice and lowest HD scores in all other categories.

[0038] To more intuitively demonstrate that the method proposed in this invention is superior to other methods, Figure 5 and Figure 6This paper presents the segmentation results of different models on the BraTS2020 and BraTS2021 datasets. Intuitively, traditional convolutional models often produce blurry depictions of tumor boundaries, easily missing necrotic areas and non-enhanced core regions. While convolutional-Transformer enhancement hybrid models improve global feature modeling, their capture of fine-grained boundaries remains insufficiently precise. Fusion enhancement models based on state-space modeling further improve overall segmentation accuracy and boundary consistency. However, the model proposed in this invention, by combining a symmetric multi-directional Mamba structure with a dual attention mechanism, achieves segmentation results closest to real-world annotations. It exhibits stronger robustness in handling complex tumor morphologies, particularly demonstrating significant advantages in the accurate identification and boundary localization of enhanced tumors and edema regions.

[0039] To further verify the effectiveness of the modules proposed in this invention, detailed ablation experiments were conducted. The experimental setup included removing the MAA module, removing the SQD-Mamba module, removing the AEAM module, and configurations with different module combinations. The experimental results are shown in Tables 3 and 4: Table 3: Ablation experimental results on the BraTS2020 dataset Table 4: Ablation experimental results on the BraTS2021 dataset Ablation experiments on the BraTS2020 and BraTS2021 datasets demonstrate that each module proposed in this invention positively contributes to improving model performance. The base model exhibits relatively stable performance without the improved modules, but with the gradual introduction of the Multi-Scale Attention (MAA) module, Sequence Feature Modeling (SQD-Mamba) module, and Adaptive Feature Enhancement (AEAM) module, the model's segmentation accuracy and boundary consistency are significantly improved.

[0040] Specifically, introducing any single module can lead to varying degrees of performance improvement. Among them, SQD-Mamba shows the most outstanding performance in the segmentation of the overall and core regions, indicating that its ability to model global dependencies effectively enhances the network's feature representation. The introduction of MAA further improves the interaction and fusion of multi-scale features, helping the model capture lesion information at different scales. AEAM improves the model's ability to identify complex boundary regions by adaptively strengthening the features of key structural regions.

[0041] The most significant performance improvement is achieved when multiple modules are used in combination. In particular, the combined configuration of MAA, SQD-Mamba, and AEAM enables the model to achieve optimal performance in both region consistency and boundary accuracy, demonstrating strong complementarity and synergistic effects among the modules. These results fully validate the effectiveness and robustness of the proposed modules in multi-scale feature fusion, global dependency modeling, and structural enhancement, providing an efficient and scalable solution for medical image segmentation tasks.

[0042] To further demonstrate the effective contribution of each module. Figure 7 and Figure 8 The visualization demonstrates the improvement process of progressive module integration. The baseline method showed significant undersegmentation in edematous regions, which was significantly improved by introducing MAA. The integration of the SQD-Mamba module greatly improved the segmentation accuracy of the tumor core region and effectively suppressed false positives in enhanced tumor and edematous regions. The AEAM module further enhanced boundary integrity. Although slight undersegmentation still exists when dealing with isolated small regions, the overall segmentation quality gradually improves with module integration, and the combination of modules shows stronger robustness to tumors with complex morphologies.

[0043] The advantages and beneficial effects of the embodiments of the present invention are as follows: 1. By designing a multi-scale adaptive attention (MAA) module, this invention employs a three-way parallel pooling and dual-kernel spatial convolution strategy to achieve collaborative optimization of channel-spatial dimensions and dynamic balance of local-global information. This effectively addresses the multi-scale heterogeneity challenge of gliomas and enhances the network's ability to perceive tumor features at different scales.

[0044] 2. Compared with traditional segmentation models, this invention introduces the symmetric multi-directional scanning strategy of the SQD-Mamba module, especially the designed bidirectional spiral scanning mechanism, which can effectively capture the radial invasion pattern and long-range spatial dependence of glioma with linear complexity, significantly improving the model's ability to understand the global structure of the tumor.

[0045] 3. The Adaptive Edge Attention (AEAM) module proposed in this invention effectively solves the problem of blurred glioma boundaries by integrating four complementary edge detection operators and an intensity adaptive adjustment mechanism. Even in complex case tests with highly blurred boundaries, the segmentation performance degradation of this invention is significantly less than that of other methods, demonstrating excellent robustness and clinical application potential.

[0046] In summary, this invention presents a novel, precise, and efficient method for MRI glioma segmentation. This method can accurately identify tumor boundaries, providing a reliable basis for clinical diagnosis and treatment planning, and has high application value and promising development prospects.

Claims

1. An MRI image segmentation method based on symmetric multi-directional Mamba and dual attention, characterized in that, include: Step 1: Acquire multimodal MRI images and preprocess them to form standard images; Step 2: Establish an image segmentation model based on the ResUNet backbone network. Take the standard image as input, map the standard image to the multi-scale semantic feature space through downsampling, enhance the attention features of the image by using multi-scale adaptive attention, and dynamically fuse the features by weighting to output the enhanced image. Step 3: Use four sets of symmetrical scanning strategies to scan the enhanced image, enhance the image's feature representation, and output the feature map; Step 4: Using the feature map output in Step 3 as input, multi-operator edge detection, edge feature encoding, adaptive intensity adjustment and gated residual fusion are successively applied. Finally, the image features are fused through symmetrical upsampling to output the segmented image and complete the MRI image segmentation. Step 5: Collect data samples to establish a dataset. Use the AdamW optimizer to train the image segmentation model from Steps 1-4. Input the image into the trained image segmentation model and output the segmented image to achieve MRI image segmentation.

2. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention as described in claim 1, characterized in that, In step 2, multi-scale adaptive attention achieves collaborative optimization of the channel-space dimensions through a parallel dual-branch architecture. The channel attention branch uses a three-way parallel pooling strategy to capture complementary information, while the spatial attention branch models pixel-level spatial dependencies and uses a dual-core parallel mechanism to capture multi-scale spatial patterns. Then, a channel-space weight balancing strategy is adopted, using learnable weight parameters. Enhanced features are achieved through dynamic fusion of two types of attention, and the final output employs a scaled residual connection strategy. Prevent excessive feature enhancement.

3. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention as described in claim 2, characterized in that, In step 2, the channel attention branch uses a three-way parallel pooling strategy to capture complementary information: global average pooling. Extract overall statistical features and use 3×3 adaptive pooling. Preserve local structure, global max pooling Highlighting the salient regions, the three features are integrated using a weighted fusion strategy and represented as follows: ; in: , The fused channel features are then subjected to a nonlinear transformation using a compression-excitation structure to generate normalized channel attention weights. : ;in Here are the weight matrices of the fully connected layers for dimensionality reduction and dimensionality enhancement, respectively, with a compression ratio of 1:16; ReLU is the non-linear activation function. The Sigmoid activation function outputs normalized attention weights. This is the final channel attention weight matrix.

4. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention as described in claim 2, characterized in that, In step 2, the spatial attention branch adopts a dual-core parallel mechanism, first acquiring input features. The channel statistics are obtained by concatenating the mean and maximum values ​​of each channel dimension to generate channel features containing rich spatial information. : ; in This means calculating the average value along the channel dimension to obtain a 1×H×W feature map, capturing overall spatial information. This represents calculating the maximum value along the channel dimension, resulting in a 1×H×W feature map that highlights salient regions. For splicing operations, The spliced ​​2-channel spatial features; Based on this feature representation, 3×3 and 7×7 dual-kernel parallel convolutions are used to capture local details respectively. and global space dependency : ; Then, the spatial features at both scales are weighted by learnable weights. Adaptive fusion is performed to achieve a dynamic balance between local and global spatial information: ; in, For the generated spatial attention weights, The weight parameters are learnable, dynamically balancing local and global information. This is the Sigmoid activation function.

5. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention according to claim 1, characterized in that, In step 3, four sets of symmetrical scanning strategies are used to scan the enhanced image, enhance the feature representation of the image, and output the feature map. The four sets of symmetrical scanning strategies include bidirectional row scanning, bidirectional column scanning, bidirectional diagonal scanning, and bidirectional spiral scanning. Among them, spiral scanning generates a spiral sorting key by calculating the radial distance and angle parameters of each pixel in the feature map, realizing radial path scanning from the outside to the inside and from the inside to the outside.

6. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention according to claim 5, characterized in that, The formulas for calculating the radial distance and angular parameters of the helical scan are as follows: ; ; Among them, radial distance Measuring the Euclidean distance from each pixel to the center directly reflects the spatial extent of glioma infiltration; angular parameters... Determine the azimuth angle of each pixel relative to the center. The function return value range is , Let (i,j) be the coordinates of the geometric center of the feature map, and (i,j) be the coordinates of a pixel in the feature map. Then regarding the order and reverse order Generate spiral sort keys respectively: ; ; in To determine the maximum radial distance of the feature map, a hierarchical weighting strategy is adopted for the sorting key: the radial distance term has a weight of 100 to ensure that distance is the dominant sorting factor; the angle term has a weight of 10 as a secondary sorting factor to ensure the spiral continuity within the same radial layer; the offset ensures that the sorting key is a positive value. After multi-directional serialization, the two-dimensional feature map for each scanning direction is flattened into a one-dimensional sequence; a selective state-space model is used for sequence processing, and the state update follows the following dynamic transition equation: ; in This represents the hidden state of the d-th scan direction at time step t. and These represent the input and output features, respectively. , , These represent the direction-specific discretized state transition matrix, input weight matrix, and output weight matrix, respectively, and the state transition behavior is adaptively adjusted according to the current input characteristics. The outputs of the last four symmetrical scanning directions are fused using an adaptive weight allocation strategy; learnable parameters are employed. Dynamically adjust contributions in each direction: ; in This represents the complete output sequence in the d-th scan direction. The Reshape operation restores the one-dimensional sequence to a two-dimensional one.

7. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention according to claim 1, characterized in that, In step 4, using the feature map output from step 3 as input, the feature map is processed successively using multi-operator edge detection and edge feature encoding, including: Based on feature maps, input features First, it is averaged along the channel dimension to generate a grayscale feature map. Subsequently, four complementary edge detection operators are used in parallel to extract boundary features: The Sobel operator uses gradient convolution in both the horizontal and vertical directions. and Detecting directional boundaries, the edge response is calculated as follows: ,in Indicates the convolution operation; Sobel edge strength is obtained through gradient magnitude: ,in Prevent division by zero; The Laplacian operator, as a second-order differential operator, captures subtle changes in the boundary: ; Diagonal detection operator supplements oblique edge information: ; in, The input is a grayscale feature map after mean squared input of the feature channels. The Laplacian operator is used to detect changes in boundary curvature. For the diagonal detection operator, supplement the diagonal edge information; Four operators characterize edge features from different dimensions, such as gradient direction, curvature change, and diagonal texture, forming complementary boundary descriptions. After detection, the four edge responses are concatenated along the channel dimension to construct a unified multidimensional edge feature. ; ; After obtaining the original edge response Deep feature refinement is achieved through a compression-expansion network. The first 1×1 convolutional layer compresses the 4-channel edge features to C / 4 dimensions, and the second layer then expands them back to C dimensions, as shown below: ; Subsequently, in order to integrate the extracted edge information into the original features, an element-wise multiplication strategy was used to generate edge enhancement features: ; Next, enhance features With original features The fusion features are concatenated along the channel dimension to form 2C channels and fed into an adaptive fusion network. First, local context is extracted using 3×3 depthwise convolutions, then channel fusion and dimensionality reduction are performed using 1×1 pointwise convolutions, finally outputting the fusion features: 。 8. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention according to claim 7, characterized in that, In step 4, based on adaptive intensity adjustment, dynamic control of edge enhancement intensity is achieved by learning the global distribution characteristics of the input features; firstly, global statistical information of the input features is extracted through global average pooling: ; Then, a two-layer 1×1 convolutional network is used to generate adaptive weight coefficients. : ; The generated adaptive weights enhance the fused edge features. Perform channel-level modulation: ; The edge enhancement magnitude of each channel is dynamically adjusted based on the global characteristics of the input features, and the final output is obtained using a learnable residual connection strategy.

9. The MRI image segmentation method based on symmetric multi-directional Mamba and dual attention according to claim 1, characterized in that, The AdamW optimizer was used with an initial learning rate of 0.0001, a weight decay coefficient of 0.0001, and a training duration of 120 epochs with a batch size of 32.