Medical image processing method and system based on state space and structure contour constraints

By constructing a medical image processing method with state space and structural contour constraints, the limitations of convolutional neural networks and Transformers in medical image processing are overcome, achieving efficient global-local information capture and structural contour localization, thus improving segmentation accuracy and efficiency.

CN122289168APending Publication Date: 2026-06-26HULUNBUIR UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610357219.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing convolutional neural networks and Transformer architectures have limitations in medical image processing. CNNs cannot effectively model long-range spatial dependencies, and Transformers cannot accurately locate structural contours, resulting in insufficient segmentation accuracy and high computational complexity.

Method used

A medical image processing method based on state space and structural contour constraints is adopted. By constructing a structural contour enhancement module, a state space-based feature optimization module, a structural contour constraint module, and a decoder, and combining the total loss function for model training, global-local information is captured and structural contours are accurately located.

Benefits of technology

It improves the accuracy and efficiency of medical image segmentation, enhances image processing capabilities in complex scenes, and achieves precise target region segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289168A_ABST
    Figure CN122289168A_ABST
Patent Text Reader

Abstract

This invention relates to the field of medical image analysis technology, providing a medical image processing method and system based on state space and structural contour constraints. The method includes the following steps: preprocessing medical images and partitioning the dataset; constructing and initializing a model, followed by model training; and segmenting the medical image to be processed using the trained model. Specifically, by constructing a state space-based feature optimization module, the model can simultaneously capture global and local information. Furthermore, by designing a structural contour enhancement module and a structural contour constraint module, the model's ability to represent the positional and morphological changes of the target structural contour is improved. This invention effectively addresses the limitations of convolutional neural networks in capturing global features through state space modeling, and by explicitly modeling the structural contour, it effectively improves the accuracy of medical image processing in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image analysis technology, and in particular relates to a medical image processing method and system based on state space and structural contour constraints. Background Technology

[0002] Medical image processing technology is a core component of intelligent medical diagnostic systems, playing an irreplaceable role in clinical image analysis. This technology can automatically identify and label organs and pathological regions in medical images, providing objective evidence for clinical diagnosis. High-quality image segmentation results not only assist physicians in interpreting image data more accurately but also significantly improve diagnostic reliability, ultimately enhancing patient treatment outcomes. In practical clinical applications, medical professionals need not only to understand the morphological characteristics and spatial distribution of lesions but also to accurately grasp the structural contour information of the lesion region. If the segmentation results are blurry, broken, or offset at the structural contour, it may lead to inaccurate definition of the lesion's extent, thus affecting surgical planning and the assessment of treatment effectiveness. Therefore, stable modeling and accurate representation of structural contour information in medical images are key technical issues for improving the reliability of medical image segmentation.

[0003] In recent years, the field of medical image processing has mainly adopted two architectures: Convolutional Neural Networks (CNNs) and Transformers. However, each has its inherent limitations. CNNs, limited by their local receptive field characteristics, perform poorly in modeling long-range spatial dependencies, resulting in insufficient segmentation accuracy for complex anatomical structures. On the other hand, while the Transformer architecture, based on the self-attention mechanism, can establish global contextual relationships, its ability to represent local information is weak, making it unable to accurately locate structural contours. Furthermore, its computational complexity increases quadratically with image size, facing severe memory bottlenecks and computational efficiency issues when processing high-resolution medical images.

[0004] Therefore, there is a need for a method that can capture global-local information while ensuring efficiency and accurately locate structural contours. Summary of the Invention

[0005] The purpose of this invention is to provide a medical image processing method and system based on state space and structural contour constraints, in order to solve the above-mentioned technical problems.

[0006] This invention is implemented as follows: a medical image processing method based on state space and structural contour constraints, comprising the following steps:

[0007] The medical images in the dataset are preprocessed, and the dataset is divided into training, validation, and test sets.

[0008] A model is constructed and initialized, which includes a structural contour enhancement module, a state space-based feature optimization module, a structural contour constraint module, and a decoder.

[0009] Medical images and ground truth pairs are sampled from the training set for model training;

[0010] The medical image is input into the structural contour enhancement module to obtain the enhanced structural contour features.

[0011] The enhanced structural contour features are input into a state-space-based feature optimization module to obtain multi-level features.

[0012] Multi-level features are input into the decoder to generate the target region segmentation result;

