Medical image segmentation method and imaging method based on Mama network

By introducing residual connections, convolutions, and interactive attention schemes into the Mamba network, combined with a multi-path scanning mechanism and channel attention regulation, the problems of structural adaptability and feature preservation of the Mamba network in medical image segmentation are solved, achieving more efficient and accurate medical image segmentation.

CN120689296AActive Publication Date: 2025-09-23CENT SOUTH UNIV

Patent Information

Application Number
CN202510773197.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-23
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

Existing medical image segmentation methods based on Mamba networks have significant limitations in medical image segmentation tasks. They are difficult to adapt to complex and changeable structural morphologies and directional heterogeneity, easily destroy the spatial topological relationship of the original image, lack effective feature preservation mechanisms in deep state modeling, and lack explicit inter-regional interaction mechanisms, resulting in limited effectiveness when anatomical structure boundaries are blurred or tissue distribution is discrete.

Method used

A medical image segmentation method based on the Mamba network is constructed. By introducing a residual connection scheme, a convolution scheme, and an interactive attention scheme, combined with an encoding module, a graph interactive attention module, and a decoding module, a multi-path, multi-directional five-dimensional selective scanning mechanism and a channel attention regulation mechanism are adopted to enhance the stability and semantic consistency of feature expression and achieve efficient modeling of long-range dependencies.

Benefits of technology

It improves the reliability and accuracy of medical image segmentation, enhances the model's ability to represent complex structures and boundary details, and improves the robustness and accuracy of image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689296A_ABST
    Figure CN120689296A_ABST
Patent Text Reader

Abstract

The invention discloses a medical image segmentation method based on a Mama network. The method comprises the following steps: acquiring existing medical image data information; preprocessing the acquired medical image data information to construct a training data set; constructing a medical image segmentation initial model based on the Mama network based on the Mama network, the residual connection scheme, the convolution scheme and the interactive attention scheme, and training to obtain a medical image segmentation model based on the Mama network; and carrying out actual medical image segmentation by adopting the obtained medical image segmentation model based on the Mama network. The invention further discloses an imaging method comprising the medical image segmentation method based on the Mama network. According to the method, segmentation of the medical image is realized, and the method is higher in reliability, better in accuracy and better in robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital image processing, and in particular relates to a medical image segmentation method and an imaging method based on a Mamba network. Background Art

[0002] Medical image segmentation has extremely wide applications in clinical medical applications and basic medical research. Therefore, ensuring the reliability and accuracy of medical image segmentation has become one of the research focuses of researchers.

[0003] Currently, traditional medical image segmentation solutions are still performed by clinical medical imaging professionals based on their own experience and technical skills. However, this manual medical image segmentation solution is not only time-consuming and labor-intensive, but also has poor reliability and accuracy.

[0004] In recent years, with the rapid development of neural network solutions, convolutional neural networks (CNNs) and Transformer architectures have been widely used in medical image segmentation tasks. CNN networks, with their local receptive field and parameter sharing mechanism, excel in fine-grained texture modeling and boundary localization, and have become the mainstream infrastructure in this field. However, they have inherent deficiencies in modeling long-range dependencies and global semantic consistency. The Transformer architecture, based on the self-attention mechanism, can capture relationships between long-range pixels and excels in modeling large-scale lesions. However, its computational complexity increases quadratically with image resolution, severely limiting its deployment in high-resolution medical images. Furthermore, the Transformer relies heavily on large-scale annotated data, which hinders its application in the medical field, where annotated resources are scarce.

[0005] The Mamba architecture within the state-space model (SSM) has garnered widespread attention in recent years. This architecture achieves efficient long-range dependency modeling through a recursive state update mechanism and supports inference on high-resolution images with linear computational complexity, making it a highly effective alternative to the Transformer architecture. However, the current Vision Mamba (ViM) approach still faces significant limitations in its practical application in medical image segmentation tasks. First, ViM typically employs a fixed linear scan path for image spatial serialization, making it difficult to adapt to the complex and varied structural morphology and directional heterogeneity found in medical images, and easily destroying the spatial topology of the original image. Second, ViM lacks effective feature preservation mechanisms found in deep state modeling. As the number of network layers increases, structural representation tends to degrade, with instability particularly observed in boundary detail regions. Third, the ViM architecture lacks an explicit inter-region interaction mechanism, making it difficult to achieve semantic coordination between spatially discontinuous regions. This limits its effectiveness in cases where anatomical boundaries are blurred or tissue distribution is discrete. Summary of the Invention

[0006] One of the purposes of the present invention is to provide a medical image segmentation method based on Mamba network with high reliability and good accuracy.

[0007] A second object of the present invention is to provide an imaging method including the medical image segmentation method based on the Mamba network.

[0008] The medical image segmentation method based on the Mamba network provided by the present invention comprises the following steps:

[0009] S1. Acquire existing medical image data information;

[0010] S2. Preprocessing the medical image data information obtained in step S1 to construct a training data set;

[0011] S3. Build an initial model for medical image segmentation based on the Mamba network, residual connection scheme, convolution scheme, and interactive attention scheme;

[0012] S4 uses the training data set constructed in step S2 to train the initial medical image segmentation model based on the Mamba network constructed in step S3 to obtain a medical image segmentation model based on the Mamba network;

[0013] S5. Use the Mamba network-based medical image segmentation model obtained in step S4 to perform actual medical image segmentation.

[0014] The construction of the initial model for medical image segmentation based on the Mamba network, the residual connection scheme, the convolution scheme, and the interactive attention scheme described in step S3 includes the following steps:

[0015] The initial model of medical image segmentation based on the Mamba network is constructed, including an encoding module, a graph interaction attention module, a decoding module, and a prediction module;

[0016] The output of the encoding module is used as the input of the decoding module, and the output of the decoding module is used as the input of the prediction module. At the same time, the intermediate processing data of the encoding module is processed by the graph interaction attention module and used as the intermediate input data of the decoding module;

[0017] An encoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The encoding module is used to extract the contextual semantic features of the input image layer by layer to achieve feature extraction of the input image.

[0018] Based on the interactive attention scheme, a graph interactive attention module is constructed. The graph interactive attention module is used to model topological relationships based on the intermediate processed data of the encoding module to enhance cross-region feature expression and semantic consistency. At the same time, the processed data is used as the intermediate input data of the decoding module.

[0019] A decoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The decoding module is used to restore the channels of the input image and reconstruct the semantic representation and boundary details based on the output of the encoding module and the output of the graph interaction attention module.

[0020] A prediction module is constructed based on a convolution scheme, and is used to predict the image segmentation result of the final input image according to the output of the decoding module.

[0021] The step S3 specifically includes the following steps:

[0022] The encoding module includes a first Patch Embedding encoding module, a first state space enhancement module, a second state space enhancement module, a second Patch Embedding encoding module, a third state space enhancement module, a fourth state space enhancement module, a third Patch Embedding encoding module, a fifth state space enhancement module, a sixth state space enhancement module, a fourth Patch Embedding encoding module, a seventh state space enhancement module, and an eighth state space enhancement module, which are connected in series in sequence; the output of the eighth state space enhancement module is used as the output of the encoding module; the output of the second Patch Embedding encoding module, the output of the third Patch Embedding encoding module, and the output of the fourth Patch Embedding encoding module are used as intermediate processing data of the encoding module and input into the graph interaction attention module;

[0023] The output of the second Patch Embedding module is processed by the Graph Interaction Attention module to obtain the first Graph Interaction Attention output. The output of the third Patch Embedding module is processed by the Graph Interaction Attention module to obtain the second Graph Interaction Attention output. The output of the fourth Patch Embedding module is processed by the Graph Interaction Attention module to obtain the third Graph Interaction Attention output.

[0024] The decoding module includes a decoding first state space enhancement module, a decoding second state space enhancement module, a decoding first Patch Expanding module, a decoding third state space enhancement module, a decoding fourth state space enhancement module, a decoding second Patch Expanding module, a decoding fifth state space enhancement module, a decoding sixth state space enhancement module, a decoding third Patch Expanding module, a decoding seventh state space enhancement module, a decoding eighth state space enhancement module and a final projection module; the decoding first state space enhancement module and the decoding second state space enhancement module are connected in series in sequence; the output of the decoding second state space enhancement module and the interactive attention output of the third image are summed by channel as the input of the decoding first Patch Expanding module; the decoding first Patch Expanding module, the decoding third state space enhancement module and the decoding fourth state space enhancement module are connected in series in sequence; the output of the decoding fourth state space enhancement module and the interactive attention output of the second image are summed by channel as the input of the decoding second Patch Expanding module; the decoding second Patch Expanding module, the decoding fifth state space enhancement module and the decoding sixth state space enhancement module are connected in series in sequence; the output of the decoding sixth state space enhancement module and the interactive attention output of the first image are summed by channel as the decoding third Patch Expanding module The input of the Expanding module; the decoding third Patch Expanding module, the decoding seventh state space enhancement module, the decoding eighth state space enhancement module and the final projection module are connected in series in sequence; the output of the final projection module is used as the output of the decoding module;

[0025] The output of the decoding module is connected to the input of the prediction module; the output of the prediction module serves as the output of the model.

[0026] The first Patch Embedding module uses 4×4 convolution to generate a size of Feature data, where H is the height of the input image, W is the width of the input image, and the input image x satisfies

[0027] The number of output channels of the second Patch Embedding module is 96; the number of output channels of the third Patch Embedding module is 192; the number of output channels of the fourth Patch Embedding module is 384; the number of output channels of the eighth state space enhancement module is 768;

[0028] The spatial resolution of the feature map output by the decoding second state space enhancement module is The spatial resolution of the feature map output by the decoding fourth state space enhancement module is The spatial resolution of the feature map output by the decoding sixth state space enhancement module is The spatial resolution of the feature map output by the decoding eighth state space enhancement module is

[0029] The structures of the encoding first state space enhancement module to the encoding eighth state space enhancement module and the decoding first state space enhancement module to the decoding eighth state space enhancement module are the same; the processing process of the state space enhancement module specifically includes the following steps:

[0030] The input image is processed by depthwise separable convolution to model the local structure; denoted as X dw =DWConv(X), where X is the input image, DWConv() is the depthwise separable convolution process, and X dw It is the feature output by depth-separable convolution;

[0031] X dw After state space modeling and attention control layer processing, the modeling control features are obtained

[0032] After the group normalization operation, it is activated by the activation function, and then the result is summed with X to obtain the output of the state space enhancement module, which is expressed as Where GN() is the group normalization operation, ψ() is the LeakyReLU activation function, and α is the scaling factor to be learned;

[0033] The state space modeling and attention control layer processing process includes the following steps:

[0034] X dw Perform layer normalization and linear mapping to enhance the representation capability, expressed as X s =W s ·LN(X dw ), where X s To enhance the representation features, LN() is the layer normalization operation, W s is the linear transformation matrix;

[0035] X s Processed by depth-separable convolution and nonlinear activation function to generate modeling features X v , denoted as X v =φ(DWConv(X s )), where φ() is the SiLU activation function;

[0036] X v It is processed through a five-dimensional selective scanning layer to capture the spatial state dependencies across directions, represented as is the spatial state dependent feature, S 5D () is the processing process of the five-dimensional selective scanning layer;

[0037] Will Then through layer normalization processing, the normalized spatial state dependent features are obtained Expressed as

[0038] X dw Through channel mapping and activation function processing, the channel attention weight G is obtained, which is expressed as G = φ(W g ·X dw ), where W g is the channel mapping matrix;

[0039] Will Perform channel-by-channel weighted fusion with G to obtain fusion features Expressed as Among them, ⊙ is the channel-wise multiplication operation;

[0040] Will Recover the channel dimension through linear mapping to obtain the modeling control characteristics Expressed that Where W o is the linear mapping matrix.

[0041] The processing of the five-dimensional selective scanning layer specifically includes the following steps:

[0042] The input feature X v , divided into 16 subspaces in order from left to right and from top to bottom, and marked with corresponding numbers; the marked subspace numbers are expressed in matrices as

[0043] Set 5 types of scanning modes:

[0044] Scan Mode 1-Fractal Mode:

[0045] Path 1: Starting from subspace 1, scan in the following order: 1-5-6-2-3-4-8-7-11-12-16-15-14-10-9-13;

[0046] Path 2: Starting from subspace 4, scan in the following order: 4-3-7-8-12-16-15-11-10-14-13-9-5-6-2-1;

[0047] Path 3: Starting from subspace 13, scan in the following order: 13-14-10-9-5-1-2-6-7-3-4-8-12-11-15-16;

[0048] Path 4: Starting from subspace 16, scan in the following order: 16-12-11-15-14-13-9-10-6-5-1-2-3-7-8-4;

[0049] Scan Mode 2-Spiral Mode:

[0050] Path 2: Starting from subspace 1, scan in the following order: 1-2-3-4-8-12-16-15-14-13-9-5-6-7-11-10;

[0051] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-14-13-9-5-1-2-3-7-11-10-6;

[0052] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-3-4-8-12-16-15-14-10-6-7-11;

[0053] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-5-1-2-3-4-8-12-11-10-6-7;

[0054] Scan Mode 3-Snake Mode:

[0055] Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-8-7-6-5-9-10-11-12-16-15-14-13;

[0056] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-11-7-3-2-6-10-14-13-9-5-7;

[0057] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-6-10-14-15-11-7-3-4-8-12-16;

[0058] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-10-11-12-8-7-6-5-1-2-3-4;

[0059] Scan Mode 4-Diagonal Mode:

[0060] Path 1: Starting from subspace 1, scan in the following order: 1-2-5-9-6-3-4-7-10-13-14-11-8-12-15-16;

[0061] Path 2: Starting from subspace 4, scan in the following order: 4-8-3-2-7-12-16-11-6-1-5-10-15-14-9-13;

