Medical image segmentation method and system based on residual Mama and multi-scale boundary enhancement

By employing residual Mamba and multi-scale boundary enhancement in medical image segmentation, this method addresses the challenges of balancing long-range semantic dependency modeling with computational efficiency, lack of adaptive fusion of multi-scale lesion features, and insufficient segmentation of regions with blurred boundaries in existing technologies. It achieves high-precision and stable medical image segmentation, applicable to complex backgrounds and diverse texture scenes.

CN121544644APending Publication Date: 2026-02-17NINGBO MEDICAL CENT LIHUILI HOSPITACL

Patent Information

Application Number
CN202610075505.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing medical image segmentation technologies struggle to balance long-range semantic dependency modeling and computational efficiency, lack adaptive fusion mechanisms for multi-scale lesion features, and have insufficient ability to segment regions with blurred boundaries, resulting in limitations in the completeness, accuracy, and clinical applicability of segmentation results.

Method used

A medical image segmentation method based on residual Mamba and multi-scale boundary enhancement is adopted. Through an encoder-decoder architecture, residual convolutional blocks, residual Mamba blocks, multi-scale gated attention modules and boundary enhancement modules are combined to achieve long-range spatial dependence and multi-scale feature fusion and optimize boundary representation.

Benefits of technology

It significantly improves segmentation accuracy, boundary quality, and multi-scale adaptability, balancing computational efficiency with clinical applicability. It is suitable for complex backgrounds and diverse texture scenes, improving the accuracy and stability of medical image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544644A_ABST
    Figure CN121544644A_ABST
Patent Text Reader

Abstract

The invention relates to a medical image segmentation method and system based on residual Mama and multi-scale boundary enhancement. The method comprises the following steps: acquiring and preprocessing a medical image; inputting the image into a segmentation model based on an encoder-decoder architecture; the encoder synchronously extracts local texture features and models long-range spatial dependence through residual error convolution blocks and residual error Mama blocks which are alternately connected; fusing and enhancing the jump connection features between the encoder and the decoder through a boundary enhancement module to optimize boundary characterization; integrating a multi-scale gating attention module in a decoding path, and adaptively selecting and fusing multi-scale context features; and finally outputting the high-precision segmentation mask. The method effectively solves the problems that in the prior art, long-range dependence and local details are difficult to consider, the multi-scale feature fusion capability is insufficient, boundary segmentation is fuzzy and the like, and the segmentation accuracy, the boundary continuity and the clinical practicability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image processing and computer vision technology, specifically to a medical image segmentation method and system based on residual Mamba and multi-scale boundary enhancement. Background Technology

[0002] Medical image segmentation is a crucial foundation for clinical diagnosis and treatment planning. Scenarios such as cardiovascular and cerebrovascular diseases, tumor screening, and preoperative assessment all rely on precise delineation and volume quantification of lesion regions. In clinical practice, the interpretation of multimodal images, including dermoscopy, MRI, and ultrasound, has long relied on manual interpretation. This process is cumbersome, time-consuming, and the results are easily influenced by the operator's experience and subjective factors, making it difficult to guarantee consistency and reproducibility. Traditional automated analysis methods are mostly based on manually designed features such as echo intensity, texture, and geometric morphology, combined with classifiers such as support vector machines and decision trees to complete recognition and segmentation. These methods are highly sensitive to noise and artifacts, struggle to adapt to the high heterogeneity of lesion morphology and scale, have limited generalization ability across devices and datasets, and their interpretability and stability fail to meet clinical needs.

[0003] Deep learning methods have driven an overall improvement in image segmentation performance. Convolutional neural networks can automatically learn multi-level representations, but they are limited by local receptive fields and are prone to omissions and misclassifications when faced with blurred boundaries, low contrast, and closely adjacent tissues, resulting in insufficient preservation of fine-grained structures. Visual Transformers enhance long-range dependency modeling through global self-attention, but they have high computational and storage overhead. In practical applications, they often rely on downsampling and windowing to control complexity, which introduces problems such as loss of small target information and degradation of boundary details. To balance global and detail, hybrid networks have gradually introduced multi-scale feature fusion and attention mechanisms, but most designs use static or uniform weights between layers, lacking adaptive selection for scale changes and directional differences, making it difficult to perform stably in complex backgrounds and diverse textures.