[0013] The enhanced structural contour features and the high-level features in the multi-level features are input into the structural contour constraint module to generate structural contour constraint prediction results.

[0014] Construct a total loss function, jointly optimize the target region segmentation results and structural contour constraint prediction results, and update the model parameters;

[0015] Repeat the model training until the preset training termination condition is met to obtain a trained model.

[0016] The system acquires the medical image to be processed and inputs it into the trained model to segment the image, outputting the corresponding segmentation results.

[0017] Furthermore, in the steps of building and initializing the model, the model's structure is described as follows: Among them, the feature optimization module based on state space The first four layers of the ResNeSt network structure are loaded with pre-trained weights from the dataset; in addition, the Kaiming method is used to initialize the structural contour enhancement module. Structural contour constraint module and decoder Convolution operations in [the context of the text].

[0018] Furthermore, the structural contour enhancement module enhances the structural contour information of the features through convolution and channel attention mechanisms to obtain enhanced structural contour features. ; = (I), where I is the input medical image.

[0019] Furthermore, the structural contour enhancement module enhances the structural contour information of the features through convolution and channel attention mechanisms, specifically including:

[0020] First, features are extracted using a 7×7 large kernel convolution. Formal description:

[0021]

[0022] in, This represents a 7×7 convolution operation. and These represent the ReLU activation function and the batch normalization operation, respectively.

[0023] Next, channel attention is used to enhance the feature representation to obtain the features. and The calculation process is described as follows:

[0024]

[0025]

[0026] in, Represents the channel attention mapping function. This represents point-by-point multiplication;

[0027] Then, using a 7×7 depthwise separable convolution kernel... Spatial feature extraction is performed, and residual linking is used to preserve the original feature information, resulting in the feature extraction process. and Formal description:

[0028]

[0029]

[0030] Finally, 1×1 pointwise convolution is performed. Channel-dimensional features are integrated to obtain enhanced structural contour features. , represented as:

[0031] .

[0032] Furthermore, the state-space-based feature optimization module utilizes the hierarchical structure of ResNeSt to capture local features and introduces a state-space feature optimization block to capture global information, thereby obtaining multi-level features E. i The formal description is as follows:

[0033]

[0034] in, Represents the i-th layer structure of ResNeSt. This represents a state-space feature optimization block.

[0035] Furthermore, the processing procedure for the state-space feature optimization block includes:

[0036] First, input features Spatial representation Convert to sequence representation ,in and sequence features After normalization, it is expressed as:

[0037]

[0038]

[0039] in, The operator representing the rearrangement of space into sequence. This represents the normalization function;

[0040] Next, the normalized sequence features The input is fed into the state space feature optimization block, which contains two parallel branches; in the first branch, the features are first expanded to the feature dimension through a linear layer. Subsequently, it is processed by a one-dimensional convolutional layer, the SiLU activation function, and the state-space sequence model (SSM), and formally described as follows:

[0041]

[0042] in, Indicates a linear layer. Represents a convolutional layer. The SiLU activation function is used. Represents the state-space sequence model (SSM);

[0043] The second branch also expands the features through a linear layer. And apply the SiLU activation function, which is expressed as:

[0044]

[0045] in, Indicates a linear layer;

[0046] Subsequently, the features output by the two branches and The fusion is performed using the Hadamard product, and can be formally described as follows:

[0047]

[0048] in, Represents the Hadamard product operation;

[0049] Ultimately, the fused features Projected back to the original dimension After reshaping and transposing, the dimension is obtained as follows: The output characteristics.

[0050] Furthermore, the structural contour constraint module uses enhanced structural contour features. and high-level characteristics As input, its processing specifically includes:

[0051] First, the Sobel operator is used to mine structural contour information, and then... Convolution performs a unified mapping on the feature channels, adjusting the channel dimension to 64, and obtaining two optimized features. and The process is formally described as follows:

[0052]

[0053]

[0054] in, Represents the Sobel operator. express Convolution operation, Indicates an upsampling operation;

[0055] Next, a gated attention mechanism is used to achieve adaptive feature fusion, resulting in the feature set. , , , The process is formally defined as follows:

[0056] ,

[0057] ,

[0058] in, The feature transformation function is used to perform nonlinear mapping and numerical stabilization on the input features. It consists of at least one layer of convolution operation, normalization processing and nonlinear activation operation in sequence. This represents the Sigmoid activation function;

[0059]

[0060]

[0061]

