A Semi-Supervised Medical Image Segmentation Method Based on Dual Correction
The semi-supervised medical image segmentation method with dual correction utilizes the prediction results of dual student and teacher models for pseudo-label correction and optimization, solving the problems of low pseudo-label accuracy and insufficient model correction, and improving the accuracy and stability of medical image segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF XIAMEN UNIV
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-05
AI Technical Summary
Existing semi-supervised medical image segmentation methods suffer from low accuracy of pseudo-labels and insufficient model correction, resulting in poor segmentation performance. Furthermore, their generalization ability is limited in complex data distributions and high-noise scenarios.
A semi-supervised medical image segmentation method with dual correction is adopted. By initializing a dual-student model and a teacher model, the prediction results of the dual-student model are used to identify and correct inconsistent regions. The uncertainty graph of the teacher model is combined to dynamically filter pseudo-labels, and various loss functions are calculated to optimize the model parameters.
It improves the quality of pseudo-label generation, enhances the model's adaptability and accuracy in complex medical images, and improves the stability and generalization ability of the segmentation model.
Smart Images

Figure CN121391894B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing and analysis technology, and in particular to a semi-supervised medical image segmentation method based on dual correction. Background Technology
[0002] With the rapid development of medical imaging technology, medical image segmentation, as one of the core tasks in medical image analysis, is widely used in various fields such as disease diagnosis, treatment planning, and surgical navigation. Traditional medical image segmentation methods mainly rely on fully supervised learning, depending on a large amount of labeled data to train deep neural network models, such as convolutional neural networks (CNNs) and their variants (e.g., U-Net). However, obtaining high-quality labeled data is not only time-consuming and labor-intensive, but also often limited in practical applications due to high professional knowledge requirements and high annotation costs. To address this, semi-supervised medical image segmentation methods have emerged, which utilize a large amount of unlabeled data combined with a small amount of labeled data to reduce the dependence on labeled data.
[0003] However, existing semi-supervised medical image segmentation methods still have many shortcomings in practical applications. First, many methods often ignore the uncertainty of model predictions when processing unlabeled data, resulting in inconsistent pseudo-label quality and affecting the final segmentation results. Second, the single teacher-student model architecture is prone to model bias and overfitting when dealing with complex data distributions and high-noise scenarios, thus limiting the model's generalization ability. Simultaneously, existing methods lack effective mechanisms for identifying and correcting inconsistencies in student model predictions, leading to the failure to correct potential errors in a timely manner. Furthermore, the dynamic selection mechanism for pseudo-labels is not robust enough, failing to flexibly adjust the selection criteria based on iterative optimization during training, thereby affecting the model's stability and performance. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a semi-supervised medical image segmentation method based on dual correction to solve the problems of low accuracy of pseudo-labels and insufficient model correction in semi-supervised medical image segmentation.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a semi-supervised medical image segmentation method based on dual correction, which includes initializing a dual student model and a teacher model, dividing the dataset and performing preprocessing;
[0008] Based on the preprocessed dataset, predictions are made using a dual-student model and a teacher model.
[0009] Based on the prediction results of the dual-student model, identify the inconsistency regions of the dual-student model, correct the dual-student model, and calculate the supervised loss and the overall supervised loss.
[0010] An uncertainty map is calculated based on the prediction results of the teacher model. Based on the uncertainty map, high-confidence pseudo-labels are dynamically screened, and teacher arbitration loss is calculated.
[0011] The total loss is defined by combining the overall supervision loss, consistency loss, and teacher arbitration loss, and the parameters of the dual-student model are optimized accordingly.
[0012] Through multiple rounds of iterative training, the model parameters are continuously optimized, and a medical image segmentation model is finally output.
[0013] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the initialization of the dual-student model and the teacher model includes the following steps:
[0014] Choose the same network structure as the basis for student models A and B;
[0015] Student models A and B were initialized with different random seeds respectively;
[0016] The teacher model uses the same network structure as student models A and B, and the parameters of the teacher model are set as the simple average of the parameters of student models A and B.
[0017] The aforementioned dataset partitioning refers to dividing the entire training set into a labeled dataset and an unlabeled dataset.
[0018] The preprocessing includes data normalization and data augmentation.
[0019] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the method includes the following steps: Based on the preprocessed dataset, prediction is performed using a dual-student model and a teacher model.
[0020] Let the total number of samples in each training batch be D, and let each batch contain NL labeled samples and NU unlabeled samples;
[0021] Using a random sampling method without replacement, NL samples are randomly selected from the labeled dataset to form a labeled batch.
[0022] NU samples are randomly selected from the unlabeled dataset to form an unlabeled batch. Data augmentation techniques are then used to generate diverse unlabeled samples.
[0023] Combine labeled batches and unlabeled batches to construct training batches;
[0024] Labeled data is input into student models A and B, and forward propagation is performed to obtain the prediction results. and ;
[0025] The preprocessed unlabeled data is input into student models A and B, and forward propagation is performed to obtain the prediction results. and ;
[0026] The raw, unlabeled data is input into the teacher model, and forward propagation is performed to obtain the predicted class probabilities. .
[0027] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the method includes the following steps: identifying inconsistencies in the dual-student model based on its prediction results, correcting the dual-student model, and calculating the supervised loss and the overall supervised loss.
[0028] The prediction results of student models A and B on labeled data are processed using Softmax normalization to obtain the probability map. and ;
[0029] For probability graphs and Binarization is performed to generate a binarized prediction image, and then an XOR operation is performed to obtain the mask of the inconsistent region.
[0030] Use a mask to extract the prediction results of student models A and B in the inconsistency region. and and real labels;
[0031] The corrective loss is obtained by measuring the difference between the prediction results of student models A and B in the potential error region and the true label through MSE;
[0032] Cross-entropy loss is used to measure the difference between the predicted class probability distribution and the true label distribution.
[0033] The Dice loss is used to measure the degree of overlap between the model's predictions and the true labels.
[0034] By combining cross-entropy loss and Dice loss, supervised loss is calculated. The supervised loss is then combined with the correction loss to obtain the overall supervised loss.
[0035] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the uncertainty graph is calculated based on the prediction results of the teacher model, including the following steps:
[0036] The decay parameter is selected to control the rate at which the teacher model parameters are updated;
[0037] Calculate the parameter sets of student models A and B. and The simple average value is used to update the parameters of the teacher model using the EMA formula;
[0038] The predicted class probabilities of the teacher model are normalized using Softmax to obtain the normalized class probability map;
[0039] The prediction uncertainty for each pixel is calculated using the information entropy formula, forming an uncertainty map.
[0040] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the method includes the following steps: dynamically screening high-confidence pseudo-labels based on an uncertainty graph and calculating consistency loss and teacher arbitration loss.
[0041] A sigmoid-type dynamic threshold function is used, which varies with the number of iterations. As the number of pseudo-tags increases, the criteria for filtering them will be gradually adjusted. The expression is:
[0042]
[0043] in, This represents the current iteration number. The maximum number of iterations is predetermined. and The parameters that control the shape and position of the Sigmoid function The filtering threshold;
[0044] The sharpening function is applied to the prediction results of student models A and B respectively to generate sharpened pseudo-labels;
[0045] The mean squared error is used to measure the difference between the prediction results of student models A and B and the sharpened pseudo-labels generated by the other model, and the consistency loss is obtained.
[0046] Based on the predicted category probabilities and uncertainty graphs of the teacher model, high-confidence pseudo-labels are selected.
[0047] The Kullback-Leibler divergence loss is used to measure the difference between the predicted distributions of student models A and B and the distribution of teacher models on high-confidence pseudo-labels, thus obtaining the teacher arbitration loss.
[0048] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the total loss is defined by integrating the overall supervised loss, consistency loss, and teacher arbitration loss, and the dual-student model parameters are optimized, including the following steps:
[0049] The total loss is obtained by combining the overall supervisory loss, consistency loss, and teacher arbitration loss.
[0050] Using the backpropagation algorithm, the gradients of the parameters of student models A and B are calculated based on the total loss.
[0051] The optimizer updates the parameters of student models A and B based on the calculated gradients.
[0052] As a preferred embodiment of the semi-supervised medical image segmentation method based on dual correction described in this invention, the method involves: continuously optimizing model parameters through multiple rounds of iterative training to ultimately output a medical image segmentation model, including the following steps.
[0053] Set the maximum number of iterations during training;
[0054] Set a threshold for the convergence of the loss function; when the loss decreases below this threshold, stop training early.
[0055] Initialize the loop variable, start iterative training, and end the loop training when the stopping condition is met;
[0056] After training, the parameters of student models A and B are selected as the final model parameters to generate the final medical image segmentation model.
[0057] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the dual-correction-based semi-supervised medical image segmentation method as described in the first aspect of the present invention.
[0058] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the semi-supervised medical image segmentation method based on dual correction as described in the first aspect of the present invention.
[0059] The beneficial effects of this invention are as follows: By utilizing a dual-student model and a teacher model for prediction, it not only makes full use of the limited labeled data, but also improves the quality of pseudo-label generation through the teacher model's prediction of unlabeled data. Finally, by combining the prediction results of different models, it provides multi-dimensional data support for subsequent correction and optimization, significantly improving the adaptability and accuracy of the segmentation model in complex medical images. Attached Figure Description
[0060] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.
[0061] Figure 1 This is a flowchart of the semi-supervised medical image segmentation method based on dual correction in Example 1.
[0062] Figure 2 This is a schematic diagram of the dual-model correction in Example 1. Detailed Implementation
[0063] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0064] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0065] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0066] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a semi-supervised medical image segmentation method based on dual correction, including the following steps:
[0067] S1. Initialize the dual-student model and teacher model, including the following steps.
[0068] Choosing the same network architecture as the basis for student models A and B, such as U-Net or V-Net, ensures that both have the same feature extraction and segmentation capabilities when handling medical image segmentation tasks.
[0069] To ensure that student models A and B have different learning paths in the early stages of training, different parameter initialization methods are used. For example, different random seeds or initialization strategies (such as He initialization and Xavier initialization) can be used to initialize the parameters of student models A and B.
[0070] Student model A is initialized with a random seed sA, and student model B is initialized with a different random seed sB; where sA=sB, to ensure that the initial parameters of the two are different, so that different data features and learning patterns can be captured during training, thereby enhancing the diversity and complementarity of the models.
[0071] The teacher model uses the same network structure as student models A and B to ensure that it can effectively integrate and guide the learning process of the student models.
[0072] To enable the teacher model to effectively integrate information from student models A and B during the initial training phase, the parameters of the teacher model are set to the simple average of the parameters of student models A and B. This allows the teacher model to initially combine the learning outcomes of both models, providing more stable and reliable guidance.
[0073] The entire training set is divided into labeled and unlabeled datasets.
[0074] All image data are normalized to have zero mean and unit variance to reduce the impact of differences in brightness and contrast between different images on model training; data augmentation operations such as random rotation, random flipping, and adding Gaussian noise are performed on labeled and unlabeled data to increase data diversity and prevent model overfitting.
[0075] S2. Based on the preprocessed dataset, predictions are made using a dual-student model and a teacher model, including the following steps.
[0076] S2.1. Set the total number of samples in each training batch to D, and set each batch to have NL labeled samples and NU unlabeled samples; usually, NL+NU=D is chosen. For example, set D=24, where NL=12 (50% labeled) and NU=12.
[0077] A random sampling method without replacement is used to randomly select NL samples from the labeled dataset to form a labeled batch. This ensures that the labeled samples in each batch have high diversity, covering different categories and sample variations, and avoids bias during model training.
[0078] NU samples are randomly selected from the unlabeled dataset to form an unlabeled batch. Data augmentation techniques (random rotation, flipping, cropping, and adding noise) are used to generate diverse unlabeled samples.
[0079] Training batches are constructed by combining labeled and unlabeled batches to ensure that the labeled and unlabeled data in each batch do not overlap, thus avoiding the reuse of the same unlabeled sample in different batches and accelerating data utilization efficiency.
[0080] S2.2. Input the labeled data into student models A and B, perform forward propagation on each, and obtain the prediction results. and , is represented as ,
[0081]
[0082] in, and Labeled data for student models A and B, respectively. The predicted output, and Let A and B represent the forward propagation functions of student models A and B, respectively. and These are the parameter sets for student models A and B, respectively.
[0083] The preprocessed unlabeled data is input into student models A and B, and forward propagation is performed to obtain the prediction results. and , is represented as ,
[0084]
[0085] in, and For student models A and B, respectively, the preprocessed unlabeled data are used. The predicted output.
[0086] The raw, unlabeled data is input into the teacher model, and forward propagation is performed to obtain the predicted class probabilities. , is represented as ,
[0087]
[0088] in, For the teacher model, the raw unlabeled data The predicted output, This represents the forward propagation function of the teacher model. This is the parameter set for the teacher model.
[0089] S3. Identify inconsistencies in the two-student model based on its prediction results, correct the two-student model, and calculate the supervised loss and the overall supervised loss, including the following steps:
[0090] S3.1. Perform Softmax normalization on the prediction results of student models A and B on labeled data to obtain the probability map. and For probability graphs and Binarization is performed to generate a binarized prediction image. Then, an XOR operation is performed to obtain the mask for the inconsistent regions, expressed as follows:
[0091]
[0092] in, This indicates that the probability map will be binarized (e.g., binarized with a threshold of 0.5). This represents the XOR operation; the output is 1 only if the two input bits are different. This indicates the region where the predictions of student models A and B are inconsistent.
[0093] It should be noted that converting continuous probability values into binary form usually involves using a fixed threshold (such as 0.5) for binarization to clearly indicate whether each pixel belongs to a certain category or not. By comparing the two binarized prediction maps, it can be determined which pixels have inconsistent prediction results in the two models, i.e., there may be erroneous prediction regions.
[0094] S3.2. Use a mask to extract the prediction results of student models A and B in the inconsistency region. and and real labels .
[0095] The corrected loss is obtained by measuring the difference between the predictions of student models A and B in the potential error region and the true label using the MSE (Mean Sequence Equation). The expression is,
[0096]
[0097] in, and These are the predicted outputs of student models A and B in the inconsistency region, respectively. The part of the true label in the inconsistent area.
[0098] These two MSE terms measure the prediction errors of student models A and B in potentially error regions, respectively. By minimizing these errors, the models are encouraged to make more accurate predictions in these regions.
[0099] S3.3, Utilizing cross-entropy loss The difference between the predicted class probability distribution and the true label distribution is measured by the expression, .
[0100]
[0101] in, The total number of categories, Category in real labels The indicator function (i.e., if the pixel belongs to the category) ,but =1, otherwise =0), The category predicted by the model The probability of.
[0102] Using Dice loss The expression for measuring the overlap between model predictions and true labels is:
[0103]
[0104] Dice loss is particularly suitable for medical image segmentation tasks and can handle class imbalance problems.
[0105] The supervised loss is calculated by combining cross-entropy loss and Dice loss. The expression is,
[0106]
[0107] Combining the supervised loss and the corrective loss, we obtain the overall supervised loss, expressed as follows:
[0108]
[0109] in, =0.5 is a hyperparameter used to balance the weights of cross-entropy loss and Dice loss with correction loss.
[0110] It should be noted that, These are hyperparameters used to balance the contributions of different loss terms, and are adjusted by... It can control the weight of the correction loss in the overall supervised loss, thereby affecting the model's correction strength for potential error regions.
[0111] S4. Calculate the uncertainty graph based on the prediction results of the teacher model, including the following steps:
[0112] S4.1 Select a decay parameter γ close to 1 (e.g., γ=0.999) to control the rate of update of the teacher model parameters and ensure that the update process is smooth and stable.
[0113] Calculate the parameter sets of student models A and B. and The simple average value is used, and the parameters of the teacher model are updated using the EMA formula.
[0114] S4.2. Softmax normalize the predicted class probabilities of the teacher model to obtain the normalized class probability map.
[0115] The prediction uncertainty for each pixel is calculated using the information entropy formula, forming an uncertainty map, which is represented as follows.
[0116]
[0117] in, This is an uncertainty graph, representing the prediction uncertainty for each pixel. For the teacher model, the categories The predicted probability.
[0118] It should be noted that information entropy High uncertainty regions indicate that the teacher model has high uncertainty in predicting that pixel, which is prone to misjudgment. By identifying these high uncertainty regions, we can focus on and optimize these regions in subsequent steps to improve the overall segmentation accuracy of the model.
[0119] S5. Based on the uncertainty graph, dynamically filter high-confidence pseudo-labels and calculate consistency loss and teacher arbitration loss, including the following steps.
[0120] S5.1. A Sigmoid-type dynamic threshold function is used, which increases with the number of iterations. As the number of pseudo-tags increases, the criteria for filtering them are gradually adjusted to balance the quantity and quality of pseudo-tags. The expression is:
[0121]
[0122] in, This represents the current iteration number. The maximum number of iterations is predetermined. and The parameters that control the shape and position of the Sigmoid function The threshold value determines the strictness of the pseudo-label filtering. It is a dual-channel system.
[0123] It should be noted that the Sigmoid function Control threshold The dynamic changes ensure that training initially relies on labeled data, gradually increasing the use of unlabeled data as the number of iterations increases; threshold The higher the confidence level, the fewer high-confidence pseudo-labels are selected, but the higher the quality.
[0124] S5.2 Apply the sharpening function to the prediction results of student models A and B respectively to generate sharpened pseudo-labels. The expression is as follows:
[0125]
[0126] in, and These are the sharpened pseudo-labels for student models A and B, respectively. This is a temperature adjustment constant used to control the intensity of sharpening. The smaller the label, the sharper the false label.
[0127] The mean squared error is used to measure the difference between the predictions of student models A and B and the sharpened pseudo-labels generated by the other model, resulting in the consistency loss, expressed as follows:
[0128]
[0129] in, This represents the consistency loss among student models.
[0130] Based on the predicted category probabilities and uncertainty graphs of the teacher model, high-confidence pseudo-labels are selected. , is represented as ,
[0131]
[0132] in, This indicates that the category with the highest probability is selected as the pseudo-label. Ensure that only select items with uncertainty below the dynamic threshold. The pixels are used as high-confidence pseudo-labels.
[0133] S5.3. The Kullback-Leibler divergence loss is used to measure the difference between the predicted distributions of student models A and B and the distribution of the teacher model on the high-confidence pseudo-labels, yielding the teacher arbitration loss, expressed as follows:
[0134]
[0135] in, Indicating the teacher's arbitration losses, High-confidence pseudo-labels generated for the teacher model.
[0136] S6. The total loss is defined by integrating the overall losses, including supervision loss, consistency loss, and teacher arbitration loss. The parameters of the dual-student model are then optimized, including the following steps.
[0137] Combining the overall supervisory loss, consistency loss, and teacher arbitration loss, we obtain the total loss, expressed as follows:
[0138]
[0139] in, This is a hyperparameter used to control the weight of unlabeled data loss in the total loss. It is usually set to be based on a Gaussian temperature function and gradually increases to 0.1 with the number of iterations.
[0140] Using the backpropagation algorithm, the gradients of the parameters of student models A and B are calculated based on the total loss.
[0141] The optimizer updates the parameters of student models A and B based on the calculated gradients.
[0142] It should be noted that by minimizing the total loss The parameters of student models A and B were optimized, making their predictions more accurate on labeled data, while their prediction consistency on unlabeled data and their segmentation performance were continuously improved under the guidance of the teacher model.
[0143] S7. Through multiple rounds of iterative training, the model parameters are continuously optimized, and the final output medical image segmentation model is obtained, including the following steps.
[0144] Set the maximum number of iterations during training to ensure that training is completed within a reasonable time.
[0145] Set a threshold for the convergence of the loss function. When the loss decreases below this threshold, stop training early.
[0146] Initialize the loop variable, start iterative training, and end the loop training when the stopping condition (loss convergence or the maximum number of iterations is reached) is met.
[0147] It should be noted that through multiple rounds of iterative training, the parameters of student models A and B are continuously optimized, the segmentation accuracy of the models on labeled data is gradually improved, and the consistency and robustness on unlabeled data are also enhanced. The teacher model steadily integrates the learning results of the student models through the EMA strategy, providing stable and reliable guidance signals.
[0148] After training, the parameters of student models A and B are selected as the final model parameters to generate the final medical image segmentation model.
[0149] The parameters of the trained student models A and B and Save it as a file for loading and use in practical applications. In actual medical image segmentation tasks, load the parameters of the trained student models A and B, use the loaded models to perform segmentation prediction on new medical images, and perform post-processing (such as denoising, smoothing, etc.) as needed to obtain the final segmentation result.
[0150] This embodiment also provides a computer device applicable to the case of a semi-supervised medical image segmentation method based on dual correction, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the semi-supervised medical image segmentation method based on dual correction as proposed in the above embodiment.
[0151] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0152] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the dual-correction-based semi-supervised medical image segmentation method as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0153] In summary, this invention achieves an organic combination of consistency and diversity in model architecture by initializing a dual-student model and a teacher model, dividing the dataset, and performing preprocessing. This not only optimizes the initial state of the model and enhances its generalization ability during training, but also lays a solid foundation for subsequent semi-supervised learning. By utilizing both the dual-student and teacher models for prediction, it not only makes full use of the limited labeled data but also improves the quality of pseudo-label generation through the teacher model's prediction of unlabeled data. Finally, by synthesizing the prediction results of different models, it provides multi-dimensional data support for subsequent correction and optimization. Through dynamic monitoring and error correction of model prediction consistency, it effectively identifies and corrects potential errors in model prediction, improves the model's segmentation accuracy in key regions, and enhances the overall reliability and robustness of the model. Through dynamic screening and multi-level loss calculation, it improves the quality and utilization efficiency of pseudo-labels, optimizes the model training process, and ultimately significantly improves the overall performance and generalization ability of the medical image segmentation model.
[0154] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A semi-supervised medical image segmentation method based on dual correction, characterized in that: include, Initialize the dual-student model and teacher model, split the dataset and perform preprocessing; Based on the preprocessed dataset, predictions are made using a dual-student model and a teacher model. Based on the prediction results of the dual-student model, identify the inconsistency regions of the dual-student model, correct the dual-student model, and calculate the supervised loss and the overall supervised loss. The uncertainty graph is calculated based on the prediction results of the teacher model. Based on the uncertainty graph, high-confidence pseudo-labels are dynamically screened, and consistency loss and teacher arbitration loss are calculated. The total loss is defined by combining the overall supervision loss, consistency loss, and teacher arbitration loss, and the parameters of the dual-student model are optimized accordingly. Through multiple rounds of iterative training, the model parameters are continuously optimized, and the final output is a medical image segmentation model; Based on the prediction results of the two-student model, inconsistencies in the two-student model are identified, the two-student model is corrected, and the supervised loss and overall supervised loss are calculated, including the following steps: The prediction results of student models A and B on labeled data are processed using Softmax normalization to obtain the probability map. and ; For probability graphs and Binarization is performed to generate a binarized prediction image, and then an XOR operation is performed to obtain the mask of the inconsistent region. Use a mask to extract the prediction results of student models A and B in the inconsistency region. and and real labels; The corrective loss is obtained by measuring the difference between the prediction results of student models A and B in the potential error region and the true label through MSE; Cross-entropy loss is used to measure the difference between the predicted class probability distribution and the true label distribution. The Dice loss is used to measure the degree of overlap between the model's predictions and the true labels. By combining cross-entropy loss and Dice loss, the supervised loss is calculated. The supervised loss is then combined with the correction loss to obtain the overall supervised loss. Based on the uncertainty graph, high-confidence pseudo-labels are dynamically screened, and consistency loss and teacher arbitration loss are calculated, including the following steps: A sigmoid-type dynamic threshold function is used, which varies with the number of iterations. As the number of pseudo-tags increases, the criteria for filtering them will be gradually adjusted. The expression is: in, This represents the current iteration number. The maximum number of iterations is predetermined. and The parameters that control the shape and position of the Sigmoid function The filtering threshold; The sharpening function is applied to the prediction results of student models A and B respectively to generate sharpened pseudo-labels; The mean squared error is used to measure the difference between the prediction results of student models A and B and the sharpened pseudo-labels generated by the other model, and the consistency loss is obtained. Based on the predicted category probabilities and uncertainty graphs of the teacher model, high-confidence pseudo-labels are selected. The Kullback-Leibler divergence loss is used to measure the difference between the predicted distributions of student models A and B and the distribution of teacher models on high-confidence pseudo-labels, thus obtaining the teacher arbitration loss.
2. The semi-supervised medical image segmentation method based on dual correction as described in claim 1, characterized in that: The initialization of the dual-student model and teacher model includes the following steps: Choose the same network structure as the basis for student models A and B; Student models A and B were initialized with different random seeds respectively; The teacher model uses the same network structure as student models A and B, and the parameters of the teacher model are set as the simple average of the parameters of student models A and B. The aforementioned dataset partitioning refers to dividing the entire training set into a labeled dataset and an unlabeled dataset. The preprocessing includes data normalization and data augmentation.
3. The semi-supervised medical image segmentation method based on dual correction as described in claim 2, characterized in that: Based on the preprocessed dataset, predictions are made using a dual-student model and a teacher model, including the following steps. Let the total number of samples in each training batch be D, and let each batch contain NL labeled samples and NU unlabeled samples; Using a random sampling method without replacement, NL samples are randomly selected from the labeled dataset to form a labeled batch. NU samples are randomly selected from the unlabeled dataset to form an unlabeled batch. Data augmentation techniques are then used to generate diverse unlabeled samples. Combine labeled batches and unlabeled batches to construct training batches; Labeled data is input into student models A and B, and forward propagation is performed to obtain the prediction results. and ; The preprocessed unlabeled data is input into student models A and B, and forward propagation is performed to obtain the prediction results. and ; The raw, unlabeled data is input into the teacher model, and forward propagation is performed to obtain the predicted class probabilities. .
4. The semi-supervised medical image segmentation method based on dual correction as described in claim 3, characterized in that: The uncertainty graph is calculated based on the prediction results of the teacher model, including the following steps: The decay parameter is selected to control the rate at which the teacher model parameters are updated; Calculate the parameter sets of student models A and B. and The simple average value is used to update the parameters of the teacher model using the EMA formula; The predicted class probabilities of the teacher model are normalized using Softmax to obtain the normalized class probability map; The prediction uncertainty for each pixel is calculated using the information entropy formula, forming an uncertainty map.
5. The semi-supervised medical image segmentation method based on dual correction as described in claim 4, characterized in that: The total loss is defined by combining supervision loss, consistency loss, and teacher arbitration loss. Optimizing the parameters of the dual-student model involves the following steps. The total loss is obtained by combining the overall supervisory loss, consistency loss, and teacher arbitration loss. Using the backpropagation algorithm, the gradients of the parameters of student models A and B are calculated based on the total loss. The optimizer updates the parameters of student models A and B based on the calculated gradients.
6. The semi-supervised medical image segmentation method based on dual correction as described in claim 5, characterized in that: Through multiple rounds of iterative training, the model parameters are continuously optimized, and the final output medical image segmentation model is achieved, including the following steps. Set the maximum number of iterations during training; Set a threshold for the convergence of the loss function; when the loss decreases below this threshold, stop training early. Initialize the loop variable, start iterative training, and end the loop training when the stopping condition is met; After training, the parameters of student models A and B are selected as the final model parameters to generate the final medical image segmentation model.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method and device based on dual-model interactive learning
CN114332135A
Semi-supervised segmentation method based on multi-mode teacher-student consistency learning
CN119624997A