A cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement

By combining a state-space model with a dual-path multi-scale enhanced cardiac image segmentation method, the problems of long-distance dependence and computational complexity in cardiac image segmentation of deep learning models are solved, achieving efficient and accurate cardiac image segmentation and improving the accuracy of cardiac disease diagnosis and treatment planning.

CN119151956BActive Publication Date: 2025-10-28QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES) +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411170349.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-10-28
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing deep learning models struggle to effectively capture long-range image feature dependencies in cardiac image segmentation tasks, and their high computational complexity limits their use in practical clinical applications.

Method used

A cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement is adopted. By constructing an encoder and decoder, and combining a state-space attention module and a dual-path multi-scale enhancement module, the segmentation network model is optimized. The linear computational complexity of the state-space model and the recognition capability of dual-path multi-scale enhancement are utilized to handle long-distance dependencies in cardiac images.

Benefits of technology

It improves the accuracy and efficiency of cardiac image segmentation, enhances the model's ability to recognize structures at different scales, adapts to the complexity and diversity of cardiac images, and significantly improves the accuracy of cardiac disease diagnosis and treatment planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151956B_ABST
    Figure CN119151956B_ABST
Patent Text Reader

Abstract

A cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement is presented, belonging to the field of image segmentation technology. The state-space attention module, by integrating the SSM state-space model branches, convolution branches, and attention branches, not only improves the model's recognition accuracy of various structural boundaries in cardiac images but also leverages the unique advantage of SSM in handling long-distance dependencies while maintaining computationally complexity linearly related to input size, thus contributing to more accurate and computationally efficient cardiac image segmentation. The dual-path multi-scale enhancement module, through channel aggregation branches and multi-scale fusion branches, enhances the model's ability to recognize structures at different scales, improving its adaptability and robustness, and facilitating the handling of cardiac structures of various sizes. Therefore, our method can better adapt to the complexity and diversity of cardiac image segmentation, providing higher accuracy and efficiency segmentation results, and significantly improving the accuracy of cardiac disease diagnosis and treatment planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image segmentation technology, specifically to a cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement. Background Technology

[0002] In the current field of medical imaging processing, accurate segmentation of cardiac images is crucial for gaining a deeper understanding of heart disease, developing treatment plans, and monitoring disease progression. With the expanding application of artificial intelligence in medicine, deep learning, particularly convolutional neural networks (CNNs) and Transformer models, has demonstrated enormous potential in cardiac image segmentation tasks. These neural network models provide powerful tools for medical image analysis by automatically extracting high-dimensional features and recognizing complex image patterns, significantly improving segmentation accuracy and efficiency compared to traditional methods.

[0003] However, despite significant progress in deep learning models, they still face limitations in cardiac image segmentation tasks. CNN models are limited to local receptive fields, making it difficult to effectively capture long-range image feature dependencies, which are crucial for understanding the integrity of cardiac structures. While Transformer-based models can handle global information, their self-attention mechanism leads to computational complexity that increases quadratically with image size, significantly increasing the computational burden of processing high-resolution cardiac images and limiting their use in practical clinical applications. Recently, the introduction of the Mamba model, which incorporates a State-Space Model (SSM), has provided a novel perspective. SSM has demonstrated unique advantages in handling long-range dependencies, while its computational complexity is linearly related to input size, significantly reducing computational resource requirements compared to traditional deep learning models. Therefore, exploring a method that can effectively handle long-range dependencies in cardiac images while maintaining high computational resource efficiency is particularly important. Summary of the Invention

[0004] In order to overcome the shortcomings of the above technologies, this invention provides a cardiac image segmentation method that effectively handles long-range dependencies in cardiac images while maintaining high efficiency in the use of computational resources.

[0005] The technical solution adopted by the present invention to overcome the technical problems is:

[0006] A cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement includes:

[0007] a) Collect N left atrial MRI image data to obtain a left atrial MRI image dataset E, E = {E1, E2, ..., E...} i ,...,E N}, Ei b) Given the i-th left atrial MRI image data, i∈{1,...,N}; i Preprocessing is performed to obtain the preprocessed MRI image data S of the i-th left atrium. i The preprocessed left atrial MRI image dataset is S, where S = {S1, S2, ..., S} i ,...,S N};

[0008] c) Divide the preprocessed left atrial MRI image dataset S into a training set, a validation set, and a test set. Slice each preprocessed left atrial MRI image data in the training set along the Z-axis to obtain a slice image set F consisting of X slice images. train F train ={F1,F2,...,F i ,...,F X}, F i For the i-th slice image, i∈{1,…,X}, slice the preprocessed left atrial MRI image data in the test set along the Z-axis to obtain a slice image set F consisting of Y slice images. test F test ={F1,F2,...,F j ,...,F Y}, F j Let j be the j-th slice image, i∈{1,...,Y};

[0009] d) Establish a segmentation network model consisting of an encoder and a decoder;

[0010] e) Take the i-th slice image F from the training set i The input is fed into the encoder of the segmentation network model, and the output is the feature map.

[0011] f) Feature map The input is fed into the decoder of the segmentation network model, and the output is the predicted segmented image.

[0012] g) Use the SGD optimizer, utilizing the total loss function L total Train the segmentation network model to obtain the optimized segmentation network model;

[0013] h) The j-th slice image F in the test set j The input is fed into the optimized segmentation network model, and the output is the predicted segmented image. Further, in step a), N left atrial MRI image data are collected from the 2018 Atrial Segmentation Challenge dataset.

[0014] Furthermore, step b) includes the following steps:

