A semi-supervised medical image segmentation method and system based on dual-network adaptive pseudo-label generation
Through the dual-network adaptive pseudo-label generation method, better performance networks are selected to generate pseudo-labels and jointly trained, solving the problems of unstable quality and error propagation of pseudo-labels in a single network, improving the accuracy and robustness of medical image segmentation, and suitable for medical image segmentation tasks with scarce labeling data.
Patent Information
- Application Number
- CN202510078894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing pseudo-label generation methods rely on a single network, resulting in unstable pseudo-label quality, error propagation and lack of diversity, making it difficult to effectively utilize unlabeled data, affecting the robustness and segmentation accuracy of the model.
Adaptive pseudo-label generation method based on dual networks is adopted, and better networks are selected as pseudo-label generators by comparing the segmentation effects of the two networks to generate high-quality pseudo-labels, and segmentation performance is improved through joint training and model fusion.
It significantly improves the segmentation accuracy and robustness of the semi-supervised medical image segmentation model, reduces the dependence on labeled data, improves the training stability and generalization capabilities of the model, and is especially suitable for medical image segmentation scenarios where labeled data is scarce.
Smart Images

Figure CN119887805B_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 medical image segmentation method and system based on dual-network adaptive pseudo-label generation. Background Art
[0002] Medical image segmentation is a key technology in medical image analysis and is widely used in the field of medical-assisted diagnosis. By segmenting different structures or tissues in medical images, it helps doctors quickly and accurately identify and locate diseased areas. With the development of medical imaging technology, especially the widespread application of CT, MRI, and ultrasound imaging, medical image segmentation has become a key component of intelligent diagnostic systems.
[0003] Semi-supervised learning has become an important research direction in the field of medical image segmentation, especially in the context of a shortage of labeled data. Labeling medical image data is typically expensive and time-consuming, and obtaining large amounts of labeled data often requires manual annotation by experts. This not only increases time and financial costs but also limits the ability to train models using large amounts of data. To address this issue, semi-supervised learning has emerged. It utilizes a small amount of labeled data alongside a large amount of unlabeled data to jointly train models, significantly improving model performance.
[0004] Pseudo-label generation methods play a crucial role in semi-supervised medical image segmentation. Pseudo-labels are labels automatically generated by a model after making predictions on unlabeled data. The core idea behind pseudo-label generation methods is to train an initial model using a small amount of available labeled data, then use that model to make predictions on unlabeled data to generate pseudo-labels. By using these pseudo-labels, the model can be further trained on unlabeled data, expanding its learning sample space and improving its generalization capabilities.
[0005] Existing pseudo-label generation methods usually rely on a single network to predict unlabeled data. Most methods train by directly using the network's predictions as pseudo-labels.
[0006] Through the above analysis, the problems and defects of the existing technology are as follows:
[0007] (1) Unstable pseudo-label quality: Traditional pseudo-label generation methods usually rely on the prediction of a single network, which is limited by the network’s own training quality and generalization ability. If the network’s segmentation performance is poor, the generated pseudo-labels will be of low quality, which will have a negative impact on training.
[0008] (2) Pseudo-label error propagation: When the network’s predictions for unlabeled data are significantly biased, pseudo-labels will be incorrect and lead to misleading training. Such errors will continue to accumulate in subsequent training processes, reducing the overall performance of the model.
[0009] (3) Lack of diversity and robustness: Most pseudo-label generation methods ignore the need to enhance the diversity of training data through multiple models or multiple strategies, and fail to effectively overcome the noise and uncertainty of the data, thus affecting the robustness of the model.
[0010] (4) It is difficult to distinguish between reliable and unreliable pseudo-labels: Existing methods usually do not have an effective mechanism to screen the quality of pseudo-labels, which means that some unreliable pseudo-labels will also participate in training, affecting the convergence speed and final performance of the model. Summary of the Invention
[0011] In response to the problems existing in the prior art, the present invention provides a semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation.
[0012] The present invention is implemented as follows: a semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation includes:
[0013] Step 1: Enhancement and preprocessing of labeled data;
[0014] Step 2, pre-training phase of the two networks;
[0015] Step 3: Send the labeled data and unlabeled data into two networks for segmentation prediction;
[0016] Step 4: Determine the pseudo-label generator for the current round;
[0017] Step 5: The pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels;
[0018] Step 6: Send the unlabeled data, pseudo-labeled data, and labeled data into another network for joint training;
[0019] Step 7: Final model fusion.
[0020] Furthermore, the annotation data is enhanced and preprocessed:
[0021] (1) Target area extraction: from the labeled data Y L Extract the target region, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target region to avoid overly sharp boundaries that make the enhanced data unnatural.
[0022] (2) Copy the target area: In each labeled image, copy the target area of the left atrium from the original image X LCut it out while retaining its three-dimensional spatial position information;
[0023] (3) Select the pasting position: Randomly select a suitable position in the background area (non-target area) of the same batch or other images and paste the cropped target area into it; be careful not to paste the position too close to the original area to cause redundancy;
[0024] (4) Update the annotation label: Corresponding to the pasted image, the position of the target area is synchronously updated to the segmentation label Y L , generate enhanced labels
[0025] (5) Repeat the above steps: generate multiple enhanced versions for each sample, and build a diverse set of enhanced labeled data by repeated copying and pasting.
[0026] Furthermore, the pre-training phase of the two networks:
[0027] (1) Subnetwork structure design
[0028] For 3D image segmentation tasks:
[0029] Network A: uses the classic VNet structure, suitable for processing 3D medical image segmentation tasks, and has efficient feature extraction capabilities;
[0030] Network B: Replace the VNet encoder with a 3D convolutional ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0031] For 2D image segmentation tasks:
[0032] Network A: uses the classic UNet structure, suitable for processing 2D medical image segmentation tasks, and has efficient feature extraction capabilities;
[0033] Network B: Replace the UNet encoder with 2D convolution ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0034] Using sub-networks with different architectures but similar performance can enhance the diversity of training in this method;
[0035] (2) Data input: Use the enhanced data set generated in step 1 Normalize the image pixel values to the range [0,1] or [-1,1];
[0036] (3) Supervised training process: using labeled data As a supervisory signal, the network is trained by optimizing the segmentation loss function, which is as follows:
[0037]
[0038] The SGD optimizer is used, with an initial learning rate of 0.01, which is dynamically adjusted according to the training progress. The batch size is 16 and the training epochs are 100 to ensure that both networks fully learn the labeled data.
[0039] (4) Training output: parameter set θ of network A A and the parameter set θ of network B B .
[0040] Furthermore, the labeled data and unlabeled data are fed into two networks for segmentation prediction:
[0041] (1) Each training batch contains 2 labeled data and 2 unlabeled data
[0042] (2) Input the labeled data and unlabeled data into network A and network B respectively to obtain the segmentation prediction results of the two networks in Represents the prediction results of the labeled data, Represents the prediction results of unlabeled data;
[0043] (3) Using the true label Y L The Dice value and 95HD value of each network are calculated, and the comprehensive score SegScore is calculated to evaluate its segmentation performance. The formula is as follows:
[0044]
[0045] 95HD(A,B)=max{percentile 95 (d(A,B)),percentile 95 (d(B,A))}
[0046] SegScore=α·Dice+β·(1 / (1+95HD))
[0047] Among them, P is the binary result predicted by the network, Y is the true label, α and β are weight coefficients, which need to be adjusted according to task requirements; the larger the SegScore value, the better the network segmentation effect;
[0048] (4) Accumulate the SegScore values of all labeled data in the batch to obtain the total SegScore values of network A and network B respectively:
[0049]
[0050] Among them, N is the number of samples of labeled data in the current batch, P is the network prediction result, and Y is the true label.
[0051] Furthermore, the pseudo label generator for the current round is determined:
[0052] Comparing SegScore total,A and SegScore total,B size:
[0053] If SegScore total,A >SegScore total,B , then network A performs better in this round, and network A is selected as the pseudo label generator;
[0054] If SegScore total,A <SegScore total,B , then network B is selected as the pseudo label generator.
[0055] Furthermore, the pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels:
[0056] The pseudo labels are generated by the pseudo label generator selected in step 4 through the segmentation prediction of unlabeled data;
[0057] Input data: unlabeled data X U , as input to the pseudo-label generator;
[0058] The process of generating pseudo labels:
[0059] (1) Pseudo-label generator for X U Output probability map P U , where the value of each pixel represents the probability that it belongs to the target area;
[0060] (2) Use the sharpening function to post-process the probability map and convert it into a soft false label. The formula is as follows:
[0061]
[0062] Among them, T is a hyperparameter used to control the smoothness of the probability distribution;
[0063] Generated pseudo labels It is a soft label matrix that contains the probability distribution information of each pixel. Compared with traditional hard labels (0 or 1), soft labels can alleviate the problems caused by prediction bias.
[0064] Step 6: Send the unlabeled data, pseudo-labeled data, and labeled data into another network for joint training;
[0065] The networks that were not selected as pseudo-label generators in step 4 are guided by the pseudo-label generator in this round and trained jointly using pseudo-labels and annotated data. The specific training details are as follows:
[0066] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training using generated pseudo labels
[0067] (2) The training of the target network is achieved by combining supervised loss and unsupervised loss. The supervised learning loss formula is as follows:
[0068]
[0069] Among them, Dice loss and cross entropy loss jointly optimize the segmentation performance of labeled data; represents the network predicted segmentation, Y L represents the true label.
[0070] The unsupervised loss formula is as follows:
[0071]
[0072] Where MSE is the mean square error loss.
[0073] The total network loss formula is as follows:
[0074] L total =L s +λL u
[0075] Where λ is the weight coefficient used to balance the contribution of labeled data and unlabeled data
[0076] Step 7, final model fusion;
[0077] After algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are integrated through a model fusion strategy. Model fusion can further improve the accuracy and stability of segmentation results. Especially in medical image segmentation tasks, this multi-model fusion method can effectively reduce the prediction bias of a single model. Fusion strategies can be divided into the following two types according to binary and multi-class segmentation tasks:
[0078] The fusion strategy for the binary segmentation task adopts probability average fusion, and the formula is as follows:
[0079]
[0080] Among them, P Ais the predicted probability graph of network A, P B is the predicted probability map of network B; the fused segmentation results need to be post-processed to further improve the segmentation quality: by threshold binarization, the probability map P final A fixed threshold of 0.5 is applied to generate a binary segmentation mask.
[0081] The multi-class segmentation task adopts a pixel-by-pixel argmax strategy, which assigns each pixel to the category with the highest probability.
[0082] First calculate the mean probability map for each class:
[0083]
[0084] Where c represents the category index.
[0085] Then use argmax to assign categories:
[0086]
[0087] Where (x,y) represents the pixel position in the image.
[0088] Another object of the present invention is to provide a semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation, comprising:
[0089] Annotation module, used for enhancement and preprocessing of annotation data;
[0090] Pre-training module, used for the pre-training stage of the two networks;
[0091] The segmentation prediction module is used to feed the labeled data and unlabeled data into two networks for segmentation prediction;
[0092] A determination module, used to determine the pseudo-label generator for the current round;
[0093] The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain pseudo-labels;
[0094] Joint training module, which is used to feed unlabeled data, pseudo-labeled and labeled data into another network for joint training;
[0095] Fusion module, used for final model fusion.
[0096] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation.
[0097] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation.
[0098] Another object of the present invention is to provide an information data processing terminal, which is used to implement the semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation.
[0099] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0100] First, the present invention proposes a pseudo-label generation algorithm based on the dual-network adaptive idea, which aims to solve the problems of unstable pseudo-label quality, error propagation and poor robustness in traditional pseudo-label generation methods. In the past, pseudo-label generation methods were divided into self-training methods of "self-production and self-sales" and dual-network training methods that pre-set a certain network as a pseudo-label generator. The present invention is different from these methods. The core idea of the algorithm is to compare the segmentation effects of the two networks on the labeled data, select the network with better segmentation effect as the pseudo-label generator, and guide the other network to train the unlabeled data. Specifically, this method combines two evaluation indicators and proposes a SegScore value to better evaluate the network segmentation performance. The network with a larger SegScore value represents that it has a better segmentation effect and has higher reliability and accuracy. Therefore, the pseudo-label generated by the network can better guide the other network to learn the characteristics of unlabeled data during training. The present invention can significantly improve the performance of the semi-supervised medical image segmentation model, especially in the case of limited labeled data, improve the segmentation accuracy and accelerate the model training process.
[0101] To overcome the problems of traditional pseudo-label generation methods, this paper proposes a "pseudo-label generation algorithm based on a dual-network adaptive mechanism." This algorithm introduces two networks, compares their segmentation performance on labeled data, and selects the better-performing network as the pseudo-label generator to guide the training of the other network on unlabeled data. This invention has the following advantages:
[0102] (1) The introduction of two networks enhances the diversity of training and can further improve the quality of pseudo-labels through subsequent comparison.
[0103] (2) By using two independent networks for prediction, richer and more diverse pseudo-labels can be obtained. Even if the prediction of one network is inaccurate, the prediction of the other network still provides valuable information.
[0104] (3) Through the competition mechanism of the two networks, the network with better performance is adaptively selected as the pseudo-label generator, thereby ensuring higher quality of pseudo-labels and reducing the risk of pseudo-label error propagation.
[0105] (4) Through the collaborative training of the dual networks, not only the quality of the pseudo-labels is improved, but also the robustness of the network is enhanced through the competition mechanism, avoiding the error generated by a single network.
[0106] Second, as auxiliary evidence for the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0107] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0108] The semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation proposed in this invention can significantly improve the accuracy and robustness of medical image segmentation, and is particularly suitable for medical image segmentation scenarios where labeled data is scarce. Its specific commercial value is: reducing data labeling costs, reducing reliance on large-scale manually labeled data through semi-supervised learning, and saving expert labeling costs; improving the accuracy of automated analysis of medical images, contributing to more accurate medical auxiliary diagnosis; being applicable to a variety of medical image segmentation tasks, such as image segmentation of organs such as the heart, brain, and liver, and having broad clinical application prospects; accelerating the implementation of intelligent medical equipment, and this solution can be integrated into intelligent medical imaging platforms, helping to promote the commercial application of intelligent medical imaging systems.
[0109] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0110] Most existing pseudo-label generation methods rely on a single network for pseudo-label generation, resulting in unstable pseudo-label quality and difficulty distinguishing between high-quality and low-quality labels. This paper introduces a competition mechanism between two networks to propose a dual-network adaptive pseudo-label generation method, effectively solving the problem of pseudo-label error propagation caused by a single network and improving segmentation accuracy. Furthermore, no published literature or patents in China or abroad use a similar dual-network adaptive mechanism for medical image segmentation. This solution, for the first time, proposes a dynamic pseudo-label generation scheme based on the SegScore evaluation metric, demonstrating its strong innovation.
[0111] (3) The technical solution of the present invention solves the technical problems that people have been eager to solve but have never been able to solve successfully:
[0112] This invention successfully addresses the long-standing challenges of unstable pseudo-label generation and error propagation in semi-supervised medical image segmentation. Previous methods primarily relied on the predictions of a single network, making it difficult to adaptively adjust the selection of the pseudo-label generator during training, leading to training instability. This invention introduces two networks, compares segmentation performance, and selects the superior network as the pseudo-label generator, achieving superior learning on unlabeled data, significantly improving segmentation accuracy and training stability.
[0113] (4) The technical solution of the present invention overcomes technical prejudice:
[0114] The technical bias inherent in traditional methods lies in their overreliance on a single network, which underutilizes the diversity and competition between multiple models. This present invention leverages the diversity and complementarity between the two networks through dual-network adaptation, introducing a dynamic adjustment mechanism during pseudo-label generation, thereby overcoming the dominant role of a single network in the training process. This approach is more scientific and comprehensive, effectively avoiding the technical bias inherent in traditional pseudo-label generation methods, which often relies too heavily on the performance of a single network. BRIEF DESCRIPTION OF THE DRAWINGS
[0115] Figure 1 This is a flow chart of a semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation provided by an embodiment of the present invention.
[0116] Figure 2 This is a structural block diagram of a semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation provided by an embodiment of the present invention.
[0117] Figure 3 This is a flow chart of a pseudo-label generation algorithm based on a dual-network adaptive mechanism provided by an embodiment of the present invention.
[0118] Figure 4 This is a diagram of the segmentation effects of all visualization methods provided by the embodiments of the present invention on the LA dataset.
[0119] Figure 5 This is a visualization diagram of the segmentation effect of the traditional pseudo-label generation algorithm (PLGA) provided by the embodiment of the present invention and the patented method on the ACDC dataset;
[0120] Figure 6 4 is a performance comparison curve of the DAPL and consistency regularization methods provided by an embodiment of the present invention on the LA dataset. DETAILED DESCRIPTION
[0121] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0122] like Figure 1 As shown, the embodiment of the present invention provides a semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation, which includes the following steps:
[0123] S101, enhancement and preprocessing of labeled data;
[0124] S102, pre-training phase of the two networks;
[0125] S103, sending the labeled data and the unlabeled data to two networks for segmentation prediction;
[0126] S104, determining a pseudo label generator for the current round;
[0127] S105, the pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels;
[0128] S106, sending the unlabeled data, pseudo-labeled data and labeled data into another network for joint training;
[0129] S107, final model fusion.
[0130] This semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation improves the performance and generalization ability of the segmentation model by effectively utilizing labeled and unlabeled data.
[0131] The method begins by augmenting and preprocessing the labeled data. Data augmentation techniques, such as rotation, flipping, scaling, and color transformation, increase data diversity and prevent model overfitting. Preprocessing steps include image normalization, denoising, and alignment to ensure the consistency and quality of the input data. These processes help improve model performance during subsequent training.
[0132] Next, the second step involves pre-training the two networks using labeled data. These networks share the same structure but independent parameters. Pre-training on labeled data allows them to initially learn the characteristics of medical images and the basic principles of the segmentation task. This pre-training phase lays a solid foundation for subsequent joint training and pseudo-label generation, ensuring both networks possess sufficient segmentation capabilities.
[0133] In the third step, the labeled and unlabeled data are fed into the two networks for segmentation prediction. The labeled data is used for supervised training, while the unlabeled data is used to leverage the network's predictions. This step allows the two networks to learn independently on different data, thereby increasing the diversity and robustness of the model. Furthermore, the use of unlabeled data allows the model to fully exploit the potential information in the large number of unlabeled samples.
[0134] In the fourth step, a network needs to be identified as the pseudo-label generator. Typically, a network that performs well on the validation set is selected, or a dynamic selection is made through some evaluation mechanism. This network is responsible for generating high-quality pseudo-labels for the unlabeled data, which serve as a supervisory signal for subsequent training. Choosing the right generator is crucial to ensuring the accuracy and effectiveness of the pseudo-labels.
[0135] In the fifth step, the pseudo-label generator predicts the unlabeled data and generates pseudo-labels. Pseudo-labels are the prediction results of unlabeled data. Although they contain a certain amount of noise, they can be gradually optimized and corrected through subsequent joint training. The generation of pseudo-labels allows unlabeled data to participate in the training process in a semi-supervised manner, improving the overall performance of the model.
[0136] In the sixth step, the unlabeled data, pseudo-labeled data, and labeled data are fed into another network for joint training. This network uses the true and pseudo-labeled data from the labeled data to perform supervised learning on the unlabeled data, thereby enhancing its segmentation capabilities. Furthermore, the inclusion of unlabeled data helps the model better generalize to different samples and scenarios. Finally, by fusion of the segmentation results from the two networks, the advantages of both networks can be combined to further improve the accuracy and stability of the segmentation results.
[0137] In summary, this semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation achieves efficient and accurate medical image segmentation by fully utilizing limited labeled data and a large amount of unlabeled data through pre-training, pseudo-label generation, and joint training. This method has significant potential for practical applications, especially in the medical field where labeled data is scarce.
[0138] Enhancement and preprocessing of labeled data provided by embodiments of the present invention:
[0139] (1) Target area extraction: from the labeled data Y L Extract the target region, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target region to avoid overly sharp boundaries that make the enhanced data unnatural.
[0140] (2) Copy the target area: In each labeled image, copy the target area of the left atrium from the original image X L Cut it out while retaining its three-dimensional spatial position information;
[0141] (3) Select the pasting position: Randomly select a suitable position in the background area (non-target area) of the same batch or other images and paste the cropped target area into it; be careful not to paste the position too close to the original area to cause redundancy;
[0142] (4) Update the annotation label: Corresponding to the pasted image, the position of the target area is synchronously updated to the segmentation label Y L , generate enhanced labels
[0143] (5) Repeat the above steps: generate multiple enhanced versions for each sample, and build a diverse set of enhanced labeled data by repeated copying and pasting.
[0144] The pre-training phase of the two networks provided in the embodiment of the present invention is as follows:
[0145] (1) Subnetwork structure design
[0146] For 3D image segmentation tasks:
[0147] Network A: uses the classic VNet structure, suitable for processing 3D medical image segmentation tasks, and has efficient feature extraction capabilities;
[0148] Network B: Replace the VNet encoder with a 3D convolutional ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0149] For 2D image segmentation tasks:
[0150] Network A: uses the classic UNet structure, suitable for processing 2D medical image segmentation tasks, and has efficient feature extraction capabilities;
[0151] Network B: Replace the UNet encoder with 2D convolution ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0152] Using sub-networks with different architectures but similar performance can enhance the diversity of training in this method;
[0153] (2) Data input: Use the enhanced data set generated in step 1 Normalize the image pixel values to the range [0,1] or [-1,1];
[0154] (3) Supervised training process: using labeled data As a supervisory signal, the network is trained by optimizing the segmentation loss function, which is as follows:
[0155]
[0156] The SGD optimizer is used, with an initial learning rate of 0.01, which is dynamically adjusted according to the training progress. The batch size is 16 and the training epochs are 100 to ensure that both networks fully learn the labeled data.
[0157] (4) Training output: parameter set θ of network A A and the parameter set θ of network B B .
[0158] The embodiment of the present invention provides the method of feeding the labeled data and the unlabeled data into two networks for segmentation prediction:
[0159] (1) Each training batch contains 2 labeled data and 2 unlabeled data
[0160] (2) Input the labeled data and unlabeled data into network A and network B respectively to obtain the segmentation prediction results of the two networks in Represents the prediction results of the labeled data, Represents the prediction results of unlabeled data;
[0161] (3) Using the true label Y L The Dice value and 95HD value of each network are calculated, and the comprehensive score SegScore is calculated to evaluate its segmentation performance. The formula is as follows:
[0162]
[0163] 95HD(A,B)=max{percentile 95 (d)A,B)),percentile 95 (d(B,A))}
[0164] SegScore=α·Dice+β·(1 / (1+95HD))
[0165] Among them, P is the binary result predicted by the network, Y is the true label, α and β are weight coefficients, which need to be adjusted according to task requirements; the larger the SegScore value, the better the network segmentation effect;
[0166] (4) Accumulate the SegScore values of all labeled data in the batch to obtain the total SegScore values of network A and network B respectively:
[0167]
[0168] Among them, N is the number of samples of labeled data in the current batch, P is the network prediction result, and Y is the true label.
[0169] The pseudo-label generator for determining the current round provided by the embodiment of the present invention:
[0170] Comparing SegScore total,A and SegScore total,B size:
[0171] If SegScore total,A >SegScore total,B , then network A performs better in this round, and network A is selected as the pseudo label generator;
[0172] If SegScore total,A <SegScore total,B , then network B is selected as the pseudo label generator.
[0173] The pseudo-label generator network provided in the embodiment of the present invention predicts the unlabeled data to obtain pseudo-labels:
[0174] The pseudo labels are generated by the pseudo label generator selected in step 4 through the segmentation prediction of unlabeled data;
[0175] Input data: unlabeled data X U , as input to the pseudo-label generator;
[0176] The process of generating pseudo labels:
[0177] (1) Pseudo-label generator for X U Output probability map P U , where the value of each pixel represents the probability that it belongs to the target area;
[0178] (2) Use the sharpening function to post-process the probability map and convert it into a soft false label. The formula is as follows:
[0179]
[0180] Among them, T is a hyperparameter used to control the smoothness of the probability distribution;
[0181] Generated pseudo labels It is a soft label matrix that contains the probability distribution information of each pixel. Compared with traditional hard labels (0 or 1), soft labels can alleviate the problems caused by prediction bias.
[0182] S106, sending the unlabeled data, pseudo-labeled data and labeled data into another network for joint training;
[0183] The networks that were not selected as pseudo-label generators in S104 are guided by the pseudo-label generator in this round and jointly trained using pseudo-labels and annotated data. The specific training details are as follows:
[0184] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training using generated pseudo labels
[0185] (2) The training of the target network is achieved by combining supervised loss and unsupervised loss. The supervised learning loss formula is as follows:
[0186]
[0187] Among them, Dice loss and cross entropy loss jointly optimize the segmentation performance of labeled data; represents the network predicted segmentation, Y L represents the true label.
[0188] The unsupervised loss formula is as follows:
[0189]
[0190] Where MSE is the mean square error loss.
[0191] The total network loss formula is as follows:
[0192] L total =L s +λL u
[0193] Where λ is the weight coefficient used to balance the contribution of labeled data and unlabeled data
[0194] S107, final model fusion;
[0195] After algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are integrated through a model fusion strategy. Model fusion can further improve the accuracy and stability of segmentation results. Especially in medical image segmentation tasks, this multi-model fusion method can effectively reduce the prediction bias of a single model. Fusion strategies can be divided into the following two types according to binary and multi-class segmentation tasks:
[0196] The fusion strategy for the binary segmentation task adopts probability average fusion, and the formula is as follows:
[0197]
[0198] Among them, P Ais the predicted probability graph of network A, P B is the predicted probability map of network B; the fused segmentation results need to be post-processed to further improve the segmentation quality: by threshold binarization, the probability map P final A fixed threshold of 0.5 is applied to generate a binary segmentation mask.
[0199] The multi-class segmentation task adopts a pixel-by-pixel argmax strategy, which assigns each pixel to the category with the highest probability.
[0200] First calculate the mean probability map for each class:
[0201]
[0202] Where c represents the category index.
[0203] Then use argmax to assign categories:
[0204]
[0205] Where (x,y) represents the pixel position in the image.
[0206] like Figure 2 As shown, an embodiment of the present invention provides a semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation, including:
[0207] Annotation module, used for enhancement and preprocessing of annotation data;
[0208] Pre-training module, used for the pre-training stage of the two networks;
[0209] The segmentation prediction module is used to feed the labeled data and unlabeled data into two networks for segmentation prediction;
[0210] A determination module, used to determine the pseudo-label generator for the current round;
[0211] The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain pseudo-labels;
[0212] Joint training module, which is used to feed unlabeled data, pseudo-labeled and labeled data into another network for joint training;
[0213] Fusion module, used for final model fusion.
[0214] The semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation provided by the embodiments of the present invention achieves efficient and accurate medical image segmentation through modular design. The working principle of this system will be described in detail below.
[0215] First, the system's annotation module is responsible for augmenting and preprocessing the annotated data. Data augmentation includes operations such as rotation, flipping, scaling, and color transformation to increase data diversity and improve the model's generalization capabilities. Preprocessing steps include image normalization, denoising, and alignment to ensure the consistency and quality of input data. These processing steps provide high-quality input data for subsequent model training, reducing model performance fluctuations caused by data quality issues.
[0216] Next, the pre-training module pre-trains two independent networks. Using labeled data, these networks are initially trained to learn the basic characteristics of medical images and the preliminary rules for segmentation tasks. This pre-training phase ensures that both networks possess a certain level of segmentation and feature extraction capabilities before entering the subsequent semi-supervised learning phase, laying the foundation for improving overall system performance.
[0217] In the segmentation prediction module, labeled and unlabeled data are fed into two separate networks for segmentation prediction. The labeled data is used to optimize network parameters through supervised learning, while the unlabeled data uses the network's predictions to generate preliminary segmentation results. This process not only fully utilizes the limited labeled data but also, by introducing unlabeled data, enhances the model's adaptability to diverse samples and improves the overall robustness of the system.
[0218] The determination module is responsible for selecting a network as the pseudo-label generator for the current round. Typically, the network with the better performance is selected by evaluating the performance of two networks on the validation set. This module uses a dynamic evaluation mechanism to adjust the pseudo-label generator selection in real time based on the network's performance during training, ensuring the generated pseudo-labels are highly accurate and reliable.
[0219] The pseudo-label acquisition module then uses the selected pseudo-label generator to predict the unlabeled data and generate pseudo-labels. Although these pseudo-labels contain some noise, they can be gradually optimized and corrected through subsequent joint training. The generation of pseudo-labels allows unlabeled data to participate in the training process in a semi-supervised manner, further improving the model's segmentation performance and generalization capabilities.
[0220] Finally, the joint training module feeds the unlabeled data, pseudo-labeled data, and labeled data into another network for joint training. This network utilizes both true and pseudo-labeled data for hybrid supervised learning, enhancing its segmentation capabilities. Meanwhile, the fusion module integrates the segmentation results of the two networks, using weighted averaging, voting, or other fusion methods to further enhance the accuracy and stability of the final segmentation results.
[0221] The system also includes a computer device and a computer-readable storage medium storing computer programs that implement the functions of each of the aforementioned modules, ensuring the method's executability and broad applicability. The information data processing terminal, serving as the system's practical application platform, integrates the aforementioned modules, enabling efficient application of a semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation in real-world medical scenarios.
[0222] In summary, the present invention achieves efficient and accurate semi-supervised medical image segmentation through modular design and dual-network collaboration, fully utilizing labeled and unlabeled data, and combining with an adaptive pseudo-label generation mechanism. It has broad application prospects and significant practical value.
[0223] The purpose of this invention is to provide a semi-supervised medical image segmentation method based on a dual-network adaptive pseudo-label generation algorithm. By introducing an adaptive pseudo-label generation mechanism, this method addresses the problems of unstable pseudo-label quality and error propagation in traditional pseudo-label generation methods. By comparing the segmentation performance of two networks on labeled data, this method selects the better-performing network as the pseudo-label generator to guide the training of the other network on unlabeled data, thereby improving the segmentation performance and robustness of the model and reducing the impact of pseudo-label error propagation.
[0224] Traditional pseudo-label generation algorithm (PLGA) steps:
[0225] Step 1. Train an initial network model: Train an initial network model using a small amount of labeled data. This network is typically trained using standard supervised learning methods, optimizing a loss function on the labeled data to learn the features of the medical image segmentation task.
[0226] Step 2. Predicting the unlabeled data: Use the trained initial network to predict the unlabeled data, thereby generating pseudo-labels. Pseudo-labels are the network's predictions for the unlabeled data. They are considered "disguised" true labels and can be used as labels for the unlabeled data during training.
[0227] Step 3. Screening and using pseudo-labels for training: After obtaining pseudo-labels, traditional methods typically select a threshold or confidence level to screen reliable pseudo-labels. Pseudo-labels with high confidence are used as training data to further optimize network learning.
[0228] Step 4. Iterative training: The filtered pseudo labels are fed into the network along with a small amount of labeled data for iterative training. This process updates the network parameters. After multiple iterations, the network will make more accurate predictions on unlabeled data.
[0229] In the above traditional pseudo-label generation algorithm steps, the initial network in step 1 is trained using labeled data, and its performance is limited by the scale and quality of the labeled data. If the labeled data is insufficient, the network will be underfitting, affecting its generalization ability for unlabeled data; in step 2, the quality of the pseudo-labels is unstable due to the inaccurate performance of the network on unlabeled data. Incorrect predictions will lead to the error propagation of pseudo-labels, thereby affecting the subsequent training results. Especially when the network performance is poor, incorrect pseudo-labels will have a negative impact on the training of the model, resulting in overfitting or inaccurate segmentation results; in step 3, a single network is used to generate pseudo-labels, and the pseudo-labels are filtered according to the confidence level. This method usually has no effective mechanism to improve the quality of pseudo-labels, because low-confidence pseudo-labels will be mistakenly used to train the model, thereby introducing noise and affecting model performance.
[0230] In summary, traditional pseudo-label generation algorithms have the following problems in solving semi-supervised medical image segmentation: First, because they rely solely on a single network to predict unlabeled data, the generated pseudo-labels are subject to significant bias. When network performance is poor, the accuracy of the pseudo-labels decreases, affecting subsequent training results. Second, traditional methods filter pseudo-labels based on the confidence level of the predictions, but these filtering criteria are not strict enough, making it easy for unreliable pseudo-labels to be introduced into training, increasing noise during the training process.
[0231] To address the challenges of traditional pseudo-label generation algorithms, this paper proposes a pseudo-label generation algorithm based on a dual-network adaptive mechanism. This algorithm introduces two networks, compares their segmentation performance on labeled data, and dynamically selects the better-performing network as the pseudo-label generator to guide the training of the other network on unlabeled data.
[0232] The steps of the dual-network adaptive pseudo-label generation algorithm (DAPL) proposed in this invention are as follows:
[0233] Input: A batch of labeled data sets {X L ,Y L}, a batch of unlabeled data sets {X U}, subnet f A (·), subnet f B (·), batch size bs, hyperparameter T, weight coefficients λ, α, β;
[0234] Output: Medical image segmentation results
[0235] 1. Use the copy and paste method to annotate the dataset {X L ,Y L} Perform data enhancement to generate a new enhanced data set
[0236] 2. Using enhanced annotation data The two sub-networks (Network A and Network B) are pre-trained separately.
[0237] 3 In each round of training, prepare a batch of training data with a batch size of bs containing labeled data and unlabeled data. Labeled data {X L ,Y L} and unlabeled data {X U} are sent to two networks for segmentation prediction.
[0238] 4. Compare the segmentation effects of the two networks on the labeled data and determine the pseudo-label generator for the current round.
[0239] 5 Pseudo label generator network for unlabeled data {X U} to make predictions, and then use the sharpening function to convert the network's prediction results into soft pseudo labels
[0240] 6. Unlabeled data {X U} and the generated pseudo labels Input another network and jointly train it with the labeled data.
[0241] 7 Repeat steps 3 to 6 to update the parameters of the two networks.
[0242] 8 At the end of training, the parameters of the two networks are fixed, and the segmentation results of the two are used for post-processing to generate the final segmentation results.
[0243] The following is a detailed description of the technical solution. First, the input of the algorithm is provided: the labeled data set {X L ,Y L}, unlabeled data set {X U}, batch size bs, hyperparameter T, weight coefficients λ, α, β. The following describes the detailed steps of the pseudo-label generation algorithm based on the dual network adaptive mechanism to solve the medical image segmentation problem:
[0244] Step 1: Enhancement and preprocessing of labeled data
[0245] This paper uses the LA left atrium dataset and the ACDC cardiac automatic diagnosis challenge dataset, which are commonly used in the field of medical image segmentation. Taking the LA dataset as an example, the data enhancement and preprocessing process is as follows:
[0246] (1) Target area extraction: from the labeled data Y LThe target area, i.e., the segmentation mask of the left atrium, is extracted from the image, and the boundary of the target area is smoothed to avoid overly sharp boundaries that make the enhanced data unnatural.
[0247] (2) Copy the target area: In each labeled image, copy the target area of the left atrium from the original image X L It is cropped out while retaining its three-dimensional spatial position information.
[0248] (3) Select the pasting position: Randomly select a suitable position in the background area (non-target area) of the same batch or other images and paste the cropped target area into it. Be careful not to paste the position too close to the original area to cause redundancy.
[0249] (4) Update the annotation label: Corresponding to the pasted image, the position of the target area is synchronously updated to the segmentation label Y L , generate enhanced labels
[0250] (5) Repeat the above steps: generate multiple enhanced versions for each sample, and build a diverse set of enhanced labeled data by repeated copying and pasting.
[0251] Step 2, pre-training phase of two networks
[0252] In this invention, the pre-training phase of the two sub-networks (network A and network B) is an important step to improve the initial segmentation ability of the model. The two networks are trained separately through supervision, enabling them to learn the basic features of medical image segmentation at an early stage, laying the foundation for subsequent pseudo-label generation. The details are as follows:
[0253] (1) Subnetwork structure design
[0254] For 3D image segmentation tasks:
[0255] Network A: Uses the classic VNet structure, suitable for processing 3D medical image segmentation tasks, and has efficient feature extraction capabilities.
[0256] Network B: Replace the VNet encoder with 3D convolutional ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0257] For 2D image segmentation tasks:
[0258] Network A: Uses the classic UNet structure, suitable for processing 2D medical image segmentation tasks, and has efficient feature extraction capabilities.
[0259] Network B: Replace the UNet encoder with 2D convolution ResNet34 as subnet B. The performance gap between network B and network A is very small.
[0260] Using sub-networks with different architectures but similar performance can enhance the diversity of training in this method.
[0261] (2) Data input: Use the enhanced data set generated in step 1 Normalize image pixel values to the range [0,1] or [-1,1].
[0262] (3) Supervised training process: using labeled data As a supervisory signal, the network is trained by optimizing the segmentation loss function, which is as follows:
[0263]
[0264] We used the SGD optimizer, set the initial learning rate to 0.01, and dynamically adjusted it based on the training progress. The batch size was 16 and the training epochs were 100 to ensure that both networks fully learned the labeled data.
[0265] (4) Training output: parameter set θ of network A A and the parameter set θ of network B B
[0266] Step 3: Send the labeled data and unlabeled data into two networks for segmentation prediction
[0267] In each round of training, labeled data and unlabeled data are combined into a training batch and fed into two sub-networks for segmentation prediction. Performance evaluation of the segmentation results of the labeled data provides a basis for the subsequent selection of pseudo-label generators. The details are as follows:
[0268] (1) Each training batch contains 2 labeled data and 2 unlabeled data
[0269] (2) Input the labeled data and unlabeled data into network A and network B respectively to obtain the segmentation prediction results of the two networks in Represents the prediction results of the labeled data, Represents the prediction results for unlabeled data.
[0270] (3) Using the true label Y L The Dice value and 95HD value of each network are calculated, and the comprehensive score SegScore is calculated to evaluate its segmentation performance. The formula is as follows:
[0271]
[0272] 95HD(A,B)=max{percentile 95 (d(A,B)),percentile 95 (d(B,A))}
[0273] SegScore=α·Dice+β·(1 / (1+95HD))
[0274] Where P is the binary result predicted by the network, Y is the true label, and α and β are weight coefficients that need to be adjusted according to task requirements. A larger SegScore value indicates a better network segmentation effect.
[0275] (4) Accumulate the SegScore values of all labeled data in the batch to obtain the total SegScore values of network A and network B respectively:
[0276]
[0277] Among them, N is the number of samples of labeled data in the current batch, P is the network prediction result, and Y is the true label.
[0278] Step 4: Determine the pseudo-label generator for the current round
[0279] Comparing SegScore total,A and SegScore total,B size:
[0280] If SegScore total,A >SegScore total,B , then network A performs better in this round, and network A is selected as the pseudo label generator.
[0281] If SegScore total,A <SegScore total,B , then network B is selected as the pseudo label generator.
[0282] Step 5: The pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels
[0283] The pseudo labels are generated by the pseudo label generator selected in step 4 through segmentation prediction of unlabeled data.
[0284] Input data: unlabeled data X U , as input to the pseudo-label generator.
[0285] The process of generating pseudo labels:
[0286] (1) Pseudo-label generator for X U Output probability map PU , where the value of each pixel represents the probability that it belongs to the target area.
[0287] (2) Use the sharpening function to post-process the probability map and convert it into a soft false label. The formula is as follows:
[0288]
[0289] Among them, T is a hyperparameter used to control the smoothness of the probability distribution.
[0290] Generated pseudo labels It is a soft label matrix that contains the probability distribution information of each pixel. Compared with traditional hard labels (0 or 1), soft labels can alleviate the problems caused by prediction bias.
[0291] Step 6: Send the unlabeled data, pseudo-labeled data and labeled data into another network for joint training
[0292] The networks that were not selected as pseudo-label generators in step 4 are guided by the pseudo-label generator in this round and trained jointly using pseudo-labels and annotated data. The specific training details are as follows:
[0293] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training using generated pseudo labels
[0294] (2) The training of the target network is achieved by combining supervised loss and unsupervised loss. The supervised learning loss formula is as follows:
[0295]
[0296] Among them, Dice loss and cross entropy loss jointly optimize the segmentation performance of labeled data. represents the network predicted segmentation, Y L represents the true label.
[0297] The unsupervised loss formula is as follows:
[0298]
[0299] Where MSE is the mean square error loss.
[0300] The total network loss formula is as follows:
[0301] L total =L s +λL u
[0302] Where λ is the weight coefficient used to balance the contribution of labeled data and unlabeled data
[0303] Step 7: Final model fusion
[0304] After algorithm training is complete, the training parameters of Network A and Network B are fixed, and the segmentation results of the two networks are combined through a model fusion strategy. Model fusion can further improve the accuracy and stability of segmentation results. Especially in medical image segmentation tasks, this multi-model fusion method can effectively reduce the prediction bias of a single model. Fusion strategies can be divided into the following two types based on binary and multi-class segmentation tasks:
[0305] The fusion strategy for the binary segmentation task adopts probability average fusion, and the formula is as follows:
[0306]
[0307] Among them, P A is the predicted probability graph of network A, P B is the predicted probability map of network B. The fused segmentation results need to be post-processed to further improve the segmentation quality: by threshold binarization, the probability map P final A fixed threshold of 0.5 is applied to generate a binary segmentation mask.
[0308] The multi-class segmentation task adopts a pixel-by-pixel argmax strategy, which assigns each pixel to the category with the highest probability.
[0309] First calculate the mean probability map for each class:
[0310]
[0311] Where c represents the category index.
[0312] Then use argmax to assign categories:
[0313]
[0314] Where (x,y) represents the pixel position in the image.
[0315] The flowchart of the pseudo label generation algorithm based on the dual network adaptive mechanism is as follows:
[0316] Figure 3 Flowchart of pseudo-label generation algorithm based on dual-network adaptive mechanism
[0317] Finally, the effectiveness of the present invention in semi-supervised medical image segmentation tasks was verified through experiments. The following are the evaluation indicators and experimental results.
[0318] In the present invention, the following evaluation indicators are used to evaluate the model segmentation performance:
[0319] (1) Dice coefficient: The Dice coefficient is a commonly used overlap metric in segmentation tasks, which is used to measure the similarity between the predicted results and the true labels. It is simple and easy to calculate, suitable for quickly evaluating model performance.
[0320] (2) Jaccard coefficient: The Jaccard coefficient is an extended form of the Dice coefficient, which calculates the ratio of the intersection and union of the predicted results and the true labels. In the segmentation task, compared with the Dice coefficient, it can better reflect the overall consistency between the predicted results and the true labels.
[0321] (3) 95% Hausdorff distance: Hausdorff distance is an indicator that measures the maximum deviation between two sets of points (such as the boundary points of the segmentation result and the true label). It can well reflect the worst case of the boundary between the segmentation result and the true label.
[0322] (4) Average surface distance: The average surface distance is the average distance between the segmentation result and the true label boundary points. It is sensitive to the overall boundary deviation and is suitable for measuring the quality of the segmentation boundary.
[0323] The experimental results on the LA dataset and ACDC dataset are shown in the following table:
[0324] Table 1 Experimental comparison results of LA dataset
[0325]
[0326] Table 2 Experimental comparison results of ACDC dataset
[0327]
[0328] The visualization of the segmentation results on the LA dataset is shown below:
[0329] Figure 4 Visualize the segmentation effects of all methods on the LA dataset
[0330] On the ACDC dataset, the visual comparison of the segmentation results of this patented method and the traditional pseudo-label generation method is shown below:
[0331] Figure 5 Segmentation visualization effects of traditional pseudo-label generation algorithm (PLGA) and this patented method on ACDC dataset
[0332] Experimental results show that the dual-network adaptive pseudo-label generation algorithm (DAPL) proposed in the present invention shows superior performance compared to other representative methods in the field of semi-supervised medical image segmentation (such as MT, UA-MT and traditional pseudo-label generation algorithms). The method of the present invention surpasses other comparison methods in all evaluation indicators, especially in the Dice coefficient and Jaccard coefficient. The method of the present invention has significant improvements over other methods, indicating that the degree of overlap between the segmentation results and the true labels is significantly improved. The method of the present invention introduces dynamic adjustment in the pseudo-label generation process through an innovative dual-network adaptive mechanism, which significantly improves the accuracy of pseudo-labels and the segmentation effect. This method has obvious advantages in improving segmentation accuracy, reducing boundary errors, and enhancing model stability. It can better solve the problems of scarce labeled data and high labeling costs faced in medical image segmentation.
[0333] The technology of the present invention can be integrated into intelligent medical equipment to construct an intelligent image analysis module to automatically process medical image data. This module can process image data from different devices (such as CT scanners, MRI equipment, ultrasound equipment, etc.), perform automatic segmentation and analysis, reduce dependence on medical experts, and improve diagnostic efficiency. For example, by applying this technology to artificial intelligence imaging diagnostic instruments, the intelligence level of medical imaging equipment can be enhanced, and an AI-based automatic image analysis function can be provided, effectively improving the efficiency and accuracy of imaging examinations, and widely used in medical environments such as hospitals and clinics.
[0334] The experimental results on the LA dataset and ACDC dataset are shown in the following table:
[0335] Table 1 Experimental comparison results of LA dataset
[0336]
[0337] Table 2 Experimental comparison results of ACDC dataset
[0338]
[0339] The segmentation results on the LA dataset are visualized as follows Figure 4 As shown, the segmentation effects of all methods on the LA dataset are visualized.
[0340] On the ACDC dataset, the segmentation results of this patented method and the traditional pseudo-label generation method are visualized and compared. Figure 5 As shown, the segmentation visualization effects of the traditional pseudo label generation algorithm (PLGA) and the patented method on the ACDC dataset.
[0341] Experimental results show that the dual-network adaptive pseudo-label generation algorithm (DAPL) proposed in the present invention shows superior performance compared to other representative methods in the field of semi-supervised medical image segmentation (such as MT, UA-MT and traditional pseudo-label generation algorithms). The method of the present invention surpasses other comparison methods in all evaluation indicators, especially in the Dice coefficient and Jaccard coefficient. The method of the present invention has significant improvements over other methods, indicating that the degree of overlap between the segmentation results and the true labels is significantly improved. The method of the present invention introduces dynamic adjustment in the pseudo-label generation process through an innovative dual-network adaptive mechanism, which significantly improves the accuracy of pseudo-labels and the segmentation effect. This method has obvious advantages in improving segmentation accuracy, reducing boundary errors, and enhancing model stability. It can better solve the problems of scarce labeled data and high labeling costs faced in medical image segmentation.
[0342] After replacing the adaptive pseudo-label generation module in the method (DAPL) provided by the present invention with the consistency regularization method (Consistency) widely used in the field, the experimental comparison effect with the DAPL of the present invention on the LA dataset with 20% labeled data is shown in the figure below. Figure 6 As shown in the figure, before 2,000 iterations, consistency regularization outperformed DAPL. However, as the number of training rounds increased, all metrics of consistency regularization declined to varying degrees. After 2,000 iterations, DAPL gradually surpassed consistency regularization in all metrics, and the gap widened. After 5,000 iterations, both methods' metrics declined, but DAPL's decline was smaller.
[0343] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0344] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation, characterized by: The following steps are involved: Step 1: Enhance and preprocess the labeled data; Step 2: Pre-train the two networks using labeled data. Step 3: Input the labeled data and unlabeled data into two networks for segmentation prediction; Step 4: Determine a network as a pseudo-label generator; Step 5: Use the pseudo-label generator to predict the unlabeled data and generate pseudo-labels; Step 6: Input the unlabeled data, pseudo-labeled data, and labeled data into another network for joint training; Step 7: Perform model fusion based on the segmentation results of the two networks; The labeled data and unlabeled data are fed into two networks for segmentation prediction: (1) Each training batch contains 2 labeled data and 2 unlabeled data (2) Input the labeled data and unlabeled data into network A and network B respectively to obtain the segmentation prediction results of the two networks and in Represents the prediction results of the labeled data, Represents the prediction results of unlabeled data; (3) Using the true label Y L The Dice value and 95HD value of each network are calculated, and the comprehensive score SegScore is calculated to evaluate its segmentation performance. The formula is as follows: 95HD(A,B)=max{percentile 95 (d(A,B)),percentile 95 (d(B,A))} SegScore=α·Dice+β·(1 / (1+95HD)) Among them, P is the binary result predicted by the network, Y is the true label, α and β are weight coefficients, which need to be adjusted according to the task requirements; the larger the SegScore value, the better the network segmentation effect; (4) Accumulate the SegScore values of all labeled data in the batch to obtain the total SegScore values of network A and network B respectively: Where N is the number of samples of labeled data in the current batch, P is the network prediction result, and Y is the true label; After algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are integrated through a model fusion strategy. Model fusion can improve the accuracy and stability of segmentation results. In medical image segmentation tasks, this multi-model fusion method can effectively reduce the prediction bias of a single model. Fusion strategies can be divided into the following two types according to binary and multi-class segmentation tasks: The fusion strategy for the binary segmentation task adopts probability average fusion, and the formula is as follows: Among them, P A is the predicted probability graph of network A, P B is the predicted probability map of network B; the fused segmentation results need to be post-processed to improve the segmentation quality: by threshold binarization, the probability map P final Apply a fixed threshold of 0.5 to generate a binary segmentation mask; The multi-class segmentation task adopts the pixel-by-pixel argmax strategy, which assigns each pixel to the category with the highest probability. First calculate the mean probability map for each class: Where c represents the category index; Then use argmax to assign categories: Where (x,y) represents the pixel position in the image.
2. The semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation according to claim 1, characterized in that: Enhancement and preprocessing of the labeled data: (1) Target area extraction: from the labeled data Y L Extract the target region, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target region to avoid overly sharp boundaries that make the enhanced data unnatural. (2) Copy the target area: In each labeled image, copy the target area of the left atrium from the original image X L Cut it out while retaining its three-dimensional spatial position information; (3) Select the pasting position: Randomly select a suitable position in the background area of the same batch or other images and paste the cropped target area into it; be careful not to paste the position too close to the original area to cause redundancy; (4) Update the annotation label: Corresponding to the pasted image, the position of the target area is synchronously updated to the segmentation label Y L , generate enhanced labels (5) Repeat the above steps: generate multiple enhanced versions for each sample, and build a diverse set of enhanced labeled data by repeated copying and pasting.
3. The semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation according to claim 1, characterized in that: Pre-training phase of the two networks: (1) Subnetwork structure design For 3D image segmentation tasks: Network A: uses the classic VNet structure, suitable for processing 3D medical image segmentation tasks, and has efficient feature extraction capabilities; Network B: Replace the VNet encoder with a 3D convolutional ResNet34 as subnet B. The performance gap between network B and network A is very small. For 2D image segmentation tasks: Network A: uses the classic UNet structure, suitable for processing 2D medical image segmentation tasks, and has efficient feature extraction capabilities; Network B: Replace the UNet encoder with 2D convolution ResNet34 as subnet B. The performance gap between network B and network A is very small. Using sub-networks with different architectures but similar performance can enhance the diversity of training in this method; (2) Data input: Use the enhanced data set generated in step 1 Normalize the image pixel values to the range [0,1] or [-1,1]; (3) Supervised training process: using labeled data As a supervisory signal, the network is trained by optimizing the segmentation loss function, which is as follows: CE is the cross entropy loss, and the SGD optimizer is used. The initial learning rate is set to 0.01 and dynamically adjusted according to the training progress. The batch size is 16 and the training rounds are 100 times to ensure that both networks can fully learn the labeled data. (4) Training output: parameter set θ of network A A and the parameter set θ of network B B .
4. The semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation according to claim 1, characterized in that: Determine the pseudo-label generator for the current round: Comparing SegScore total,A and SegScore total,B size: If SegScore total,A >SegScore total,B , then network A performs better in this round, and network A is selected as the pseudo label generator; If SegScore total,A <SegScore total,B , then network B is selected as the pseudo label generator.
5. The semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation according to claim 1, characterized in that: The pseudo-label generator predicts the unlabeled data to obtain pseudo-labels: The pseudo labels are generated by the pseudo label generator selected in step 4 through the segmentation prediction of unlabeled data; Input data: unlabeled data X U , as input to the pseudo-label generator; The process of generating pseudo labels: (1) Pseudo-label generator for X U Output probability map P U , where the value of each pixel represents the probability that it belongs to the target area; (2) Use the sharpening function to post-process the probability map and convert it into a soft false label. The formula is as follows: Among them, T is a hyperparameter used to control the smoothness of the probability distribution; Generated pseudo labels It is a soft label matrix that contains the probability distribution information of each pixel. Compared with traditional hard labels, soft labels can alleviate the problems caused by prediction bias. Step 6: Send the unlabeled data, pseudo-labeled data, and labeled data into another network for joint training; The networks that were not selected as pseudo-label generators in step 4 are guided by the pseudo-label generator in this round and trained jointly using pseudo-labels and annotated data. The specific training details are as follows: (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training using generated pseudo labels (2) The training of the target network is achieved by combining supervised loss and unsupervised loss. The supervised learning loss formula is as follows: Among them, Dice loss and cross entropy loss jointly optimize the segmentation performance of labeled data; represents the network predicted segmentation, Y L represents the true label; The unsupervised loss formula is as follows: Where MSE is the mean square error loss; The total network loss formula is as follows: THE total =L s +λL u Where λ is the weight coefficient used to balance the contribution of labeled data and unlabeled data; Step 7: Final model fusion.
6. A semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation that implements the semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation as described in any one of claims 1 to 5, characterized in that: The semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation includes: Annotation module, used for enhancement and preprocessing of annotation data; Pre-training module, used for the pre-training stage of the two networks; The segmentation prediction module is used to feed the labeled data and unlabeled data into two networks for segmentation prediction; A determination module, used to determine the pseudo-label generator for the current round; The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain pseudo-labels; Joint training module, which is used to feed unlabeled data, pseudo-labeled and labeled data into another network for joint training; Fusion module, used for final model fusion.
7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the steps of the semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation according to any one of claims 1 to 5.
9. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation as described in claim 6.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method and device based on dual-model interactive learning
CN114332135A
Semi-supervised medical image segmentation method based on mutual competition double-flow network
CN118570471A