[0004] Real-world clinical data still faces challenges such as annotation noise, class imbalance, and inter-domain differences. Models are highly sensitive to loss design and training strategies, and distortions such as adhesion, breakage, and jagged edges are common in boundary regions. It is difficult to balance structural continuity and morphological consistency, and a gap remains between objective evaluation metrics and clinical perception. Although recent studies have attempted to alleviate these problems by introducing long-range dependency modeling and channel space recalibration, how to simultaneously improve global semantic understanding, fine-grained boundary characterization, and multi-scale adaptive selection with controllable computational overhead remains a key bottleneck in the field of medical image segmentation.

[0005] In summary, existing technologies still have significant shortcomings in the collaborative modeling of long-range dependencies and local textures, adaptive gating of multi-scale information, and refined representation of complex boundaries. They are difficult to balance accuracy, stability, and efficiency in different modalities and various clinical scenarios. There is an urgent need to propose segmentation methods and systems that can enhance long-range modeling and improve boundary perception capabilities. Summary of the Invention

[0006] This invention designs a medical image segmentation method and system based on residual Mamba and multi-scale boundary enhancement. The technical problem it solves is that existing medical image segmentation techniques have three main shortcomings: (1) it is difficult to balance the long-range semantic dependency modeling ability and computational efficiency; (2) it lacks an adaptive fusion and selection mechanism for multi-scale lesion features; and (3) it is not capable of fine segmentation of regions with blurred boundaries, which limits the completeness, accuracy and clinical applicability of the segmentation results.

[0007] To solve the aforementioned technical problems, the present invention adopts the following solution:

[0008] A medical image segmentation method based on residual Mamba and multi-scale boundary enhancement, characterized by the following steps:

[0009] Step S1: Acquire the medical images to be segmented and perform standardized preprocessing;

[0010] Step S2: Input the preprocessed image into the segmentation model; the segmentation model is a deep learning network based on an encoder-decoder architecture;

[0011] The encoder includes alternately connected residual convolutional blocks and residual Mamba blocks for synchronously extracting local texture features of the image and modeling long-range spatial dependencies.

[0012] Among them, a boundary enhancement module is set between the corresponding layers of the encoder and the decoder to fuse and enhance the features of skip connections in order to optimize the boundary representation.

[0013] The decoder's decoding path integrates a multi-scale gated attention module for adaptively selecting and fusing multi-scale contextual features.

[0014] Step S3: Process the input image using the segmentation model and output a segmentation mask with the same size as the input image.

[0015] Preferably, the processing of the residual Mamba block includes: flattening the input spatial feature map into a feature sequence; converting the feature sequence into two projection sequences using two different linear projection matrices; processing the first projection sequence sequentially with one-dimensional convolution and SiLU activation function, then processing the input state space model to obtain a first output sequence; processing the second projection sequence with SiLU activation function to obtain a second output sequence; performing element-wise multiplication between the first output sequence and the second output sequence, and outputting the final feature sequence through linear projection; and reconstructing the final feature sequence into a two-dimensional spatial feature map.

[0016] Preferably, the processing steps of the multi-scale gated attention module include: passing the input feature map through multiple parallel dilated convolutional layers with different dilation rates to extract contextual features of different receptive fields; concatenating the features output by the branches of the multiple parallel dilated convolutional layers in the channel dimension; performing channel integration and dimensionality reduction on the concatenated features using a 1×1 convolution; performing detail enhancement on the integrated features using a depthwise separable convolution; performing element-wise multiplication of the features output by the depthwise separable convolution with a guiding feature to form a gated response, and adding it to the original input features through a residual path to output the enhanced features.

[0017] Preferably, the boundary enhancement module's processing includes: element-wise addition of skip features from the encoder and features from the same layer of the decoder to obtain fused features; inputting the fused features into two parallel multi-scale convolutional branches, wherein the first branch uses a small-scale convolutional kernel and the second branch uses a large-scale convolutional kernel to capture fine-grained and coarse-scale boundary information respectively; element-wise addition of the output features of the two branches to obtain a fused edge feature map; passing the fused edge feature map sequentially through a channel attention module and a spatial attention module for dual attention enhancement; and element-wise multiplying the output after dual attention enhancement with the fused features through an identity residual path to obtain the final output feature after boundary enhancement.

[0018] Preferably, when training the segmentation model, the loss function used is a weighted joint of Dice loss, cross-entropy loss, and structural similarity loss, and its calculation formula is: L total =λ1*L dice +λ2* L ce +λ3*L ssim Where λ1, λ2, and λ3 are preset weight coefficients. The loss function includes: L dice L ce and L ssim ; among which, L dice : Used to optimize the overlap between the predicted region and the real region; L ceUsed to optimize pixel-level classification accuracy; L ssim These three factors are used to improve the boundary continuity and structural consistency of the segmentation results; they are combined by weighting to form a joint loss function, which comprehensively improves the segmentation performance and robustness of the model.