[0015] b-1) Transfer the i-th left atrial MRI image data E i Slice along the Z-axis, and resample several slices with a pixel spacing of 1.5 in the X-axis direction and a pixel spacing of 1.5 in the Y-axis direction;

[0016] b-2) Use the CenterCrop function in PyTorch to perform a center cropping operation on the slice after the resampling operation. The size of the cropped slice is 112×112.

[0017] b-3) Use the torch.stack() function to stack the centrally cropped slices and restore the left atrial MRI image data E. i ′;

[0018] b-4) Use the random_flip_rotate() function to transfer the left atrial MRI image data E i The image is flipped along either the horizontal or vertical axis with a probability of 0.5, and the flip angle is 90 degrees, to obtain the rotated left atrial MRI image data E. i ";

[0019] b-5) The rotated left atrial MRI image data E i "Z-score normalization is performed to obtain the preprocessed MRI image data S of the i-th left atrium." i .

[0020] Furthermore, in step c), the preprocessed left atrial MRI image dataset S is divided into training set, validation set, and test set in a ratio of 6:1:3.

[0021] Furthermore, step e) includes the following steps:

[0022] The encoder of the segmentation network model (e-1) consists of convolutional layers, a first state-space attention module (SSSCA), a first max-pooling layer, a second state-space attention module (SSSCA), a second max-pooling layer, a third state-space attention module (SSSCA), a third max-pooling layer, a fourth state-space attention module (SSSCA), and a fourth max-pooling layer. Each of the first, second, third, and fourth state-space attention modules (SSSCA) consists of an SSM branch, a convolutional branch, and an attention branch. The SSM branch consists of a first LayerNorm layer, a first Linear layer, a first SiLu activation function, a second Linear layer, a depthwise separable convolutional layer, a second SiLu activation function, a state-space model (SSM), and a second LayerNorm layer. Each convolutional branch consists of a BatchNorm layer, a first convolutional layer, a first ReLU activation function, a second convolutional layer, a second ReLU activation function, and a pointwise convolutional layer. The attention branch consists of a channel attention mechanism (CAM) and a spatial attention mechanism (SAM).

[0023] e-2) The i-th slice image F in the training set i The input is fed into the convolutional layer of the encoder, and the output is the feature map.

[0024] e-3) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map F. l 1-1 , feature map F l 1-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the first state-space attention module SSCA, and the output is the feature map F. l 1-3 , will F l 1-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the first state-space attention module SSCA and the second LayerNorm layer, and the output is the feature map F.l 1-4 , feature map F l 1-2 With feature map F l 1-4 Perform a multiplication operation to obtain the feature map F. l 1 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. Feature map F l 1 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the first state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-4) Feature Map The input is fed into the first max-pooling layer of the encoder, and the output is the feature map. e-5) Use the torch.chunk() function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map F. l 2-1 , feature map F l 2-1The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map F. l 2-2 , feature map F l 2-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the second state-space attention module SSCA, and the output is the feature map F. l 2-3 , will F l 2-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the second state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 2-4 , feature map F l 2-2 With feature map F l 2-4 Perform a multiplication operation to obtain the feature map F. l 2 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the second state space attention module SSSCA, and the output is the feature map. Feature map F l 2 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the second state space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the second state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-6) Feature Map The input is fed into the second max-pooling layer of the encoder, and the output is the feature map. e-7) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map F. l 3-1 , feature map F l 3-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map F. l 3-2 , feature map F l 3-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the third state-space attention module SSCA, and the output is the feature map F. l 3-3 , will F l 3-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the third state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 3-4 , feature map F l 3-2 With feature map F l 3-4 Perform a multiplication operation to obtain the feature map F. l 3 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the third state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the third state-space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the third state space attention module (SSSCA), and the output is the feature map. Feature map F l 3 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the third state space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the third-state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-8) Feature Map The input is fed into the third max-pooling layer of the encoder, and the output is the feature map. e-9) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map F. l 4-1 , feature map F l 4-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map F. l 4-2 , feature map F l 4-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the fourth state-space attention module SSCA, and the output is the feature map F. l 4-3 , will F l 4-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the fourth state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 4-4 , feature map F l 4-2 With feature map F l 4-4 Perform a multiplication operation to obtain the feature map F. l 4 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the fourth state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. Feature map F l 4 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the fourth state space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the fourth-state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-10) feature map The input is fed into the fourth max-pooling layer of the encoder, and the output is the feature map. Preferably, in step e-2), the kernel size of the convolutional layer of the encoder is 3×3; in step e-3), the kernel size of the depth-separable convolutional layer of the SSM branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the first convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the second convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; and the kernel size of the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3 and stride of 1; in step e-4),... The first max pooling layer in step e-5) has a 2×2 kernel and a stride of 2; the depthwise separable convolutional layer of the SSM branch of the second state space attention module SSSCA in step e-5) has a 3×3 kernel, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel and a stride of 1; the second max pooling layer in step e-6) The pooling kernel is 2×2 with a stride of 2; in step e-7), the depthwise separable convolutional layer of the SSM branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3 with a stride of 1; in step e-8), the pooling kernel of the third max pooling layer is 2×2. 2. The stride is 2; in step e-9), the depth-separable convolutional layer of the SSM branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3 and stride of 1; in step e-10), the pooling kernel of the fourth max pooling layer is 2×2 and stride of 2.

[0025] Furthermore, step f) includes the following steps:

