Medical image segmentation algorithm and system based on Mama and storage medium

By improving the downsampling and skip connections of the Mamba architecture and combining the MCAM and COC modules, the problem of insufficient feature fusion in existing medical image segmentation methods is solved, and efficient and accurate medical image segmentation is achieved.

CN120635115APending Publication Date: 2025-09-12WUHAN UNIV OF SCI & TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510752032.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-12

Smart Images

  • Figure CN120635115A_ABST
    Figure CN120635115A_ABST
Patent Text Reader

Abstract

The invention discloses a medical image segmentation algorithm and system based on Mama, and a storage medium. The method comprises the following steps: processing medical image features through a multi-path convolution attention mixer MCAM; the VSS Block captures global information through a state space model to enhance the coding capability; the COC module extracts features through channel projection, vertical offset and horizontal offset; the up-sampling features and the features output by the MCAM are fused, the resolution of the image is gradually recovered through inverse operation, and the number of channels is adjusted to the proportion required by the segmentation task; inputting the feature maps after multiple complete coding and down-sampling into an up-sampling and visual state space module, and decoding the feature maps together with the corresponding feature maps of multiple coding cross offset connection operations; medical image segmentation is carried out, and key anatomical features and subtle pathological changes are accurately distinguished. By improving downsampling and U-Net jump connection based on Mama, the feature extraction capability and the capability of capturing complex semantic information are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image segmentation, and in particular to a medical image segmentation algorithm, system and storage medium based on Mamba. Background Art

[0002] Medical image segmentation is crucial for disease detection and tracking, auxiliary diagnosis, preoperative planning, and postoperative evaluation. Traditional image segmentation methods rely heavily on manual annotation, resulting in low efficiency and requiring high levels of expertise from the annotators, limiting their widespread adoption in large-scale clinical applications. In recent years, with the advancement of deep learning technology, automated image segmentation methods have become mainstream, significantly improving segmentation efficiency and accuracy. The U-Net model, proposed in 2015, has been widely used in medical image segmentation due to its encoder-decoder structure and skip connection mechanism, which effectively integrates multi-scale features. Various improvements based on the U-Net architecture have become a current research hotspot, primarily by introducing feature enhancement modules to improve model performance. These enhancement modules can be broadly categorized into two types: hybrid models that fuse convolutional neural networks (CNNs) with the Transformer architecture, and novel architectures based on the Mamba framework.

[0003] While U-Net and its variants have achieved good performance in medical image segmentation, they still suffer from insufficient feature fusion and loss of detailed information when processing images with complex structures or high edge details. To alleviate these issues, some research has introduced the Transformer architecture. For example, the Vision Transformer (ViT) demonstrates advantages in modeling long-range dependencies in images, effectively expanding the model's receptive field. However, the Transformer architecture is typically associated with high computational complexity and resource consumption, making it unsuitable for deployment in resource-constrained medical scenarios.

[0004] The recently proposed Mamba architecture, based on a one-dimensional state-space model, captures global image information from multiple directions through a cross-scanning approach. This approach boasts linear complexity and improves modeling efficiency for high-resolution images. However, due to its core one-dimensional sequence modeling approach, it still has limitations in modeling spatial structure and contextual relationships in two-dimensional images. This can lead to incomplete feature representation, particularly when processing medical images with complex textures or fine structures, thus affecting segmentation accuracy. Summary of the Invention

[0005] The purpose of the present invention is to address the problem that current existing medical image segmentation methods fail to fully integrate multi-scale features and global information for local information when processing complex medical images, resulting in insufficient feature extraction capability, loss of detail information, and low computational efficiency. The present invention provides a Mamba-based medical image segmentation algorithm, system, and storage medium. By improving downsampling and Mamba-based U-Net skip connections, the feature extraction capability and the ability to capture complex semantic information are enhanced.