[0019] A medical image segmentation system, characterized in that it comprises: a segmentation model module; the segmentation model module includes: an encoder submodule, configured to extract local texture features of the image and model long-range spatial dependencies under high resolution conditions through alternately connected residual convolutional blocks and residual Mamba blocks, so as to alleviate misclassification and omission caused by receptive field limitations; a decoder submodule, connected to the encoder submodule, and configured to adaptively select contextual information of different scales in the channel and spatial dimensions through a multi-scale gating attention module integrated therein, so as to highlight key lesion responses and suppress complex backgrounds; and a boundary enhancement module, which is set on the skip connection path between corresponding levels of the encoder submodule and the decoder submodule, for explicitly enhancing contour information in the decoding stage, so as to improve the boundary continuity and morphological consistency of the segmentation results and reduce boundary adhesion and breakage phenomena.

[0020] Preferably, the residual Mamba block is configured to: serialize the spatial feature map, propagate global information through a state-space model, and reconstruct the output into a two-dimensional feature map.

[0021] Preferably, the multi-scale gated attention module is configured to: extract multi-scale features through dilated convolutional layers with different dilation rates set in parallel, and dynamically enhance key features through depth-separable convolution and adaptive gating mechanism.

[0022] Preferably, the boundary enhancement module is configured to fuse encoder features and decoder features on the skip connection path, and optimize the representation of the boundary region through parallel multi-scale convolution and dual attention mechanism.

[0023] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the medical image segmentation method based on residual Mamba and multi-scale boundary enhancement as described above.

[0024] Compared with existing technologies, the medical image segmentation method and system based on residual Mamba and multi-scale boundary enhancement have the following advantages:

[0025] (1) Through the organic integration of three core innovative modules, this invention not only achieves a leapfrog improvement in segmentation accuracy, boundary quality and multi-scale adaptive capability at the technical level, but also takes into account computational efficiency and clinical applicability at the application level. It provides a powerful technical tool for promoting the precision, automation and universality of intelligent medical image analysis, and has broad clinical application prospects and market value.

[0026] (2) This invention overcomes the inherent defects of limited receptive field of CNN and loss of detail of Transformer by co-modeling long-range dependencies and local textures in the encoder through residual Mamba structure. Combined with the synergistic effect of multi-scale gated attention (MGA) and boundary enhancement (BE) modules, it has achieved a breakthrough performance improvement on public benchmark datasets.

[0027] (3) This invention innovatively designs a dedicated boundary enhancement (BE) module, which explicitly enhances contour information through multi-scale convolution and dual attention mechanisms. The boundary segmentation quality is significantly improved, making it more clinically applicable.

[0028] (4) The multi-scale gated attention (MGA) module introduced in this invention can dynamically and adaptively select key contextual information under different receptive fields. This module achieves precise focusing on lesion features with significant scale differences and complex backgrounds through dilated convolution and adaptive gating, effectively suppressing interference from complex backgrounds.

[0029] (5) The residual Mamba block used in this invention has the natural advantage of linear computational complexity in its state-space model (SSM) when processing long sequences, overcoming the quadratic complexity bottleneck of the Transformer self-attention mechanism. It achieves an excellent balance between computational efficiency and performance, making it easy to deploy in practice.

[0030] (6) This invention employs a weighted joint loss function of Dice loss, cross-entropy loss, and structural similarity (SSIM) loss. This combined loss optimizes the model simultaneously from multiple perspectives, including region overlap, pixel classification, and structural similarity, reducing the sensitivity to a single loss and effectively improving the stability of the training process. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the overall network architecture of the automatic medical image segmentation system described in this invention.

[0032] Figure 2 This is a detailed structural diagram of the boundary enhancement module in this invention.

[0033] Figure 3 This is a detailed structural diagram of the multi-scale gating attention module in this invention.

[0034] Figure 4 This is a schematic diagram of the overall architecture and workflow of the medical image segmentation system of the present invention.

[0035] Figure 5 This is a diagram showing the module composition and data flow of the medical image segmentation system of the present invention. Detailed Implementation

[0036] The following is combined with Figures 1 to 5 The present invention will be further described as follows:

[0037] like Figure 1 As shown, the system of this invention adopts an encoder-decoder (U-Net) backbone framework. On the encoder side, this invention innovatively introduces a hybrid design of residual convolutional blocks and residual Mamba blocks, used for extracting local texture features and modeling long-range spatial dependencies, respectively. On the decoder side, spatial resolution is restored through upsampling and skip connections. The key innovation lies in fusing multi-scale gated attention modules (MGA) at each level to adaptively select key features, and embedding boundary enhancement modules (BE) at skip connections to explicitly optimize contour output. This architecture ensures effective coordination between global semantic information and local detail features, ultimately outputting a high-precision segmentation mask.

[0038] like Figure 2 As shown, the boundary enhancement (BE) module receives features from the same-layer decoding and skip connection features, denoted as a, ... i With b i The algorithm then enters two parallel convolutional branches to extract multi-scale boundary information. Each branch employs a bottleneck structure: first, a 1×1 convolution is used for channel compression, followed by main convolutions (3×3 and 7×7 respectively to simultaneously capture fine-grained and coarse-scale contours), and finally, a 1×1 convolution is used to complete channel integration. The outputs of the two branches are added together and then sequentially fed into the channel attention module and the spatial attention module. Element-wise multiplication is used to selectively enhance key channels and key locations, while retaining an identity residual path to multiply with the attention output to stabilize training and suppress background noise. The final result is an output feature c with clearer boundaries and a more continuous structure. i .

[0039] like Figure 3 As shown, the input feature size is C. iThe ×H×W tensor is first divided into four parallel branches, which are then subjected to dilated convolutions with dilation rates of d=1, 2, 5, and 7 to extract contextual information from different receptive fields. The four results are concatenated along the channel dimension and then integrated and reduced in power consumption by 1×1 convolutions. Subsequently, they are fed into depthwise separable convolutions to enhance structural details and suppress background. The resulting multi-scale representation is then multiplied element-wise with a guiding feature generated by the main branch to form a gated response. At the same time, a residual path is retained and element-wise added to the gated output to stabilize training and maintain the baseline representation. The final output is an enhanced feature of size C0×H×W, which is used to highlight key channels and key locations and improve the recognition ability of small targets and complex textures.

[0040] like Figure 4 The diagram illustrates the overall architecture and workflow of the medical image segmentation system of this invention. It employs an encoder-decoder backbone, where the encoder path extracts local texture features and models long-range spatial dependencies of the image simultaneously during layer-by-layer downsampling through alternately connected residual convolutional blocks and residual Mamba blocks. The decoder path gradually restores spatial resolution through upsampling operations and adaptively filters and fuses key contextual features using the integrated multi-scale gated attention (MGA) module. Simultaneously, a dedicated boundary enhancement (BE) module is embedded in the skip connections between the encoder and decoder layers. By fusing the features of the encoder and decoder and explicitly optimizing the boundary representation using multi-scale convolution and dual attention mechanisms, a high-precision segmentation mask with significant improvements in detail, semantic coherence, and boundary accuracy is finally output.

[0041] like Figure 5 As shown, a medical image segmentation system includes a segmentation model module. The segmentation model module comprises: an encoder submodule configured to extract local texture features of the image and model long-range spatial dependencies at high resolution using alternately connected residual convolutional blocks and residual Mamba blocks, thereby mitigating misclassification and omissions caused by receptive field limitations; a decoder submodule connected to the encoder submodule and configured to adaptively select contextual information at different scales in the channel and spatial dimensions using an integrated multi-scale gating attention module, to highlight key lesion responses and suppress complex backgrounds; and a boundary enhancement module located on the skip connection paths between corresponding levels of the encoder and decoder submodules, used to explicitly enhance contour information during the decoding stage to improve the boundary continuity and morphological consistency of the segmentation results, and reduce boundary adhesion and breakage phenomena.

[0042] The residual Mamba block is configured to serialize the spatial feature map, propagate global information through a state-space model, and reconstruct the output into a two-dimensional feature map. The multi-scale gating attention module is configured to extract multi-scale features through dilated convolutional layers with different dilation rates in parallel, and dynamically enhance key features using depthwise separable convolution and an adaptive gating mechanism. The boundary enhancement module is configured to fuse encoder and decoder features along skip connection paths and optimize the representation of boundary regions through parallel multi-scale convolution and a dual attention mechanism.