[0062] in, Representation of features and characteristics splicing operation, , , , These are learnable adjustable parameters.

[0063] Furthermore, the decoder generates target region segmentation results through multi-level progressive upsampling, cross-layer feature fusion, and convolution optimization operations.

[0064] Furthermore, the total loss function is expressed as follows:

[0065]

[0066] in, The loss term represents the segmentation result of the target region; The loss term represents the prediction result of the structural profile constraint; and G and represent the target region segmentation result and the structural contour constraint prediction result, respectively; These represent the truth value and the profile truth value, respectively. Using cross-entropy loss function Perform calculations. Using the Dice loss function Then the total loss function Described as:

[0067] .

[0068] Another objective of this invention is to provide a medical image processing system based on state space and structural contour constraints, for implementing the aforementioned medical image processing method based on state space and structural contour constraints, comprising:

[0069] The data preprocessing module is used to preprocess the medical images in the dataset and divide the dataset into training, validation and test sets.

[0070] The model initialization module is used to build and initialize the model;

[0071] The sampling module is used to sample medical image-ground pairs from the training set for model training.

[0072] The structural contour enhancement module is used to enhance the structural contours of medical images to obtain enhanced structural contour features.

[0073] The state-space-based feature optimization module is used to optimize the enhanced structural contour features based on the state space to obtain multi-level features.

[0074] The decoder is used to decode multi-level features and generate target region segmentation results;

[0075] The structural contour constraint module is used to constrain the structural contour based on the enhanced structural contour features and the high-level features in the multi-level features, and generate structural contour constraint prediction results.

[0076] The total loss function construction module is used to construct the total loss function, jointly optimize the target region segmentation results and the structural contour constraint prediction results, and update the model parameters.

[0077] The model training module is used to repeatedly train the model until the preset training termination condition is met, and a trained model is obtained.

[0078] The output module is used to acquire the medical image to be processed and input it into the trained model to perform segmentation processing on the medical image and output the corresponding segmentation result.

[0079] This invention provides a medical image processing method based on state space and structural contour constraints. By extracting global-local information and enhancing structural contour representation capabilities, it proposes an innovative fully supervised medical image processing framework. Specifically, in the encoding stage, a state space-based feature optimization module is constructed, enabling the model to simultaneously capture global and local information, thus improving its feature representation capabilities. Furthermore, by designing structural contour enhancement and constraint modules, the model's ability to represent the positional and morphological changes of target structural contours is improved, strengthening its ability to locate complex contours and ultimately obtaining accurate segmentation maps. This invention effectively addresses the limitations of convolutional neural networks in capturing global features through state space modeling, and by explicitly modeling structural contours, it effectively improves the accuracy of medical image processing in complex scenes. Attached Figure Description

[0080] Figure 1 This is a flowchart illustrating the medical image processing method based on state space and structural contour constraints provided in an embodiment of the present invention.

[0081] Figure 2 This is a schematic diagram of a model constructed for an embodiment of the present invention.

[0082] Figure 3 This is a schematic diagram of a structural contour enhancement module provided in an embodiment of the present invention.

[0083] Figure 4 This is a schematic diagram of the internal structure of the structural contour constraint module provided in an embodiment of the present invention.

[0084] Figure 5 This is a comparison chart of the processing results from different models. Detailed Implementation

[0085] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0086] To address the inherent limitations of existing models such as CNN and Transformer, this invention provides a medical image processing method based on state space and structural contour constraints. This method introduces a state space-based feature optimization module during the feature extraction stage, effectively capturing long-distance spatial dependencies while maintaining linear computational complexity, thus enhancing the model's ability to express the global context structure. Simultaneously, a structural contour enhancement module and a structural contour constraint module are designed to model and optimize key structural contours in medical images, thereby improving the model's ability to represent the structural contours of target regions and obtaining segmentation maps with accurate contour localization.

[0087] Specifically, such as Figure 1 As shown, in one embodiment of the present invention, a medical image processing method based on state space and structural contour constraints is provided. This method intelligently segments input medical images using a pre-trained model, and includes the following steps:

[0088] S1. Preprocess the medical images in the dataset and divide the dataset into training set, validation set and test set;

[0089] S2. Construct and initialize the model, which includes a structural contour enhancement module, a state space-based feature optimization module, a structural contour constraint module, and a decoder;

[0090] S3. Sample medical image-ground pairs from the training set for model training;