[0026] f-1) The decoder of the segmentation network model consists of a first dual-path multi-scale enhancement module DPMSFE, a first transposed convolutional layer, a first residual block, a second dual-path multi-scale enhancement module DPMSFE, a second transposed convolutional layer, a second residual block, a third dual-path multi-scale enhancement module DPMSFE, a third transposed convolutional layer, a third residual block, a fourth dual-path multi-scale enhancement module DPMSFE, a fourth transposed convolutional layer, a fourth residual block, and a convolutional layer; the first dual-path multi-scale enhancement module DPMSFE, the second dual-path multi-scale enhancement module DPMSFE, the third dual-path multi-scale enhancement module DPMSFE, and the fourth dual-path multi-scale enhancement module D... Each PMSFE consists of a lower convolutional layer, a channel aggregation branch, a multi-scale fusion branch, and an upper convolutional layer. The channel aggregation branch consists of an average pooling layer, a first convolutional layer, a ReLU activation function, and a second convolutional layer. The multi-scale fusion branch consists of a first convolutional layer, a second convolutional layer, a third convolutional layer, a max pooling layer, a fourth convolutional layer, and a sigmoid activation function. The first residual block, the second residual block, the third residual block, and the fourth residual block each consist of a first convolutional layer, a first BatchNorm layer, a first ReLU activation function, a second convolutional layer, a second BatchNorm layer, a second ReLU activation function, and a third ReLU activation function.

[0027] f-2) Feature map The input is fed into the lower convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. f-3) feature map With feature map Perform the addition operation to output the feature map. f-4) feature map The input is fed into the first transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the first residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the first residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the first residual block of the decoder, and the output is the feature map. f-5) feature map The input is fed into the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the second dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-6) feature map With feature map Perform the addition operation to output the feature map. f-7) will feature map The input is fed into the second transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the second residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the second residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the second residual block of the decoder, and the output is the feature map. f-8) feature map The input is fed into the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-9) feature map With feature map Perform the addition operation to output the feature map. f-10) will feature map The input is fed into the third transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the third residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the third residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the third residual block of the decoder, and the output is the feature map. f-11) will feature map The input is fed into the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-12) feature map With feature map Perform the addition operation to output the feature map. f-13) feature map The input is fed into the fourth transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. f-14) will feature map The input is fed into the convolutional layer of the decoder, and the output is the predicted segmented image. Preferably, in step f-2), the kernel size of the lower convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1; the kernel size of the first convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the second convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the first convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1; and the kernel size of the second convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1, and the stride is 1. In step f-4), the kernel size of the first transposed convolutional layer of the decoder is 2×2, the stride is 2, the kernel size of the first convolutional layer of the first residual block of the decoder is 3×3, and the kernel size of the second convolutional layer of the first residual block of the decoder is 3×2. 3; In step f-5), the kernel size of the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1; the kernel size of the first convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the second convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the first convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1; the kernel size of the second convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-7), the kernel size of the second transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the second residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the second residual block of the decoder is 3×3.In step f-8), the kernel size of the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. 2. The kernel size of the third convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-10), the kernel size of the third transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the third residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the third residual block of the decoder is 3×3. In step f-11), the kernel size of the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1, stride is 1. In step f-13), the kernel size of the fourth transposed convolutional layer of the decoder is 2×2, stride is 2. The kernel size of the first convolutional layer of the fourth residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the fourth residual block of the decoder is 3×3. Further, through formula L; total =αL Dice +βL CEThe total loss function L is calculated. total In the formula, α and β are both hyperparameters, L Dice Let L be the Dice loss function. CE This is the cross-entropy loss function.

[0028] Preferably, when training the segmentation network model, the learning rate is set to 0.01, the batch size is set to 8, the number of iterations is set to 1000, the hyperparameter α is set to 0.4, and the hyperparameter β is set to 0.4.

[0029] The beneficial effects of this invention are as follows: The state-space attention module, by integrating the SSM state-space model branches, convolution branches, and attention branches, not only improves the model's recognition accuracy of various structural boundaries in cardiac images, but also leverages the unique advantage of SSM in handling long-distance dependencies while maintaining computationally complexity linearly related to input size, thus contributing to more accurate and computationally efficient segmentation of cardiac images. The dual-path multi-scale enhancement module, through channel aggregation branches and multi-scale fusion branches, enhances the model's ability to recognize structures at different scales, improving its adaptability and robustness, and facilitating the handling of cardiac structures of various sizes. Therefore, our method can better adapt to the complexity and diversity of cardiac image segmentation, providing higher accuracy and efficiency in segmentation results, and significantly improving the accuracy of cardiac disease diagnosis and treatment planning. Attached Figure Description

[0030] Figure 1 This is a structural diagram of the segmentation network of the present invention;

[0031] Figure 2 This is a structural diagram of the State Space Attention Module (SSSCA) of the present invention;

[0032] Figure 3 This is a structural diagram of the dual-path multi-scale enhancement module DPMSFE of the present invention. Detailed Implementation

[0033] The following is in conjunction with the appendix Figure 1 Appendix Figure 2 Appendix Figure 3 The present invention will be further described below.

[0034] A cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement includes:

[0035] a) Collect N left atrial MRI image data to obtain a left atrial MRI image dataset E, E = {E1, E2, ..., E...} i ,...,E N}, E i Let be the MRI image data of the i-th left atrium, i∈{1,...,N}.

[0036] b) Transfer the MRI image data of the i-th left atrium to E i Preprocessing is performed to obtain the preprocessed MRI image data S of the i-th left atrium. i The preprocessed left atrial MRI image dataset is S, where S = {S1, S2, ..., S} i ,...,S N}