[0006] The technical solutions of the present invention are as follows: A medical image segmentation algorithm based on Mamba includes the following steps: Perform preprocessing operations on the input medical image; In the encoding stage, the input feature map of the medical image is changed and progressively encoded through the encoder; the medical image features are processed through the multi-path convolutional attention mixer (MCAM), and the features of multiple paths are processed in parallel by MCAM to enhance the feature representation; Set up a visual state space module VSS Block, which captures global information through the state space model to enhance encoding capabilities; In the skip connection, a cross-offset connection module COC is set. The COC module extracts features through channel projection, vertical offset and horizontal offset; In the decoding stage, the upsampled features are fused with the features output by MCAM, and the image resolution is gradually restored through inverse operations, and the number of channels is adjusted to the ratio required by the segmentation task; Loop operation: The feature maps after multiple complete encoding and downsampling are input to the upsampling and visual state space modules, and decoded together with the feature maps of the corresponding multiple encoding cross-offset connection operations; each encoding and decoding is skipped through the COC module; Perform medical image segmentation to accurately distinguish key anatomical features from subtle pathological changes.

[0007] Through the above method, feature information from multiple paths is integrated in parallel during the downsampling phase. Deep convolutional layers and max pooling layers are used to extract local and global features of the image, respectively, while attention layers enhance the expressiveness of features through channel attention and spatial attention. A cross-offset mechanism is implemented to enhance skip connections, which enrich feature information through channel projection, normalization, and activation functions, and perform cross-offset operations in both horizontal and vertical directions, ultimately achieving high-precision medical image segmentation.

[0008] Furthermore, the encoding stage specifically includes the following steps: When inputting the encoder, the input medical image data features are embedded through Patch Embedding The mapping transformation is Dimension, where 、 、 Represent the height, width and number of channels of the feature map respectively, and are progressively encoded through a four-layer encoder; Each downsampling block reduces the resolution by half while doubling the number of channels, resulting in a size of , feature maps until the bottleneck layer; After downsampling in the encoder, the feature map is input into the multi-path composite attention mixer MCAM for deep feature encoding to capture multi-level and multi-scale information; MCAM converts the size of The feature map is divided into three parts along the channel dimension: 、 and Channel, channel segmentation formula is: , in, Indicates that the feature map Split along the channel dimension into 、 and ,in The size is , and The size is ; Feature map After maximum pooling and average pooling, two sizes are generated. The mask is linearly projected, summed, and activated using the Sigmoid function to generate the final channel attention mask: , Among them, CAM represents the channel attention mask, represents the Sigmoid activation function, represents a linear layer; Perform average pooling, the formula is as follows: , in, Represents the average response intensity of each spatial position in all channels, reflecting the importance of global space; Perform max pooling: , in, Represents the most significant feature response at each spatial position, highlighting the local key areas; Concatenate the mean and maximum values ​​and generate a spatial attention mask through convolution and Sigmoid function: , Among them, Cat represents tensor concatenation along a specific dimension, and Conv1 is a 1×1 convolutional layer.

[0009] Furthermore, the and The processing is done through the pooling layer and the depth convolution layer respectively. The processing formula is as follows: , , Among them, GELU refers to the activation function, It is a grouped convolution, the number of groups is equal to the number of output channels, using a 3×3 convolution kernel, and MaxPool is the maximum pooling operation. It is a 1×1 convolutional layer; The processed output is concatenated along the channel dimension: , in, Represents the stitched image.

[0010] This division allows each group to be processed differently based on specific feature attributes, thereby enhancing the flexibility of the model and the richness of feature representation. The attention mechanism increases the model's sensitivity to key features by assigning greater weights to the most informative regions in the image. Pooling and linear layers reduce spatial dimensions and capture a wider range of contextual information, while deep convolutional layers retain local details, making it effective for complex textures and structures. The attention mechanism applies channel attention and spatial attention sequentially, which can selectively emphasize informative regional features by assigning higher weights to clinically significant regions.

