Semi-supervised medical image segmentation method and device based on cross pseudo supervision
Through the cross-pseudo-supervision mechanism combined with convolutional network and diffusion network, and using high-frequency Mamba module and contrast learning, the problem of insufficient combination of distribution information and detailed information in the existing medical image segmentation method is solved, and efficient and accurate medical image segmentation is achieved.
Patent Information
- Application Number
- CN202510274634.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-18
AI Technical Summary
The existing medical image segmentation method fails to effectively combine distribution information and detailed information. The CNN network captures local details but consumes a lot of computing resources. The diffusion model generation ability is strong but the details are poorly captured. Semi-supervised learning ignores the relationship between unlabeled samples and labeled samples. The existing tag propagation method is limited to local semantic similarity, resulting in limited generalization ability.
The cross-pseudo-supervision mechanism is adopted to combine the convolutional network and the diffusion network, and the global context information is extracted through the high-frequency Mamba module, and the tag information is spread by comparative learning, and the total loss function optimization model is designed to achieve synchronous learning of distribution and details.
It improves the accuracy and efficiency of medical image segmentation, reduces computing resource consumption, enhances the generalization ability of the model, and improves the integrity and boundary accuracy of the segmentation results.
Smart Images

Figure CN120339603A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular, to a semi-supervised medical image segmentation method and device based on cross pseudo-supervision. Background Art
[0002] Medical image segmentation algorithms play an important role in computer-aided medical diagnosis. Medical images usually have the characteristics of complex backgrounds and blurred boundaries, which greatly increase the difficulty of annotation. Therefore, semi-supervised learning is used to try to make full use of annotated and unannotated data to improve the performance of the model, and research is carried out based on the CNN network and diffusion model.
[0003] Most existing studies are limited to limited samples and fail to capture the overall data distribution. Therefore, it is crucial to combine distribution information with detail information to achieve more robust and accurate segmentation results. On the one hand, due to its powerful generative ability, the diffusion model can effectively learn the data distribution, but it performs poorly in capturing details, resulting in the generated images containing misleading details. The CNN network usually focuses on the details of samples, but due to the limited size of the convolution kernel, it can only capture local details, is easily affected by local noise, and lacks the ability to capture global structures. And using the CNN network to capture comprehensive high-frequency details requires a large amount of computing resources, which is not ideal for efficient model optimization.
[0004] On the other hand, existing semi-supervised learning methods usually only focus on unlabeled samples themselves and ignore the relationship between unlabeled samples and labeled samples. This results in the model being unable to make full use of the information in unlabeled data and limits the generalization ability of the model. And existing label propagation methods are usually based on local semantic similarity, but this similarity may exist between different labeled categories, making it difficult to assign the correct category to unlabeled regions.
[0005] Therefore, there is an urgent need for a semi-supervised medical image segmentation method that combines the CNN network and the diffusion model to correct detail information while learning the data distribution, and at the same time has fast computing power and high generalization ability. Summary of the Invention
[0006] The purpose of the present invention is to provide a semi-supervised medical image segmentation method and device based on cross pseudo-supervision to improve the above problems. To achieve the above purpose, the technical solutions adopted by the present invention are as follows:
[0007] In the first aspect, the present application provides a semi-supervised medical image segmentation method based on cross pseudo-supervision, including:
[0008] Obtain medical image data, where the medical image data includes a plurality of labeled medical images and a plurality of unlabeled medical images;
[0009] Construct a semi - supervised medical image segmentation model based on medical image data. The semi - supervised medical image segmentation model includes a convolutional network and a diffusion network. The convolutional network includes a feature encoding module, a high - frequency Mamba module, and a feature decoding module connected in sequence;
[0010] Train the semi - supervised medical image segmentation model based on the total loss function, cross - pseudo - supervision mechanism, and contrast learning to obtain the segmentation results of unlabeled medical images.
[0011] In a second aspect, the present application also provides a semi - supervised medical image segmentation device based on cross - pseudo - supervision, including:
[0012] An acquisition unit for acquiring medical image data, where the medical image data includes a plurality of labeled medical images and a plurality of unlabeled medical images;
[0013] A construction unit for constructing a semi - supervised medical image segmentation model based on medical image data. The semi - supervised medical image segmentation model includes a convolutional network and a diffusion network. The convolutional network includes a feature encoding module, a high - frequency Mamba module, and a feature decoding module connected in sequence;
[0014] A segmentation unit for training the semi - supervised medical image segmentation model based on the total loss function, cross - pseudo - supervision mechanism, and contrast learning to obtain the segmentation results of unlabeled medical images.
[0015] The beneficial effects of the present invention are as follows: The present invention combines a diffusion network with a convolutional network and designs a semi - supervised medical image segmentation model based on the cross - pseudo - supervision mechanism, enabling the diffusion network to learn the data distribution and the convolutional network to correct fine details. At the same time, a high - frequency Mamba module is designed, which has the ability to capture the global context information of the image, can reduce the influence of local noise, and extract more high - frequency details, solving the problem that the convolutional network requires a large amount of computing resources to capture complete high - frequency details and is easily affected by local noise. And through contrast learning, the labels are propagated from the labeled data to the unlabeled data. The semi - supervised medical image segmentation model improves the accuracy and efficiency of medical image segmentation from both the distribution and feature perspectives.
[0016] Other features and advantages of the present invention will be described in the subsequent specification, and, in part, will be obvious from the specification, or can be understood by implementing the embodiments of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification, claims, and drawings. Brief Description of the Drawings
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0018] Figure 1 Schematic diagram of the process of the semi-supervised medical image segmentation method based on cross pseudo-supervision described in the embodiments of the present invention;
[0019] Figure 2 Schematic diagram of the structure of the semi-supervised medical image segmentation model in the embodiments of the present invention;
[0020] Figure 3 Comparison chart of the segmentation results of the semi-supervised medical image segmentation model and other existing segmentation methods on the LA dataset in the embodiments of the present invention. Detailed implementation manners
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but merely represents the selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0022] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0023] Embodiment 1:
[0024] This embodiment provides a semi-supervised medical image segmentation method based on cross pseudo-supervision.
[0025] See Figure 1 , which shows that this method includes step S100, step S200, and step S300.
[0026] Step S100: Obtain medical image data, where the medical image data includes multiple labeled medical images and multiple unlabeled medical images;
[0027] Step S200: Construct a semi-supervised medical image segmentation model based on the medical image data. The semi-supervised medical image segmentation model includes a convolutional network and a diffusion network. The convolutional network includes a feature encoding module, a high-frequency Mamba module, and a feature decoding module connected in sequence;
[0028] In this embodiment, the constructed semi-supervised medical image segmentation model is simply referred to as the Diff-CL model. The Diff-CL model selects the V-Net network based on the CNN network architecture as the diffusion network and uses the V-Net network as the basis of the convolutional network. The V-Net network includes a connected feature encoding module and a feature decoding module. In this step, a high-frequency Mamba module is embedded in the V-Net network to obtain the convolutional network.
[0029] As Figure 2 shown, it is a schematic diagram of the Diff-CL model, where L cl represents the contrast loss function, CL represents contrast learning, represents the first cross pseudo-supervised loss function, represents the second cross pseudo-supervised loss function, represents the first labeled loss function, represents the second labeled loss function, represents the initial clean label of the unlabeled medical image, represents the initial clean label of the labeled medical image, represents the noisy label of the unlabeled medical image, represents the noisy label of the labeled medical image, represents the first mapped feature of the unlabeled medical image, represents the second mapped feature of the labeled medical image, x u represents the unlabeled medical image, x l represents the labeled medical image.
[0030] Since medical images usually show a structured anatomical pattern with a clear sequential relationship, where global context information is crucial for enhancing the extraction of fine details. To address the computational challenges faced by the CNN network in capturing high-frequency details, a high-frequency Mamba module is designed, which uses the global context information of the image to globally learn the details of the samples.
[0031] In step S200, the steps for the high-frequency Mamba module to perform feature extraction are:
[0032] Step A100: Apply spatial attention to the input features of the high-frequency Mamba module and then perform a fast Fourier transform to obtain frequency-domain features;
[0033] Step A200: Center the spectrum of the frequency-domain features and then perform high-pass filtering to obtain high-frequency features. Perform an inverse fast Fourier transform on the high-frequency features to obtain transformed features;
[0034] Step A300: Apply layer normalization to the transformed features and then obtain spatial features through the spatial Mamba sub-module;
[0035] Step A400: Add the spatial features and the transformed features to obtain added features. Apply layer normalization to the added features and then obtain perceptual features through a multi-layer perceptron;
[0036] Step A500: Add the perceptual features, the added features, and the input features to obtain the output features of the high-frequency Mamba module.
[0037] In this embodiment, in order to obtain the high-frequency components of the features, first, the 3D features are transformed from the spatial domain to the frequency domain through a fast Fourier transform. Then, the features are filtered through high-pass filtering. Finally, the obtained high-frequency features are transformed back to the spatial domain for Mamba attention learning.
[0038] In this step, the formula for feature extraction by the high-frequency Mamba module is:
[0039] F g = FFT(SA(f in ))
[0040] F h = iFFT(HPF(fftShift(F g )))
[0041] F m = SM(LN(F h )) + F h
[0042] F o = MLP(LN(F m )) + F m + F g
[0043] where f in represents the input features of the high-frequency Mamba module, SA(·) represents spatial attention, FFT(·) represents the fast Fourier transform, F g represents the frequency-domain features, F hdenotes the transformation feature, fftShift(·) denotes spectrum centering, HPF(·) denotes high-pass filtering, iFFT(·) denotes the inverse fast Fourier transform, and F m denotes the addition feature, SM(·) denotes the spatial Mamba sub-module, LN(·) denotes layer normalization, and F o denotes the output feature of the high-frequency Mamba module, and MLP(·) denotes the multi-layer perceptron.
[0044] Among them, the input feature of the high-frequency Mamba module is the 3D feature output by the feature encoding module of the convolutional network, including 3D labeled features and 3D unlabeled features. Therefore, during the process of feature extraction by the high-frequency Mamba module, the features are all 3D.
[0045] Therefore, the formula of the spatial Mamba sub-module is:
[0046] F SM = Mamba(z f ) + Mamba(z r ) + Mamba(z s )
[0047] In the formula, F SM denotes the output feature of the spatial Mamba sub-module, Mamba(·) denotes sequence modeling based on the state space model, and z f , z r and z s denote the forward sequential feature, the backward sequential feature, and the spatial sequential feature respectively.
[0048] Actually, z f , z r and z s are features that change the order of each voxel feature in the input feature of the spatial Mamba sub-module. And the sequence modeling based on the state space model is a prior art, and its dynamic mechanism can efficiently capture important information when processing long sequences while ignoring irrelevant details.
[0049] Therefore, the high-frequency Mamba module alleviates the limitations of the CNN network by learning the high-frequency details in medical images and using its ability to integrate global context information, overcoming the problem that the CNN network overly focuses on local details and is easily affected by local noise. And the CNN network requires a large amount of computing resources to capture high-frequency information, but the high-frequency Mamba module runs with linear computational complexity and can efficiently capture high-frequency features.
[0050] Step S300: Train the semi-supervised medical image segmentation model based on the total loss function, the cross pseudo-supervision mechanism, and contrastive learning to obtain the segmentation result of the unlabeled medical image.
[0051] The said step S300 includes:
[0052] Step S301: Segment the medical image data through a convolutional network and a diffusion network to obtain first image information and second image information;
[0053] In this embodiment, through a cross pseudo - supervision mechanism, the pseudo - labels generated by the diffusion network provide distribution learning for the convolutional network, while the pseudo - labels generated by the convolutional network provide correct details for the diffusion network.
[0054] In step S301, the obtaining steps of the said first image information are:
[0055] Step B100: Extract features from the medical image data through a convolutional network to obtain first medical features and a first class probability map of the medical image;
[0056] Step B200: Map the first medical features through a mapping head to obtain first mapped features;
[0057] Step B300: Calculate a first pseudo - label of the medical image based on the first class probability map;
[0058] Step B400: Take the first mapped features, the first class probability map, and the first pseudo - label as the first image information.
[0059] In this embodiment, in one forward pass of the convolutional network, a mini - batch of labeled medical images and unlabeled medical images are input, and the corresponding first medical features are obtained. After passing the first medical features through the last convolutional layer and the Softmax function, the corresponding first class probability map is obtained. Then, after passing the first class probability map through the argmax function, the first pseudo - label of the medical image is obtained.
[0060] In step S301, the obtaining steps of the said second image information are:
[0061] Step C100: Perform one - hot encoding on the true labels of the labeled medical images and the first pseudo - labels of the unlabeled medical images to obtain initial clean labels;
[0062] Step C200: Add continuous noise to the initial clean labels to obtain noise labels;
[0063] Step C300: Input the medical images and the corresponding noise labels into the diffusion network to obtain second medical features and a second class probability map of the medical images;
[0064] Step C400: Map the second medical features through a mapping head to obtain second mapped features;
[0065] Step C500: Calculate the second pseudo-label of the medical image based on the second category probability map;
[0066] Step C600: Use the second mapped feature, the second category probability map, and the second pseudo-label as the second image information.
[0067] In this embodiment, since the diffusion network conditions the diffusion label on the samples, but the unlabeled medical images have no labels, the first pseudo-labels of the unlabeled medical images obtained by the convolutional network are used for replacement.
[0068] To obtain the input of the diffusion network, the true labels of the labeled medical images and the first pseudo-labels of the unlabeled medical images are converted into one-hot encoded form to obtain the initial clean labels of the labeled medical images and the initial clean labels of the unlabeled medical images.
[0069] Then, continuous t-step noise is added to the initial clean labels to obtain the noise labels, specifically:
[0070]
[0071] In the formula, represents the noise label of the unlabeled medical image, represents the noise label of the labeled medical image, represents the initial clean label of the unlabeled medical image, represents the initial clean label of the labeled medical image, represents a predefined time-dependent scalar parameter, t represents the diffusion time step, ∈ represents the noise, and ∈ follows a standard normal distribution.
[0072] Then, the medical image and the corresponding noise label are input into the diffusion network to obtain the second medical feature of the medical image. After passing the second medical feature through the last convolutional layer and the Softmax function, the corresponding second category probability map is obtained. Then, after passing the second category probability map through the argmax function, the second pseudo-label of the medical image is obtained.
[0073] Meanwhile, in this embodiment, the first medical feature and the second medical feature are also mapped through the mapping head for subsequent contrast learning. The mapping head consists of a linearly transformed layer, a batch normalization layer, a ReLU activation function, and a linearly transformed layer connected in sequence.
[0074] Step S302: Obtain positive and negative pairs of labeled feature vectors from the first image information and the second image information, and then perform contrast learning;
[0075] In this embodiment, medical images usually exhibit consistent structures within the same category, but significant differences exist between different categories. Regions in unlabeled medical images that are semantically similar to the overall category of labeled medical images are likely to belong to the same category, while regions with the least similarity are less likely. Therefore, contrastive learning is used to spread label information by narrowing the boundaries between regions in unlabeled medical images that are overall semantically similar to each category of labeled medical images and expanding the boundaries between unrelated regions.
[0076] In step S302, the specific steps for obtaining positive and negative pairs of labeled feature vectors are as follows:
[0077] Step D100: Obtain medical images with correct predictions through the second pseudo-labels and true labels of labeled medical images;
[0078] In this embodiment, the second pseudo-labels of the labeled medical images obtained by the diffusion network are compared with the corresponding true labels. If they are consistent, they are medical images with correct predictions, and a memory bank is constructed. The memory bank is used to store the second mapping features and second pseudo-labels of the medical images with correct predictions obtained by the diffusion network.
[0079] Step D200: Randomly select multiple labeled features for each category based on the second mapping features of the medical images with correct predictions to obtain labeled feature vectors for each category;
[0080] In this embodiment, from the memory bank, multiple labeled features are randomly selected for each category to represent the category semantics, and the labeled feature vectors are obtained specifically as follows:
[0081] a = (a 1 , a 2 , …, a C )
[0082]
[0083] γ = 1, 2, …, C
[0084] e = 1, 2, …, p
[0085] In the formula, a represents the labeled feature vector, a γ represents the labeled feature vector of the γ-th category, C represents the total number of categories, represents the e-th labeled feature of the γ-th category, and p represents the number of labeled features.
[0086] Step D300: Randomly select multiple unlabeled features based on the first mapping features of unlabeled medical images;
[0087] In this embodiment, the unlabeled features are represented as:
[0088] b = (b1, b2, …, b q )
[0089] j = 1, 2, …, q
[0090] where b represents the unlabeled feature vector, b j represents the j-th unlabeled feature, and q represents the number of unlabeled features.
[0091] Step D400: Calculate the sum of the cosine distances between each unlabeled feature and the labeled feature vectors of each category;
[0092] In this embodiment, first, for all the labeled features of the γ-th category, calculate the cosine distance between the unlabeled feature and each labeled feature, specifically:
[0093]
[0094] where cos(b j , a i ) represents the cosine distance between a i and b j , a i represents the i-th labeled feature of the γ-th category, b j represents the j-th unlabeled feature, a i ∈ a γ , b j ∈ b, a γ represents the labeled feature vector of the γ-th category, b represents the unlabeled feature vector, R represents the feature dimension, represents the ω-th dimension of a i , represents the ω-th dimension of b j .
[0095] Then sum up the cosine distances to obtain the sum of the cosine distances between the j-th unlabeled feature b j and the labeled feature vectors of each category.
[0096] Step D500: Select the unlabeled features of the labeled feature vectors of each category based on the sum of the cosine distances to obtain the positive and negative pairs of the labeled feature vectors of each category.
[0097] According to the sum of the cosine distances, for each category, find the top k unlabeled features that are most similar and the top k unlabeled features that are least similar in the unlabeled feature vector b, and use them as the positive and negative pairs of the labeled feature vectors of each category, specifically:
[0098]
[0099] where b γ,PDenote the top k unlabeled features that are most similar to the γ-th class, b γ,N Denote the top k unlabeled features that are least similar to the γ-th class Denote taking the top k largest corresponding unlabeled features Denote taking the top k largest corresponding unlabeled features Denote the total sum of the cosine distances of similarity corresponding to the j-th unlabeled feature The total sum of the cosine distances of dissimilarity corresponding to the j-th unlabeled feature, a i Denote the i-th labeled feature of the γ-th class, b j Denote the j-th unlabeled feature, b j ∈b, a γ Denote the labeled feature vector of the γ-th class, b denotes the unlabeled feature vector, p denotes the number of labeled features, q denotes the number of unlabeled features, cos(b j , a i ) denotes a i and b j cosine distance of
[0100] Thus, positive and negative pairs of the labeled feature vectors of each class are obtained, specifically: {(b 1,P , b 1,N ), …, (b C,P , b C ,N ), where γ = 1, 2, …, C, and C represents the total number of classes
[0101] Construct a contrastive loss function through the positive and negative pairs of the labeled feature vectors. When performing contrastive learning, it is promoted that the distance between the top k most similar unlabeled features and the labeled features of this class is close, and it is promoted that the top k least similar unlabeled features are far from the labeled features of this class. And when optimizing the model parameters through backpropagation subsequently, the model naturally passes the parameters of the labeled features to the unlabeled features similar to them, while the unlabeled features that are least similar to them are isolated
[0102] Step S303: Determine whether the preset number of iterations is reached. If so, obtain the segmentation result of the unlabeled medical image through the second image information. Otherwise, calculate the total loss through the positive and negative pairs of the labeled feature vectors, then perform backpropagation to optimize the model parameters, and perform the next round of iterative training
[0103] In this embodiment, through training, the output results of the convolutional network and the diffusion network are made close, and finally the second pseudo-label is obtained as the predicted label of the unlabeled medical image. At the same time, in the iterative training, the total loss is calculated through the total loss function for iteration
[0104] In this embodiment, the construction steps of the total loss function are as follows:
[0105] Step E100: Construct a cross-pseudo-supervised loss function through the first pseudo-label, the second pseudo-label, the first class probability map, and the second class probability map of the unlabeled medical images;
[0106] In this embodiment, the Softmax prediction of the guiding diffusion network is obtained by using the convolutional network, and the Softmax prediction of the convolutional network is guided by the diffusion network. Therefore, an unsupervised loss, that is, a cross-pseudo-supervised loss function, is constructed. The cross-pseudo-supervised loss function includes a first cross-pseudo-supervised loss function and a second cross-pseudo-supervised loss function, specifically:
[0107]
[0108] In the formula, represents the first cross-pseudo-supervised loss function, represents the second cross-pseudo-supervised loss function, represents the second class probability map of the unlabeled medical images, represents the first class probability map of the unlabeled medical images, represents the second pseudo-label of the unlabeled medical images, represents the first pseudo-label of the unlabeled medical images, λ1 and λ2 respectively represent the first weight parameter and the second weight parameter, D(·) represents the Dice coefficient, and E(·) represents the cross-entropy.
[0109] Step E200: Construct a contrastive loss function based on the positive and negative pairs of the labeled feature vectors;
[0110] In this embodiment, in this embodiment, contrastive learning is carried out by narrowing the distance between positive pairs and widening the distance between negative pairs. The contrastive loss function is actually the label information propagation loss, specifically:
[0111]
[0112] In the formula, L cl represents the contrastive loss function, represents the contrastive loss between i a j and i b j , C represents the total number of classes, γ a j represents the i-th labeled feature of the γ-th class, i b iand b j The cosine distance, τ represents the temperature parameter, b γ,P represents the top k unlabeled features that are most similar to the γ-th category, b γ,N represents the top k unlabeled features that are least similar to the γ-th category.
[0113] Step E300: Construct a labeling loss function based on the ground truth labels, the first category probability map, and the second category probability map of the labeled medical images;
[0114] In this embodiment, a supervised loss, that is, a labeling loss function, is constructed. The labeling loss function includes a first labeling loss function and a second labeling loss function, specifically:
[0115]
[0116] In the formula, represents the first labeling loss function, represents the second labeling loss function, D(·) represents the Dice coefficient, E(·) represents the cross entropy, β1 and β2 respectively represent the third weight parameter and the fourth weight parameter, represents the second category probability map of the labeled medical images, represents the first category probability map of the labeled medical images, y l represents the ground truth labels of the labeled medical images.
[0117] Step E400: Construct a total loss function based on the cross pseudo-supervised loss function, the contrastive loss function, and the labeling loss function.
[0118] In this embodiment, the total loss function is a weighted combination of the supervised loss on the labeled data and the unsupervised loss on the unlabeled data. The unlabeled loss function of the convolutional network is constructed through the contrastive loss function and the second cross pseudo-supervised loss function, specifically:
[0119]
[0120] In the formula, represents the unlabeled loss function, represents the second cross pseudo-supervised loss function, L cl represents the contrastive loss function, η represents the fifth weight parameter.
[0121] Through the unlabeled loss function, the first cross pseudo-supervised loss function, and the labeling loss function, a total loss function is constructed. The total loss function includes a convolutional total loss function and a diffusion total loss function, specifically:
[0122]
[0123] In the formula, L dDenote the total diffusion loss function, L c Denote the total convolution loss function Denote the first label loss function Denote the second label loss function Denote the first cross pseudo-supervision loss function Denote the unlabeled loss function, where μ1 and μ2 denote the sixth weight parameter and the seventh weight parameter respectively
[0124] Example 2
[0125] In this example, the performance of the Diff-CL model was evaluated on three publicly available left atrial segmentation datasets LA. The LA dataset contains 100 3D gadolinium-enhanced MR images with a resolution of 0.625mm×0.625mm×0.625mm. 80 scan images were used for training and 20 scan images were used for testing. All images were cropped at the center of the heart region and normalized to zero mean and unit variance
[0126] In this example, the Diff-CL model was compared with nine existing semi-supervised image segmentation methods. The existing semi-supervised image segmentation methods include the dual-task consistency network DTC, the shape-aware model SASSNet, the uncertainty-aware mean teacher network UA-MT, the uncertainty-corrected pyramid consistency network URPC, the interaction consistency network MC-Net and MC-Net+, the fuzzy consensus mean teacher network AC-MT, the correlation-aware interaction learning network CAML, and the interaction learning network with reliable pseudo-labels ML-RPL
[0127] The Diff-CL model was trained for 300 epochs using the stochastic gradient descent (SGD) optimizer, with weight decay of 3×10 -5 and momentum of 0.9, and the learning rate was kept at 0.01. A Gaussian warm-up function was used to control the weights at each iteration. To mitigate overfitting, the training dataset was augmented by random cropping, flipping, and rotation techniques. In the segmentation of the LA dataset, random cropping was performed to a size of 112×112×80 voxels, and a sliding window strategy with a step size of 18×18×4 voxels was used for prediction
[0128] Table 1 Performance comparison table of the Diff-CL model and existing segmentation methods
[0129]
[0130]
[0131] In Table 1, four complementary evaluation metrics were used to quantitatively evaluate the segmentation performance of each model during the test. Dice represents the Dice similarity index, Jaccard represents the Jaccard index, 95HD represents the 95% Hausdorff distance, and ASD represents the average surface distance. Dice and Jaccard measure the degree of region matching. The higher the Dice and Jaccard scores, the higher the pixel-level matching degree. ASD and 95HD are two boundary-based evaluation metrics used to measure the boundary differences in the image. The lower the ASD and 95HD scores, the smaller the boundary differences in the image.
[0132] As shown in Table 1, comparative experiments were conducted on the LA dataset under the 5% and 10% labeled data settings. The Diff-CL model outperformed the other nine methods under different labeled data settings. Compared with the existing nine methods, under the 5% labeled data setting, the Dice score of Diff-CL was 1.49% higher, the Jaccard score was 2.4% higher, the 95HD was 3.54 lower, and the ASD was 0.01 lower, superior to the best alternative method. Under the 10% labeled data setting, the Dice score of Diff-CL was 1.56% higher, the Jaccard score was 2.53% higher, the 95HD was 2.84 lower, and the ASD was 0.08 lower. These results demonstrate the effectiveness of Diff-CL, showing performance close to supervised learning even with limited labeled data.
[0133] As Figure 3 shown, in the highlighted area, even with only 10% labeled data, the segmentation of the Diff-CL model is closer to the ground truth. Compared with methods such as UA-MT and MC-Net+, the Diff-CL model better preserves the atrial edges and details, demonstrating efficient utilization on limited labeled data and strong performance at different labeling ratios.
[0134] This embodiment also conducted ablation studies to verify the effectiveness of the Diff-CL model. Table 2 shows the results of the ablation study on the LA dataset, comparing different combinations of loss functions and evaluating their effects on various metrics such as Dice, Jaccard, 95HD, and ASD.
[0135] Table 2 Ablation analysis table of the Diff-CL model
[0136]
[0137] As shown in Table 2, using only the loss including and provides a solid foundation for segmentation accuracy, but there is still room for improvement in boundary approximation and segmentation smoothness. Adding and The high-frequency Mamba module (HFM) significantly improves Dice and Jaccard, that is, it improves the segmentation accuracy and the overlap rate. It also improves boundary approximation and smoothness, as demonstrated by the reduction in 95HD and ASD values. And the addition of L cl achieves the highest Dice and Jaccard in all settings, that is, it has the highest accuracy and the best overlap rate. It also significantly reduces the worst-case boundary error and improves contour smoothness.
[0138] In summary, the present invention proposes a semi-supervised medical image segmentation model from the perspective of distribution, and actually proposes a new semi-supervised medical image segmentation framework. On the one hand, by designing a cross-pseudo-supervised learning mechanism for a diffusion network and a convolutional network, the diffusion model is combined with the convolutional neural network, enabling the former to learn the data distribution and the latter to correct fine details. Considering that capturing complete high-frequency details through a CNN network architecture requires a large amount of computing resources and is vulnerable to local noise, a 3D high-frequency Mamba module is designed to learn high-frequency details in medical images. On the other hand, a new label information propagation method from labeled data to unlabeled data through contrastive learning is proposed, solving the problem that most existing label propagation methods focus on local semantic similarity, but such similarity may exist between different labeled categories, making it difficult to assign a category to unlabeled regions.
[0139] Embodiment 3:
[0140] This embodiment provides a semi-supervised medical image segmentation device based on cross-pseudo-supervision, and the device includes:
[0141] An acquisition unit for acquiring medical image data, where the medical image data includes a plurality of labeled medical images and a plurality of unlabeled medical images;
[0142] A construction unit for constructing a semi-supervised medical image segmentation model based on the medical image data, where the semi-supervised medical image segmentation model includes a convolutional network and a diffusion network, and the convolutional network includes a feature encoding module, a high-frequency Mamba module, and a feature decoding module connected in sequence;
[0143] A segmentation unit for training the semi-supervised medical image segmentation model based on a total loss function, a cross-pseudo-supervision mechanism, and contrastive learning to obtain a segmentation result of the unlabeled medical image.
[0144] The construction unit includes:
[0145] A transformation sub-unit for performing a fast Fourier transform on the input features of the high-frequency Mamba module after using spatial attention to obtain frequency-domain features;
[0146] A filtering sub-unit, configured to perform spectrum centering on the frequency-domain features and then perform high-pass filtering to obtain high-frequency features, and perform an inverse fast Fourier transform on the high-frequency features to obtain transformed features;
[0147] A first extraction sub-unit, configured to perform layer normalization on the transformed features and then obtain spatial features through a spatial Mamba sub-module;
[0148] A second extraction sub-unit, configured to add the spatial features and the transformed features to obtain an added feature, perform layer normalization on the added feature, and then obtain perceptual features through a multi-layer perceptron;
[0149] A splicing sub-unit, configured to add the perceptual features, the added features, and the input features to obtain the output features of the high-frequency Mamba module.
[0150] The segmentation unit includes:
[0151] A segmentation sub-unit, configured to perform image segmentation on the medical image data through a convolutional network and a diffusion network to obtain first image information and second image information;
[0152] A contrastive learning sub-unit, configured to obtain positive and negative pairs of labeled feature vectors from the first image information and the second image information and then perform contrastive learning;
[0153] A judgment sub-unit, configured to judge whether a preset number of iterations is reached. If so, obtain the segmentation result of the unlabeled medical image through the second image information; otherwise, calculate the total loss through the positive and negative pairs of labeled feature vectors, perform backpropagation to optimize the model parameters, and perform the next round of iterative training.
[0154] It should be noted that regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0155] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
[0156] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present invention, and all should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A semi-supervised medical image segmentation method based on cross pseudo-supervision, characterized in that Including: Obtain medical image data, where the medical image data includes a plurality of labeled medical images and a plurality of unlabeled medical images; Construct a semi-supervised medical image segmentation model based on the medical image data, where the semi-supervised medical image segmentation model includes a convolutional network and a diffusion network, and the convolutional network includes a feature encoding module, a high-frequency Mamba module, and a feature decoding module connected in sequence; Train the semi-supervised medical image segmentation model based on the total loss function, cross pseudo-supervision mechanism, and contrast learning to obtain the segmentation results of the unlabeled medical images.
2. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 1, wherein , The steps for the high-frequency Mamba module to perform feature extraction are: Perform a fast Fourier transform on the input features of the high-frequency Mamba module after using spatial attention to obtain frequency domain features; Perform spectral centering on the frequency domain features and then perform high-pass filtering to obtain high-frequency features, and perform an inverse fast Fourier transform on the high-frequency features to obtain transformed features; Perform layer normalization on the transformed features and then obtain spatial features through a spatial Mamba sub-module; Add the spatial features and the transformed features to obtain added features, perform layer normalization on the added features, and then obtain perceptual features through a multi-layer perceptron; Add the perceptual features, the added features, and the input features to obtain the output features of the high-frequency Mamba module.
3. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 1, characterized in that , Training the semi-supervised medical image segmentation model based on the total loss function, cross pseudo-supervision mechanism, and contrast learning to obtain the segmentation results of the unlabeled medical images, including: Perform image segmentation on the medical image data through the convolutional network and the diffusion network to obtain first image information and second image information; Obtain positive and negative pairs of labeled feature vectors through the first image information and the second image information and then perform contrast learning; Determine whether the preset number of iterations is reached. If so, obtain the segmentation results of the unlabeled medical images through the second image information. Otherwise, calculate the total loss through the positive and negative pairs of labeled feature vectors, perform backpropagation to optimize the model parameters, and perform the next round of iterative training.
4. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 3, wherein , The steps for obtaining the first image information are: Perform feature extraction on the medical image data through the convolutional network to obtain the first medical features and the first class probability map of the medical image; Map the first medical features through a mapping head to obtain first mapped features; Calculate the first pseudo-label of the medical image based on the first class probability map; Use the first mapped features, the first class probability map, and the first pseudo-label as the first image information.
5. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 4, wherein , The steps for obtaining the second image information are: Perform one-hot encoding on the true labels of the labeled medical images and the first pseudo-labels of the unlabeled medical images to obtain initial clean labels; Add continuous noise to the initial clean labels to obtain noise labels; Input the medical images and the corresponding noise labels into the diffusion network to obtain the second medical features and the second class probability map of the medical images; Map the second medical features through a mapping head to obtain second mapped features; Calculate the second pseudo-label of the medical image based on the second class probability map; Use the second mapped features, the second class probability map, and the second pseudo-label as the second image information.
6. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 5, wherein , The specific steps for obtaining the positive and negative pairs of labeled feature vectors are: Obtain the correctly predicted medical images through the second pseudo-labels and true labels of the labeled medical images; Randomly select multiple labeled features for each category based on the second mapping features of the correctly predicted medical images to obtain the labeled feature vectors for each category; Randomly select multiple unlabeled features based on the first mapping features of the unlabeled medical images; Calculate the sum of the cosine distances between each unlabeled feature and the labeled feature vectors of each category; Select the unlabeled features of the labeled feature vectors for each category based on the sum of the cosine distances to obtain the positive and negative pairs of the labeled feature vectors for each category.
7. The semi-supervised medical image segmentation method based on cross pseudo-supervision according to claim 6, wherein , The construction steps of the total loss function are as follows: Construct a cross-pseudo-supervision loss function through the first pseudo-labels, second pseudo-labels, first category probability map, and second category probability map of the unlabeled medical images; Construct a contrastive loss function based on the positive and negative pairs of the labeled feature vectors; Construct a labeled loss function based on the true labels, first category probability map, and second category probability map of the labeled medical images; Construct a total loss function based on the cross-pseudo-supervision loss function, contrastive loss function, and labeled loss function.
8. A semi-supervised medical image segmentation device based on cross pseudo-supervision, characterized in that, Including: An acquisition unit for acquiring medical image data, where the medical image data includes multiple labeled medical images and multiple unlabeled medical images; A construction unit for constructing a semi-supervised medical image segmentation model based on the medical image data, where the semi-supervised medical image segmentation model includes a convolutional network and a diffusion network, and the convolutional network includes a feature encoding module, a high-frequency Mamba module, and a feature decoding module connected in sequence; A segmentation unit for training the semi-supervised medical image segmentation model based on the total loss function, cross-pseudo-supervision mechanism, and contrastive learning to obtain the segmentation results of the unlabeled medical images.
9. The semi-supervised medical image segmentation device based on cross pseudo-supervision according to claim 8, characterized in that, The construction unit includes: A transformation sub-unit for performing a fast Fourier transform on the input features of the high-frequency Mamba module after using spatial attention to obtain frequency-domain features; A filtering sub-unit for performing spectral centering on the frequency-domain features and then performing high-pass filtering to obtain high-frequency features, and performing an inverse fast Fourier transform on the high-frequency features to obtain transformed features; A first extraction sub-unit for performing layer normalization on the transformed features and then obtaining spatial features through a spatial Mamba sub-module; A second extraction sub-unit for adding the spatial features and the transformed features to obtain an added feature, performing layer normalization on the added feature, and then obtaining perceptual features through a multi-layer perceptron; A splicing sub-unit for adding the perceptual features, the added features, and the input features to obtain the output features of the high-frequency Mamba module.
10. The semi-supervised medical image segmentation device based on cross pseudo-supervision according to claim 8, wherein The segmentation unit includes: A segmentation sub-unit for performing image segmentation on the medical image data through the convolutional network and the diffusion network to obtain first image information and second image information; A contrastive learning sub-unit for performing contrastive learning after obtaining the positive and negative pairs of the labeled feature vectors through the first image information and the second image information; A judgment sub-unit for judging whether the preset number of iterations is reached. If so, obtain the segmentation results of the unlabeled medical images through the second image information. Otherwise, calculate the total loss through the positive and negative pairs of the labeled feature vectors, perform backpropagation to optimize the model parameters, and perform the next round of iterative training.
Citation Information
Cited By
Semi-supervised segmentation method and system based on amplitude perception deep reinforcement learning
CN120876858A