[0037] c) Divide the preprocessed left atrial MRI image dataset S into a training set, a validation set, and a test set. Slice each preprocessed left atrial MRI image data in the training set along the Z-axis to obtain a slice image set Ftrain consisting of X slice images. train ={F1,F2,...,F i ,...,F X}, F i For the i-th slice image, i∈{1,...,X}, the preprocessed left atrial MRI image data in the test set are sliced ​​along the Z-axis to obtain a slice image set Ftest consisting of Y slice images. test ={F1,F2,…,F j ,…,F Y}, F j Let be the j-th slice image, i∈{1,…,Y}.

[0038] d) Establish a segmentation network model consisting of an encoder and a decoder.

[0039] e) Take the i-th slice image F from the training set i The input is fed into the encoder of the segmentation network model, and the output is the feature map.

[0040] f) Feature map The input is fed into the decoder of the segmentation network model, and the output is the predicted segmented image.

[0041] g) Use the SGD optimizer, utilizing the total loss function L total Train the segmentation network model to obtain the optimized segmentation network model.

[0042] h) The j-th slice image F in the test set j The input is fed into the optimized segmentation network model, and the output is the predicted segmented image. In one embodiment of the present invention, step a) involves collecting N left atrial MRI image data from the 2018 Atrial Segmentation Challenge dataset.

[0043] In one embodiment of the present invention, step b) includes the following steps:

[0044] b-1) Transfer the i-th left atrial MRI image data E i Slice along the Z-axis, and then resample the slices with a pixel spacing of 1.5 in the X-axis direction and a pixel spacing of 1.5 in the Y-axis direction.

[0045] b-2) Use the CenterCrop function in PyTorch to perform a center cropping operation on the slice after the resampling operation. The size of the cropped slice is 112×112.

[0046] b-3) Use the torch.stack() function to stack the centrally cropped slices and restore the left atrial MRI image data E. i ′.

[0047] b-4) Use the random_flip_rotate() function to transfer the left atrial MRI image data E i The image is flipped along either the horizontal or vertical axis with a probability of 0.5, and the flip angle is 90 degrees, to obtain the rotated left atrial MRI image data E. i ″.

[0048] b-5) The rotated left atrial MRI image data E i "Z-score normalization is performed to obtain the preprocessed MRI image data S of the i-th left atrium." i .

[0049] In one embodiment of the present invention, in step c), the preprocessed left atrial MRI image dataset S is divided into a training set, a validation set, and a test set in a ratio of 6:1:3.

[0050] In one embodiment of the present invention, step e) includes the following steps:

[0051] (e-1) The encoder of the segmentation network model consists of convolutional layers, a first state-space attention module (SSSCA), a first max-pooling layer, a second state-space attention module (SSSCA), a second max-pooling layer, a third state-space attention module (SSSCA), a third max-pooling layer, a fourth state-space attention module (SSSCA), and a fourth max-pooling layer. The first, second, third, and fourth state-space attention modules (SSSCA) each consist of an SSM branch, a convolutional branch, and an attention branch. The SSM branch consists of a first LayerNorm layer (LN), a first Linear layer, a first SiLu activation function, a second Linear layer, a depthwise separable convolutional layer (DwConv), a second SiLu activation function, a state-space model SSM, and a second LayerNorm layer; the convolutional branches all consist of a BatchNorm layer (BN), a first convolutional layer, a first ReLu activation function, a second convolutional layer, a second ReLu activation function, and a pointwise convolutional layer (PwConv); the attention branches consist of a channel attention mechanism (CAM) and a spatial attention mechanism (SAM).

[0052] e-2) The i-th slice image F in the training set i The input is fed into the convolutional layer of the encoder, and the output is the feature map.

[0053] e-3) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map F. l 1-1 , feature map F l 1-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map F. l 1 -2 , feature map F l 1-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the first state-space attention module SSCA, and the output is the feature map F. l 1-3 , will F l 1-3The inputs are sequentially fed into the state-space model SSM of the SSM branch of the first state-space attention module SSCA and the second LayerNorm layer, and the output is the feature map F. l 1-4 , feature map F l 1-2 With feature map F l 1-4 Perform a multiplication operation to obtain the feature map F. l 1 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. Feature map F l 1 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the first state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the first state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-4) Feature Map The input is fed into the first max-pooling layer of the encoder, and the output is the feature map. e-5) Use the torch.chunk() function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map F. l 2-1 , feature map F l2-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map F. l 2 -2 , feature map F l 2-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the second state-space attention module SSCA, and the output is the feature map F. l 2-3 , will F l 2-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the second state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 2-4 , feature map F l 2-2 With feature map F l 2-4 Perform a multiplication operation to obtain the feature map F. l 2 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the second state space attention module SSSCA, and the output is the feature map. Feature map F l 2 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the second state space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the second state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-6) Feature Map The input is fed into the second max-pooling layer of the encoder, and the output is the feature map. e-7) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map F. l 3-1 , feature map F l 3-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map F. l 3-2 , feature map F l 3-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the third state-space attention module SSCA, and the output is the feature map F. l 3-3 , will F l 3-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the third state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 3-4 , feature map F l 3-2 With feature map F l 3-4 Perform a multiplication operation to obtain the feature map F. l 3 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the third state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the third state-space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the third state space attention module (SSSCA), and the output is the feature map. Feature map F l 3 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the third state space attention module SSSCA, and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the third-state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-8) Feature Map The input is fed into the third max-pooling layer of the encoder, and the output is the feature map. e-9) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map feature map The input is fed into the first LayerNorm layer of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map F. l 4-1 , feature map F l 4-1 The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map F. l 4-2 , feature map F l 4-1 The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the fourth state-space attention module SSCA, and the output is the feature map F. l 4-3 , will F l 4-3 The inputs are sequentially fed into the state-space model SSM of the SSM branch of the fourth state-space attention module SSCA, and the second LayerNorm layer, and the output is the feature map F. l 4-4 , feature map F l 4-2 With feature map F l 4-4 Perform a multiplication operation to obtain the feature map F. l 4 ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the fourth state-space attention module SSSCA, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. Feature map F l 4 With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. feature map The input is fed into the channel attention mechanism CAM of the attention branch of the fourth state space attention module (SSSCA), and the output is the feature map. feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the fourth-state spatial attention module (SSSCA), and the output is the feature map. feature map With feature map Perform an addition operation to obtain the feature map. e-10) feature map The input is fed into the fourth max-pooling layer of the encoder, and the output is the feature map. In this embodiment, in step e-2), the kernel size of the encoder's convolutional layer is 3×3; in step e-3), the kernel size of the depth-separable convolutional layer of the SSM branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the first convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the second convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; and the kernel size of the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3 and stride of 1; in step e- 4) The first max-pooling layer has a 2×2 kernel and a stride of 2; in step e-5), the depthwise separable convolutional layer of the SSM branch of the second state-space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the second state-space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the second state-space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the second state-space attention module SSSCA has a 3×3 kernel and a stride of 1; in step e-6), the second max-pooling layer... The pooling kernel of the max pooling layer is 2×2 with a stride of 2; in step e-7), the depthwise separable convolutional layer of the SSM branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3 with a stride of 1; in step e-8), the pooling kernel of the third max pooling layer is 2×2. ×2, stride 2; In step e-9), the depth-separable convolutional layer of the SSM branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3 and stride of 1; In step e-10), the pooling kernel of the fourth max pooling layer is 2×2 and stride 2.