[0011] Through these methods, MCAM integrates local and global information, effectively balancing attention bias and improving the accuracy of feature detection, such as identifying organ or lesion boundaries. MCAM's parallel processing of different channels reduces parameters and floating-point operations (FLOPs), significantly improving efficiency and computational speed compared to traditional CNN and Transformer hybrid architectures.

[0012] Furthermore, the setting of the visual state space module VSS Block specifically includes the following steps: The processed features are added and passed to the VSS Block for modeling long-distance dependencies; the input features are three-dimensional tensors , VSS Block rearranges the two-dimensional feature map into a one-dimensional sequence to meet the one-dimensional input requirements of state space modeling, that is, for ; This process can also be modeled separately in row or column directions. In actual implementation, a cross-scanning strategy can be used to enhance the spatial structure modeling capability; One-dimensional state space modeling models the image sequence as a one-dimensional state space system: , , in, yes dimensional input sequence at time steps Features, is the hidden state, yes The output of dimension, 、 、 is the learnable state transfer matrix and projection matrix; the model can be efficiently implemented in the form of convolution, that is, the state space response function Perform a one-dimensional convolution with the input sequence: , in, represents a one-dimensional convolution operation, is the state space response kernel; Then, spatial rearrangement and residual connection are performed to transform the one-dimensional sequence output dimension into of Rearrange back to 2D image form , whose dimensions are ; And combined with residual connection and feed-forward module FFN to further enhance the model's expressiveness: .

[0013] Furthermore, the setting of the cross offset connection module COC specifically includes the following steps: The COC module divides the VSS Block output into two parts and ,in For subsequent offset operations, Directly retained for final feature concatenation: , in, Indicates that the feature map Split along the channel dimension into and ; The feature map after segmentation Perform channel projection operation, channel projection is performed through and The CO block processing of the convolution kernel maps the feature map to the new space to form the feature map and , the purpose is to provide a more flexible feature representation for subsequent offset operations: , , in, is normalized, and Respectively indicate the sizes and The convolution kernel.

[0014] Furthermore, the setting of the cross offset connection module COC further includes the following steps: The feature map after channel projection and Perform element-wise addition and add it to the original feature map Perform residual connection to form an intermediate feature map : , For the intermediate feature map Perform group normalization processing and enhance its feature representation ability through multi-layer perceptron MLP. The processing results are similar to Add to get the feature map : , in, It is a multi-layer perceptron; Feature Map With the directly retained feature map Perform feature concatenation in the channel dimension to form the final output feature map : , .

[0015] Through the above methods, the interaction of features in two directions is promoted, the model's attention to the central area is enhanced, the model's ability to capture rich semantic information is improved, and potential bias is reduced.

[0016] Furthermore, the preprocessing operations include image normalization, cropping and resolution adjustment.

[0017] Furthermore, the medical image uses ACDC data, the ACDC data set is used for cardiac MRI segmentation, the ACDC data set includes 100 samples, and the evaluation index is to evaluate DSC.

[0018] This application also includes a medical image segmentation system based on Mamba, including: Data processing module: pre-processing the input medical images; Encoding module: changes the input feature map of the medical image and performs progressive encoding through the encoder; processes the medical image features through the multi-path convolutional attention mixer (MCAM), and enhances the feature representation by processing the features of multiple paths in parallel through MCAM; Visual State Space Block: Set up the Visual State Space Block (VSS Block). The VSS Block enhances encoding capabilities by capturing global information through a state space model. Cross-offset connection operation module: Set the cross-offset connection module COC, which extracts features through channel projection, vertical offset and horizontal offset; Decoding module: fuses the upsampled features with the features output by MCAM, and gradually restores the image resolution through inverse operations; Loop operation module: The features output from the encoding stage are passed through the encoding stage multiple times, and then input into the decoding stage for multiple cycles; each time the encoding and decoding are connected by a jump connection through the COC module.