[0062] Path 3: Starting from subspace 13, scan in the following order: 13-9-14-15-10-5-1-6-11-16-12-7-2-3-8-4;

[0063] Path 4: Starting from subspace 16, scan in the following order: 16-15-12-8-11-14-13-10-7-4-3-6-9-5-2-1;

[0064] Scan Mode 5 - Zigzag Mode:

[0065] Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16;

[0066] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-3-7-11-15-2-6-10-14-1-5-9-13;

[0067] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-14-10-6-2-15-11-7-3-16-12-8-4;

[0068] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-1;

[0069] The one-dimensional feature sequence generated by the i-th path in the k-th scanning mode is expressed as The value of k ranges from 1 to 5, and the value of i ranges from 1 to 4;

[0070] Each Processing is performed through the state modeling layer, and modeling and recursion based on the gated state space are performed in each spatial subdomain to obtain path-level state features

[0071] In each scanning mode, the path-level state features on the four paths are summed channel by channel to obtain the preliminary aggregate features. Expressed as

[0072] Calculate the channel mean of the path output for

[0073] Calculate the direction fusion weight G k for Where ∈ is the set numerical stability parameter, σ() is the Sigmoid activation function;

[0074] Calculate the fusion output for

[0075] Finally, the spatial state dependent features are obtained for Concat() is concatenated by channel dimension.

[0076] The processing process of the graph interaction attention module includes the following steps:

[0077] The input of the graph interaction attention module is represented as F i , the value of i ranges from 1 to 3, corresponding to the outputs of the second Patch Embedding module to the fourth Patch Embedding module respectively;

[0078] Using three independent graph attention maps, we can calculate F i The query matrix Q, key matrix K and value matrix V, where Q = W q F i , K=W k F, V = W v F i , where W q is the linear projection matrix of the query matrix, W k is the linear projection matrix of the key matrix, W v is the linear projection matrix of the value matrix;

[0079] Rearrange the query matrix Q, key matrix K and value matrix V along the height direction and width direction respectively to obtain the height direction query matrix Q h , width direction query matrix Q w , height direction key matrix K h , width direction key matrix K w , height direction value matrix V h and the width direction value matrix V w ;

[0080] The joint attention weight matrix S is calculated as Where softmax() is the softmax function;

[0081] The obtained joint attention weight matrix S is divided into the height direction weight matrix S along the channel dimension h and the width direction weight matrix S w ;

[0082] Calculate the feature representation T after direction enhancement i T i =S h V h +S w V w ;

[0083] The feature after direction enhancement is represented as T i Processed through a 1×1 convolutional layer to reconstruct the channel dimension and compared with F i Perform residual connection operation to obtain the final output feature map And serve as the output of the graph interaction attention module; The calculation process is expressed as Among them, Conv 1×1 () is the 1×1 convolution layer processing process.

[0084] The final projection module processing process specifically includes the following steps:

[0085] The final projection module is used to upsample the feature image output by the decoder to its original size.

[0086] The processing of the prediction module includes the following steps:

[0087] A 1×1 convolutional layer is used as the prediction module;

[0088] The input image features are mapped into a single-channel prediction map through a 1×1 convolutional layer to achieve the prediction of the final image segmentation result of the input image.

[0089] The present invention also provides an imaging method including the medical image segmentation method based on the Mamba network, further comprising the following steps:

[0090] S6. The segmentation result of the medical image obtained in step S5 is marked and re-imaged on the original medical image to obtain a medical image with the segmentation result.

[0091] The medical image segmentation method and imaging method based on the Mamba network provided by the present invention construct a corresponding image segmentation model based on the Mamba network, a residual connection scheme, a convolution scheme and an interactive attention scheme, which not only realizes the segmentation of medical images, but also has higher reliability, better accuracy and better robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 Schematic diagram of the process flow of the segmentation method of the present invention.

[0093] Figure 2 Schematic diagram showing the comparison of the segmentation effect of the segmentation method of the present invention and the existing scheme on the ISIC 2017 dataset.

[0094] Figure 3 Schematic diagram showing the comparison of the segmentation effect of the segmentation method of the present invention and the existing scheme on the ISIC 2018 dataset.

[0095] Figure 4 Schematic diagram comparing the segmentation effects of the segmentation method of the present invention and the existing solutions on the CVC-ClinicDB dataset.

[0096] Figure 5 Schematic diagram comparing the segmentation effects of the segmentation method of the present invention and the existing scheme on the ACDC dataset.

[0097] Figure 6 Schematic diagram of the process flow of the imaging method of the present invention. DETAILED DESCRIPTION

[0098] like Figure 1 The figure shows a flow chart of the segmentation method of the present invention: The medical image segmentation method based on the Mamba network provided by the present invention comprises the following steps:

[0099] S1. Acquire existing medical image data information;

[0100] S2. Preprocessing the medical image data information obtained in step S1 to construct a training data set;

[0101] S3. Based on the Mamba network, residual connection scheme, convolution scheme, and interactive attention scheme, an initial model for medical image segmentation based on the Mamba network is constructed. The steps include:

[0102] The initial model of medical image segmentation based on the Mamba network is constructed, including an encoding module, a graph interaction attention module, a decoding module, and a prediction module;

[0103] The output of the encoding module is used as the input of the decoding module, and the output of the decoding module is used as the input of the prediction module. At the same time, the intermediate processing data of the encoding module is processed by the graph interaction attention module and used as the intermediate input data of the decoding module;

[0104] An encoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The encoding module is used to extract the contextual semantic features of the input image layer by layer to achieve feature extraction of the input image.

[0105] Based on the interactive attention scheme, a graph interactive attention module is constructed. The graph interactive attention module is used to model topological relationships based on the intermediate processed data of the encoding module to enhance cross-region feature expression and semantic consistency. At the same time, the processed data is used as the intermediate input data of the decoding module.

[0106] A decoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The decoding module is used to restore the channels of the input image and reconstruct the semantic representation and boundary details based on the output of the encoding module and the output of the graph interaction attention module.

[0107] A prediction module is constructed based on a convolution scheme, and is used to predict the image segmentation result of the final input image according to the output of the decoding module.

[0108] In a specific implementation, the encoding module includes a first Patch Embedding encoding module, a first state space enhancement module, a second state space enhancement module, a second Patch Embedding encoding module, a third state space enhancement module, a fourth state space enhancement module, a third Patch Embedding encoding module, a fifth state space enhancement module, a sixth state space enhancement module, a fourth Patch Embedding encoding module, a seventh state space enhancement module, and an eighth state space enhancement module, which are connected in series in sequence; the output of the eighth state space enhancement module is used as the output of the encoding module; the output of the second Patch Embedding encoding module, the output of the third Patch Embedding encoding module, and the output of the fourth Patch Embedding encoding module are used as intermediate processing data of the encoding module and input into the graph interaction attention module;

[0109] The output of the second Patch Embedding module is processed by the Graph Interaction Attention module to obtain the first Graph Interaction Attention output. The output of the third Patch Embedding module is processed by the Graph Interaction Attention module to obtain the second Graph Interaction Attention output. The output of the fourth Patch Embedding module is processed by the Graph Interaction Attention module to obtain the third Graph Interaction Attention output.