[0054] In one embodiment of the present invention, step f) includes the following steps:

[0055] f-1) The decoder of the segmentation network model consists of a first dual-path multi-scale enhancement module (DPMSFE), a first transposed convolutional layer, a first residual block, a second dual-path multi-scale enhancement module (DPMSFE), a second transposed convolutional layer, a second residual block, a third dual-path multi-scale enhancement module (DPMSFE), a third transposed convolutional layer, a third residual block, a fourth dual-path multi-scale enhancement module (DPMSFE), a fourth transposed convolutional layer, a fourth residual block, and a convolutional layer. The first, second, third, and fourth dual-path multi-scale enhancement modules (DPMSFE, DPMSFE, DPMSFE, and DPMSFE) are all composed of a lower convolutional layer. The system consists of a downconvolutional layer (DownConv), a channel aggregation branch, a multi-scale fusion branch, and an upconvolutional layer (UpConv). The channel aggregation branch consists of an average pooling layer, a first convolutional layer, a ReLU activation function, and a second convolutional layer. The multi-scale fusion branch consists of a first convolutional layer, a second convolutional layer, a third convolutional layer, a max pooling layer, a fourth convolutional layer, and a sigmoid activation function. The first, second, third, and fourth residual blocks each consist of a first convolutional layer, a first batchNorm layer, a first ReLU activation function, a second convolutional layer, a second batchNorm layer, a second ReLU activation function, and a third ReLU activation function. f-2) The feature map... The input is fed into the lower convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. f-3) feature map With feature map Perform the addition operation to output the feature map. f-4) feature map The input is fed into the first transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the first residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the first residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the first residual block of the decoder, and the output is the feature map. f-5) feature map The input is fed into the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the second dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-6) feature map With feature map Perform the addition operation to output the feature map. f-7) will feature map The input is fed into the second transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the second residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the second residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the second residual block of the decoder, and the output is the feature map. f-8) feature map The input is fed into the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-9) feature map With feature map Perform the addition operation to output the feature map. f-10) will feature map The input is fed into the third transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the third residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the third residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the third residual block of the decoder, and the output is the feature map. f-11) will feature map The input is fed into the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map The input is fed into the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to obtain the feature map. feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map feature map Feature map Feature map Perform an addition operation to obtain the feature map. feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. feature map With feature map Perform a multiplication operation to output the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. f-12) feature map With feature map Perform the addition operation to output the feature map. f-13) feature map The input is fed into the fourth transposed convolutional layer of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. feature map With feature map Perform the addition operation to output the feature map. feature map The input is fed into the third ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. f-14) will feature map The input is fed into the convolutional layer of the decoder, and the output is the predicted segmented image. In this embodiment, in step f-2), the kernel size of the lower convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1; the kernel size of the first convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the second convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1; the kernel size of the first convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1; and the kernel size of the second convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1×1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1, and the stride is 1. In step f-4), the kernel size of the first transposed convolutional layer of the decoder is 2×2, the stride is 2, the kernel size of the first convolutional layer of the first residual block of the decoder is 3×3, and the kernel size of the second convolutional layer of the first residual block of the decoder is 1×2. In step f-5), the kernel size of the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-7), the kernel size of the second transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the second residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the second residual block of the decoder is 3×3.In step f-8), the kernel size of the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. 2. The kernel size of the third convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-10), the kernel size of the third transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the third residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the third residual block of the decoder is 3×3. In step f-11), the kernel size of the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1, stride is 1. In step f-13), the kernel size of the fourth transposed convolutional layer of the decoder is 2×2, stride is 2. The kernel size of the first convolutional layer of the fourth residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the fourth residual block of the decoder is 3×3.

[0056] In one embodiment of the present invention, through formula L total =αLDice +βL CE The total loss function L is calculated. total In the formula, α and β are both hyperparameters, L Dice Let L be the Dice loss function. CE This is the cross-entropy loss function.