[0019] The present application also includes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, steps in a Mamba-based medical image segmentation algorithm are implemented.

[0020] The present application also includes a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in a Mamba-based medical image segmentation algorithm are implemented.

[0021] Compared with the existing technology, the beneficial effects of the present invention are: A Mamba-based medical image segmentation algorithm, system, and storage medium enhance the model's ability to manage multi-scale features and fuse them by integrating a multi-path convolutional attention mixer (MCAM) and a cross-offset connection (COC) module. During the downsampling phase, MCAM combines channel attention, spatial attention, depthwise convolution, and the original feature map in parallel. This method significantly benefits clinical segmentation tasks by accurately distinguishing key anatomical features from subtle pathological changes. This method addresses the potential problem of downsampling and upsampling operations in traditional U-Net architectures, which can exacerbate the loss of fine details and thus undermine segmentation accuracy. During the downsampling phase, multi-level and multi-scale information from deep convolution, attention mechanisms, and max pooling are integrated in parallel, enhancing feature representation. A cross-offset mechanism is introduced within the traditional UNet's skip connections, offsetting features horizontally and vertically to better capture complex semantic information. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is the algorithm architecture diagram of this application.

[0023] Figure 2 This is a flowchart of the detailed steps of the algorithm of this application. DETAILED DESCRIPTION

[0024] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0025] The features and performance of the present invention are further described in detail below with reference to the embodiments.

[0026] See also Figure 1 and Figure 2 ,A medical image segmentation algorithm based on Mamba adopts a U-shaped design to effectively integrate multi-scale features to achieve accurate segmentation of medical images, including the following steps: Data Processing: A public dataset was obtained from a medical image database. In this specific example, the ACDC dataset was used. This dataset, used for cardiac MRI segmentation, contains 100 samples, and the evaluation metric is mean DSC. The medical images in the ACDC database were preprocessed, including image normalization, cropping, and resolution adjustment, to ensure uniformity and consistency of the input data.

[0027] Encoding stage: Path Embedding is used to transform the input feature map of the medical image, and progressive encoding is performed through a four-layer encoder, so that each downsampling block reduces the resolution by half while doubling the number of channels until the bottleneck layer. The medical image features are processed through a multi-path convolutional attention mixer (MCAM), and the MCAM processes the features of multiple paths in parallel to enhance the feature representation. The coding phase specifically includes the following steps: When inputting the encoder, the input medical image data features are embedded through Patch Embedding The mapping transformation is Dimension, where 、 、 Represent the height, width and number of channels of the feature map respectively, and are progressively encoded through a four-layer encoder; Each downsampling block reduces the resolution by half while doubling the number of channels, resulting in a size of , feature maps until the bottleneck layer; After downsampling in the encoder, the feature map is input into the multi-path composite attention mixer MCAM for deep feature encoding to capture multi-level and multi-scale information; MCAM converts the size of The feature map is divided into three parts along the channel dimension: 、 and Channel, channel segmentation formula is: , in, Indicates that the feature map Split along the channel dimension into 、 and ,in The size is , and The size is ; Feature map After maximum pooling and average pooling, two sizes are generated. The mask is linearly projected, summed, and activated using the Sigmoid function to generate the final channel attention mask: , Among them, CAM represents the channel attention mask, represents the Sigmoid activation function, represents a linear layer; Perform average pooling, the formula is as follows: , in, Represents the average response intensity of each spatial position in all channels, reflecting the importance of global space; Perform max pooling: , in, Represents the most significant feature response at each spatial position, highlighting the local key areas; Concatenate the mean and maximum values ​​and generate a spatial attention mask through convolution and Sigmoid function: , Among them, Cat represents tensor concatenation along a specific dimension, and Conv1 is a 1×1 convolutional layer.