[0110] The decoding module includes a decoding first state space enhancement module, a decoding second state space enhancement module, a decoding first Patch Expanding module, a decoding third state space enhancement module, a decoding fourth state space enhancement module, a decoding second Patch Expanding module, a decoding fifth state space enhancement module, a decoding sixth state space enhancement module, a decoding third Patch Expanding module, a decoding seventh state space enhancement module, a decoding eighth state space enhancement module and a final projection module; the decoding first state space enhancement module and the decoding second state space enhancement module are connected in series in sequence; the output of the decoding second state space enhancement module and the interactive attention output of the third image are summed by channel as the input of the decoding first Patch Expanding module; the decoding first Patch Expanding module, the decoding third state space enhancement module and the decoding fourth state space enhancement module are connected in series in sequence; the output of the decoding fourth state space enhancement module and the interactive attention output of the second image are summed by channel as the input of the decoding second Patch Expanding module; the decoding second Patch Expanding module, the decoding fifth state space enhancement module and the decoding sixth state space enhancement module are connected in series in sequence; the output of the decoding sixth state space enhancement module and the interactive attention output of the first image are summed by channel as the decoding third Patch Expanding module The input of the Expanding module; the decoding third Patch Expanding module, the decoding seventh state space enhancement module, the decoding eighth state space enhancement module and the final projection module are connected in series in sequence; the output of the final projection module is used as the output of the decoding module;

[0111] The output of the decoding module is connected to the input of the prediction module; the output of the prediction module serves as the output of the model.

[0112] Among them, the first Patch Embedding module uses 4×4 convolution to process and generate a size of Feature data, where H is the height of the input image, W is the width of the input image, and the input image x satisfies

[0113] The number of output channels of the second Patch Embedding module is 96; the number of output channels of the third Patch Embedding module is 192; the number of output channels of the fourth Patch Embedding module is 384; the number of output channels of the eighth state space enhancement module is 768;

[0114] The spatial resolution of the feature map output by the decoding second state space enhancement module is The spatial resolution of the feature map output by the decoding fourth state space enhancement module is The spatial resolution of the feature map output by the decoding sixth state space enhancement module is The spatial resolution of the feature map output by the decoding eighth state space enhancement module is

[0115] The structures of the encoding first state space enhancement module to the encoding eighth state space enhancement module and the decoding first state space enhancement module to the decoding eighth state space enhancement module are the same; the processing process of the state space enhancement module specifically includes the following steps:

[0116] The input image is processed by depthwise separable convolution to model the local structure; denoted as X dw =DWConv(X), where X is the input image, DWConv() is the depthwise separable convolution process, and X dw It is the feature output by depth-separable convolution;

[0117] X dw After state space modeling and attention control layer processing, the modeling control features are obtained

[0118] After the group normalization operation, it is activated by the activation function to improve the expression stability and response sparsity. The result is then summed with X to obtain the output of the state space enhancement module, which is expressed as Where GN() is the group normalization operation, ψ() is the LeakyReLU activation function, and α is the scaling factor to be learned;

[0119] The state space modeling and attention control layer processing process includes the following steps:

[0120] X dw Perform layer normalization and linear mapping to enhance the representation capability, expressed as X s =W s ·LN(X dw ), where X s To enhance the representation features, LN() is a layer normalization operation (used to improve feature stability and accelerate model convergence), W s is the linear transformation matrix;

[0121] X s Processed by depth-separable convolution and nonlinear activation function to generate modeling features X v , denoted as X v =φ(DWConv(X s )), where φ() is the SiLU activation function;

[0122] X vIt is processed through a five-dimensional selective scanning layer to capture the spatial state dependencies across directions, represented as is the spatial state dependent feature, S 5D () is the processing process of the five-dimensional selective scanning layer;

[0123] Will Then through layer normalization processing, the normalized spatial state dependent features are obtained Expressed as

[0124] X dw Through channel mapping and activation function processing, the channel attention weight G is obtained, which is expressed as G = φ(W g ·X dw ), where W g is the channel mapping matrix;

[0125] Will Perform channel-by-channel weighted fusion with G to obtain fusion features Expressed as Among them, ⊙ is the channel-wise multiplication operation;

[0126] Will Recover the channel dimension through linear mapping to obtain the modeling control characteristics Expressed that Where W o is the linear mapping matrix;

[0127] The state-space enhancement module of the present invention is based on the basic Mamba state-space modeling framework and performs targeted optimization based on the characteristics of medical image segmentation tasks. Unlike the standard Mamba model, which is based solely on single-path sequence recursion, the present invention introduces a five-dimensional selective scanning mechanism. This uses a multi-path, multi-directional scanning strategy to spatially sequence image features, effectively improving the model's ability to model complex spatial structures and directional changes. In addition, the present invention introduces a channel attention control mechanism and residual fusion design during the state recursion process, which can further enhance the stability and semantic consistency of feature expression and alleviate the problem of feature degradation that may occur in deep recursion.

[0128] The state space enhancement module of the present invention achieves efficient modeling of long-distance dependencies through continuous state updates and dynamic gating control, and can capture cross-regional semantic associations while maintaining linear computational complexity; this mechanism improves the model's ability to represent complex structures and boundary details in medical images, providing more discriminative feature support for subsequent segmentation.

[0129] The processing of the five-dimensional selective scanning layer specifically includes the following steps:

[0130] The input feature X v , divided into 16 subspaces in order from left to right and from top to bottom, and marked with corresponding numbers; the marked subspace numbers are expressed in matrices as

[0131] Set 5 types of scanning modes:

[0132] Scan Mode 1-Fractal Mode:

[0133] Path 1: Starting from subspace 1, scan in the following order: 1-5-6-2-3-4-8-7-11-12-16-15-14-10-9-13;

[0134] Path 2: Starting from subspace 4, scan in the following order: 4-3-7-8-12-16-15-11-10-14-13-9-5-6-2-1;

[0135] Path 3: Starting from subspace 13, scan in the following order: 13-14-10-9-5-1-2-6-7-3-4-8-12-11-15-16;

[0136] Path 4: Starting from subspace 16, scan in the following order: 16-12-11-15-14-13-9-10-6-5-1-2-3-7-8-4;

[0137] Scan Mode 2-Spiral Mode:

[0138] Path 2: Starting from subspace 1, scan in the following order: 1-2-3-4-8-12-16-15-14-13-9-5-6-7-11-10;

[0139] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-14-13-9-5-1-2-3-7-11-10-6;

[0140] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-3-4-8-12-16-15-14-10-6-7-11;

[0141] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-5-1-2-3-4-8-12-11-10-6-7;

[0142] Scan Mode 3-Snake Mode:

[0143] Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-8-7-6-5-9-10-11-12-16-15-14-13;

[0144] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-11-7-3-2-6-10-14-13-9-5-7;

[0145] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-6-10-14-15-11-7-3-4-8-12-16;

