Contrast learning assisted semi-supervised image segmentation method and system for dual-region balance consistency learning
By introducing a contrast learning-assisted dual-zone balanced consistency learning strategy and a hard negative sample comparison learning module in the semi-supervised medical image segmentation method, the problem of imbalance in the uncertain region and insufficient class separability is solved. , achieving higher segmentation accuracy and class separability.
Patent Information
- Application Number
- CN202411646492.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing semi-supervised medical image segmentation method has insufficient attention to the balance model for high-uncertainty and low-uncertainty areas, resulting in low accuracy of segmentation results, and using consistency learning alone cannot guarantee the class in the segmentation results. Separability.
A two-zone balanced consistent learning method is proposed to calculate the information entropy of the predicted results of the student model, divide the high-entropy region and the low-entropy region, and set different loss weights for it, combining the comparison of hard negative samples. Learning module to enhance the class separability of the model's learning of high-entropy regions and segmentation results.
The accuracy and class separability of medical image segmentation are improved, and the overall performance of the model is improved by balancing the attention of high and low uncertain areas and using the contrast learning module.
Smart Images

Figure CN119478414A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image segmentation, and in particular relates to a semi-supervised image segmentation method and system thereof for dual-region balanced consistency learning assisted by contrastive learning. Background Art
[0002] The development of modern medical imaging technology enables doctors to obtain detailed images of the internal anatomical structure and tissues and organs of the human body through various imaging methods and equipment, and to diagnose, treat and monitor diseases. The role of computer-assisted analysis of medical images in clinical diagnosis and treatment is becoming increasingly significant.
[0003] Medical image segmentation aims to determine the category of each pixel in the image and to separate the required anatomical structures, such as organs and tumors, from the image. Accurate segmentation can provide more reliable anatomical structure information, reflect the pathological characteristics of specific diseases, and is also an important step in computer-aided disease diagnosis and subsequent treatment planning. Medical image segmentation methods based on deep learning have made great progress in technology in recent years, especially in identifying lesions and anatomical structures. Medical image segmentation methods based on deep learning usually take the form of fully supervised learning, which means that the model requires a large amount of labeled data for training. Semi-supervised learning can learn information from a large amount of unlabeled data, and then combine a small amount of labeled data to train and optimize the segmentation model to achieve a segmentation effect close to that of a fully supervised model. Therefore, semi-supervised segmentation methods have become an effective way to alleviate the problem of insufficient labeled data in medical image segmentation.
[0004] In the field of semi-supervised medical image segmentation, consistency regularization is one of the mainstream methods, which is mainly improved on the Mean-Teacher (MT) method. This method includes two models, namely the student model and the teacher model. For labeled images, they are input into the student model, and after obtaining the segmentation results, the real labels of the images are used for supervision; for unlabeled images, different random perturbations need to be applied to them, such as Gaussian noise, and then they are input into the student model and the teacher model respectively to obtain the predicted segmentation results of the two models, and then the consistency loss is calculated for the two segmentation results. The student model back-propagates through the consistency loss and the supervision loss, and the gradient updates the parameters of the model. The parameters of the teacher model are updated by the exponential moving average (EMA) of the student model parameters.
[0005] However, there are still some shortcomings in the current Mean-Teacher-based improved methods: (1) The basic MT model can improve the model effect when only high-uncertainty areas or low-uncertainty areas are selected to calculate the consistency loss. Among them, the effect is better when only high-uncertainty areas are selected for consistency learning. This shows that it is meaningful to perform consistency learning in both areas separately. Therefore, how to balance the model's attention to high-uncertainty areas and low-uncertainty areas to further improve the overall effect of consistency learning has become a challenge. (2) The method based on consistency learning only calculates the MSE loss between predictions under different perturbations. The MSE loss only calculates the difference between voxels and is not used to perceive class information. Therefore, the semi-supervised model implemented only using consistency learning cannot guarantee the class separability in the segmentation results.
[0006] In summary, the current consistency method will cause the model to be unable to fully utilize the information of unlabeled images, thus affecting the segmentation accuracy of the model. Summary of the invention
[0007] The first purpose of the present invention is to address the problems existing in the prior art and propose a contrastive learning-assisted dual-region balanced consistency learning semi-supervised medical image segmentation method and system, aiming to solve the problem of how to balance the model's attention to high-uncertainty areas and low-uncertainty areas, and the problem of insufficient class separability in the segmentation results, thereby improving the segmentation accuracy of medical images.
[0008] In a first aspect, the present invention provides a semi-supervised image segmentation method of dual-region balanced consistency learning assisted by contrastive learning, which specifically comprises the following steps: Step 1: Obtain medical images, including labeled images The corresponding unlabeled image ; Step 2: Preprocess the medical images and construct the data set; Step 3: Build an image segmentation network architecture and train it using the dataset; The image segmentation network includes a student model , Teacher Model , dual-region balanced consistency learning strategy, contrastive learning module using hard negative samples, EMA module; During the training process, the student model For the preprocessed label image and unlabeled images Process them separately to obtain the corresponding first prediction segmentation results And the second predicted segmentation result ; Wherein the subscript i represents the i-th image; The teacher model For the preprocessed unlabeled images Processing is performed to obtain the third predicted segmentation result ; The implementation method of the dual-zone balance consistency learning strategy is as follows: 1) For unlabeled images, we need to measure the uncertainty in the prediction results. Considering that information entropy reflects the uncertainty of the prediction results, high entropy means higher uncertainty. Therefore, we use normalized entropy to quantify the uncertainty of the prediction results.
[0009] Model for students Output of the second predicted segmentation result Calculate the information entropy value of each voxel in the image ; in ne v ∈ [0, 1] ; p i c Represents the second predicted segmentation result The predicted probability map of the cth class in the middle; Represents a set of segmentation object categories; Indicates the number of segmentation object categories.
[0010] According to the information entropy value of each voxel , filter out Greater than threshold In the high entropy region ; Threshold It can gradually increase with the number of iterations, and its update can be seen in: Where t represents the current iteration number, ttotal represents the total number of iterations of model training, h represents the initial threshold, and r represents the threshold growth rate; Represents the growth coefficient.
[0011] use Calculate the second predicted segmentation result And the third predicted segmentation result Consistency loss in high entropy regions ; in and They respectively represent the predictions on the vth voxel in the second predicted segmentation result and the third predicted segmentation result.
[0012] use Calculate the second predicted segmentation result And the third predicted segmentation result Consistency loss in low entropy regions between ; In order to make the model focus more on learning the knowledge in the high entropy area, a larger weight is set for its loss, and a smaller weight is selected for the consistency loss in the low entropy area. and consistency loss in low entropy regions , calculate the total loss of consistency learning ;
[0013] in , Respectively , The weight of > >0.
[0014] 2) For the label image, use the student model to first predict the segmentation result and the true label Calculating supervised loss ; in represents the cross entropy loss, represents Dice loss; The contrastive learning module using hard negative samples comprises the following steps: 1) Create a storage container , used to store positive and negative samples; 2) Set anchor point samples; Using feature mapping model The second predicted segmentation result of the current iteration Prediction probability plot for different classes in Mapped into the feature space, we get class samples of different classes , and As anchor sample; in, Represents the class sample of the c-th segmentation object; because represents the category of the segmented object, represents the segmentation object class, Represents the background class, we can get { , }, represents the class sample of the segmented object class, Represents the class sample of the background class; 3) Obtain positive sample pairs; Since in each iteration, from Only one class sample corresponding to each class can be obtained , multiple samples of the same category cannot be provided; therefore, use To store the unlabeled images in the previous iteration Class sample As a positive sample, it can be compared with the anchor sample Forming positive sample pairs ; 4) Obtain hard negative sample pairs; If the consistency loss of the high entropy region in the current iteration is higher than the consistency loss of the high entropy region in the previous iteration, it indicates that the second predicted segmentation result of the unlabeled image And the third predicted segmentation result There is a big difference between the student model and the teacher model. The corresponding generated class samples of different classes from the anchor samples are taken as hard negative samples Store in storage container In; if Already exists in , then the current Replace the original and store it in a storage container middle; During training, from the storage container Remove hard negative samples With anchor sample Construct hard negative pairs For contrastive learning; 5) Use positive sample pairs and negative sample pairs for comparative learning; Combined with the infoNCE loss in contrastive learning to calculate the loss value, the learned class information is incorporated into the model training; contrastive learning loss The calculation is as follows: in represents the anchor point sample; Indicates that the samples obtained from the i-1th image and the anchor point sample belong to the same category, that is, positive samples; Indicates from The hard negative samples taken from the anchor point are of different classes; τ is the temperature coefficient; Indicates that if the anchor sample is of class c, samples of other classes except class c are taken from {C}; The total loss of consistency learning calculated according to the dual-region balanced consistency learning strategy and monitoring losses , and the contrastive learning module calculates the contrastive learning loss , calculate the total loss ,After back propagation, the gradient updates the parameters of the student model; The parameters of the student model update the parameters of the teacher model through the EMA module; represents the parameters of the teacher model in the last round of training, represents the parameters of the student model in this round of training, represents weight; Step 4: Use the student model trained in step 3 , realizing medical image segmentation.
[0015] In a second aspect, the present invention provides a semi-supervised image segmentation system, comprising: A data acquisition module, used to acquire medical image data with segmented objects; A data preprocessing module, used for preprocessing medical image data with segmentation targets; Image segmentation module, using the trained student model The preprocessed medical image data is segmented to obtain the image segmentation result.
[0016] The beneficial effects of the present invention are as follows: 1. The present invention aims to address the problem that the existing medical image segmentation methods do not balance the model's attention to different deterministic regions, resulting in low segmentation result accuracy. During the model training process, the information entropy of the student model prediction results is calculated, and the results are divided into two regions with different information contents through a threshold. A larger loss weight is set for the region with information entropy higher than the threshold, so that the model pays more attention to the learning of this region. This approach helps to improve the accuracy of medical image segmentation.
[0017] 2. To address the problem of insufficient class separability in segmentation results of the current semi-supervised methods based only on consistency learning, the present invention converts the entire prediction probability map of different classes of the student model into class samples, and combines the results of consistency learning to selectively select samples that can effectively play the role of contrast learning for learning, thereby improving the accuracy of medical image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the structure of a semi-supervised medical image segmentation network for dual-region balanced consistency learning assisted by contrastive learning in the present invention.
[0019] Figure 2 This is the effect diagram of segmentation of 10% label image and 20% label image in the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further explained below in conjunction with specific embodiments.
[0021] The present invention provides a semi-supervised medical image segmentation method of dual-region balanced consistency learning assisted by contrastive learning. The proposed dual-region balanced consistency learning strategy can focus on the learning of high-entropy areas while not ignoring the low-entropy areas in the image, balancing the model's attention to the two regions and improving the overall effect of consistency learning. In addition, a contrastive learning module using hard negative samples is proposed, which can combine consistency learning to select samples with better contrastive learning effects and improve the class separability in the segmentation results. By constructing an overall model in which consistency learning and contrastive learning complement each other, the segmentation results of medical images are effectively improved. Experimental results show that in the 20% labeled image experiment of the LA dataset, the Dice coefficient of the present invention reaches 91.26%; in the 10% labeled experiment, the Dice coefficient reaches 89.50%, which exceeds other comparison methods and proves its effectiveness and reliability.
[0022] The method is as Figure 1 Specifically include the following: Step 1: Obtain MR images of the heart in the left atrium segmentation challenge public dataset (LA), and divide the dataset into labeled data with segmentation object labels and unlabeled data in proportion.
[0023] Step 2: Preprocess the MR images in the dataset. The preprocessing method includes random flipping of the three-dimensional images and cropping them to a uniform size.
[0024] Step 3: Build Figure 1 The semi-supervised image segmentation network shown is trained using preprocessed MR image data.
[0025] The semi-supervised image segmentation network includes a student model , Teacher Model , dual-region balanced consistency learning strategy (DRBCL), contrastive learning module using hard negative samples (CLHNS), EMA module; Student Model , Teacher Model , both have the same network structure, and in this embodiment, both use the V-Net model to predict the segmentation result of the input image.
[0026] During the training process, the student model For the preprocessed label image and unlabeled images Process them separately to get the first predicted segmentation result And the second predicted segmentation result ; Wherein the subscript i represents the i-th image; The teacher model For the preprocessed unlabeled images Processing is performed to obtain the third predicted segmentation result ; For the labeled image, the student model is used to calculate the supervision loss for its predicted results and the true label. The supervision loss formula is as follows: (1) in represents the cross entropy loss, Denotes Dice loss.
[0027] For unlabeled images, we first calculate the normalized entropy of the unlabeled image prediction results output by the student model. The normalized entropy formula used is as follows: ne v =− ∑ c ∈ C p i c log( p i c ) / log( C ) ∈ [0, 1] (2) Represents the segmentation result of the cth class of segmented objects in the image. It represents the information entropy value of each voxel in the 3D image.
[0028] In order to dynamically adjust the two partitions according to the learning situation of the model, a threshold is set as the basis for partitioning. The threshold formula used is as follows: (3) Among them, t represents the current iteration number, t total Indicates the total number of iterations of model training.
[0029] Passing this threshold Select the mask of the high entropy area: (4) The consistency loss is calculated with the help of mask. Formula (5) and Formula (6) are the consistency losses in high entropy regions and low entropy regions respectively. Formula (7) is the total loss of consistency learning: (5) (6) (7) The consistency loss is calculated as the mean square error between the prediction results of the student model and the teacher model for the unlabeled image, where β is taken as 0.3. It is set to a smaller value of 0.06. The purpose is to make the model pay more attention to the information in the high entropy area during training.
[0030] The obtained supervision loss and consistency loss will be used for subsequent parameter updates of the student model.
[0031] The contrastive learning module using hard negative samples is intended to improve the class separability in the segmentation results and further improve the segmentation accuracy of the model.
[0032] The storage container Memery Bank shown in the figure is used to store positive and negative samples. Feature Mapping Model To predict the results Prediction probability plot for different classes in Mapped into the feature space, we get class samples of different classes:
[0033] (8) in, Represents class samples of different segmentation objects, Represents the categories of different segmentation objects, represents the segmentation object class, Represents the background class. Representation feature mapping model , mainly composed of convolutional layers, pooling layers and linear layers.
[0034] First, we need to set the anchor point sample. Input into the student model can get the predicted probability map of different classes .Will Input feature map network Can get class samples ( , ), and use them as anchor samples.
[0035] Secondly, obtain positive samples. Since in each iteration, Only one class sample corresponding to each class can be obtained , multiple samples of the same category cannot be provided. Therefore, we use To store the unlabeled images in the previous iteration Class sample , which can be compared with the anchor sample Forming positive sample pairs .
[0036] Then, get hard negative samples. Current unlabeled image The obtained class samples are used as anchor samples. Other unlabeled images other than can also generate class samples. Then, we can select negative samples from other images that are different from the class of the anchor sample. In order to improve the model's ability to distinguish features of different categories, we select negative samples that are more conducive to improving the contrastive learning effect from negative samples generated by other unlabeled images. These negative samples are called hard negative samples. We select hard negative samples based on the consistency learning situation, when the consistency loss value of the high entropy region is higher than the consistency loss value in the previous iteration ( ), indicating that there is a large divergence between the prediction results of the unlabeled image and the teacher model, and the corresponding generated samples of different classes from the anchor samples are regarded as hard negative samples. Deposit If Already exists in Then we will use the current Replace the original and store it in During the training process, Remove hard negative samples With anchor sample Construct hard negative pairs Used for contrastive learning.
[0037] Finally, we use the constructed positive sample pairs and negative sample pairs for contrastive learning. Combined with the infoNCE loss in contrastive learning, the loss value is calculated and the learned class information is incorporated into the model training. The loss function used in the contrastive learning module is as follows:
[0038] (9) Represents the anchor point sample, which is the probability map of the cth class in the prediction result of the i-th image, and the class sample obtained by the feature mapping network. It indicates that the samples obtained from the i-1th image belong to the same category as the anchor sample, that is, the positive sample. Indicates from Negative samples from τ that are different from the anchor samples. τ is the temperature coefficient, and its value is set to 1.
[0039] Finally, the parameters of the model are updated by the total loss. The formula for the total loss is as follows:
[0040] (10) The value of λ is 0.2. Back propagation is performed according to the total loss value. The parameters of the student model are updated by the gradient. The parameters of the teacher model are updated by the exponential moving average (EMA) of the student model parameters. The update method is as follows: (11) represents the parameters of the teacher model in the last round of training, Indicates the parameters of the student model during this round of training. The value of α is 0.99.
[0041] In order to verify the effectiveness of the segmentation method proposed in this invention, four evaluation indicators commonly used in medical image segmentation, namely, Dice coefficient (Dice), Jaccard similarity coefficient (Jaccard), 95% Hausdorff distance (95HD) and average surface distance (ASD), were selected to evaluate the accuracy of medical image segmentation. The expressions of Dice, Jaccard, 95HD and ASD are defined as shown in formula (11)-formula (14):
[0042] (12) (13) (14) (15) in, , .
[0043] In order to verify the effectiveness of the present invention, the method of the present invention is compared with a variety of existing semi-supervised medical image segmentation methods, such as Mean-Teacher (MT), UA-MT, SASSNet, CPS, URPC, MC-Net+, SCC, AC-MT, MCF and DAE-MT, etc. The experiment is trained and tested based on the LA public dataset.
[0044] Table 1 Results of various methods and full supervision when the labeled images account for 10% and 20% in the LA dataset.
[0045] The experimental results are shown in Table 1. The proposed dual-region balanced consistency learning strategy enables the model to focus on different regions in a balanced manner and fully learn the information in different regions. The contrastive learning module using hard negative samples can improve the class separability in the segmentation results and effectively improve the segmentation effect of the model. When the labeled data accounts for 10% and 20%, the final Dice coefficient results of the present invention are 89.50% and 91.26% respectively, which are better than the above methods. The segmentation effect of the LA dataset is shown in Figure 2 shown.
[0046] In order to verify the effectiveness of the dual-region balanced consistency learning strategy and the contrastive learning module using hard negative samples, we conducted an ablation study. Taking the Mean-Teacher method as the baseline, experiments were conducted on the LA dataset using 20% labeled data and 80% unlabeled data. The experimental results are detailed in Table 2. It can be seen that by incorporating the partition consistency learning strategy into the baseline, the Dice score is improved by 1.87 percentage points, because it allows the model to focus on different regions. When the baseline is combined with the contrastive learning module, it is able to use the learned class information as a supplement to consistency learning, which improves the Dice score by 0.31 percentage points over the baseline. When the partition consistency learning strategy and the contrastive learning module are combined, the contrastive learning module is able to select more effective samples based on the consistency learning situation, which improves the Dice score by 2.35 percentage points. Overall, integrating the partition consistency learning strategy and the contrastive learning module into the baseline improves the accuracy of semi-supervised segmentation, proving their effectiveness in enhancing model performance.
[0047] Table 2 Ablation experiment results, the proportion of labeled data is 20% In order to evaluate the advantages of the positive and negative samples sampled by our proposed method in terms of contrastive learning effects, we performed ablation experiments using two different methods: obtaining positive and negative samples from the prediction results of labeled images and unlabeled images. The results are shown in Table 3. Exp 1: We use positive and negative samples obtained from the prediction results of labeled images for contrastive learning. The Dice score is only 91.03%. Due to the limited number of labeled images, it is impossible to learn more diverse class information from labeled images. Exp 2: Due to the The class samples obtained in are only used as anchor samples and cannot provide redundant class samples, so we The Dice score is only 90.95%. Exp 3: We select hard negative samples to improve the model's ability to learn features. We select positive samples from the prediction results of the previous unlabeled image and negative samples from the prediction results of the unlabeled image with the highest consistency loss in the high entropy area to obtain the best results. The data in Table 3 show the importance of positive and negative sample sampling methods in contrastive learning, as well as the effectiveness of our proposed positive and negative sample sampling methods.
[0048] Table 3 Ablation experiments on sampling methods, with labeled data accounting for 20% Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in 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 image segmentation method based on dual-region balanced consistency learning assisted by contrastive learning, characterized in that The method comprises the following steps: Step 1: Obtain medical images, including labeled images The corresponding unlabeled image ; Step 2: Preprocess the medical images and construct the data set; Step 3: Build an image segmentation network architecture and train it using the dataset; The image segmentation network architecture includes a student model , Teacher Model , dual-region balanced consistency learning strategy, contrastive learning module using hard negative samples, EMA module; During the training process, the student model For the preprocessed label image and unlabeled images Process them separately to obtain the corresponding first prediction segmentation results And the second predicted segmentation result ; Wherein the subscript i represents the i-th image; The teacher model For the preprocessed unlabeled images Processing is performed to obtain the third predicted segmentation result ; The implementation method of the dual-zone balance consistency learning strategy is as follows: For unlabeled images, the student model Output of the second predicted segmentation result Calculate the information entropy value of each voxel in the image ; According to the information entropy value of each voxel , filter out Greater than threshold In the high entropy region ; use Calculate the second predicted segmentation result And the third predicted segmentation result Consistency loss in high entropy regions ;use Calculate the second predicted segmentation result And the third predicted segmentation result Consistency loss in low entropy regions between ; According to the consistency loss of high entropy region and consistency loss in low entropy regions , calculate the total loss of consistency learning ; For the label image, use the student model to first predict the segmentation result and the true label Calculating supervised loss ; The contrastive learning module using hard negative samples is based on anchor samples. , obtain positive sample pairs and hard negative sample pairs; use positive sample pairs and negative sample pairs for contrastive learning and obtain contrastive learning loss ; The total consistency learning loss calculated according to the dual-region balanced consistency learning strategy during training and monitoring losses , and the contrastive learning module calculates the contrastive learning loss , calculate the total loss , after back propagation, the gradient updates the student model Parameters; The EMA module is based on the Student model Update the teacher model with the updated parameters Parameters; Step 4: Use the student model trained in step 3 , realizing medical image segmentation.
2. The method according to claim 1, characterized in that: The student model and teacher model Use V-Net model.
3. The method according to claim 1, characterized in that: The information entropy value of each voxel in the dual-region balanced consistency learning strategy The calculation of is as follows: (1) in Represents the second predicted segmentation result The predicted probability map of the cth class in the middle; Represents a set of segmentation object categories; Indicates the number of segmentation object categories.
4. The method according to claim 1, characterized in that: The threshold in the dual-zone balanced consistency learning strategy The updates are as follows: (2) Among them, t represents the current iteration number, t total represents the total number of iterations of model training, h represents the initial threshold, and r represents the threshold growth rate; Represents the growth coefficient.
5. The method according to claim 1, characterized in that: The consistency loss in the high entropy region in the dual-region balanced consistency learning strategy The calculation of is as follows: (3) in and Respectively represent the predictions on the vth voxel in the second predicted segmentation result and the third predicted segmentation result; Consistency loss in low entropy regions The calculation of is as follows: (4) Total loss for consistency learning The calculation of is as follows; (5) in , Respectively , The weight of > >
0.
6. The method according to claim 1, characterized in that: The supervised loss in the dual-region balanced consistency learning strategy The calculation of is as follows: (6) in represents the cross entropy loss, represents the Dice loss, represents the true label.
7. The method according to claim 1, characterized in that: The process of obtaining anchor point samples in the contrastive learning module using hard negative samples is as follows: Using feature mapping model The second predicted segmentation result of the current iteration Prediction probability plot for different classes in Mapped into the feature space, we get class samples of different classes , and As anchor sample; (7) in, Represents the class sample of the c-th segmentation object; because represents the category of the segmented object, represents the segmentation object class, Represents the background class, we can get { , }, represents the class sample of the segmented object class, Represents the class sample of the background class; The process of obtaining positive sample pairs is as follows: Since in each iteration, from Only one class sample corresponding to each class can be obtained , multiple samples of the same category cannot be provided; therefore, use To store the unlabeled images in the previous iteration Class sample As a positive sample, it can be compared with the anchor sample Forming positive sample pairs ; The process of obtaining hard negative sample pairs is as follows: If the consistency loss of the high entropy region in the current iteration is higher than the consistency loss of the high entropy region in the previous iteration, it indicates that the second predicted segmentation result of the unlabeled image And the third predicted segmentation result There is a big difference between the student model and the teacher model. The corresponding generated class samples of different classes from the anchor samples are taken as hard negative samples Store in storage container In; if Already exists in , then the current Replace the original and store it in a storage container middle; During training, from the storage container Remove hard negative samples With anchor sample Construct hard negative pairs Used for contrastive learning.
8. The method according to claim 1, characterized in that: The contrastive learning loss in the contrastive learning module using hard negative samples The calculation is as follows: (8) in represents the anchor point sample; Indicates that the samples obtained from the i-1th image and the anchor point sample belong to the same category, that is, positive samples; Indicates from The hard negative samples taken from the anchor point are of different classes; τ is the temperature coefficient; It means that if the anchor sample is of category c, samples of other categories except category c are taken from {C}.
9. The method according to claim 1, characterized in that: Total loss The calculation of is as follows: (9) in Represents weight.
10. A semi-supervised image segmentation system implementing the method according to any one of claims 1 to 9, characterized in that include: A data acquisition module, used to acquire medical image data with segmented objects; A data preprocessing module, used for preprocessing medical image data with segmentation targets; Image segmentation module, using the trained student model The preprocessed medical image data is segmented to obtain the image segmentation result.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method based on mutual correction and pixel-level contrast learning
CN118587438A
Semi-supervised image segmentation method
CN118710912A
Semi-supervised medical image segmentation method based on dual-view complementary consistency
CN118968091A