[0028] and The processing is done through the pooling layer and the depth convolution layer respectively. The processing formula is as follows: , , Among them, GELU refers to the activation function, It is a grouped convolution, the number of groups is equal to the number of output channels, using a 3×3 convolution kernel, and MaxPool is the maximum pooling operation. It is a 1×1 convolutional layer; The processed output is concatenated along the channel dimension: , in, Represents the concatenated image. This division allows each group to perform different processing based on specific feature attributes, thereby enhancing the model's flexibility and the richness of feature representation. The attention mechanism increases the model's sensitivity to key features by assigning greater weight to the most informative regions in the image. Pooling and linear layers reduce spatial dimensionality and capture a wider range of contextual information, while deep convolutional layers preserve local details, making it effective for complex textures and structures. The attention mechanism sequentially applies channel-wise and spatial-wise attention, selectively emphasizing informative regional features by assigning higher weights to clinically significant regions, such as the fine anatomical structures in a central MRI image. Through this process, MCAM integrates local and global information, effectively balancing attentional bias and improving the accuracy of feature detection, such as identifying organ or lesion boundaries. MCAM's parallel processing of different channels reduces parameters and floating-point operations (FLOPs), significantly improving efficiency and computational speed compared to traditional CNN and Transformer hybrid architectures.

[0029] This approach preserves the specific contribution of each processing path, achieving richer and more expressive feature representations compared to summation or averaging methods, which can dilute individual features. The attention mechanism improves sensitivity to key features by assigning higher weights to informative regions. Pooling and linear layers capture broad contextual information, while deep convolutional layers preserve local details, benefiting from this. The attention mechanism improves sensitivity to key features by assigning higher weights to informative regions. Pooling and linear layers capture broad contextual information, while deep convolutional layers preserve local details, facilitating the processing of complex textures and structures. This approach combines local and global information to improve the efficiency and accuracy of feature detection.

[0030] Visual State Space Module: Set up the Visual State Space Module (VSS Block) to model long-distance dependencies. The VSS Block captures global information through the state space model (SSM) and enhances encoding capabilities. This module adopts the linear state space modeling paradigm and combines the two-dimensional structural characteristics of the image to achieve the ability to efficiently model long-distance contextual dependencies while maintaining linear complexity.

[0031] Setting up the Visual State Space Module (VSS Block) involves the following steps: The features processed by the encoding stage and the visual state space module are added and passed to the VSS Block for modeling long-distance dependencies; the input feature is a three-dimensional tensor , VSS Block rearranges the two-dimensional feature map into a one-dimensional sequence to meet the one-dimensional input requirements of state space modeling, that is, for ; This process can also be modeled separately in the row or column direction. In actual implementation, a cross-scanning strategy can be used to enhance the spatial structure modeling capability.

[0032] One-dimensional state space modeling models the image sequence as a one-dimensional state space system: , , in, yes dimensional input sequence at time steps Features, is the hidden state, yes The output of dimension, 、 、 is the learnable state transfer matrix and projection matrix; the model can be efficiently implemented in the form of convolution, that is, the state space response function Perform a one-dimensional convolution with the input sequence: , in, represents a one-dimensional convolution operation, is the state-space response kernel (usually predefined as an exponential decay form or a learned low-rank matrix form); Then, spatial rearrangement and residual connection are performed to transform the one-dimensional sequence output dimension into of Rearrange back to 2D image form , whose dimensions are ; And combined with residual connection and feed-forward module FFN to further enhance the model's expressiveness: .

[0033] Cross-Offset Connection Operation Module: Within the skip connection, a cross-offset connection module (COC) is implemented. The COC module extracts features through channel projection, vertical offset, and horizontal offset. This module integrates spatial context through channel projection and spatial shift, enhancing the feature representation during the skip connection. These spatial variations explicitly encode positional relationships, enabling the model to better capture subtle changes in structural alignment and positioning. Compared to traditional methods (such as simple addition or concatenation without shifting), this method significantly enhances the model's ability to accurately depict the fine structural details necessary for accurate segmentation. This method reduces translation invariance and increases sensitivity to positional information.