[0146] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-10-11-12-8-7-6-5-1-2-3-4;

[0147] Scan Mode 4-Diagonal Mode:

[0148] Path 1: Starting from subspace 1, scan in the following order: 1-2-5-9-6-3-4-7-10-13-14-11-8-12-15-16;

[0149] Path 2: Starting from subspace 4, scan in the following order: 4-8-3-2-7-12-16-11-6-1-5-10-15-14-9-13;

[0150] Path 3: Starting from subspace 13, scan in the following order: 13-9-14-15-10-5-1-6-11-16-12-7-2-3-8-4;

[0151] Path 4: Starting from subspace 16, scan in the following order: 16-15-12-8-11-14-13-10-7-4-3-6-9-5-2-1;

[0152] Scan Mode 5 - Zigzag Mode:

[0153] Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16;

[0154] Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-3-7-11-15-2-6-10-14-1-5-9-13;

[0155] Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-14-10-6-2-15-11-7-3-16-12-8-4;

[0156] Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-1;

[0157] The five-dimensional scanning process designed in this application breaks through the structural expression limitations caused by the single scanning path in traditional visual state space models. By introducing different types of spatial scanning modes in multiple orthogonal subspaces and combining a multi-path parallel mechanism, it effectively captures multi-directional state dependencies.

[0158] The one-dimensional feature sequence generated by the i-th path in the k-th scanning mode is expressed as The value of k ranges from 1 to 5, and the value of i ranges from 1 to 4;

[0159] Each Processing is performed through the state modeling layer, and modeling and recursion based on the gated state space are performed in each spatial subdomain to obtain path-level state features In specific implementation, the state modeling layer can adopt the state modeling module proposed by Albert Gu et al. in the paper "Mamba: Linear-Time Sequence Modeling with Selective State Spaces";

[0160] In each scanning mode, the path-level state features on the four paths are summed channel by channel to integrate the multi-path output within each scanning mode to obtain the preliminary aggregated features. Expressed as

[0161] In order to enhance the consistency of directional modeling and the distinguishability of response distribution among the paths, a directional fusion gate mechanism is designed to generate adjustment weights based on the channel variation coefficients of the four path responses; the channel mean of the path output is calculated. for

[0162] Calculate the direction fusion weight G k for Where ∈ is the set numerical stability parameter (used to prevent the denominator from being 0), σ() is the Sigmoid activation function;

[0163] Calculate the fusion output for

[0164] Finally, the spatial state dependent features are obtained for Among them, Concat() is splicing by channel dimension;

[0165] Through the intra-path variation coefficient-based directional fusion mechanism and the structural compensation of the diversified scanning strategy between paths, the five-dimensional selective scanning layer significantly enhances the expression stability and spatial semantic robustness of the model in areas with significant structural direction changes.

[0166] The processing of the graph interaction attention module specifically includes the following steps:

[0167] In complex medical images, semantically related regions often exhibit spatial dispersion and structural discontinuity. Relying on local modeling or fixed path propagation makes it difficult to capture long-range dependencies, which can easily lead to semantic fragmentation and inconsistent feature expression between regions. In particular, during the information bridging process between the encoder and decoder, although skip connections can provide spatial detail compensation, the lack of an explicit semantic interaction mechanism makes it difficult to effectively bridge the expression gap between deep and shallow features. To this end, this application introduces a graph interaction attention module, which achieves adaptive semantic enhancement between spatially discontinuous regions by constructing a pixel-level adjacency graph and implementing attention propagation in the graph space.

[0168] The input of the graph interaction attention module is represented as F i , the value of i ranges from 1 to 3, corresponding to the outputs of the second Patch Embedding module to the fourth Patch Embedding module respectively;

[0169] Using three independent graph attention maps, we can calculate F i The query matrix Q, key matrix K and value matrix V, where Q = W q F i , K=W k F, V = W v F i , where W q is the linear projection matrix of the query matrix, W k is the linear projection matrix of the key matrix, W v is the linear projection matrix of the value matrix;

[0170] Rearrange the query matrix Q, key matrix K and value matrix V along the height direction and width direction respectively to obtain the height direction query matrix Q h , width direction query matrix Q w , height direction key matrix K h , width direction key matrix K w , height direction value matrix V h and the width direction value matrix Vw ;

[0171] The joint attention weight matrix S is calculated as Where softmax() is the softmax function;

[0172] The obtained joint attention weight matrix S is divided into the height direction weight matrix S along the channel dimension h and the width direction weight matrix S w ;

[0173] Calculate the feature representation T after direction enhancement i T i =S h V h +S w V w ;

[0174] The feature after direction enhancement is represented as T i Processed through a 1×1 convolutional layer to reconstruct the channel dimension and compared with F i Perform residual connection operation to obtain the final output feature map And serve as the output of the graph interaction attention module; The calculation process is expressed as Among them, Conv 1×1 () is the 1×1 convolution layer processing process;

[0175] Output features The original structural information is combined with the contextual dependency after graph attention enhancement; the above process is performed in parallel at each scale i∈{1,2,3}, and the enhanced multi-scale feature map set is output As important semantic guidance information in the decoder stage; through explicit graph structure modeling and bidirectional spatial attention propagation mechanism, the graph interaction attention module effectively improves the model's semantic expression ability for complex structural regions, boundaries and regional discontinuity problems, further enhancing the overall segmentation performance.

[0176] The final projection module processing process specifically includes the following steps:

[0177] The final projection module is used to upsample the feature image output by the decoder to its original size.

[0178] The processing of the prediction module specifically includes the following steps:

[0179] A 1×1 convolutional layer is used as the prediction module;

[0180] The input image features are mapped into a single-channel prediction map through a 1×1 convolutional layer to achieve the prediction of the final image segmentation result of the input image.

[0181] S4 uses the training data set constructed in step S2 to train the initial medical image segmentation model based on the Mamba network constructed in step S3 to obtain a medical image segmentation model based on the Mamba network;

[0182] S5. Use the Mamba network-based medical image segmentation model obtained in step S4 to perform actual medical image segmentation.

[0183] The effect of the segmentation method of the present invention is further described below with reference to the embodiments:

[0184] The segmentation method of the present invention is compared with the existing scheme on the ISIC 2017 dataset, ISIC 2018 dataset, CVC-ClinicDB dataset and ACDC dataset;

[0185] ISIC17 and ISIC18 datasets: These two datasets are derived from the 2017 and 2018 Lesion Segmentation Challenges hosted by the International Skin Imaging Collaboration (ISIC), and are widely used in the study of automatic segmentation of lesion areas in dermoscopic images. Both provide RGB images and their corresponding pixel-level masks, covering a variety of common skin lesion types. The ISIC17 dataset contains a total of 2,150 images, and the ISIC18 dataset contains 2,694 images. This application divides ISIC17 into 1,500 training images and 650 test images, and ISIC18 into 1,886 training images and 808 test images. In the performance evaluation process, the Dice Similarity Coefficient (DSC) and Mean Intersection over Union (mIoU) are used as the main indicators to measure the segmentation effect of the model at different scales and boundary complexities.

