Three-dimensional medical image segmentation model training method, segmentation method and system
The 3D medical image segmentation method combining an adaptive hybrid encoder and a multilayer perceptron with a channel attention module solves the problems of high computational complexity and heavy dependence on labeled data in traditional methods, and achieves efficient and accurate 3D medical image segmentation.
Patent Information
- Application Number
- CN202511525395.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-24
AI Technical Summary
Existing 3D medical image segmentation techniques struggle to capture both global contextual information and local detail features while maintaining computational efficiency. Traditional methods suffer from high computational complexity, high resource consumption, and excessive reliance on labeled data.
An adaptive hybrid encoder and decoder architecture is adopted, which combines a multilayer perceptron and a channel attention module. Features are extracted through a hierarchical structure, reducing computational complexity and enhancing feature selection capabilities. The importance of feature channels is dynamically adjusted, and multi-scale feature reconstruction is performed.
While ensuring segmentation performance, it significantly reduces computational complexity, improves segmentation accuracy and efficiency, and reduces dependence on labeled data, making it suitable for efficient 3D medical image segmentation tasks.
Smart Images

Figure CN121010614B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a three-dimensional medical image segmentation model training method, a segmentation method and a system. BACKGROUND
[0002] Medical image segmentation is a key step in medical image analysis, which can help to more accurately locate and identify lesions, tumors, organs and other anatomical structures, and is also a non-invasive method that can be used for quantitative analysis, such as calculating the volume shape of organs or lesions, to assist doctors in diagnosis and treatment.
[0003] Three-dimensional medical image segmentation is a fine-grained pixel-level semantic segmentation task, which needs to accurately delineate dozens or hundreds of regions of interest or interconnected tissues in CT, MRI, PET, ultrasound and other three-dimensional medical image volumes with high latitude and high resolution characteristics. Due to the complex structure and large amount of details of these three-dimensional medical images, high-quality manual annotation is difficult and laborious, and medical image segmentation faces great challenges.
[0004] Current advanced medical segmentation techniques are mainly based on CNN and Transformer methods. Traditional methods based on fully convolutional neural networks CNN, especially U-Net and its variants, dominate this field by implementing feature extraction and segmentation through layer-by-layer encoding and decoding of images. The advantage of these methods is that they can capture local features and perform well on small-scale datasets. However, they rely on local receptive fields, limiting the capture of global contextual information and making it difficult to effectively handle long-range dependencies. Visual Transformer (ViT) excels in learning long-range dependencies and has been introduced as an alternative method in the field of medical image segmentation. It uses its self-attention mechanism to establish relationships between features in a global range. Visual Transformer divides images into patches and treats these patches as sequences of input. It learns the global relationship between patches through self-attention mechanisms. This method performs well on large-scale datasets, but due to the lack of inductive bias, ViT performs poorly in local feature learning and requires large amounts of labeled datasets and high computational resources, which are often limited in the medical image field.
[0005] Furthermore, hybrid model architectures are beginning to demonstrate advantages in medical image segmentation tasks, combining the local feature capture capabilities of CNNs with the global information modeling capabilities of Transformers. For example, TransUNet enhances segmentation accuracy by concatenating CNNs and Transformers, first using CNNs to extract low-level features and then leveraging Transformers to capture high-level global features; while UNETR uses a Transformer as the primary encoder, combined with skip connection structures to improve information transfer efficiency. These hybrid methods improve segmentation accuracy to some extent, but still suffer from high computational complexity and resource consumption.
[0006] In summary, previous research has primarily relied on single architectures, such as fully convolutional or fully Transformer-based structures. These methods face a trade-off between capturing global and local features, failing to simultaneously ensure accuracy in capturing broad contextual information and detailed features. CNN-based fully convolutional methods, limited by their local receptive fields, cannot acquire global information without increasing complexity. Furthermore, fully Transformer-based models perform poorly on small medical datasets and incur high training and computational costs. Hybrid models, while more complex, increase design difficulty and training resource requirements; although they can improve segmentation accuracy, they require substantial computational resources and are inefficient in testing. Summary of the Invention
[0007] To address the shortcomings of the existing technologies, this invention provides a three-dimensional medical image segmentation model training method, segmentation method, and system, which can realize global and local image feature information and improve segmentation accuracy while maintaining computational efficiency.
[0008] Firstly, a method for training a three-dimensional medical image segmentation model is provided, including the following steps:
[0009] The architecture for constructing the segmentation model consists of an adaptive hybrid encoder, decoder, and classification head connected in sequence.
[0010] The adaptive hybrid encoder includes an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence. Each nested layer includes a clustering operation module, a multilayer perceptron hybrid module, and a deblocking operation module connected in sequence. A three-dimensional convolutional pooling module is also provided before the clustering operation module of each nested layer except the first layer. Each feature map of the adaptive hybrid encoder, except for the last feature map, is further processed by a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. Each layer of the decoder upsamples the input feature map and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder. The decoder then inputs the final output feature map into the classification head.
[0011] Obtain a sample dataset of annotated 3D medical images;
[0012] The segmentation model is trained based on the sample dataset to obtain the final 3D medical image segmentation model.
[0013] Furthermore, the multilayer perceptron mixing module includes a spatial mixing block and a channel mixing block connected in sequence. The spatial mixing block includes a normalization layer and a 3D spatial mixer connected in sequence, and the 3D spatial mixer performs a transpose operation before and after each operation. The input and output of the spatial mixing block are fused together through a skip connection and used as the input of the channel mixing block. The channel mixing block includes a normalization layer and a 3D channel mixer connected in sequence, and the input and output of the channel mixing block are fused together through a skip connection and used as the output of the entire multilayer perceptron mixing module.
[0014] Furthermore, both the 3D spatial mixer and the 3D channel mixer include two fully connected layers, with a GELU activation layer inserted between the two fully connected layers.
[0015] Furthermore, the three-dimensional convolutional pooling module includes a convolutional layer, a normalization layer, and a max pooling layer connected in sequence.
[0016] Furthermore, the channel attention module includes a global pooling layer, a first fully connected layer, a ReLU activation layer, a second fully connected layer, a Sigmoid activation layer, and a feature reweighting layer connected in sequence.
[0017] Furthermore, the main path of the residual block includes two convolutional layers, each followed by a normalization layer and a ReLU activation function, and finally a skip connection is used to directly fuse the input of the residual block with the output of the main path.
[0018] Furthermore, the decoder performs the following steps:
[0019] The first stage of the decoder completes multi-scale feature map fusion decoding. In this stage, each layer performs the following operations: the decoded feature map of the previous layer is upsampled and fused with the feature map output by the corresponding intermediate layer of the encoder. Then, a residual block is used to process the fused feature map to obtain the decoded feature map of that layer of the decoder. The feature map output by the last layer of the encoder is used as the initial decoded feature map of the decoder.
[0020] The second stage of the decoder first fuses the decoded feature map output from the first stage with the output of the image embedding layer, and then fuses the fused feature map with the input 3D medical image to obtain the final output feature map of the decoder.
[0021] Secondly, a three-dimensional medical image segmentation method is provided, including the following steps:
[0022] Obtain the 3D medical image to be segmented;
[0023] The three-dimensional medical image to be segmented is input into the three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method described above, and the segmented three-dimensional medical image is output.
[0024] Thirdly, a three-dimensional medical image segmentation model training system is provided, including:
[0025] The module framework builds modules for constructing the architecture of the segmentation model, which includes an adaptive hybrid encoder, decoder, and classification head connected in sequence.
[0026] The adaptive hybrid encoder includes an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence. Each nested layer includes a clustering operation module, a multilayer perceptron hybrid module, and a deblocking operation module connected in sequence. A three-dimensional convolutional pooling module is also provided before the clustering operation module of each nested layer except the first layer. Each feature map of the adaptive hybrid encoder, except for the last feature map, is further processed by a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. Each layer of the decoder upsamples the input feature map and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder. The decoder then inputs the final output feature map into the classification head.
[0027] The dataset acquisition module is used to acquire a sample dataset of labeled 3D medical images.
[0028] The training module is used to train the segmentation model based on the sample dataset to obtain the final 3D medical image segmentation model.
[0029] Fourthly, a three-dimensional medical image segmentation system is provided, comprising:
[0030] The data acquisition module is used to acquire the three-dimensional medical images to be segmented;
[0031] The image segmentation module is equipped with a three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method described above. The model is used to input the three-dimensional medical image to be segmented into the three-dimensional medical image segmentation model and output the segmented three-dimensional medical image.
[0032] This invention proposes a training method, segmentation method, and system for a 3D medical image segmentation model, capable of simultaneously capturing global contextual information and local detailed features. Through an adaptive hybrid encoder using a hierarchical structure to extract features, and a global feature modeling approach based on a multilayer perceptron, the computational complexity is reduced from quadratic to linear while maintaining segmentation performance, significantly improving model efficiency. Simultaneously, a channel attention module enhances information fusion between channels, dynamically adjusting the importance of feature channels to improve feature selection capabilities, focusing on important feature channels relevant to the segmentation task, reducing background interference, and improving segmentation results. Features generated by the encoder are passed to the decoder through skip connections, and the decoder restores the image spatial resolution layer by layer, gradually reconstructing high-resolution content by combining multi-scale features. This invention not only outperforms traditional self-attention mechanisms in computational efficiency but also improves the model's segmentation accuracy for complex regions in medical images through channel attention. Furthermore, this model framework effectively reduces the dependence on the number of labeled samples, making it suitable for efficient 3D medical image segmentation tasks. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart of the three-dimensional medical image segmentation model training method provided in the embodiments of the present invention;
[0035] Figure 2 This is a framework diagram of a three-dimensional medical image segmentation model provided in an embodiment of the present invention;
[0036] Figure 3 This is a schematic diagram of the multilayer sensor hybrid module structure provided in an embodiment of the present invention;
[0037] Figure 4This is a schematic diagram of the channel attention module structure provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0039] In generative medical image segmentation models, the self-attention mechanism in the Transformer is typically used to capture global contextual information. The self-attention mechanism has achieved great success in modern deep learning models, particularly in natural language processing and computer vision, and is a core module of the Transformer architecture. Its multi-head self-attention mechanism allows the model to focus on other pixels in the entire image while processing each input pixel, thereby accurately segmenting the boundaries of lesions or organs. However, the computational complexity of the self-attention mechanism is... Processing high-resolution images can lead to significant computational overhead and storage burden, which is particularly evident in 3D medical image segmentation, limiting the efficiency of the model and its practical application.
[0040] To address the bottleneck of self-attention mechanisms in high-resolution image processing, various improved methods have been proposed in recent years. For example, Atrous Self-Attention associates only with elements within a certain distance, thus reducing computational costs; Local Self-Attention restricts attention to a local window, considering only a few surrounding elements. Furthermore, OpenAI's Sparse Self-Attention combines local and long-range sparse correlations to reduce unnecessary attention computations, thereby improving efficiency. These improvements to self-attention mechanisms have all enhanced the computational efficiency of models to varying degrees and improved their adaptability to specific tasks. However, these methods still face the challenge of balancing computational efficiency with global information capture, and cannot fundamentally reduce complexity and resource consumption. In addition, Mega's moving average mechanism and gated attention, and Flatten Transformer's Focused Linear Attention module, have balanced performance and computational costs to some extent, but still cannot fundamentally reduce complexity and resource consumption, especially in 3D medical image processing tasks.
[0041] In recent years, several modules have been introduced in Convolutional Neural Network (CNN) research to optimize network structure and improve segmentation performance. SCConv (Spatial and Channel Reconstruction Convolution) reconstructs spatial and channel features, compressing CNNs and reducing redundant computation. ECA-Net introduces a lightweight ECA module that uses 1D convolutions instead of fully connected layers to achieve more accurate feature channel selection, preserving global contextual information while reducing parameter overhead. The EMA (Efficient Multi-Scale Attention) module achieves multi-scale learning by grouping channels, further balancing spatial semantic information within feature groups. Meanwhile, the STN (Spatial Transformer) module adaptively adjusts the position, scale, and rotation of feature maps by learning geometric transformations, effectively improving the model's robustness and accuracy in handling complex scenes. However, these modules are relatively less adaptable and flexible for complex anatomical structures and details involved in specific tasks (such as medical image segmentation), and cannot comprehensively improve the model's performance in complex scenarios.
[0042] To improve segmentation processing speed and reduce time complexity, while integrating global information capture and local feature extraction capabilities to achieve accurate 3D high-resolution medical image segmentation, this invention provides a 3D medical image segmentation model training method, segmentation method, and system. By introducing a global feature modeling approach based on a multilayer perceptron, the computational complexity can be reduced from quadratic to linear while maintaining segmentation performance. Furthermore, a channel attention module is introduced for adaptive channel attention enhancement to strengthen the model's feature selection capability, making it more focused on important feature channels relevant to the segmentation task. Thus, this approach not only outperforms traditional self-attention mechanisms in terms of computational efficiency but also improves the model's segmentation accuracy for complex regions in medical images through channel attention, making it suitable for efficient 3D medical image segmentation tasks. The technical solution of this invention will be described in more detail below with reference to specific embodiments.
[0043] like Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for training a three-dimensional medical image segmentation model, including the following steps:
[0044] S1: The architecture for building the segmentation model, consisting of an Adaptive MixerEncoder (AME), a decoder, and a classification head connected in sequence.
[0045] Specifically, such as Figure 2 As shown, the adaptive hybrid encoder includes an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence.
[0046] The image embedding layer (Patch Projection layer) randomly crops the input 3D medical image into sub-volumes. Then, through the Patch partitioning step, the input 3D medical image is projected into a series of lengths. A fixed-size embedded token, each embedded token being of size . ,in, These represent height, width, and depth, respectively. and These are the input dimension and the embedding dimension, respectively.
[0047] Each nested layer includes a block operation module, a multilayer perceptron hybridization module, and a deblocking operation module connected in sequence. In addition, a 3D convolutional pooling module is set before the block operation module of the other nested layers except the first level.
[0048] The following embodiment uses a three-nested-layer example for illustration. In the three nested layers, the embedded sequences are aggregated into 64, 8, and 1 blocks respectively using a blockify operation. The resolution of each block is... , where b is the batch size, T is the number of blocks in each nested layer, and n is the length of the embedding sequence. To obtain rich hierarchical feature representations without increasing computational complexity, the block side lengths of each layer are kept consistent, and the same parameters are shared.
[0049] like Figure 3 As shown, the multilayer perceptron mixing module includes a spatial mixing block and a channel mixing block connected in sequence. The spatial mixing block includes a normalization layer and a 3D spatial mixer connected in sequence. The 3D spatial mixer performs a transpose operation before and after each layer. The input and output of the spatial mixing block are fused together through a skip connection and used as the input of the channel mixing block. The channel mixing block includes a normalization layer and a 3D channel mixer connected in sequence. The input and output of the channel mixing block are fused together through a skip connection and used as the output of the entire multilayer perceptron mixing module.
[0050] Spatial blending blocks operate on the transposed columns of input features, allowing spatial information exchange between patches within the block (e.g., ...). Figure 3 (Top) Spatial blending blocks focus on spatial information interaction within a block, efficiently capturing the dependencies of patches within the block by sharing inter-column weights. Channel blending blocks process features along the row, fusing information between channels while maintaining spatial invariance (e.g., Figure 3 The bottom layer (channel mixer) handles cross-channel feature fusion, similar to a convolution operation, ensuring the ability to model information between channels. Both the 3D spatial mixer and the 3D channel mixer include two fully connected layers, with a GELU activation layer inserted between them.
[0051] The calculation process for the spatial mixing block is as follows:
[0052] ;
[0053] in, Indicates the output of the spatial blending block of the current layer; This represents the input to the spatial blending block of the current layer, i.e., the output of the first nested layer after the clustering operation or the output of the channel blending block of the previous layer; This indicates normalization processing. This represents the 3D spatial mixer processing. The complete calculation process for the spatial mixing block is shown below:
[0054] ;
[0055] in, and These represent the weight matrices of the two fully connected layers in the 3D spatial mixer. This represents the GELU activation function in the 3D spatial mixer.
[0056] The calculation process for the channel mixing block is as follows:
[0057] ;
[0058] in, This indicates the output of the current layer's channel blending block. This represents the 3D channel mixer processing. The complete calculation process of the channel mixing block is shown below:
[0059] ;
[0060] in, and These represent the weight matrices of the two fully connected layers in the 3D channel mixer. This represents the GELU activation function in the 3D channel mixer.
[0061] This architecture provides efficient representation of both local and global features by separating feature processing in the spatial and channel dimensions. Spatial and channel blending blocks are separated by a normalization layer and both are configured with skip connections, allowing the output of the previous layer to be processed. or the output of the previous module The outputs are summed to enhance information flow and stability during training, preventing gradient vanishing and overfitting problems. Compared to traditional self-attention mechanisms, the multilayer perceptron hybrid module not only significantly reduces computational overhead but also maintains excellent feature extraction capabilities in high-dimensional medical image tasks.
[0062] After the aggregated 3D blocks obtained through the Blockify operation are processed by the multilayer perceptron hybrid module to form local feature representations, the local feature representations of the 3D blocks are reformatted through the Deblockify operation. The size of the input features is adjusted from T×n×C to H×W×D×C, serving as the input for the next level. To further downsample and multi-scale process the features, a 3D convolutional pooling module is set before the blockify operation module in all nested layers except the first level. The 3D convolutional pooling module consists of the following components: a... A convolutional layer is used to extract multi-scale features and enhance local information; a normalization layer is used to stabilize training; and a... The max pooling layer downsamples the features by a factor of 2 and converts the dimensions to the set embedding dimensions.
[0063] Through the above processing, the spatial dimension of the feature map is compressed to its original value. Meanwhile, the channel dimension is adjusted to the preset embedding dimension. This process enhances the diversity of multi-scale features, providing richer input representations for the decoding stage.
[0064] The adaptive hybrid encoder processes each feature map except for the last layer through a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. The decoder upsamples the input feature map at each layer and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder to retain multi-scale feature information. The decoder then inputs the final output feature map into the classification head.
[0065] The main path of the residual block includes two... Each convolutional layer is followed by a normalization layer and a ReLU activation function. Finally, a skip connection is used to directly fuse the input of the residual block with the output of the main path, thus transferring high-quality feature information between low and high resolution.
[0066] like Figure 4As shown, the channel attention module comprises a globally pooled layer, a first fully connected layer, a ReLU activation layer, a second fully connected layer, a Sigmoid activation layer, and a feature reweighting layer connected in sequence. The globally pooled layer is used for compression, reducing the spatial dimension of the input tensor to 1×1×C. The middle part, consisting of a fully connected layer, a ReLU activation layer, a fully connected layer, and a Sigmoid activation layer connected in sequence, is used for activation. The first fully connected layer reduces the channel dimension by a factor of r (scaling parameter), and the second fully connected layer restores it to its original size. This bottleneck design achieves a balance between computational efficiency and expressive power, while modeling the interdependencies between feature channels. Reducing the input dimension from 1×1×C to 1×1×C / r aims to reduce the number of channels, thereby reducing computational complexity. The ReLU activation layer, located between the two fully connected layers, enhances the information integration between different channels by introducing non-linearity, which is more conducive to feature interaction and modeling channel correlations. The feature reweighting layer is used for relocalization, multiplying the learned channel weights with the input feature map of the channel attention module, thereby effectively recalibrating the features. By employing channel-adaptive weighting, the importance of features is recalibrated, and useful features are dynamically enhanced, significantly improving feature representation capabilities. The channel attention module ensures higher segmentation accuracy and efficiency by strengthening channel-level feature selection capabilities, particularly excelling in diverse anatomical structures and image conditions.
[0067] The residual block and the channel attention module work together to maintain the integrity of the information flow and solve the gradient vanishing problem.
[0068] The decoder employs a CNN-based design, progressively restoring the compressed high-dimensional feature map generated by the encoder to the original resolution of the input image. Combining multi-scale features, it gradually reconstructs high-resolution content. Specifically, the decoder performs the following steps:
[0069] The first stage of the decoder completes multi-scale feature map fusion decoding. In this stage, each layer performs the following operations: the decoded feature map of the previous layer is upsampled through transposed convolution and then fused with the feature map output by the corresponding intermediate layer of the encoder through a Concat operation. Then, a residual block is used to process the fused feature map to extract information and enhance its expressiveness, thus obtaining the decoded feature map of that layer of the decoder; the feature map output by the last layer (Bottleneck) of the encoder is used as the initial decoded feature map of the decoder.
[0070] In the second stage of the decoder, the decoded feature map output from the first stage is first fused with the output of the image embedding layer, and then the fused feature map is fused with the input 3D medical image to obtain the final output feature map of the decoder. The feature fusion process of each layer in the second stage of the decoder is the same as that of each layer in the first stage of the decoder. That is, the upsampled feature map is fused with the output of the image embedding layer or the 3D medical image after processing by the residual block and the channel attention module by performing a Concat operation, and then a residual block is used to process the fused feature map.
[0071] The decoder inputs the final output feature map into the classification head, which processes the data and outputs the segmentation probability of each pixel. The label corresponding to the highest probability is then selected as the final segmentation result for that pixel.
[0072] S2: Obtain the completed annotated 3D medical image construction sample dataset;
[0073] S3: The segmentation model is trained based on the sample dataset to obtain the final 3D medical image segmentation model.
[0074] The above embodiments provide a training method for a 3D medical image segmentation model, proposing a novel 3D medical image segmentation model. This model enhances its ability to capture multi-scale features by introducing a hierarchical structure, enabling it to handle complex anatomical structures more efficiently in 3D medical image segmentation tasks. An adaptive hybrid encoder is constructed, based on a global feature modeling approach using a multilayer perceptron. This reduces the complexity of calculating image patch associations from quadratic to linear levels while maintaining segmentation performance, significantly reducing computation time and greatly improving model efficiency, thus solving the problem of long computation times in 3D medical image segmentation. A channel attention module is added to improve feature selection capabilities: before fusing feature information of different scales in each encoder layer, a channel attention module is introduced, employing a "feature recalibration" strategy. By adaptively weighting feature channels, it enhances the focus on key features in the medical segmentation task and suppresses unimportant feature channels. This approach effectively improves the model's accuracy in medical image segmentation. In summary, this invention not only outperforms traditional self-attention mechanisms in terms of computational efficiency, but also improves the model's segmentation accuracy for complex regions in medical images through channel attention. Furthermore, the model framework effectively reduces its dependence on the number of labeled samples, making it suitable for efficient 3D medical image segmentation tasks. The model architecture of this invention can be widely applied to various medical image segmentation tasks, including but not limited to organ segmentation, lesion detection, and tumor segmentation. Its versatility and efficiency enable this solution to demonstrate excellent performance in different medical scenarios.
[0075] This invention also discloses a three-dimensional medical image segmentation method, comprising the following steps:
[0076] Obtain the 3D medical image to be segmented;
[0077] The three-dimensional medical image to be segmented is input into the three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method described in the foregoing embodiments, and the segmented three-dimensional medical image is output.
[0078] Furthermore, embodiments of the present invention also disclose a three-dimensional medical image segmentation model training system, comprising:
[0079] The module framework builds modules for constructing the architecture of the segmentation model, which includes an adaptive hybrid encoder, decoder, and classification head connected in sequence.
[0080] The adaptive hybrid encoder includes an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence. Each nested layer includes a clustering operation module, a multilayer perceptron hybrid module, and a deblocking operation module connected in sequence. A three-dimensional convolutional pooling module is also provided before the clustering operation module of each nested layer except the first layer. Each feature map of the adaptive hybrid encoder, except for the last feature map, is further processed by a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. Each layer of the decoder upsamples the input feature map and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder. The decoder then inputs the final output feature map into the classification head.
[0081] The dataset acquisition module is used to acquire a sample dataset of labeled 3D medical images.
[0082] The training module is used to train the segmentation model based on the sample dataset to obtain the final 3D medical image segmentation model.
[0083] Furthermore, embodiments of the present invention also disclose a three-dimensional medical image segmentation system, comprising:
[0084] The data acquisition module is used to acquire the three-dimensional medical images to be segmented;
[0085] The image segmentation module is equipped with a three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method described above. The model is used to input the three-dimensional medical image to be segmented into the three-dimensional medical image segmentation model and output the segmented three-dimensional medical image.
[0086] It should be understood that the functional unit modules in the various embodiments of the present invention can be concentrated in one processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated into one unit module, and can be implemented in hardware or software.
[0087] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0088] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for training a three-dimensional medical image segmentation model, characterized in that, Includes the following steps: The architecture for constructing the segmentation model includes an adaptive hybrid encoder, decoder, and classification head connected in sequence; The adaptive hybrid encoder comprises an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence. Each nested layer comprises a clustering operation module, a multilayer perceptron hybridization module, and a deblocking operation module connected in sequence. A 3D convolutional pooling module is also provided before the clustering operation module of each nested layer except the first layer. Each feature map of the adaptive hybrid encoder, except for the last layer, is further processed by a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. Each layer of the decoder upsamples the input feature map and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder. The decoder inputs the final output feature map to the classification head. Specifically, the image embedding layer randomly crops the input 3D medical image into sub-volumes, then patches the cropped sub-volumes and projects them into a fixed-size volume embedding token sequence. The clustering operation module aggregates the volume embedding token sequence into a preset number of blocks. The deblocking operation module reformatts the local feature representation output by the multilayer perceptron hybridization module and restores the dimension of the local feature representation. Obtain a sample dataset of annotated 3D medical images; The segmentation model is trained based on the sample dataset to obtain the final 3D medical image segmentation model.
2. The three-dimensional medical image segmentation model training method according to claim 1, characterized in that, The multilayer perceptron mixing module includes a spatial mixing block and a channel mixing block connected in sequence. The spatial mixing block includes a normalization layer and a 3D spatial mixer connected in sequence. The 3D spatial mixer performs a transpose operation before and after each layer. The input and output of the spatial mixing block are fused together through a skip connection and used as the input of the channel mixing block. The channel mixing block includes a normalization layer and a 3D channel mixer connected in sequence. The input and output of the channel mixing block are fused together through a skip connection and used as the output of the entire multilayer perceptron mixing module.
3. The three-dimensional medical image segmentation model training method according to claim 2, characterized in that, Both the 3D spatial mixer and the 3D channel mixer include two fully connected layers, with a GELU activation layer inserted between the two fully connected layers.
4. The three-dimensional medical image segmentation model training method according to claim 1, characterized in that, The three-dimensional convolutional pooling module includes a convolutional layer, a normalization layer, and a max pooling layer connected in sequence.
5. The three-dimensional medical image segmentation model training method according to claim 1, characterized in that, The channel attention module includes a global pooling layer, a first fully connected layer, a ReLU activation layer, a second fully connected layer, a Sigmoid activation layer, and a feature reweighting layer connected in sequence.
6. The three-dimensional medical image segmentation model training method according to claim 1, characterized in that, The main path of the residual block includes two convolutional layers, each followed by a normalization layer and a ReLU activation function. Finally, a skip connection is used to directly fuse the input of the residual block with the output of the main path.
7. The three-dimensional medical image segmentation model training method according to claim 1, characterized in that, The decoder performs the following steps: The first stage of the decoder completes multi-scale feature map fusion decoding. In this stage, each layer performs the following operations: the decoded feature map of the previous layer is upsampled and fused with the feature map output by the corresponding intermediate layer of the encoder. Then, a residual block is used to process the fused feature map to obtain the decoded feature map of the decoder layer. Use the feature map output from the last layer of the encoder as the initial decoding feature map for the decoder; The second stage of the decoder first fuses the decoded feature map output from the first stage with the output of the image embedding layer, and then fuses the fused feature map with the input 3D medical image to obtain the final output feature map of the decoder.
8. A three-dimensional medical image segmentation method, characterized in that, Includes the following steps: Obtain the 3D medical image to be segmented; The three-dimensional medical image to be segmented is input into the three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method as described in any one of claims 1 to 7, and the segmented three-dimensional medical image is output.
9. A three-dimensional medical image segmentation model training system, characterized in that, The method for training a three-dimensional medical image segmentation model as described in claim 1 includes: The module framework builds modules for constructing the architecture of the segmentation model, which includes an adaptive hybrid encoder, decoder, and classification head connected in sequence. The adaptive hybrid encoder includes an image embedding layer, at least two nested layers, a normalization layer, and a convolutional layer connected in sequence. Each nested layer includes a clustering operation module, a multilayer perceptron hybrid module, and a deblocking operation module connected in sequence. A three-dimensional convolutional pooling module is also provided before the clustering operation module of each nested layer except the first layer. Each feature map of the adaptive hybrid encoder, except for the last feature map, is further processed by a residual block and a channel attention module. After processing, each feature map of the adaptive hybrid encoder is connected to the corresponding layer of the decoder. Each layer of the decoder upsamples the input feature map and fuses it with the feature map of the corresponding layer of the adaptive hybrid encoder. The decoder then inputs the final output feature map into the classification head. The dataset acquisition module is used to acquire a sample dataset of labeled 3D medical images. The training module is used to train the segmentation model based on the sample dataset to obtain the final 3D medical image segmentation model.
10. A three-dimensional medical image segmentation system, characterized in that, include: The data acquisition module is used to acquire the three-dimensional medical images to be segmented; An image segmentation module is configured with a three-dimensional medical image segmentation model trained using the three-dimensional medical image segmentation model training method as described in any one of claims 1 to 7, for inputting a three-dimensional medical image to be segmented into the three-dimensional medical image segmentation model and outputting a segmented three-dimensional medical image.
Citation Information
Patent Citations
Image classification method and related equipment
CN116524254A
Lightweight skin lesion segmentation method and system based on convolutional neural network and multilayer perceptron
CN117252852A