[0034] Setting up the cross offset connection module COC specifically includes the following steps: The COC module divides the VSS Block output into two parts and ,in For subsequent offset operations, Directly retained for final feature concatenation: , in, Indicates that the feature map Split along the channel dimension into and ; The feature map after segmentation Perform channel projection operation, channel projection is performed through and The CO block processing of the convolution kernel maps the feature map to the new space to form the feature map and , the purpose is to provide a more flexible feature representation for subsequent offset operations: , , in, is normalized, and Respectively indicate the sizes and The convolution kernel.

[0035] Setting up the cross offset connection module COC also includes the following steps: The feature map after channel projection and Perform element-wise addition and add it to the original feature map Perform residual connection to form an intermediate feature map : , For the intermediate feature map Perform group normalization processing and enhance its feature representation ability through multi-layer perceptron MLP. The processing results are similar to Add to get the feature map : , in, It is a multi-layer perceptron; Feature Map With the directly retained feature map Perform feature concatenation in the channel dimension to form the final output feature map : , .

[0036] During the decoding phase, the upsampled features are fused with the features output by the MCAM. The image resolution is gradually restored through inverse operations, and the number of channels is adjusted to the ratio required for the segmentation task. To emphasize key features, cross-offset connections are integrated into skip connections, effectively merging information from different layers and enriching semantic details. This significantly improves segmentation accuracy and efficiency. The decoder gradually upsamples the feature maps to the original image resolution, and the final output layer adjusts the number of channels to the ratio required for the segmentation task.

[0037] Loop operation: The feature maps after multiple complete encoding and downsampling are input to the upsampling and visual state space modules, and decoded together with the feature maps of the corresponding multiple encoding cross-offset connection operations; each encoding and decoding is skipped through the COC module; Perform medical image segmentation to accurately distinguish key anatomical features from subtle pathological changes.

[0038] This application also includes a medical image segmentation system based on Mamba, including: Data processing module: pre-processing the input medical images; Encoding module: changes the input feature map of the medical image and performs progressive encoding through the encoder; processes the medical image features through the multi-path convolutional attention mixer (MCAM), and enhances the feature representation by processing the features of multiple paths in parallel through MCAM; Visual State Space Block: Set up the Visual State Space Block (VSS Block). The VSS Block enhances encoding capabilities by capturing global information through a state space model. Cross-offset connection operation module: Set the cross-offset connection module COC, which extracts features through channel projection, vertical offset and horizontal offset; Decoding module: fuses the upsampled features with the features output by MCAM, and gradually restores the image resolution through inverse operations; Circular operation module: The features output from the encoding stage are passed through the encoding stage multiple times, and then input into the decoding stage for multiple cycles; each encoding and decoding is connected by a jump connection through the COC module. More specifically: the initial sampled image features in the medical image are input into the encoding stage and VSS Block, and then downsampled, which is regarded as a complete encoding module. The output features are further input into the encoding stage, and the encoding module is run n times in sequence. The output of the n complete encoding modules is input as features into the decoding stage. The decoding stage includes upsampling and VSS Block and performs n rounds of decoding in a one-to-one correspondence with the encoding stage. Among them, between each encoding and decoding, the features obtained through MCAM in the encoding stage are fused with the downsampled features and input into the COC module, and a jump connection is made with the upsampled features in the decoding stage.

[0039] The present application also includes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, steps in a Mamba-based medical image segmentation algorithm are implemented.

[0040] The present application also includes a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in a Mamba-based medical image segmentation algorithm are implemented.

[0041] In the embodiment, the model is implemented in Python using PyTorch on an NVIDIA RTX 4090 GPU and trained using the AdamW optimizer (batch size 24, weight decay 0.01, learning rate 0.001) to prevent overfitting and enhance generalization.