[0057] In this embodiment, the learning rate is set to 0.01, the batch size is set to 8, the number of iterations is set to 1000, the hyperparameter α is set to 0.4, and the hyperparameter β is set to 0.4 when training the segmentation network model.

[0058] To verify the reliability of this patented method, the final predicted segmentation results were analyzed. A systematic evaluation was conducted, comparing the results with existing deep learning segmentation methods, as shown in Table 1:

[0059]

[0060] In the experimental methods, we compared two classic medical image segmentation methods, MT and DAN, with four superior existing medical image segmentation methods: UA-MT, CCT, SASSNet, and DTC. Our evaluation metrics used the four most commonly used metrics: Dice, Jaccard, ASD, and 95HD. Higher scores for Dice and Jaccard indicate better performance, while lower scores for ASD and 95HD indicate better performance. The data in the table shows that the proposed method improves the Dice metric by 0.77% and the Jaccard metric by 0.46% compared to the previous best method. The ASD and 95HD metrics are 1.75 and 6.63 respectively, all superior to previous methods. In conclusion, this performance improvement indicates that the proposed method can better handle long-range dependencies in cardiac images, thus achieving better segmentation results.

[0061] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A cardiac image segmentation method based on a state-space model and dual-path multi-scale enhancement, characterized in that, include: a) Collect N left atrial MRI image data to obtain a left atrial MRI image dataset. , , For the first One left atrial MRI image data, ; b) will Left atrial MRI image data Preprocessing is performed to obtain the preprocessed first... Left atrial MRI image data The preprocessed left atrial MRI image dataset is , ; c) The preprocessed left atrial MRI image dataset The dataset was divided into training, validation, and test sets. Preprocessed left atrial MRI images from the training set were sliced ​​along the Z-axis to obtain... A slice image set consisting of slice images , , For the first A slice image, The preprocessed left atrial MRI image data from the test set were sliced ​​along the Z-axis to obtain... A slice image set consisting of slice images , , For the first A slice image, ; d) Establish a segmentation network model consisting of an encoder and a decoder; e) The training set slice image The input is fed into the encoder of the segmentation network model, and the output is the feature map. ; f) Feature map The input is fed into the decoder of the segmentation network model, and the output is the predicted segmented image. ; g) Use the SGD optimizer, utilizing the total loss function. Train the segmentation network model to obtain the optimized segmentation network model; h) The test set of the first slice image The input is fed into the optimized segmentation network model, and the output is the predicted segmented image. ; Step b) includes the following steps: b-1) will the first Left atrial MRI image data Slice along the Z-axis, and resample several slices with a pixel spacing of 1.5 in the X-axis direction and a pixel spacing of 1.5 in the Y-axis direction; b-2) Use the CenterCrop function in PyTorch to perform a center cropping operation on the slice after the resampling operation. The size of the cropped slice is 112×112. b-3) Use the torch.stack() function to stack the centrally cropped slices and restore the left atrial MRI image data. ; b-4) Use the random_flip_rotate() function to transfer left atrial MRI image data The left atrial MRI image data was obtained by flipping the image along either the horizontal or vertical axis with a probability of 0.5 and a flip angle of 90 degrees. ; b-5) Rotated left atrial MRI image data Perform Z-Score standardization to obtain the preprocessed version of the first Z-Score. Left atrial MRI image data .

2. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 1, characterized in that: In step a), N left atrial MRI images are collected from the 2018 Atrial Segmentation Challenge dataset.

3. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 1, characterized in that: In step c), the preprocessed left atrial MRI image dataset The dataset is divided into training, validation, and test sets in a 6:1:3 ratio.

4. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 1, characterized in that, Step e) includes the following steps: The encoder of the segmentation network model (e-1) consists of convolutional layers, a first state-space attention module (SSSCA), a first max-pooling layer, a second state-space attention module (SSSCA), a second max-pooling layer, a third state-space attention module (SSSCA), a third max-pooling layer, a fourth state-space attention module (SSSCA), and a fourth max-pooling layer. Each of the first, second, third, and fourth state-space attention modules (SSSCA) consists of an SSM branch, a convolutional branch, and an attention branch. The SSM branch consists of a first LayerNorm layer, a first Linear layer, a first SiLu activation function, a second Linear layer, a depthwise separable convolutional layer, a second SiLu activation function, a state-space model (SSM), and a second LayerNorm layer. Each convolutional branch consists of a BatchNorm layer, a first convolutional layer, a first ReLU activation function, a second convolutional layer, a second ReLU activation function, and a pointwise convolutional layer. The attention branch consists of a channel attention mechanism (CAM) and a spatial attention mechanism (SAM). e-2) The training set will be the first slice image The input is fed into the convolutional layer of the encoder, and the output is the feature map. ; e-3) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map , feature map The input is fed into the first LayerNorm layer of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the first state-space attention module SSCA, and the output is the feature map. ,Will The inputs are sequentially fed into the state-space model SSM of the SSM branch of the first state-space attention module SSCA and the second LayerNorm layer, and the output is the feature map. , feature map With feature map Perform a multiplication operation to obtain the feature map. ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. ; feature map The input is fed into the channel attention mechanism CAM of the attention branch of the first state-space attention module SSSCA, and the output is the feature map. , feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the first state spatial attention module (SSSCA), and the output is the feature map. , feature map With feature map Perform an addition operation to obtain the feature map. ; e-4) Feature Map The input is fed into the first max-pooling layer of the encoder, and the output is the feature map. ; e-5) Use the torch.chunk() function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map , feature map The input is fed into the first LayerNorm layer of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the second state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the second state-space attention module SSCA, and the output is the feature map. ,Will The inputs are sequentially fed into the state-space model SSM of the SSM branch of the second state-space attention module SSCA, and then into the second LayerNorm layer, resulting in a feature map as the output. , feature map With feature map Perform a multiplication operation to obtain the feature map. ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the second state-space attention module SSSCA, and the output is the feature map. , feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the second state space attention module SSSCA, and the output is the feature map. , feature map With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. ; feature map The input is fed into the channel attention mechanism CAM of the attention branch of the second state space attention module SSSCA, and the output is the feature map. , feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the second state spatial attention module (SSSCA), and the output is the feature map. , feature map With feature map Perform an addition operation to obtain the feature map. ; e-6) Feature Map The input is fed into the second max-pooling layer of the encoder, and the output is the feature map. ; e-7) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map , feature map The input is fed into the first LayerNorm layer of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the third state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the third state-space attention module SSCA, and the output is the feature map. ,Will The inputs are sequentially fed into the state-space model SSM of the SSM branch of the third state-space attention module SSCA, and then into the second LayerNorm layer, resulting in a feature map as the output. , feature map With feature map Perform a multiplication operation to obtain the feature map. ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the third state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the third state-space attention module (SSSCA), and the output is the feature map. , feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the third state space attention module (SSSCA), and the output is the feature map. , feature map With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. ; feature map The input is fed into the channel attention mechanism CAM of the attention branch of the third state space attention module SSSCA, and the output is the feature map. , feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the third-state spatial attention module (SSSCA), and the output is the feature map. , feature map With feature map Perform an addition operation to obtain the feature map. ; e-8) Feature Map The input is fed into the third max-pooling layer of the encoder, and the output is the feature map. ; e-9) Use the `torch.chunk()` function in PyTorch to process the feature map. Perform a split operation to output the feature map. and feature map , feature map The input is fed into the first LayerNorm layer of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first Linear layer and the first SiLu activation function of the SSM branch of the fourth state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the second Linear layer, the depthwise separable convolutional layer, and the second SiLu activation function of the SSM branch of the fourth state-space attention module SSCA, and the output is the feature map. ,Will The inputs are sequentially fed into the state-space model SSM of the SSM branch of the fourth state-space attention module SSCA, and then into the second LayerNorm layer, resulting in a feature map as the output. , feature map With feature map Perform a multiplication operation to obtain the feature map. ; feature map The input is fed into the BatchNorm layer of the convolutional branch of the fourth state-space attention module SSSCA, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first ReLU activation function, the second convolutional layer, and the second ReLU activation function of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. , feature map The input is fed into the pointwise convolutional layer of the convolutional branch of the fourth state space attention module (SSSCA), and the output is the feature map. , feature map With feature map The feature map is obtained by performing a concat operation using the torch.cat() function in PyTorch. ; feature map The input is fed into the channel attention mechanism CAM of the attention branch of the fourth state space attention module (SSSCA), and the output is the feature map. , feature map The input is fed into the spatial attention mechanism (SAM) of the attention branch of the fourth-state spatial attention module (SSSCA), and the output is the feature map. , feature map With feature map Perform an addition operation to obtain the feature map. ; e-10) feature map The input is fed into the fourth max-pooling layer of the encoder, and the output is the feature map. .

5. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 4, characterized in that: In step e-2), the kernel size of the convolutional layer of the encoder is 3×3; in step e-3), the kernel size of the depthwise separable convolutional layer of the SSM branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the first convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the second convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3, with padding of 1 and stride of 1; the kernel size of the pointwise convolutional layer of the convolutional branch of the first state-space attention module SSSCA is 3×3 and stride of 1; in step e-4), the first The max pooling layer has a 2×2 kernel and a stride of 2; in step e-5), the depthwise separable convolutional layer of the SSM branch of the second state space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the second state space attention module SSSCA has a 3×3 kernel and a stride of 1; in step e-6), the pooling layer of the second max pooling layer... The kernel size is 2×2 with a stride of 2; in step e-7), the depthwise separable convolutional layer of the SSM branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the third state space attention module SSSCA has a kernel size of 3×3 with a stride of 1; in step e-8), the pooling kernel of the third max pooling layer is 2×2. The stride is 2; in step e-9), the depth-separable convolutional layer of the SSM branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the first convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the second convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3, padding of 1, and stride of 1; the pointwise convolutional layer of the convolutional branch of the fourth state spatial attention module SSSCA has a kernel size of 3×3 and stride of 1; in step e-10), the pooling kernel of the fourth max pooling layer is 2×2 and stride of 2.

6. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 1, characterized in that, Step f) includes the following steps: f-1) The decoder of the segmentation network model consists of a first dual-path multi-scale enhancement module DPMSFE, a first transposed convolutional layer, a first residual block, a second dual-path multi-scale enhancement module DPMSFE, a second transposed convolutional layer, a second residual block, a third dual-path multi-scale enhancement module DPMSFE, a third transposed convolutional layer, a third residual block, a fourth dual-path multi-scale enhancement module DPMSFE, a fourth transposed convolutional layer, a fourth residual block, and a convolutional layer; the first dual-path multi-scale enhancement module DPMSFE, the second dual-path multi-scale enhancement module DPMSFE, the third dual-path multi-scale enhancement module DPMSFE, and the fourth dual-path multi-scale enhancement module D... Each PMSFE consists of a lower convolutional layer, a channel aggregation branch, a multi-scale fusion branch, and an upper convolutional layer. The channel aggregation branch consists of an average pooling layer, a first convolutional layer, a ReLU activation function, and a second convolutional layer. The multi-scale fusion branch consists of a first convolutional layer, a second convolutional layer, a third convolutional layer, a max pooling layer, a fourth convolutional layer, and a sigmoid activation function. The first residual block, the second residual block, the third residual block, and the fourth residual block each consist of a first convolutional layer, a first BatchNorm layer, a first ReLU activation function, a second convolutional layer, a second BatchNorm layer, a second ReLU activation function, and a third ReLU activation function. f-2) Feature map The input is fed into the lower convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. , feature map The input is fed into the channel aggregation branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to obtain the feature map. , feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map , feature map Feature map Feature map Perform an addition operation to obtain the feature map. , feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to output the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the upper convolutional layer of the first dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. ; f-3) feature map With feature map Perform the addition operation to output the feature map. ; f-4) feature map The input is fed into the first transposed convolutional layer of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the first residual block of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the first residual block of the decoder, and the output is the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the third ReLU activation function of the first residual block of the decoder, and the output is the feature map. ; f-5) feature map The input is fed into the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map The input is fed into the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to obtain the feature map. , feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the second dual-path multi-scale enhancement module (DPMSFE) of the decoder, and the output is the feature map. Feature map Feature map , feature map Feature map Feature map Perform an addition operation to obtain the feature map. , feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to output the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. ; f-6) feature map With feature map Perform the addition operation to output the feature map. ; f-7) will feature map The input is fed into the second transposed convolutional layer of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the second residual block of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the second residual block of the decoder, and the output is the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the third ReLU activation function of the second residual block of the decoder, and the output is the feature map. ; f-8) feature map The input is fed into the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map The input is fed into the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to obtain the feature map. , feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map , feature map Feature map Feature map Perform an addition operation to obtain the feature map. , feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to output the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. ; f-9) feature map With feature map Perform the addition operation to output the feature map. ; f-10) will feature map The input is fed into the third transposed convolutional layer of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the third residual block of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the third residual block of the decoder, and the output is the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the third ReLU activation function of the third residual block of the decoder, and the output is the feature map. ; f-11) will feature map The input is fed into the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map The input is fed into the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to obtain the feature map. , feature map The inputs are respectively fed into the first, second, and third convolutional layers of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. Feature map Feature map , feature map Feature map Feature map Perform an addition operation to obtain the feature map. , feature map The inputs are sequentially fed into the max pooling layer, the fourth convolutional layer, and the sigmoid activation function of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. , feature map With feature map Perform a multiplication operation to output the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE in the decoder, and the output is the feature map. ; f-12) feature map With feature map Perform the addition operation to output the feature map. ; f-13) feature map The input is fed into the fourth transposed convolutional layer of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the first convolutional layer, the first BatchNorm layer, and the first ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. , feature map The inputs are sequentially fed into the second convolutional layer, the second BatchNorm layer, and the second ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. , feature map With feature map Perform the addition operation to output the feature map. , feature map The input is fed into the third ReLU activation function of the fourth residual block of the decoder, and the output is the feature map. ; f-14) will feature map The input is fed into the convolutional layer of the decoder, and the output is the predicted segmented image. .

7. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 6, characterized in that: In step f-2), the kernel size of the lower convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the first dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the first dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the first dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-4), the kernel size of the first transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the first residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the first residual block of the decoder is 3×3. In step f-5), the kernel size of the lower convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the second dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the second dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the second dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-7), the kernel size of the second transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the second residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the second residual block of the decoder is 3×3.In step f-8), the kernel size of the lower convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the third dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1.

2. The kernel size of the third convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the third dual-path multi-scale enhancement module DPMSFE is 7×7, the stride is 1, and the padding is 3. The kernel size of the upper convolutional layer of the third dual-path multi-scale enhancement module DPMSFE is 1×1 and the stride is 1. In step f-10), the kernel size of the third transposed convolutional layer of the decoder is 2×2 and the stride is 2. The kernel size of the first convolutional layer of the third residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the third residual block of the decoder is 3×3. In step f-11), the kernel size of the lower convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1 with a stride of 1. The kernel size of the first convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the second convolutional layer of the channel aggregation branch of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1. The kernel size of the first convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 3×3 with a stride of 1 and padding of 1. The kernel size of the second convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 5×5 with a stride of 1 and padding of 1. The kernel size of the third convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the fourth convolutional layer of the multi-scale fusion branch of the fourth dual-path multi-scale enhancement module DPMSFE is 7×7, stride is 1, and padding is 3. The kernel size of the upper convolutional layer of the fourth dual-path multi-scale enhancement module DPMSFE is 1×1, stride is 1. In step f-13), the kernel size of the fourth transposed convolutional layer of the decoder is 2×2, stride is 2. The kernel size of the first convolutional layer of the fourth residual block of the decoder is 3×3. The kernel size of the second convolutional layer of the fourth residual block of the decoder is 3×3.

8. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 1, characterized in that: Through formula The total loss function is calculated. In the formula and All of these are hyperparameters. The Dice loss function, This is the cross-entropy loss function.

9. The cardiac image segmentation method based on state-space model and dual-path multi-scale enhancement according to claim 8, characterized in that: When training the segmentation network model, the learning rate was set to 0.01, the batch size to 8, the number of iterations to 1000, and the hyperparameters... Set to 0.4, hyperparameter Set it to 0.4.

Citation Information

Patent Citations

  • Heart segmentation method based on multi-scale attention U-net network

    CN113744210A

  • Semi-supervised medical image segmentation method based on geometric consistency constraint

    CN114862800A