[0043] Its workflow can be summarized as follows: The input medical image first enters the encoder submodule, where local textures are extracted and long-range dependencies are modeled synchronously through alternating residual convolutional blocks and residual Mamba blocks to gradually condense features; multi-level features are generated during the encoding process. Figure 1 On the one hand, it performs deep abstraction downwards along the main path, and on the other hand, it is horizontally transported to the boundary enhancement module of the corresponding level through a skip path. This module fuses the encoder features with the decoder features of the same layer, and uses parallel multi-scale convolution and dual attention mechanism to explicitly optimize the boundary representation. The decoder submodule receives deep semantic features and boundary-enhanced detailed features, restores the resolution through upsampling, and uses the multi-scale gating attention module to adaptively select and fuse key context information to gradually reconstruct a high-precision segmentation mask with the same size as the input.

[0044] The medical image segmentation method based on residual Mamba and multi-scale boundary enhancement of this invention includes the following steps:

[0045] Step S1: Input preprocessing: Given the original image X, after inputting the feature map, each convolutional residual unit enhances the network's nonlinear representation and feature extraction capabilities through two-dimensional convolution operations, batch normalization (BN), and the Leaky ReLU activation function.

[0046] Where X is the input medical image, with tensor shape of Batch, Channels, Height, Width. Y is the feature map after processing by the convolutional block. This represents the sigmoid activation function. The symbols represent convolution operations (Batch, Channels, Height, Width correspond to B, C, H, W below). BN(·) represents batch normalization, which is used to standardize the distribution of intermediate features to accelerate model training and improve stability.

[0047] Step S2: The input features of the Mamba structure need to be processed in sequence form. Therefore, the spatial features extracted by convolution are flattened along the spatial dimensions and transformed into a form suitable for sequence processing. The feature map output by the residual convolution module is then processed. Flattened along the spatial dimension to a length of Sequence characteristics.

[0048]

[0049] The input Y has a shape of [B, C, H, W]. The Flatten(·) operation flattens the spatial dimensions, followed by the Norm(·) layer normalization operation. S is the output sequence with a shape of [B, L, C], where: B is the batch size; L is the sequence length, usually obtained by flattening the height and width of the original image (L = H × W); and C is the number of channels. It does not change the data content of the tensor, only its view in memory (dimensional arrangement). The Flatten(·) operation reshapes an input tensor to the specified target shape, without changing its data content, only its view in memory (dimensional arrangement). Norm(·) specifically refers to Layer Normalization, a standard and necessary preprocessing step after transforming spatial features into a sequence and before feeding them into Mamba blocks. It is used to normalize the data distribution, ensuring the stability and efficiency of model training.

[0050] Step S3: To further enhance the ability to model long-range spatial dependencies, the Mamba module was used. This was achieved through two different linear projection matrices. , feature sequence Transformed into two different projection representations:

[0051] .

[0052] in, (State projection matrix): It is responsible for generating the feature representation that transforms the input sequence and sends it into the SSM core (state space model) for long-range dependency modeling. The (gated projection matrix) is responsible for generating a feature representation for "gating" or "modulation". S is the output sequence generated in step S2.

[0053] Step S4: Sequence The data is fed into the SSM module through convolutional layers and the SiLU(·) nonlinear activation function. SSM(·) represents the state-space model, a core component for modeling long-range dependencies in sequential data with linear complexity. SiLU(·) represents the Sigmoid linear unit activation function.

[0054] Another sequence Directly processed using the SiLU(·) nonlinear activation function.

[0055] ,

[0056] Through element-wise multiplication Combine the two, then output via linear projection:

[0057]

[0058] Z is a core intermediate variable, a product of the State-Space Model (SSM), carrying long-range spatial dependency information. It is a key input to the dynamic gating mechanism, multiplied by V within the residual Mamba block, and then used to guide attention in the MGA module. It is a linear projection matrix. It is element-wise multiplication.

[0059] Feature sequences obtained via the Mamba module It needs to be restructured into a two-dimensional spatial structure.

[0060] Step S5: Traditional segmentation models often struggle to accurately segment lesions or anatomical structures with significant size variations, complex shapes, or ambiguous boundaries. Multi-scale gated attention (MGA) modules are highly effective at capturing multi-scale contextual information and dynamically enhancing important features.

[0061] Input features The input is fed into the MGA module, where multi-scale features are extracted and multi-scale representations are constructed through dilated convolutions.

[0062] ;

[0063] This represents a dilated convolution with an inflation rate of d. Indicates a splicing operation;

[0064] Step S6: MGA uses depthwise separable convolution to significantly reduce computational cost while retaining the key ability to extract multi-scale spatial details. .

[0065] This represents depthwise separable convolution; F refined This represents the refined boundary features extracted and fused through multi-scale convolution.

[0066] Step S7: MGA introduces an adaptive gating mechanism to dynamically adjust feature importance, with the specific formula as follows: ;F attn This represents refined boundary features;