[0042] The model provided by the present invention was trained on the ACDC dataset. The ACDC dataset, used for cardiac MRI segmentation, contains 100 samples. These samples were divided into training, validation, and test sets, with a 70%, 10%, and 20% split, respectively. The evaluation metric used for this dataset was mean DSC. The performance evaluation metrics and prediction results of the generated model in this set of experiments are shown in Table 1.

[0043] Table 1

[0044] As can be seen from the results in Table 1, the medical image segmentation algorithm based on Mamba's multi-path convolution and cross-offset connection provided in this application can achieve leading performance and show significant advantages in ensuring segmentation consistency and accuracy, especially in processing complex areas in images with higher accuracy.

[0045] The above-described embodiments merely represent specific implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of protection of the present application. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the technical concept of the present application, and all such variations and improvements fall within the scope of protection of the present application.

Claims

1. A medical image segmentation algorithm based on Mamba, characterized in that: The following steps are involved: Perform preprocessing operations on the input medical image; In the encoding stage, the input feature map of the medical image is changed and progressively encoded through the encoder; the medical image features are processed through the multi-path convolutional attention mixer (MCAM), and the features of multiple paths are processed in parallel by MCAM to enhance the feature representation; Set up a visual state space module VSS Block, which captures global information through the state space model to enhance encoding capabilities; In the skip connection, a cross-offset connection module COC is set. The COC module extracts features through channel projection, vertical offset and horizontal offset; In the decoding stage, the upsampled features are fused with the features output by MCAM, and the image resolution is gradually restored through inverse operations, and the number of channels is adjusted to the ratio required by the segmentation task; Loop operation: The feature maps after multiple complete encoding and downsampling are input to the upsampling and visual state space modules, and decoded together with the feature maps of the corresponding multiple encoding cross-offset connection operations; each encoding and decoding is skipped through the COC module; Perform medical image segmentation to accurately distinguish key anatomical features from subtle pathological changes.

2. A medical image segmentation algorithm based on Mamba according to claim 1, characterized in that: The encoding stage specifically includes the following steps: When inputting the encoder, the input medical image data features are embedded through Patch Embedding The mapping transformation is Dimension, where 、 、 Represent the height, width and number of channels of the feature map respectively, and are progressively encoded through a four-layer encoder; Each downsampling block reduces the resolution by half while doubling the number of channels, resulting in a size of , feature maps until the bottleneck layer; After downsampling in the encoder, the feature map is input into the multi-path composite attention mixer MCAM for deep feature encoding to capture multi-level and multi-scale information; MCAM converts the size of The feature map is divided into three parts along the channel dimension: 、 and Channel, channel segmentation formula is: , in, Indicates that the feature map Split along the channel dimension into 、 and ,in The size is , and The size is ; Feature map After maximum pooling and average pooling, two sizes are generated. The mask is linearly projected, summed, and activated using the Sigmoid function to generate the final channel attention mask: , Among them, CAM represents the channel attention mask, represents the Sigmoid activation function, represents a linear layer; Perform average pooling, the formula is as follows: , in, Represents the average response intensity of each spatial position in all channels, reflecting the importance of global space; Perform max pooling: , in, Represents the most significant feature response at each spatial position, highlighting the local key areas; Concatenate the mean and maximum values ​​and generate a spatial attention mask through convolution and Sigmoid function: , Among them, Cat represents tensor concatenation along dimension, and Conv1 is a 1×1 convolutional layer.

3. A medical image segmentation algorithm based on Mamba according to claim 2, characterized in that: described and The processing is done through the pooling layer and the depth convolution layer respectively. The processing formula is as follows: , , Among them, GELU refers to the activation function, It is a grouped convolution, the number of groups is equal to the number of output channels, using a 3×3 convolution kernel. is the maximum pooling operation, It is a 1×1 convolutional layer; The processed output is concatenated along the channel dimension: , in, Represents the stitched image.