[0091] S4. Input the medical image into the structural contour enhancement module to obtain the enhanced structural contour features;

[0092] S5. Input the enhanced structural contour features into the state-space-based feature optimization module to obtain multi-level features;

[0093] S6. Input the multi-level features into the decoder to generate the target region segmentation result;

[0094] S7. Input the enhanced structural contour features and the high-level features in the multi-level features into the structural contour constraint module to generate structural contour constraint prediction results.

[0095] S8. Construct a total loss function, jointly optimize the target region segmentation results and the structural contour constraint prediction results, and update the model parameters through backpropagation.

[0096] S9. Repeat the model training (repeatedly execute steps S3-S8) until the preset training termination condition is met, and the trained model is obtained.

[0097] S10. Obtain the medical image to be processed and input it into the trained model. Through the forward propagation calculation process, segment the medical image to be processed and output the corresponding segmentation result.

[0098] In a preferred embodiment of the present invention, in step S1, the medical image can be a skin lesion image under a dermatoscope, and the dataset can be the ISIC2018 dataset, but is not limited thereto. Furthermore, to improve data reading efficiency and optimize model training performance, the dataset can be converted to NumPy array format and stored as an NPY file. The dataset is divided into a training set, a validation set, and a test set in a [7:1:2] ratio. The training set is fed into the model for end-to-end training, and the network weight parameters are iteratively optimized using the backpropagation method.

[0099] In practical applications, the structure of the model constructed above is as follows: Figure 2 As shown, it specifically includes:

[0100] Structural profile enhancement module, see Figure 3 The structural contour enhancement module optimizes the contour representation of features through 7×7 convolution, channel attention, and residual structure.

[0101] The state-space-based feature optimization module consists of a hierarchical structure of ResNeSt and a state-space feature optimization block. Specifically, the CNN-based ResNeSt captures local information, while the state-space feature optimization block extracts global information.

[0102] The decoder effectively combines deep and low-level features and restores feature space information by mainly using transposed convolution for dimensionality increase, skip connections for fusion, and convolution-based optimization blocks.

[0103] The structural contour constraint module enhances the model's ability to represent structural contours through the Sobel operator and attention mechanism. Its internal structure is described in [link to internal structure description]. Figure 4 .

[0104] In a preferred embodiment of the present invention, the structure of the model in step S2 is described as follows: Among them, the feature optimization module based on state space The first four layers of the ResNeSt network structure are loaded with pre-trained weights from the ImageNet dataset; in addition, the Kaiming method is used to initialize the structural contour enhancement module. Structural contour constraint module and decoder Convolution operations in [the context of the text].

[0105] In a preferred embodiment of the present invention, in step S4, the structural contour enhancement module enhances the structural contour information of the features through convolution and channel attention mechanisms, thereby improving the model's ability to represent the structural contour and detailed information of the target being processed, and obtaining the enhanced structural contour features. Formal description: = (I), where I is the input medical image.

[0106] In a preferred embodiment of the present invention, the structural contour enhancement module enhances the structural contour information of the features through convolution and channel attention mechanisms, specifically including:

[0107] First, features are extracted using a 7×7 large kernel convolution. Formal description:

[0108]

[0109] in, This represents a 7×7 convolution operation. and These represent the ReLU activation function and the batch normalization operation, respectively.

[0110] Next, channel attention is used to enhance the feature representation to obtain the features. and The calculation process is described as follows:

[0111]

[0112]

[0113] in, Represents the channel attention mapping function. This represents point-by-point multiplication;

[0114] Then, using a 7×7 depthwise separable convolution kernel... Spatial feature extraction is performed, and residual linking is used to preserve the original feature information, resulting in the feature extraction process. and Formal description:

[0115]

[0116]

[0117] Finally, 1×1 pointwise convolution is performed. Channel-dimensional features are integrated to obtain enhanced structural contour features. , represented as:

[0118] .

[0119] In a preferred embodiment of the present invention, in step S5, the enhanced structural contour features from the previous step are... The input is fed into the state space-based feature optimization module. This allows the model to capture global and local features. The state-space-based feature optimization module utilizes the hierarchical structure of ResNeSt to capture local features and introduces a state-space feature optimization block to capture global information, thereby improving the model's feature representation capability and obtaining multi-level features E. i The formal description is as follows:

[0120]

[0121] in, Represents the i-th layer structure of ResNeSt. This represents a state-space feature optimization block.