[0067] This represents the sigmoid activation function;

[0068] Step S8: Given two feature maps and , representing the intermediate features of the encoder and decoder respectively. The boundary enhancement (BE) module first performs element-wise addition to generate fused features with complementary features. . It is the core intermediate feature within the MGA module that aggregates multi-scale contextual information.

[0069] To capture fine-grained edge information at multiple scales, the fused features... Perform two parallel convolution operations:

[0070] ;

[0071] F edge This represents a preliminary edge / boundary feature map obtained by directly extracting and summing the features through multi-scale convolution.

[0072] Step S9: These refined edge feature maps are fused element-wise and enhanced through a dual attention mechanism consisting of channel attention and spatial attention to improve the expressiveness of the boundary regions. .

[0073] This indicates the channel attention mechanism. This represents the spatial attention mechanism.

[0074] Experimental verification:

[0075] Two publicly available medical image datasets were used: a color 2D skin melanoma dataset and a brain tumor MRI dataset. The ISIC dataset contains a total of 5,423 images of skin lesions, covering different sizes, shapes, and colors. Of these, 3,461 images were selected as the training set, and 2,002 images were selected as the test set. The LGG dataset contains MRI slices of 110 gliomas. This dataset contains 1,311 images, of which 1,049 were used for training and 262 were used for testing.

[0076] Evaluation on the ISIC dataset:

[0077] Compared to existing mainstream methods, the proposed method achieves superior performance across all four metrics, fully demonstrating its comprehensive advantages in image perception accuracy, boundary recognition capability, and global consistency modeling. Our method achieves a Dice coefficient of 93.57%, significantly outperforming representative Transformer fusion models such as TransUnet, UCTransNet, and ScaleFormer. This improvement indicates that the proposed residual Mamba structure not only models details like a convolutional network but also efficiently captures global contextual relationships in images. Similarly, the proposed method surpasses all comparable methods in accuracy, demonstrating high reliability in pixel-level classification. By introducing a multi-scale gated attention mechanism, the network effectively aggregates feature representations from different receptive fields, focusing on complex or blurred-boundary lesion regions while suppressing background interference. In terms of sensitivity, the proposed method achieves 98.21%, outperforming TransUnet's 97.52% and significantly surpassing SwinUnet's 96.30% and MTUNet's 96.01%. High sensitivity means the model can capture lesion areas more fully, especially in identifying early lesions with blurred boundaries, small areas, or irregular shapes, demonstrating stronger perceptual ability. This is thanks to the dual enhancement mechanism formed by the residual Mamba structure and the MGA module at both the sequence and spatial levels. Our method achieves a specificity of 98.84%, significantly higher than the current state-of-the-art results, indicating that the model has stronger discriminative ability when excluding non-lesion areas. The boundary enhancement module proposed in this invention refines the modeling of blurred and jagged boundaries through multi-scale convolution and channel spatial attention mechanisms, effectively reducing false positive responses and improving the accuracy and completeness of segmentation boundaries.

[0078] Evaluation on the LGG dataset:

[0079] The method of this invention achieves state-of-the-art results in terms of Dice coefficient, accuracy, sensitivity, and specificity, validating its accuracy, stability, and generalization ability in complex structural lesion scenarios. The Dice coefficient of this method reaches 93.87%, surpassing UCTransNet's 93.68%, UNet++'s 93.54%, and MTUNet's 93.41%. This improvement is mainly attributed to the effective modeling of long-range spatial dependencies by the R-Mamba structure, combined with residual convolution to enhance local detail extraction, enabling the model to maintain contextual consistency while possessing clear boundary representation capabilities. In terms of sensitivity, the result of this invention is 95.69%, 1.19% higher than TransUnet. This numerical difference fully reflects the model's stronger coverage of lesion regions and lower false negative rate, making it particularly suitable for handling small tumor regions with blurred boundaries in the LGG dataset. The MGA module, through multi-scale feature fusion and dynamic gating adjustment, effectively enhances the model's focus on key regions, improving the comprehensiveness of detection. The specificity is 98.93%, which is superior to MTUNet's 98.84%, Transception's 98.89%, and ScaleFormer's 97.89%. The boundary enhancement module significantly reduces the probability of normal tissue being misidentified as lesions. By introducing a dual attention mechanism at both the channel and spatial levels, the model enhances its ability to distinguish boundaries during feature fusion and reduces spurious activations in background regions.