[0186] CVC-ClinicDB dataset: This dataset, published by the Polytechnic University of Catalonia, is a commonly used evaluation benchmark for the task of polyp segmentation in colonoscopy images. The dataset contains 612 clinical images with pixel-level annotations. The images are derived from actual endoscopic examinations and have high structural complexity and interference factors. Due to the fuzzy boundaries, irregular morphology, and large scale variations of polyps, this dataset is often used to verify the model's segmentation capabilities for small object detection and complex background conditions.

[0187] ACDC (Automated Cardiac Diagnosis Challenge) dataset: This dataset is derived from clinical cardiac MRI scans and provides pixel-level segmentation and annotation of the left ventricle (LV), right ventricle (RV), and myocardium (MYO). The data covers 100 patients, including image slices at two key time points: end-diastole (ED) and end-systole (ES). The dataset is divided into 70 cases for training, 10 for validation, and 20 for testing, corresponding to 140, 20, and 40 three-dimensional image samples, respectively. The structural contours exhibit significant deformation and large morphological differences between individuals, making it suitable for evaluating the accuracy and robustness of models in multi-structure organ modeling.

[0188] The schematic diagram of the segmentation effect on each data set is as follows Figures 2 to 5 The specific segmentation index comparison data are shown in Tables 1 to 4:

[0189] Table 1 Comparison of segmentation indicators on the ISIC2017 dataset

[0190] method DSC↑ mIoU↑ Acc↑ Spe↑ Sen↑ U-Net 0.8683 0.7672 0.9557 0.9724 0.8723 U-Net++ 0.866 0.7637 0.9563 0.9792 0.8425 Attention Unet 0.8686 0.7677 0.9566 0.9766 0.8567 UCTransNet 0.8823 0.7894 0.9611 0.9792 0.871 TransUNet 0.841 0.7256 0.94879 0.9768 0.8091 MedT 0.8773 0.7814 0.9594 0.9783 0.8655 VM-UNet 0.8603 0.7549 0.9547 0.979 0.8336 VM-UNet v2 0.875 0.7779 0.9573 0.9702 0.8929 H-vmunet 0.8789 0.7839 0.9597 0.9774 0.872 CCViM 0.8734 0.7752 0.9586 0.9798 0.8528 AC-MAMBASEG 0.8926 0.8061 0.9648 0.9831 0.873 Ours 0.9063 0.8287 0.9686 0.9812 0.9062

[0191] Table 2 Comparison of segmentation indicators on the ISIC2018 dataset

[0192] method DSC↑ mIoU↑ Acc↑ Spe↑ Sen↑ U-Net 0.878 0.7825 0.9414 0.966 0.865 U-Net++ 0.8812 0.7877 0.9426 0.9648 0.8738 Attention Unet 0.8744 0.7768 0.9411 0.9731 0.8418 UCTransNet 0.8915 0.8043 0.947 0.9642 0.8936 TransUNet 0.8537 0.7448 0.9296 0.9572 0.8439 MedT 0.8791 0.7844 0.9427 0.9705 0.8561 VM-UNet 0.8732 0.775 0.9403 0.9713 0.8439 VM-UNet v2 0.8766 0.7804 0.9395 0.9575 0.8834 H-vmunet 0.891 0.8035 0.9472 0.9669 0.886 CCViM 0.877 0.781 0.9398 0.9586 0.8814 AC-MAMBASEG 0.8965 0.8125 0.9498 0.9684 0.8922 Ours 0.9101 0.8351 0.9562 0.9712 0.9098

[0193] Table 3 Comparison of segmentation indicators on the CVC-ClinicDB dataset

[0194] method DSC↑ mIoU↑ Acc↑ Spe↑ Sen↑ U-Net 0.8995 0.8174 0.9846 0.9954 0.8603 U-Net++ 0.8913 0.804 0.9833 0.9943 0.8562 Attention Unet 0.8798 0.7855 0.9817 0.9944 0.836 UCTransNet 0.8946 0.8093 0.9833 0.9921 0.8825 TransUNet 0.9011 0.82 0.9849 0.9958 0.8596 MedT 0.8959 0.8115 0.9826 0.9869 0.9332 VM-UNet 0.8901 0.8019 0.9824 0.9905 0.8891 VM-UNet v2 0.8862 0.7956 0.9821 0.9918 0.87 H-vmunet 0.8979 0.8147 0.9835 0.9903 0.9052 CCViM 0.9099 0.8347 0.9857 0.9927 0.9041 AC-MAMBASEG 0.9139 0.8414 0.9856 0.9892 0.9458 Ours 0.9252 0.8609 0.9878 0.9919 0.9412

[0195] Table 4 Comparison of segmentation indicators on the ACDC dataset

[0196]

[0197] pass Figures 2 to 5As can be seen from Tables 1 to 4, the proposed solution exhibits superior segmentation performance on multiple medical image segmentation datasets. In the ISIC2017 and ISIC2018 skin lesion segmentation tasks, the proposed solution achieved superior results compared to existing convolutional neural networks, Transformer architectures, and state-space modeling methods in multiple core indicators, including the Dice coefficient, mIoU, accuracy, sensitivity, and specificity. Compared with representative methods such as U-Net, UCTransNet, and CCViM, the proposed solution achieved improvements of up to 6.15% in key indicators such as Dice and mIoU, demonstrating more accurate positioning and boundary restoration capabilities for lesion areas. Furthermore, in the CVC-ClinicDB colon polyp segmentation task, the proposed solution achieved Dice and mIoU indicators of 0.9252 and 0.8609, respectively, demonstrating significant advantages over various existing methods in terms of boundary continuity, small target recognition, and stability in complex backgrounds. In the ACDC cardiac MRI multi-structure segmentation task, the solution of the present invention achieved an average Dice coefficient of 0.926 for three types of cardiac anatomical structures, and an HD95 error of 1.1296. It is overall superior to various convolutional, Transformer, and state-space comparison methods, especially in terms of boundary consistency and structural integrity of the right ventricle and myocardial regions.

[0198] like Figure 6 The figure shows a flow chart of the imaging method of the present invention: the imaging method disclosed in the present invention, which includes the medical image segmentation method based on the Mamba network, comprises the following steps:

[0199] S1. Acquire existing medical image data information;

[0200] S2. Preprocessing the medical image data information obtained in step S1 to construct a training data set;

[0201] S3. Build an initial model for medical image segmentation based on the Mamba network, residual connection scheme, convolution scheme, and interactive attention scheme;

[0202] S4 uses the training data set constructed in step S2 to train the initial medical image segmentation model based on the Mamba network constructed in step S3 to obtain a medical image segmentation model based on the Mamba network;

[0203] S5. Using the Mamba network-based medical image segmentation model obtained in step S4, actual medical image segmentation is performed;

[0204] S6. The segmentation result of the medical image obtained in step S5 is marked and re-imaged on the original medical image to obtain a medical image with the segmentation result.