[0122] In a preferred embodiment of the present invention, the core of the state-space-based feature optimization module lies in introducing state-space feature optimization blocks into each level of the ResNeSt structure to achieve global-local joint modeling of features; wherein, the processing of the state-space feature optimization block includes:

[0123] First, input features Spatial representation Convert to sequence representation ,in and sequence features After normalization, it is expressed as:

[0124]

[0125]

[0126] in, The operator representing the rearrangement of space into sequence. This represents the normalization function;

[0127] Next, the normalized sequence features The input is fed into the state space feature optimization block, which contains two parallel branches; in the first branch, the features are first expanded to the feature dimension through a linear layer. Subsequently, it is processed by a one-dimensional convolutional layer, the SiLU activation function, and the state-space sequence model (SSM), and formally described as follows:

[0128]

[0129] in, Indicates a linear layer. Represents a convolutional layer. The SiLU activation function is used. Represents the state-space sequence model (SSM);

[0130] The second branch also expands the features through a linear layer. And apply the SiLU activation function, which is expressed as:

[0131]

[0132] in, Indicates a linear layer;

[0133] Subsequently, the features output by the two branches and The fusion is performed using the Hadamard product, and can be formally described as follows:

[0134]

[0135] in, Represents the Hadamard product operation;

[0136] Ultimately, the fused features Projected back to the original dimension After reshaping and transposing, the dimension is obtained as follows: The output characteristics.

[0137] In a preferred embodiment of the present invention, in step S6, the multi-level features are... Send to decoder Through multi-level progressive upsampling, cross-layer feature fusion, and convolution optimization operations, the target region segmentation result P is generated:

[0138] .

[0139] In a preferred embodiment of the present invention, in step S7, the structural contour constraint module uses the enhanced structural contour features. and high-level characteristics As input, its processing specifically includes:

[0140] First, the Sobel operator is used to mine structural contour information, and then... Convolution performs a unified mapping on the feature channels, adjusting the channel dimension to 64, and obtaining two optimized features. and The process is formally described as follows:

[0141]

[0142]

[0143] in, Represents the Sobel operator. express Convolution operation, Indicates an upsampling operation;

[0144] Next, a gated attention mechanism is used to achieve adaptive feature fusion, resulting in the feature set. , , , The process is formally defined as follows:

[0145] ,

[0146] ,

[0147] in, The feature transformation function is used to perform nonlinear mapping and numerical stabilization on the input features. It consists of at least one layer of convolution operation, normalization processing and nonlinear activation operation in sequence. This represents the Sigmoid activation function;

[0148]

[0149]

[0150]

[0151] in, Representation of features and characteristics splicing operation, , , , These are learnable adjustable parameters.

[0152] In a preferred embodiment of the present invention, in step S8, the total loss function is expressed as follows:

[0153]

[0154] in, The loss term represents the segmentation result of the target region; The loss term represents the prediction result of the structural profile constraint; and G and represent the target region segmentation result and the structural contour constraint prediction result, respectively; These represent the truth value and the profile truth value, respectively.

[0155] Preferably, Using cross-entropy loss function Calculations are performed; considering the class imbalance problem in the structural outline. Using the Dice loss function Then the total loss function It can be described as:

[0156] .

[0157] The following example illustrates the medical image processing method based on state space and structural contour constraints, which includes the following steps:

[0158] 1. Obtain the medical image dataset for training. Taking skin lesion segmentation as an example, the ISIC2018 dataset was randomly divided into training, testing, and validation sets, with 70% used as the training set, 20% as the testing set, and 10% as the validation set.

[0159] 2. Preprocess the input medical image data to make the image size uniform at 256×256 and save it as a NUMPY file.

[0160] 3. Construct a medical image processing model based on state space and structural contour constraints according to the above method, input the training set data, and verify the model performance; the model uses the Adam optimizer, with an initial learning rate of 1e-3, a batch size of 16, and a total number of iterations of 200.

[0161] 4. Load the optimal weights into the model, process the test set data, and output the segmentation results.

[0162] The processing results are evaluated using metrics such as IoU, Dice, and Recall to assess model performance.

