Semi-supervised medical image segmentation method and system based on dual-network adaptive pseudo label generation
By adopting a dual-network adaptive pseudo-label generation method in medical image segmentation, selecting a network with better performance as a pseudo-label generator, solving the problems of pseudo-label quality instability and error propagation, significantly improving the performance and robustness of the model.
Patent Information
- Application Number
- CN202510078894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing pseudo-label generation methods have problems in the instability of pseudo-label quality, error propagation, lack of diversity and robustness, and difficulty in distinguishing between reliable and unreliable pseudo-labels in medical image segmentation.
Using a pseudo-label generation method based on dual-network adaptation, by comparing the segmentation effect of two networks on labeled data, a network with better performance is selected as a pseudo-label generator, and another network is guided to train unlabeled data. This method combines Dice value, 95HD value and SegScore score to dynamically select the pseudo-tag generator, and improves the quality of the pseudo-tag and the robustness of the model through joint training and model fusion.
It significantly improves the performance and robustness of semi-supervised medical image segmentation model, improves segmentation accuracy and training stability, and reduces the impact of false propagation of pseudo-label errors.
Smart Images

Figure CN119887805A_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 auxiliary diagnosis. It helps doctors quickly and accurately identify and locate disease areas by segmenting different structures or tissues in medical images. With the development of medical image technology, especially the widespread application of CT, MRI and ultrasound images, medical image segmentation has become an important part of intelligent diagnosis systems.
[0003] Semi-supervised learning has gradually become an important research direction in the field of medical image segmentation, especially in the case of a lack of labeled data. The labeling of medical image data is usually expensive and time-consuming. Obtaining a large amount of labeled data often requires manual labeling by experts, which not only increases time and economic costs, but also limits the ability to train models with large-scale data. To solve this problem, semi-supervised learning came into being. It uses a small amount of labeled data and a large amount of unlabeled data to jointly train the model, thereby significantly improving the model performance.
[0004] In semi-supervised medical image segmentation, pseudo-label generation methods play a vital role. Pseudo-labels are labels that are automatically generated after a model predicts unlabeled data. The core idea of pseudo-label generation methods is to use a small amount of existing labeled data to train the initial model, and then use the model to predict 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 the generalization ability of the model.
[0005] Existing pseudo-label generation methods usually rely on a single network to predict unlabeled data. Most methods train by directly using the network prediction results as pseudo-labels.
[0006] Through the above analysis, the problems and defects of the prior art 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-label quality is low, which has a negative impact on training.
[0008] (2) Pseudo-label error propagation: When the network’s prediction of unlabeled data is highly biased, the pseudo-labels will be incorrect and lead to training misleading. Such errors will continue to accumulate in the subsequent training process, 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 view of 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 comprises:
[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 to 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-labels, and labeled data to another network for joint training;
[0019] Step 7: Final model fusion.
[0020] Further, the enhancement and preprocessing of the labeled data:
[0021] (1) Target area extraction: From the labeled data Y L Extract the target area, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target area to avoid overly sharp boundaries that make the enhanced data unnatural;
[0022] (2) Copy the target region: In each annotated image, copy the target region 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 In the example above, we 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) Sub-network structure design
[0028] For 3D image segmentation tasks:
[0029] Network A: uses the classic VNet structure, which is suitable for 3D medical image segmentation tasks and has efficient feature extraction capabilities;
[0030] Network B: Replace the encoder of VNet with 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, which is suitable for 2D medical image segmentation tasks and has efficient feature extraction capabilities;
[0033] Network B: Replace the encoder of UNet with 2D convolutional 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 supervision signal, the network is trained by optimizing the segmentation loss function, and the supervision loss function is as follows:
[0037]
[0038] The SGD optimizer is used, and the initial learning rate is set to 0.01, which is dynamically adjusted according to the training progress; the batch size is 16 and the training rounds are 100 times to ensure that the two networks can 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 the unlabeled data are respectively 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 result of the labeled data, Represents the prediction results for unlabeled data;
[0043] (3) Use 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] Further, the pseudo label generator of 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 select network B as the pseudo label generator.
[0055] Furthermore, the pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels:
[0056] The pseudo-label is generated by the pseudo-label generator selected in step 4 through the segmentation prediction of the unlabeled data;
[0057] Input data: unlabeled data X U , as the input of 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) The probability map is post-processed using the sharpening function to 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-labels, and labeled data to 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 jointly trained using pseudo-labels and annotated data; the specific details of the training are as follows:
[0066] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training with 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 prediction 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 the algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are comprehensively processed through the model fusion strategy; model fusion can further improve the accuracy and stability of the 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 segmentation tasks and multi-classification 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: through 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 two networks;
[0091] The segmentation prediction module is used to send the labeled data and the unlabeled data to two networks for segmentation prediction;
[0092] A determination module, used to determine the pseudo label generator of the current round;
[0093] The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain the pseudo-label;
[0094] A joint training module, which is used to feed unlabeled data, pseudo-labels, 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 executes 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, enables 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, aiming 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 another 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] In order to overcome the problems in the traditional pseudo-label generation method, the present invention proposes a "pseudo-label generation algorithm based on a dual-network adaptive mechanism". The algorithm introduces two networks, compares the segmentation effect of the labeled data through them, selects the network with better performance as the pseudo-label generator, and guides the unlabeled data training of the other network. The present 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 to make predictions, 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 dual 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 situation where errors are generated by a single network.
[0106] Second, as auxiliary evidence of 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 the present 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. The specific commercial value is: reducing data labeling costs, reducing dependence on large-scale manually labeled data through semi-supervised learning, saving expert labeling costs; improving the accuracy of automated analysis of medical images, which contributes to more accurate medical auxiliary diagnosis; can be extended to a variety of medical image segmentation tasks, such as image segmentation of organs such as the heart, brain, and liver, and has broad clinical application prospects; accelerating the implementation of intelligent medical equipment, the solution can be integrated into the intelligent medical imaging platform, which helps 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 to generate pseudo-labels, resulting in unstable pseudo-label quality and difficulty in distinguishing high-quality from low-quality labels. The present invention introduces a competition mechanism between two networks and proposes a dual-network adaptive pseudo-label generation method, which effectively solves the problem of pseudo-label error propagation caused by a single network and improves segmentation accuracy. In addition, there are currently no public documents or patents at home and abroad that use a similar dual-network adaptive mechanism for medical image segmentation. This scheme is the first to propose a dynamic pseudo-label generation scheme based on the SegScore evaluation index, which is highly innovative.
[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] The present invention successfully solves the problem of unstable pseudo-label generation quality and error propagation in semi-supervised medical image segmentation, which is a long-standing problem in this field. Previous methods mainly rely on the prediction results of a single network, and it is difficult to adaptively adjust the selection of the pseudo-label generator during the training process, resulting in unstable training. The present invention introduces two networks and compares the segmentation performance, selects the better network as the pseudo-label generator, and achieves better learning of unlabeled data, thereby significantly improving the segmentation accuracy and training stability.
[0113] (4) The technical solution of the present invention overcomes technical prejudice:
[0114] The technical bias in traditional methods is reflected in the excessive reliance on a single network and the underutilization of the differences and competition mechanisms between multiple models. The present invention fully utilizes the differences and complementarities between the two networks through dual-network adaptation, and introduces a dynamic adjustment mechanism in the pseudo-label generation process, thereby overcoming the dominant role of a single network in the training process. This method is more scientific and comprehensive, and effectively avoids the technical bias of over-reliance on the performance of a single network in traditional pseudo-label generation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0115] Figure 1 It 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 It 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 It 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 It is a segmentation effect diagram of all visualization methods provided by the embodiments of the present invention on the LA dataset.
[0119] Figure 5 This is a segmentation visualization effect diagram of the traditional pseudo-label generation algorithm (PLGA) provided by the embodiment of the present invention and the patented method on the ACDC data set;
[0120] Figure 6 It is a performance comparison curve chart of DAPL and the consistency regularization method provided by an embodiment of the present invention on the LA dataset. DETAILED DESCRIPTION
[0121] In order to make the purpose, technical solution 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 used to limit the present invention.
[0122] like Figure 1 As shown, a semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation provided by an embodiment of the present invention 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 respectively;
[0126] S104, determining a pseudo label generator for the current round;
[0127] S105, the pseudo-label generator network predicts the unlabeled data to obtain a pseudo-label;
[0128] S106, sending the unlabeled data, the pseudo-labels, and the labeled data to 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] First, the first step of the method is to enhance and preprocess the labeled data. Data augmentation techniques such as rotation, flipping, scaling, and color transformation can increase the diversity of the data and prevent the model from overfitting. Preprocessing steps include image normalization, denoising, and alignment to ensure the consistency and quality of the input data. These processes help improve the performance of the model in subsequent training.
[0132] Next, the second step is to pre-train the two networks using labeled data. The two networks have the same structure but independent parameters. Through pre-training on labeled data, they can initially learn the characteristics of medical images and the basic rules of segmentation tasks. The pre-training stage lays a solid foundation for subsequent joint training and pseudo-label generation, ensuring that the two networks have a certain segmentation ability.
[0133] In the third step, the labeled data and unlabeled data are input into the two networks for segmentation prediction. The labeled data is used for supervised training, and the unlabeled data uses the prediction results of the network. The purpose of this step is to allow the two networks to learn independently on different data, thereby increasing the diversity and robustness of the model. At the same time, the use of unlabeled data enables the model to fully explore the potential information in a large number of unlabeled samples.
[0134] In the fourth step, a network needs to be determined as the pseudo-label generator. Usually, a network that performs better on the validation set is selected, or it is dynamically selected through some evaluation mechanism. This network is responsible for generating high-quality pseudo-labels for unlabeled data as a supervisory signal for subsequent training. Choosing a suitable generator is crucial to ensure the accuracy and effectiveness of pseudo-labels.
[0135] The fifth step is to use the pseudo-label generator to predict the unlabeled data and generate pseudo-labels. Pseudo-labels are the prediction results of unlabeled data. Although they contain certain 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-labels, and labeled data are fed into another network for joint training. This network uses the real labels and pseudo-labels of the labeled data to supervise the unlabeled data, thereby enhancing its segmentation ability. At the same time, the participation of unlabeled data helps the model to better generalize to different samples and scenarios. Finally, by fusing the model based on the segmentation results of the two networks, the advantages of both 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, through pre-training, pseudo-label generation and joint training, makes full use of limited labeled data and a large amount of unlabeled data to achieve efficient and accurate medical image segmentation. This method has important potential in practical applications, especially in the medical field where labeled data is scarce.
[0138] Enhancement and preprocessing of the annotation data provided by the embodiment of the present invention:
[0139] (1) Target area extraction: From the labeled data Y L Extract the target area, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target area to avoid overly sharp boundaries that make the enhanced data unnatural;
[0140] (2) Copy the target region: In each annotated image, copy the target region 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 In the example above, we 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) Sub-network structure design
[0146] For 3D image segmentation tasks:
[0147] Network A: uses the classic VNet structure, which is suitable for 3D medical image segmentation tasks and has efficient feature extraction capabilities;
[0148] Network B: Replace the encoder of VNet with 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, which is suitable for 2D medical image segmentation tasks and has efficient feature extraction capabilities;
[0151] Network B: Replace the encoder of UNet with 2D convolutional 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 supervision signal, the network is trained by optimizing the segmentation loss function, and the supervision loss function is as follows:
[0155]
[0156] The SGD optimizer is used, and the initial learning rate is set to 0.01, which is dynamically adjusted according to the training progress; the batch size is 16 and the training rounds are 100 times to ensure that the two networks can 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 that the labeled data and the unlabeled data are respectively fed 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 result of the labeled data, Represents the prediction results for unlabeled data;
[0161] (3) Use 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 select network B 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 the pseudo-label:
[0174] The pseudo-label is generated by the pseudo-label generator selected in step 4 through the segmentation prediction of the unlabeled data;
[0175] Input data: unlabeled data X U , as the input of 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, the pseudo-labels, and the labeled data to 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 details of the training are as follows:
[0184] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training with 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 prediction 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 the algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are comprehensively processed through the model fusion strategy; model fusion can further improve the accuracy and stability of the 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 segmentation tasks and multi-classification 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: through 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, a semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation provided by an embodiment of the present invention includes:
[0207] Annotation module, used for enhancement and preprocessing of annotation data;
[0208] Pre-training module, used for the pre-training stage of two networks;
[0209] The segmentation prediction module is used to send the labeled data and the unlabeled data to two networks for segmentation prediction;
[0210] A determination module, used to determine the pseudo label generator of the current round;
[0211] The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain the pseudo-label;
[0212] A joint training module, which is used to feed unlabeled data, pseudo-labels, 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 embodiment of the present invention realizes efficient and accurate medical image segmentation through modular design. The working principle of the system will be described in detail below.
[0215] First, the annotation module in the system is responsible for enhancing and preprocessing the annotated data. Data enhancement includes operations such as rotation, flipping, scaling, and color transformation to increase data diversity and improve the generalization ability of the model. The preprocessing steps include image normalization, denoising, and alignment to ensure the consistency and quality of the input data. These processing steps provide high-quality input data for subsequent model training and reduce model performance fluctuations caused by data quality issues.
[0216] Next, the pre-training module pre-trains two independent networks. The two networks are preliminarily trained using labeled data so that they can learn the basic features of medical images and the preliminary rules of segmentation tasks. The pre-training stage ensures that the two networks have certain segmentation and feature extraction capabilities when entering the subsequent semi-supervised learning stage, laying the foundation for improving the overall performance of the system.
[0217] In the segmentation prediction module, labeled data and unlabeled data are input into two independent networks for segmentation prediction. The labeled data optimizes the network parameters through supervised learning, while the unlabeled data uses the network's prediction results to generate preliminary segmentation results. This process not only makes full use of limited labeled data, but also enhances the model's adaptability to different samples and improves the overall robustness of the system through the introduction of unlabeled data.
[0218] The determination module is responsible for selecting a network as the pseudo-label generator in the current round. Usually, by evaluating the performance of the two networks on the validation set, the network with better performance is selected as the pseudo-label generator. This module adopts a dynamic evaluation mechanism to adjust the selection of the pseudo-label generator in real time according to the performance of the network during the training process to ensure that the generated pseudo-labels have high accuracy and reliability.
[0219] Subsequently, the pseudo-label acquisition module uses the selected pseudo-label generator to predict the unlabeled data and generate pseudo-labels. Although these pseudo-labels 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, further improving the segmentation performance and generalization ability of the model.
[0220] Finally, the joint training module inputs the unlabeled data, pseudo-labels, and labeled data into another network for joint training. The network uses real labels and pseudo-labels for mixed supervised learning to enhance its segmentation ability. At the same time, the fusion module integrates the segmentation results of the two networks, adopts weighted average, voting mechanism or other fusion methods, and combines the advantages of both to further improve the accuracy and stability of the final segmentation results.
[0221] In addition, the system also includes a computer device and a computer-readable storage medium, which stores a computer program that implements the functions of the above modules to ensure the executability and wide applicability of the method. The information data processing terminal, as the actual application platform of the system, integrates the above modules and realizes the efficient application of the semi-supervised medical image segmentation system based on dual-network adaptive pseudo-label generation in actual medical scenarios.
[0222] In summary, the present invention realizes efficient and accurate semi-supervised medical image segmentation through modular design and dual network collaboration, making full use of labeled and unlabeled data and combining with an adaptive pseudo-label generation mechanism, which has broad application prospects and significant practical value.
[0223] The purpose of the present invention is to provide a semi-supervised medical image segmentation method based on a dual-network adaptive pseudo-label generation algorithm, which introduces an adaptive pseudo-label generation mechanism to solve the problems of unstable pseudo-label quality and error propagation in traditional pseudo-label generation methods. This method compares the segmentation effects of two networks on labeled data, selects the better performing network as the pseudo-label generator, and guides the other network to train 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 the initial network model: Train an initial network model using a small amount of labeled data. This network is usually trained using standard supervised learning methods, optimizing the loss function on the labeled data to learn the features of the medical image segmentation task;
[0226] Step 2. Predict unlabeled data: Use the trained initial network to predict the unlabeled data to generate pseudo labels. Pseudo labels are the prediction results of the network on unlabeled data. They are considered to be "disguised" true labels and can be used as labels for unlabeled data during training.
[0227] Step 3. Screening and using pseudo labels for training: After obtaining pseudo labels, traditional methods usually select a threshold or confidence standard to screen reliable pseudo labels. Pseudo labels with high confidence will be used as training data to further optimize the learning of the network.
[0228] Step 4. Iterative training: Input the filtered pseudo labels and a small amount of labeled data into the network for iterative training, and update the network parameters through repeated training. After multiple iterations, the network will make more accurate predictions for 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 have an underfitting problem, which will affect its generalization ability for unlabeled data; in step 2, due to the inaccurate performance of the network on unlabeled data, the quality of the pseudo-label is unstable. Incorrect predictions will lead to the error propagation of pseudo-labels, thus 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 screened 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, the traditional pseudo-label generation algorithm has the following problems in solving the semi-supervised medical image segmentation problem: First, due to relying on only a single network to predict unlabeled data, the generated pseudo-labels have large deviations. When the network performance is poor, the accuracy of the pseudo-labels decreases, affecting the subsequent training effect. Second, the traditional method selects pseudo-labels according to the confidence of the prediction, but the screening criteria are not strict enough, and it is easy to introduce unreliable pseudo-labels into the training, resulting in increased noise in the training process.
[0231] In view of the problems existing in traditional pseudo-label generation algorithms, this paper proposes a pseudo-label generation algorithm based on a dual-network adaptive mechanism. The algorithm introduces two networks, compares their segmentation effects on labeled data, and dynamically selects the network with better performance as the pseudo-label generator to guide the unlabeled data training of the other network.
[0232] The steps of the dual-network adaptive pseudo-label generation algorithm (Dual-network Adaptive Pseudo-Labeling, DAPL) proposed in the present 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. Use 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 The 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 is a detailed description of the 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 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 region: In each annotated image, copy the target region 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 In the example above, we 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 of two networks
[0252] In the present 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 supervised and trained separately, so that they can 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) Sub-network structure design
[0254] For 3D image segmentation tasks:
[0255] Network A: uses the classic VNet structure, which is suitable for processing 3D medical image segmentation tasks and has efficient feature extraction capabilities.
[0256] Network B: Replace the encoder of VNet 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, which is suitable for processing 2D medical image segmentation tasks and has efficient feature extraction capabilities.
[0259] Network B: Replace the encoder of UNet with 2D convolutional 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 supervision signal, the network is trained by optimizing the segmentation loss function, and the supervision loss function is as follows:
[0263]
[0264] The SGD optimizer is used, and the initial learning rate is set to 0.01, which is dynamically adjusted according to the training progress. The batch size is 16 and the training rounds are 100 times to ensure that the two networks can fully learn 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 to two networks for segmentation prediction
[0267] In each round of training, the labeled data and unlabeled data are integrated into a training batch and input into two sub-networks for segmentation prediction. The performance evaluation of the segmentation results of the labeled data provides a basis for the selection of the subsequent pseudo-label generator. 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 result of the labeled data, Represents the prediction results for unlabeled data.
[0270] (3) Use 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] Among them, P is the binary result predicted by the network, Y is the real 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.
[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 the input of 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 to 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 jointly trained using pseudo-labels and annotated data. The specific details of the training are as follows:
[0293] (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training with 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 prediction 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 the algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are comprehensively processed through the model fusion strategy. Model fusion can further improve the accuracy and stability of the 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 segmentation tasks and multi-classification 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: through 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 the semi-supervised medical image segmentation task 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 result and the true label. It is simple and easy to calculate, and 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 result and the true label. In the segmentation task, compared with the Dice coefficient, it can better reflect the overall consistency between the predicted result and the true label.
[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 the 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 segmentation results on the LA dataset are visualized as follows:
[0329] Figure 4 Visualize the segmentation effect 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 the 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 with 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 comparative methods in various evaluation indicators, especially in Dice coefficient and Jaccard coefficient. The method of the present invention has significant improvements over other methods, indicating that the overlap between the segmentation result and the true label 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 segmentation effects. This method has obvious advantages in improving segmentation accuracy, reducing boundary errors, and enhancing model stability, and can better solve the problems of scarce labeled data and high labeling costs 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 it to artificial intelligence imaging diagnostic instruments, by integrating this technology, the intelligence level of medical imaging equipment can be enhanced, and an AI-based automatic image analysis function can be provided, which effectively improves the efficiency and accuracy of image examinations and is widely used in medical environments such as hospitals and clinics.
[0334] The experimental results on the LA dataset and the 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 as follows: 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 with 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 comparative methods in various evaluation indicators, especially in Dice coefficient and Jaccard coefficient. The method of the present invention has significant improvements over other methods, indicating that the overlap between the segmentation result and the true label 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 segmentation effects. This method has obvious advantages in improving segmentation accuracy, reducing boundary errors, and enhancing model stability, and can better solve the problems of scarce labeled data and high labeling costs 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. It can be seen that before 2K iterations, consistency regularization is better than DAPL, but as the number of training rounds increases, all indicators of consistency regularization decrease to varying degrees. After 2K iterations, the effects of DAPL indicators gradually surpass consistency regularization, and the gap is getting bigger and bigger. After 5K iterations, the indicators of both methods have decreased, but the decrease of DAPL is 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 part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, 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. Such code is provided on the carrier medium. The device and its 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, etc., 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, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0344] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A semi-supervised medical image segmentation method based on dual-network adaptive pseudo-label generation, characterized in that: 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 a pseudo-label generator to predict the unlabeled data and generate pseudo-labels; Step 6: Input the unlabeled data, pseudo-labels, and labeled data into another network for joint training; Step 7: Perform model fusion based on the segmentation results of the two networks.
2. The semi-supervised medical image segmentation method based on dual network adaptive pseudo-label generation as claimed in claim 1, characterized in that: Enhancement and preprocessing of the labeled data: (1) Target region extraction: From the labeled data Y L Extract the target area, i.e., the segmentation mask of the left atrium, and smooth the boundary of the target area to avoid overly sharp boundaries that make the enhanced data unnatural; (2) Copy the target region: In each annotated image, copy the target region 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 (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; (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 In the example above, we 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 as claimed in claim 1, characterized in that: Pre-training phase of the two networks: (1) Sub-network structure design For 3D image segmentation tasks: Network A: uses the classic VNet structure, which is suitable for 3D medical image segmentation tasks and has efficient feature extraction capabilities; Network B: Replace the encoder of VNet with 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, which is suitable for 2D medical image segmentation tasks and has efficient feature extraction capabilities; Network B: Replace the encoder of UNet with 2D convolutional 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 supervision signal, the network is trained by optimizing the segmentation loss function, and the supervision loss function is as follows: The SGD optimizer is used, and the initial learning rate is set to 0.01, which is dynamically adjusted according to the training progress; the batch size is 16 and the training rounds are 100 times to ensure that the two 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 as claimed in claim 1, characterized in that: The labeled data and unlabeled data are respectively sent to 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 result of the labeled data, Represents the prediction results for unlabeled data; (3) Use 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 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: 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.
5. The semi-supervised medical image segmentation method based on dual network adaptive pseudo-label generation as claimed in claim 1, characterized in that: The pseudo label generator for determining 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 select network B as the pseudo label generator.
6. The semi-supervised medical image segmentation method based on dual network adaptive pseudo-label generation as claimed in claim 1, characterized in that: The pseudo-label generator network predicts the unlabeled data to obtain pseudo-labels: The pseudo-label is generated by the pseudo-label generator selected in step 4 through the segmentation prediction of the unlabeled data; Input data: unlabeled data X U , as the input of 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) The probability map is post-processed using the sharpening function to 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 (0 or 1), soft labels can alleviate the problems caused by prediction bias. Step 6: Send the unlabeled data, pseudo-labels, and labeled data to 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 jointly trained using pseudo-labels and annotated data; the specific details of the training are as follows: (1) Input data: labeled data X L ,Y L , used for supervised learning; unlabeled data X U , Training with 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 prediction 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; After the algorithm training is completed, the training parameters of network A and network B are fixed, and the segmentation results of the two networks are comprehensively processed through the model fusion strategy; model fusion can further improve the accuracy and stability of the 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 segmentation tasks and multi-classification 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 further improve the segmentation quality: through threshold binarization, the probability map P final A fixed threshold of 0.5 is applied to generate a binary segmentation mask. The multi-class segmentation task adopts a 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.
7. 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 claimed in any one of claims 1 to 6, 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 two networks; The segmentation prediction module is used to send the labeled data and the unlabeled data to two networks for segmentation prediction; A determination module, used to determine the pseudo label generator of the current round; The pseudo-label acquisition module is used by the pseudo-label generator network to predict the unlabeled data and obtain the pseudo-label; A joint training module, which is used to feed unlabeled data, pseudo-labels, and labeled data into another network for joint training; Fusion module, used for final model fusion.
8. 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-6.
9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes 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 6.
10. 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 7.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method and device based on dual-model interactive learning
CN114332135A
Medical image segmentation model training method and device based on graffiti annotation, and terminal
CN115861333A
3D medical image segmentation model establishment method based on mask modeling and application thereof
CN116664588A
Semi-supervised medical image segmentation method based on mutual competition double-flow network
CN118570471A
Multi-task hybrid supervised medical image segmentation method and system based on federated learning
JP7386370B1
Cited By
Three-dimensional medical image segmentation method
CN120219754A