[0080] In summary, this invention constructs an innovative segmentation framework based on an encoder-decoder architecture. Through the synergistic integration of three core technology modules, it achieves high-precision segmentation of medical images, significantly improves the accuracy of automated diagnosis, and provides strong technical support for intelligent analysis and diagnostic assistance of medical images.

[0081] Experimental Conditions and Testing Environment: All experiments in this invention were conducted using the PyTorch deep learning framework on an Ubuntu 18.04 operating system. A Tesla V100 GPU with 32GB of memory was used for acceleration during network training. The total number of training iterations was set to 2000, and the batch size was 8. To ensure the consistency of input data, all images were uniformly adjusted to a resolution of 256 × 256 before being input into the network. We chose the Adam optimizer to update the model parameters, with an initial learning rate set to 0.0001. In the weighted combination of the loss function, we set... , and .

[0082] Application Scenarios: To address the challenges of complex anatomical structures, blurred lesion boundaries, and lesions of varying scales commonly encountered in sensor-acquired images, this invention proposes a method that integrates a residual Mamba backbone network, a multi-scale gated attention (MGA) module, and a boundary enhancement (BE) module. This framework achieves accurate segmentation while reducing computational complexity, making it suitable for deployment in real-time and resource-constrained edge environments.

[0083] Integration and expansion with other technologies: To further verify the feasibility of model deployment, this invention can be integrated into the constructed Internet of Things Medical Platform (IoMT), realizing the entire closed-loop process of image acquisition, network transmission, intelligent analysis and result feedback, and promoting the intelligent upgrade of medical care.

[0084] Data Privacy and Compliance: The data used in this invention is a publicly available benchmark dataset, anonymized by the publishing organization, and complies with relevant medical data privacy protection regulations and ethical requirements. The system design strictly adheres to data security management standards to ensure that clinical data is used only for model training and validation, preventing any form of leakage of sensitive information.

[0085] Future development directions: Further optimize the model's lightweight characteristics and energy efficiency, explore its compatibility with real-time data streams and transmission protocols in IoT scenarios, and extend it to multimodal and longitudinal medical image segmentation tasks in real clinical environments.

[0086] In summary, this invention is not only innovative and advanced in its technical implementation, but also demonstrates high practical value and development potential in clinical applications, system expansion, and data compliance, laying a solid foundation for promoting the development of the field of intelligent medical imaging diagnosis.

[0087] The present invention has been described above by way of example with reference to the accompanying drawings. Obviously, the implementation of the present invention is not limited to the above-described manner. Any improvements made using the inventive concept and technical solution of the present invention, or the direct application of the inventive concept and technical solution of the present invention to other occasions without modification, are all within the protection scope of the present invention.

Claims

1. A medical image segmentation method based on residual Mamba and multi-scale boundary enhancement, characterized in that, The method comprises the following steps: Step S1: obtaining a medical image to be segmented and performing standardization preprocessing; Step S2: inputting the preprocessed image into a segmentation model; the segmentation model is a deep learning network based on an encoder-decoder architecture; The encoder comprises alternately connected residual convolution blocks and residual Mamba blocks, which are used to synchronously extract local texture features of the image and model long-range spatial dependencies; A boundary enhancement module is arranged between corresponding levels of the encoder and the decoder, which is used to fuse and enhance the features of the skip connection to optimize the boundary representation; In the decoding path of the decoder, a multi-scale gated attention module is integrated, which is used to adaptively select and fuse multi-scale context features; Step S3: processing the input image by using the segmentation model to output a segmentation mask with the same size as the input image.

2. The medical image segmentation method based on residual Mamba and multi-scale boundary enhancement according to claim 1, characterized in that: The processing process of the residual Mamba block comprises: The input spatial feature map is flattened into a feature sequence; The feature sequence is converted into two projection sequences through two different linear projection matrices; After the first projection sequence is sequentially subjected to one-dimensional convolution and SiLU activation function processing, the first output sequence is obtained by inputting the state space model for processing; The second projection sequence is subjected to SiLU activation function processing to obtain the second output sequence; The first output sequence and the second output sequence are element-wise multiplied, and the final feature sequence is output through linear projection; The final feature sequence is reconstructed into a two-dimensional spatial feature map.

3. The medical image segmentation method based on residual Mamba and multi-scale boundary enhancement according to claim 1, characterized in that: The processing process of the multi-scale gated attention module comprises: The input feature map is subjected to a plurality of parallel and different hole rates of the hole convolution layer to extract context features of different receptive fields; The features output by the plurality of parallel hole convolution layer branches are spliced in the channel dimension; The spliced features are subjected to channel integration and dimension reduction using a 1x1 convolution; The integrated features are subjected to detail enhancement using a depth separable convolution; The features output by the depth separable convolution are element-wise multiplied with a guide feature to form a gating response, and are added to the original input feature through a residual path to output enhanced features.