4. The Mamba-based medical image segmentation algorithm according to claim 1, characterized in that: The setting of the visual state space module VSS Block specifically includes the following steps: The processed features are added and passed to the VSS Block for modeling long-distance dependencies; the input features are three-dimensional tensors , VSS Block rearranges the two-dimensional feature map into a one-dimensional sequence to meet the one-dimensional input requirements of state space modeling, that is, for ; This process can also be modeled separately in the row or column direction. In actual implementation, a cross-scanning strategy can be used to enhance the spatial structure modeling capability; One-dimensional state space modeling models the image sequence as a one-dimensional state space system: , , in, yes dimensional input sequence at time steps Features, is the hidden state, yes Dimensional output, 、 、 is the learnable state transfer matrix and projection matrix; the model can be efficiently implemented in the form of convolution, that is, the state space response function Perform a one-dimensional convolution with the input sequence: , in, represents a one-dimensional convolution operation, is the state space response kernel; Then, spatial rearrangement and residual connection are performed to transform the one-dimensional sequence output dimension into of Rearrange back to 2D image form , whose dimensions are ; And combined with residual connection and feed-forward module FFN to further enhance the model's expressiveness: 。 5. The Mamba-based medical image segmentation algorithm according to claim 1, characterized in that: The setting of the cross offset connection module COC specifically includes the following steps: The COC module divides the VSS Block output into two parts and ,in For subsequent offset operations, Directly retained for final feature concatenation: , in, Indicates that the feature map Split along the channel dimension into and ; The feature map after segmentation Perform channel projection operation, channel projection is performed through and The CO block processing of the convolution kernel maps the feature map to the new space to form the feature map and , the purpose is to provide a more flexible feature representation for subsequent offset operations: , , in, is normalized, and Respectively indicate the sizes and The convolution kernel.

6. The Mamba-based medical image segmentation algorithm according to claim 5, characterized in that: The setting of the cross offset connection module COC further comprises the following steps: The feature map processed by channel projection and Perform element-by-element addition and add it to the original feature map Perform residual connection to form an intermediate feature map : , For the intermediate feature map Perform group normalization processing and enhance its feature representation ability through multi-layer perceptron MLP. The processing results are similar to Add to get the feature map : , in, It is a multi-layer perceptron; Feature Map With the directly retained feature map Perform feature concatenation in the channel dimension to form the final output feature map : , 。 7. The Mamba-based medical image segmentation algorithm according to claim 1, characterized in that: The preprocessing operations include image normalization, cropping, and resolution adjustment. The medical image uses ACDC data, the ACDC dataset is used for cardiac MRI segmentation, the ACDC dataset includes 100 samples, and the evaluation index is the evaluation DSC.

8. A medical image segmentation system based on Mamba, characterized in that: include: Data processing module: pre-processing the input medical images; Encoding module: changes the input feature map of the medical image and performs progressive encoding through the encoder; Medical image features are processed through a multi-path convolutional attention mixer (MCAM), and multi-path features are processed in parallel by MCAM to enhance feature representation. Visual State Space Block: Set up the Visual State Space Block (VSS Block). The VSS Block enhances encoding capabilities by capturing global information through a state space model. Cross-offset connection operation module: Set the cross-offset connection module COC, which extracts features through channel projection, vertical offset and horizontal offset; Decoding module: fuses the upsampled features with the features output by MCAM, and gradually restores the image resolution through inverse operations; Loop operation module: The features output from the encoding stage are passed through the encoding stage multiple times, and then input into the decoding stage for multiple cycles; each time the encoding and decoding are connected by a jump connection through the COC module.

9. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the Mamba-based medical image segmentation algorithm as claimed in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of a Mamba-based medical image segmentation algorithm as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Medical image segmentation method based on multi-scanning visual state space

    CN120953621A

  • Three-dimensional medical image segmentation system and method based on three-dimensional structure enhancement

    CN121121130A

  • Dynamic guide type gland instance segmentation method and system based on state space model

    CN121504950A