[0163] After multiple rounds of experiments, as shown in Table 1 and Figure 5 (Where "Ours" represents the method provided in this embodiment of the invention) As shown, on the ISIC2018 dataset, the IoU reaches 88.62%, Dice reaches 91.0%, and Recall is 91.37%. Compared with models such as U-Net, UNet++, CANet, PraNet, and GFANet, the method provided in this embodiment of the invention improves the IoU index by 7.03%, 7.05%, 7.07%, 6.5%, and 4.96%, respectively. Furthermore, the method provided in this embodiment of the invention achieves the highest results in both Dice and Recall metrics. Figure 5 The segmentation results for each model demonstrate the advanced nature of the method provided in this embodiment of the invention.

[0164] Table 1

[0165]

[0166] In another embodiment of the present invention, a medical image processing system based on state space and structural contour constraints is also provided for implementing the above method, specifically including:

[0167] The data preprocessing module is used to preprocess the medical images in the dataset and divide the dataset into training, validation and test sets.

[0168] The model initialization module is used to build and initialize the model;

[0169] The sampling module is used to sample medical image-ground pairs from the training set for model training.

[0170] The structural contour enhancement module is used to enhance the structural contours of medical images to obtain enhanced structural contour features.

[0171] The state-space-based feature optimization module is used to optimize the enhanced structural contour features based on the state space to obtain multi-level features.

[0172] The decoder is used to decode multi-level features and generate target region segmentation results;

[0173] The structural contour constraint module is used to constrain the structural contour based on the enhanced structural contour features and the high-level features in the multi-level features, and generate structural contour constraint prediction results.

[0174] The total loss function construction module is used to construct the total loss function, jointly optimize the target region segmentation results and the structural contour constraint prediction results, and update the model parameters.

[0175] The model training module is used to repeatedly train the model until the preset training termination condition is met, and a trained model is obtained.

[0176] The output module is used to acquire the medical image to be processed and input it into the trained model to perform segmentation processing on the medical image and output the corresponding segmentation result.

[0177] It should be noted that each of the above modules can be implemented as a computer program, which can run on a computer device. The computer device's memory can store the computer program consisting of each module, enabling the processor to execute each step of the above method.

[0178] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0179] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods.

[0180] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A medical image processing method based on state space and structural contour constraints, characterized in that, Includes the following steps: The medical images in the dataset are preprocessed, and the dataset is divided into training, validation, and test sets. A model is constructed and initialized, which includes a structural contour enhancement module, a state space-based feature optimization module, a structural contour constraint module, and a decoder. Medical images and ground truth pairs are sampled from the training set for model training; The medical image is input into the structural contour enhancement module to obtain the enhanced structural contour features. The enhanced structural contour features are input into a state-space-based feature optimization module to obtain multi-level features. Multi-level features are input into the decoder to generate the target region segmentation result; The enhanced structural contour features and the high-level features in the multi-level features are input into the structural contour constraint module to generate structural contour constraint prediction results. Construct a total loss function, jointly optimize the target region segmentation results and structural contour constraint prediction results, and update the model parameters; Repeat the model training until the preset training termination condition is met to obtain a trained model. The system acquires the medical image to be processed and inputs it into the trained model to segment the image, outputting the corresponding segmentation results.

2. The medical image processing method based on state space and structural contour constraints according to claim 1, characterized in that, In the steps of building and initializing the model, the structure of the model is described as follows: Among them, the feature optimization module based on state space The first four layers of the ResNeSt network structure are loaded with pre-trained weights from the dataset; in addition, the Kaiming method is used to initialize the structural contour enhancement module. Structural contour constraint module and decoder Convolution operations in [the context of the text].

3. The medical image processing method based on state space and structural contour constraints according to claim 2, characterized in that, The structural contour enhancement module enhances the structural contour information of the features through convolution and channel attention mechanisms to obtain enhanced structural contour features. ; = (I), where I is the input medical image.

4. The medical image processing method based on state space and structural contour constraints according to claim 3, characterized in that, The structural contour enhancement module enhances the structural contour information of features through convolution and channel attention mechanisms, specifically including: First, features are extracted using a 7×7 large kernel convolution. Formal description: in, This represents a 7×7 convolution operation. and These represent the ReLU activation function and the batch normalization operation, respectively. Next, channel attention is used to enhance the feature representation to obtain the features. and The calculation process is described as follows: in, Represents the channel attention mapping function. This represents point-by-point multiplication; Then, using a 7×7 depthwise separable convolution kernel... Spatial feature extraction is performed, and residual linking is used to preserve the original feature information, resulting in the feature extraction process. and Formal description: Finally, 1×1 pointwise convolution is performed. Channel-dimensional features are integrated to obtain enhanced structural contour features. , represented as: 。 5. The medical image processing method based on state space and structural contour constraints according to claim 3, characterized in that, The state-space-based feature optimization module utilizes the hierarchical structure of ResNeSt to capture local features and introduces a state-space feature optimization block to capture global information, thereby obtaining multi-level features E. i The formal description is as follows: in, Represents the i-th layer structure of ResNeSt. This represents a state-space feature optimization block.