4. The medical image segmentation method based on residual Mamba and multi-scale boundary enhancement according to claim 1, characterized in that: The processing process of the boundary enhancement module comprises: The skip features from the encoder and the same layer features from the decoder are element-wise added to obtain fused features; The fused features are input into two parallel multi-scale convolution branches, wherein a small-scale convolution kernel is used in the first branch and a large-scale convolution kernel is used in the second branch to capture fine-grained and coarse-scale boundary information, respectively; The output features of the two branches are element-wise added to obtain a fused edge feature map; the fused edge feature map is sequentially subjected to double attention enhancement through a channel attention module and a spatial attention module; The output subjected to double attention enhancement is element-wise multiplied with the fused features through an identity residual path to obtain the final output features after boundary enhancement.

5. The medical image segmentation method based on residual Mamba and multi-scale boundary enhancement according to claim 1, characterized in that: In training the segmentation model, a loss function adopted is a weighted combination of Dice loss, cross-entropy loss and structural similarity loss, and a calculation formula thereof is: L total =λ1*L dice +λ2* L ce +λ3*L ssim ; wherein λ1, λ2 and λ3 are preset weight coefficients. The loss function comprises: L dice , L ce , and L ssim ; wherein, L dice is used for optimizing the overlap degree of the predicted region and the real region; L ce is used for optimizing the pixel-level classification accuracy; L ssim is used for improving the boundary continuity and structure consistency of the segmentation result; and the three are combined through weighting to form a joint loss function, so as to comprehensively improve the segmentation performance and robustness of the model.

6. A medical image segmentation system for performing the method of medical image segmentation based on residual Mamba and multi-scale boundary enhancement according to any one of claims 1-5, characterized in that, It comprises: a segmentation model module; The segmentation model module comprises: The encoder submodule is configured to extract local texture features and model long-range spatial dependencies of the image under high-resolution conditions through alternately connected residual convolution blocks and residual Mamba blocks, so as to relieve misclassification and missed classification caused by the receptive field limitation. The decoder submodule is connected with the encoder submodule and is configured to adaptively select context information of different scales in the channel and spatial dimensions through a multi-scale gated attention module integrated therein, so as to highlight key lesion responses and suppress complex backgrounds. The boundary enhancement module is arranged on a skip connection path between corresponding levels of the encoder submodule and the decoder submodule, and is configured to explicitly enhance contour information in the decoding stage, so as to improve the boundary continuity and morphological consistency of the segmentation result, and reduce the boundary adhesion and fracture phenomenon.

7. The medical image segmentation system of claim 6, wherein: The residual Mamba block is configured to sequence the spatial feature map, propagate global information through a state space model, and reconstruct the output into a two-dimensional feature map.

8. The medical image segmentation system of claim 6, wherein: The multi-scale gated attention module is configured to extract multi-scale features through parallelly arranged convolution layers with different hole rates, and dynamically enhance key features through depth separable convolution and an adaptive gating mechanism.

9. The medical image segmentation system of claim 6, wherein: The boundary enhancement module is configured to fuse the encoder features and the decoder features on the skip connection path, and optimize the representation of the boundary region through parallel multi-scale convolution and a double attention mechanism.

10. A computer readable storage medium having stored thereon a computer program, characterized in that: When the program is executed by the processor, the medical image segmentation method based on residual Mamba and multi-scale boundary enhancement as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • IG-MambaUNet image segmentation model, model training method and application method thereof

    CN120088787A

  • Ophthalmic atrophy arc image segmentation method based on full supervision

    CN120599258A

  • Medical image segmentation method based on contextual information and multi-scale feature fusion

    CN120746945A

  • Medical image fuzzy boundary segmentation method based on edge perception Mama network

    CN120747143A

Cited By

  • Cerebrovascular segmentation method and device based on physical guidance and pyramid vision Transform

    CN121746409A

  • Cerebral vessel segmentation method and device based on physical guidance and pyramid vision transformer

    CN121746409B

  • Medical image segmentation method, system and equipment based on multi-attention and multi-scale fusion

    CN121810693A

  • A medical image segmentation method, system, and device based on multi-attention and multi-scale fusion

    CN121810693B

  • Medical image segmentation method based on boundary perception multi-scale fusion network

    CN121937731A