[0205] The imaging method provided by the present invention can be directly applied to existing medical imaging equipment (such as X-ray machines, CT machines, MRI detection equipment, etc.), or directly applied to a terminal (such as a computer); in specific application, the existing scheme is used to obtain the actual medical image, and then the obtained data is input into the corresponding machine equipment or terminal. At this time, the machine equipment or terminal can obtain the actual medical image segmentation result according to the imaging method disclosed by the present invention, and mark and display the segmentation result on the original image through different types of representations (such as color), and then perform secondary imaging and output; at this time, the output image is the medical image of the segmentation result, which can reflect the actual medical image and the corresponding segmentation result content, thereby greatly facilitating the subsequent work of clinical medical staff and laboratory experimenters.

Claims

1. A medical image segmentation method based on Mamba network, comprising the following steps: S1. Acquire existing medical image data information; S2. Preprocessing the medical image data information obtained in step S1 to construct a training data set; S3. Build an initial model for medical image segmentation based on the Mamba network, residual connection scheme, convolution scheme, and interactive attention scheme; S4 uses the training data set constructed in step S2 to train the initial medical image segmentation model based on the Mamba network constructed in step S3 to obtain a medical image segmentation model based on the Mamba network; S5. Use the Mamba network-based medical image segmentation model obtained in step S4 to perform actual medical image segmentation.

2. The medical image segmentation method based on Mamba network according to claim 1 is characterized in that The construction of the initial model for medical image segmentation based on the Mamba network, the residual connection scheme, the convolution scheme, and the interactive attention scheme described in step S3 includes the following steps: The initial model of medical image segmentation based on the Mamba network is constructed, including an encoding module, a graph interaction attention module, a decoding module, and a prediction module; The output of the encoding module is used as the input of the decoding module, and the output of the decoding module is used as the input of the prediction module. At the same time, the intermediate processing data of the encoding module is processed by the graph interaction attention module and used as the intermediate input data of the decoding module; An encoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The encoding module is used to extract the contextual semantic features of the input image layer by layer to achieve feature extraction of the input image. Based on the interactive attention scheme, a graph interactive attention module is constructed. The graph interactive attention module is used to model topological relationships based on the intermediate processed data of the encoding module to enhance cross-region feature expression and semantic consistency. At the same time, the processed data is used as the intermediate input data of the decoding module. A decoding module is constructed based on the Mamba network, residual connection scheme, and convolution scheme. The decoding module is used to restore the channels of the input image and reconstruct the semantic representation and boundary details based on the output of the encoding module and the output of the graph interaction attention module. A prediction module is constructed based on a convolution scheme, and is used to predict the image segmentation result of the final input image according to the output of the decoding module.

3. The medical image segmentation method based on Mamba network according to claim 2 is characterized in that The step S3 specifically includes the following steps: The encoding module includes a first Patch Embedding encoding module, a first state space enhancement module, a second state space enhancement module, a second Patch Embedding encoding module, a third state space enhancement module, a fourth state space enhancement module, a third Patch Embedding encoding module, a fifth state space enhancement module, a sixth state space enhancement module, a fourth Patch Embedding encoding module, a seventh state space enhancement module, and an eighth state space enhancement module, which are connected in series in sequence; the output of the eighth state space enhancement module is used as the output of the encoding module; the output of the second Patch Embedding encoding module, the output of the third Patch Embedding encoding module, and the output of the fourth Patch Embedding encoding module are used as intermediate processing data of the encoding module and input into the graph interaction attention module; The output of the second Patch Embedding module is processed by the Graph Interaction Attention module to obtain the first Graph Interaction Attention output. The output of the third Patch Embedding module is processed by the Graph Interaction Attention module to obtain the second Graph Interaction Attention output. The output of the fourth Patch Embedding module is processed by the Graph Interaction Attention module to obtain the third Graph Interaction Attention output. The decoding module includes a decoding first state space enhancement module, a decoding second state space enhancement module, a decoding first Patch Expanding module, a decoding third state space enhancement module, a decoding fourth state space enhancement module, a decoding second Patch Expanding module, a decoding fifth state space enhancement module, a decoding sixth state space enhancement module, a decoding third Patch Expanding module, a decoding seventh state space enhancement module, a decoding eighth state space enhancement module and a final projection module; the decoding first state space enhancement module and the decoding second state space enhancement module are connected in series in sequence; the output of the decoding second state space enhancement module and the interactive attention output of the third image are summed by channel as the input of the decoding first Patch Expanding module; the decoding first Patch Expanding module, the decoding third state space enhancement module and the decoding fourth state space enhancement module are connected in series in sequence; the output of the decoding fourth state space enhancement module and the interactive attention output of the second image are summed by channel as the input of the decoding second Patch Expanding module; the decoding second Patch Expanding module, the decoding fifth state space enhancement module and the decoding sixth state space enhancement module are connected in series in sequence; the output of the decoding sixth state space enhancement module and the interactive attention output of the first image are summed by channel as the decoding third Patch Expanding module The input of the Expanding module; the decoding third Patch Expanding module, the decoding seventh state space enhancement module, the decoding eighth state space enhancement module and the final projection module are connected in series in sequence; the output of the final projection module is used as the output of the decoding module; The output of the decoding module is connected to the input of the prediction module; the output of the prediction module serves as the output of the model.

4. The medical image segmentation method based on Mamba network according to claim 3 is characterized in that The first PatchEmbedding module uses 4×4 convolution to generate a size of Feature data, where H is the height of the input image, W is the width of the input image, and the input image x satisfies The number of output channels of the second Patch Embedding module is 96; the number of output channels of the third Patch Embedding module is 192; the number of output channels of the fourth Patch Embedding module is 384; the number of output channels of the eighth state space enhancement module is 768; The spatial resolution of the feature map output by the decoding second state space enhancement module is The spatial resolution of the feature map output by the decoding fourth state space enhancement module is The spatial resolution of the feature map output by the decoding sixth state space enhancement module is The spatial resolution of the feature map output by the decoding eighth state space enhancement module is 5. The medical image segmentation method based on Mamba network according to claim 4 is characterized in that The structures of the encoding first state space enhancement module to the encoding eighth state space enhancement module and the decoding first state space enhancement module to the decoding eighth state space enhancement module are the same; the processing process of the state space enhancement module specifically includes the following steps: The input image is processed by depthwise separable convolution to model the local structure; denoted as X dw =DWConv(X), where X is the input image, DWConv() is the depthwise separable convolution process, and X dw It is the feature output by depth-separable convolution; X dw After state space modeling and attention control layer processing, the modeling control features are obtained After the group normalization operation, it is activated by the activation function, and then the result is summed with X to obtain the output of the state space enhancement module, which is expressed as Where GN() is the group normalization operation, ψ() is the LeakyReLU activation function, and α is the scaling factor to be learned; The state space modeling and attention control layer processing process includes the following steps: X dw Perform layer normalization and linear mapping to enhance the representation capability, expressed as X s =W s ·LN(X dw ), where X s To enhance the representation features, LN() is the layer normalization operation, W s is the linear transformation matrix; X s Processed by depth-separable convolution and nonlinear activation function to generate modeling features X v , denoted as X v =φ(DWConv(X s )), where φ() is the SiLU activation function; X v It is processed through a five-dimensional selective scanning layer to capture the spatial state dependencies across directions, expressed as is the spatial state dependent feature, S 5D () is the processing process of the five-dimensional selective scanning layer; Will Then through layer normalization processing, the normalized spatial state dependent features are obtained Expressed as X dw Through channel mapping and activation function processing, the channel attention weight G is obtained, which is expressed as G = φ(W g ·X dw ), where W g is the channel mapping matrix; Will Perform channel-by-channel weighted fusion with G to obtain fusion features Expressed as Among them, ⊙ is the channel-wise multiplication operation; Will Recover the channel dimension through linear mapping to obtain the modeling control characteristics Expressed that Where W o is the linear mapping matrix.