6. The medical image processing method based on state space and structural contour constraints according to claim 5, characterized in that, The processing procedure for the state space feature optimization block includes: First, input features Spatial representation Convert to sequence representation ,in and sequence features After normalization, it is expressed as: in, The operator representing the rearrangement of space into sequence. This represents the normalization function; Next, the normalized sequence features The input is fed into the state space feature optimization block, which contains two parallel branches; in the first branch, the features are first expanded to the feature dimension through a linear layer. Subsequently, it is processed by a one-dimensional convolutional layer, the SiLU activation function, and the state-space sequence model (SSM), and formally described as follows: in, Indicates a linear layer. Represents a convolutional layer. The SiLU activation function is used. Represents the state-space sequence model (SSM); The second branch also expands the features through a linear layer. And apply the SiLU activation function, which is expressed as: in, Indicates a linear layer; Subsequently, the features output by the two branches and The fusion is performed using the Hadamard product, and can be formally described as follows: in, Represents the Hadamard product operation; Ultimately, the fused features Projected back to the original dimension After reshaping and transposing, the dimension is obtained as follows: The output characteristics.

7. The medical image processing method based on state space and structural contour constraints according to claim 5, characterized in that, The structural contour constraint module uses enhanced structural contour features. and high-level characteristics As input, its processing specifically includes: First, the Sobel operator is used to mine structural contour information, and then... Convolution performs a unified mapping on the feature channels, adjusting the channel dimension to 64, and obtaining two optimized features. and The process is formally described as follows: in, Represents the Sobel operator. express Convolution operation, Indicates an upsampling operation; Next, a gated attention mechanism is used to achieve adaptive feature fusion, resulting in the feature set. , , , The process is formally defined as follows: , , in, The feature transformation function is used to perform nonlinear mapping and numerical stabilization on the input features. It consists of at least one layer of convolution operation, normalization processing and nonlinear activation operation in sequence. This represents the Sigmoid activation function; in, Representation of features and characteristics splicing operation, , , , These are learnable adjustable parameters.

8. The medical image processing method based on state space and structural contour constraints according to claim 1, characterized in that, The decoder generates target region segmentation results through multi-level progressive upsampling, cross-layer feature fusion, and convolution optimization operations.

9. The medical image processing method based on state space and structural contour constraints according to claim 1, characterized in that, The total loss function is expressed as follows: in, The loss term represents the segmentation result of the target region; The loss term represents the prediction result of the structural profile constraint; and G and represent the target region segmentation result and the structural contour constraint prediction result, respectively; These represent the truth value and the profile truth value, respectively. Using cross-entropy loss function Perform calculations. Using the Dice loss function Then the total loss function Described as: 。 10. A medical image processing system based on state space and structural contour constraints, used to implement the medical image processing method based on state space and structural contour constraints as described in any one of claims 1-9, characterized in that, include: The data preprocessing module is used to preprocess the medical images in the dataset and divide the dataset into training, validation and test sets. The model initialization module is used to build and initialize the model; The sampling module is used to sample medical image-ground pairs from the training set for model training. The structural contour enhancement module is used to enhance the structural contours of medical images to obtain enhanced structural contour features. The state-space-based feature optimization module is used to optimize the enhanced structural contour features based on the state space to obtain multi-level features. The decoder is used to decode multi-level features and generate target region segmentation results; The structural contour constraint module is used to constrain the structural contour based on the enhanced structural contour features and the high-level features in the multi-level features, and generate structural contour constraint prediction results. The total loss function construction module is used to construct the total loss function, jointly optimize the target region segmentation results and the structural contour constraint prediction results, and update the model parameters. The model training module is used to repeatedly train the model until the preset training termination condition is met, and a trained model is obtained. The output module is used to acquire the medical image to be processed and input it into the trained model to perform segmentation processing on the medical image and output the corresponding segmentation result.