6. The medical image segmentation method based on Mamba network according to claim 5 is characterized in that The processing of the five-dimensional selective scanning layer specifically includes the following steps: The input feature X v , divided into 16 subspaces in order from left to right and from top to bottom, and marked with corresponding numbers; the marked subspace numbers are expressed in matrices as Set 5 types of scanning modes: Scan Mode 1-Fractal Mode: Path 1: Starting from subspace 1, scan in the following order: 1-5-6-2-3-4-8-7-11-12-16-15-14-10-9-13; Path 2: Starting from subspace 4, scan in the following order: 4-3-7-8-12-16-15-11-10-14-13-9-5-6-2-1; Path 3: Starting from subspace 13, scan in the following order: 13-14-10-9-5-1-2-6-7-3-4-8-12-11-15-16; Path 4: Starting from subspace 16, scan in the following order: 16-12-11-15-14-13-9-10-6-5-1-2-3-7-8-4; Scan Mode 2-Spiral Mode: Path 2: Starting from subspace 1, scan in the following order: 1-2-3-4-8-12-16-15-14-13-9-5-6-7-11-10; Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-14-13-9-5-1-2-3-7-11-10-6; Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-3-4-8-12-16-15-14-10-6-7-11; Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-5-1-2-3-4-8-12-11-10-6-7; Scan Mode 3-Snake Mode: Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-8-7-6-5-9-10-11-12-16-15-14-13; Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-15-11-7-3-2-6-10-14-13-9-5-7; Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-2-6-10-14-15-11-7-3-4-8-12-16; Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-9-10-11-12-8-7-6-5-1-2-3-4; Scan Mode 4-Diagonal Mode: Path 1: Starting from subspace 1, scan in the following order: 1-2-5-9-6-3-4-7-10-13-14-11-8-12-15-16; Path 2: Starting from subspace 4, scan in the following order: 4-8-3-2-7-12-16-11-6-1-5-10-15-14-9-13; Path 3: Starting from subspace 13, scan in the following order: 13-9-14-15-10-5-1-6-11-16-12-7-2-3-8-4; Path 4: Starting from subspace 16, scan in the following order: 16-15-12-8-11-14-13-10-7-4-3-6-9-5-2-1; Scan Mode 5 - Zigzag Mode: Path 1: Starting from subspace 1, scan in the following order: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16; Path 2: Starting from subspace 4, scan in the following order: 4-8-12-16-3-7-11-15-2-6-10-14-1-5-9-13; Path 3: Starting from subspace 13, scan in the following order: 13-9-5-1-14-10-6-2-15-11-7-3-16-12-8-4; Path 4: Starting from subspace 16, scan in the following order: 16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-1; The one-dimensional feature sequence generated by the i-th path in the k-th scanning mode is expressed as The value of k ranges from 1 to 5, and the value of i ranges from 1 to 4; Each Processing is performed through the state modeling layer, and modeling and recursion based on the gated state space are performed in each spatial subdomain to obtain path-level state features In each scanning mode, the path-level state features on the four paths are summed channel by channel to obtain the preliminary aggregate features. Expressed as Calculate the channel mean of the path output for Calculate the direction fusion weight G k for Where ∈ is the set numerical stability parameter, σ() is the Sigmoid activation function; Calculate the fusion output for Finally, the spatial state dependent features are obtained for Concat() is concatenated by channel dimension.

7. The medical image segmentation method based on Mamba network according to claim 6 is characterized in that The processing process of the graph interaction attention module includes the following steps: The input of the graph interaction attention module is represented as F i , the value of i ranges from 1 to 3, corresponding to the outputs of the second Patch Embedding module to the fourth Patch Embedding module respectively; Using three independent graph attention maps, we can calculate F i The query matrix Q, key matrix K and value matrix V, where Q = W q F i , K=W k F, V = W v F i , where W q is the linear projection matrix of the query matrix, W k is the linear projection matrix of the key matrix, W v is the linear projection matrix of the value matrix; Rearrange the query matrix Q, key matrix K and value matrix V along the height direction and width direction respectively to obtain the height direction query matrix Q h , width direction query matrix Q w , height direction key matrix K h , width direction key matrix K w , height direction value matrix V h and the width direction value matrix V w ; The joint attention weight matrix S is calculated as Where softmax() is the softmax function; The obtained joint attention weight matrix S is divided into the height direction weight matrix S along the channel dimension h and the width direction weight matrix S w ; Calculate the feature representation T after direction enhancement i T i =S h V h +S w V w ; The feature after direction enhancement is represented as T i Processed through a 1×1 convolutional layer to reconstruct the channel dimension and compared with F i Perform residual connection operation to obtain the final output feature map And serve as the output of the graph interaction attention module; The calculation process is expressed as Among them, Conv 1×1 () is the 1×1 convolution layer processing process.

8. The medical image segmentation method based on Mamba network according to claim 7 is characterized in that The final projection module processing process specifically includes the following steps: The final projection module is used to upsample the feature image output by the decoder to its original size.

9. The medical image segmentation method based on Mamba network according to claim 8, characterized in that The processing of the prediction module includes the following steps: A 1×1 convolutional layer is used as the prediction module; The input image features are mapped into a single-channel prediction map through a 1×1 convolutional layer to achieve the prediction of the final image segmentation result of the input image.

10. An imaging method comprising the medical image segmentation method based on the Mamba network according to any one of claims 1 to 9, characterized in that The following steps are also included: S6. The segmentation result of the medical image obtained in step S5 is marked and re-imaged on the original medical image to obtain a medical image with the segmentation result.

Citation Information

Patent Citations

  • Method for accurately segmenting medical image

    CN117994517A

  • Underwater image enhancement method of Mama hybrid architecture based on space-frequency fusion

    CN118710507A

  • Ultrahigh-resolution remote sensing image segmentation method based on frequency domain information fusion

    CN119559200A

  • Visual Mama and multi-scale feature fused image segmentation network construction method

    CN119785022A

  • Medical image segmentation method based on axial MLP and spatial cross gating

    CN119963835A

Cited By

  • Fire cable protection multi-material sub-path microscopic image generation method based on Mama

    CN122116051A