Self-training learning method, system and electronic equipment for medical image segmentation
Through iterative training and pseudo-label optimization methods, the proportion of malignant lesions is gradually increased, and the pseudo-label image optimization model is generated and used to solve the problem of insufficient recognition ability caused by excessive benign samples in the existing technology, and the segmentation accuracy and generalization ability of medical image segmentation models are improved.
Patent Information
- Application Number
- CN202411610252.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2044-11-12
AI Technical Summary
During the training process, the existing medical image segmentation model has weak recognition ability for malignant breast tumors due to excessive benign breast tumors. The traditional iterative training methods lack targeted optimization, which affects the segmentation accuracy and clinical application effect.
The iterative training method is adopted to gradually increase the proportion of training data for malignant lesions segmentation, and the pseudo-label images of missed and missed detection areas are generated by calculating the intersection difference between the predicted lesions and labeled images, and added them to the training set for targeted optimization, combining data enhancement technology and pseudo-label confidence optimization.
The model's ability to identify malignant lesions is improved, the segmentation accuracy and generalization ability of the model are enhanced, the label noise propagation is reduced, the need for expensive repository label refinement is eliminated, and the model's robustness and interpretability is improved.
Smart Images

Figure CN119559461B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a self-training learning method, system and electronic equipment for medical image segmentation. Background Art
[0002] Currently, segmentation of lesions such as breast tumors primarily relies on deep learning models, such as convolutional neural networks (CNNs). Training is typically performed using datasets containing images of both benign and malignant breast tumors, hoping the model can learn the features that distinguish between tumors of different natures.
[0003] However, in practice, benign breast tumor samples often outnumber malignant ones. This can lead to models over-focusing on benign tumor features during training, while their ability to identify malignant tumors is relatively weak. Furthermore, traditional iterative training methods often simply repeat the training process without optimizing the model's weaknesses at each iteration.
[0004] These problems not only affect the segmentation accuracy of medical image segmentation models, but also limit their promotion and effectiveness in clinical applications. Therefore, it is particularly important to develop a training method that can improve the segmentation accuracy and generalization ability of the model. Summary of the Invention
[0005] The purpose of this application is to provide a self-training learning method, system and electronic equipment for medical image segmentation, which can improve the segmentation accuracy and generalization ability of medical image segmentation models.
[0006] This application is implemented as follows:
[0007] In the first aspect, the present application provides a self-training learning method for medical image segmentation, comprising the following steps: obtaining an original training data set and an original test data set; the original training data set includes benign lesion segmentation training data and malignant lesion segmentation training data. The original training data set is divided into multiple data sets, and iterative training is performed in combination with the original test data set to form multiple groups of training data sets and test data sets. The training process is executed using each group of training data sets and test data sets formed by iterative training, and the training process includes: gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model; using the first segmentation model to predict the test data set to obtain a corresponding lesion prediction image; by calculating the intersection difference between the lesion prediction image and the annotated image, a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area are obtained respectively; the obtained pseudo-label image of the missed detection area and the pseudo-label image of the false detection area are added to the training set, and the first segmentation model is trained until convergence.
[0008] In some implementations, dividing the original training dataset into multiple datasets and performing iterative training in combination with the original test dataset to form multiple sets of training datasets and test datasets includes: dividing the original training dataset into a first training dataset and a second training dataset according to the number of people; using the original training dataset and the original test dataset as the first set of training datasets and test datasets; fusing the original test dataset and the first training dataset to obtain a new test dataset, and using the second training dataset as the corresponding test dataset to obtain a second set of training datasets and test datasets; fusing the original test dataset and the second training dataset to obtain a new test dataset, and using the first training dataset as the corresponding test dataset to obtain a third set of training datasets and test datasets.
[0009] In some implementations, the method of gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model includes: using the benign lesion segmentation training data in the currently grouped training data set to train the original medical image segmentation model until convergence; using all benign lesion segmentation training data and part of the malignant lesion segmentation training data to train the model, and gradually increasing the malignant lesion segmentation training data in multiple training stages until all are used; using all benign lesion segmentation training data and malignant lesion segmentation training data to train the model until convergence; performing data enhancement processing on all benign lesion segmentation training data and malignant lesion segmentation training data, and using the data after data enhancement processing to train the model until convergence, to obtain the first segmentation model.
[0010] In some implementations, the method of calculating the intersection difference between the lesion prediction image and the annotated image to obtain a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area respectively includes: for each lesion segmentation prediction image in the test set, calculating the intersection with the corresponding annotated image to obtain a common area; subtracting the common area from the annotated image to obtain a pseudo-label image of the missed detection area; and subtracting the common area from the predicted image to obtain a pseudo-label image of the false detection area.
[0011] In some implementations, the pseudo-label images of missed-detected areas and the pseudo-label images of false-detected areas are added to a training set, and the first segmentation model is trained until convergence, including: iteratively updating the pseudo-label images of missed-detected areas and the pseudo-label images of false-detected areas, and in each iteration, using the data in the training data set, and the updated pseudo-label images of missed-detected areas and the pseudo-label images of false-detected areas to retrain the first segmentation model until convergence; wherein, in each iteration, the performance of the model after each iteration is evaluated using independent test set data, if the accuracy of the model on the test set is improved compared with the previous iteration, the parameters of the current model are retained as the starting point for the next iteration; and the accuracy of the prediction results of the training data set is calculated using the model after each iteration, and the pseudo-label images of missed-detected areas and the pseudo-label images of false-detected areas are updated / not updated according to the calculated accuracy of the prediction results.
[0012] In some implementations, the accuracy of the prediction results of the training data set is calculated using the model after each iteration, and the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area are updated / not updated according to the accuracy of the calculated prediction results, including: if the accuracy of the fused prediction image is higher than the accuracy of the intermediate prediction image, and higher than the accuracy of the fused prediction image retained in the last update, the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area are updated; otherwise, they are not updated.
[0013] In some implementations, the step of calculating the confidence of the pseudo-label image of the missed detection area and the pseudo-label image of the misdetected area includes: calculating the pseudo-label efficiency, and calculating the pseudo-label confidence by fusing all average precipitates and pseudo-label efficiency.
[0014] In some implementations, the loss calculation of the training process includes: calculating the SoftMax cross entropy loss for the intermediate prediction features calculated by the model when training is not performed without adding the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area; calculating the SoftMax cross entropy loss for the intermediate prediction features calculated by the model when training is performed with the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area, and calculating the SoftMax cross entropy loss and consistency loss for the fused prediction features, and calculating the SoftMax cross entropy loss or L1 loss for the prediction features of the missed detection area and the prediction features of the false detection area.
[0015] In a second aspect, the present application provides a self-training learning system for medical image segmentation, which includes:
[0016] The data acquisition module is configured to obtain an original training dataset and an original test dataset; the original training dataset includes benign lesion segmentation training data and malignant lesion segmentation training data. The data preprocessing module is configured to divide the original training dataset into multiple datasets, and perform iterative training in combination with the original test dataset to form multiple training datasets and test datasets. The model training module is configured to execute a training process using each training dataset and test dataset formed by iterative training, the training process including: gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model; using the first segmentation model to predict the test dataset to obtain a corresponding lesion prediction image; by calculating the intersection difference between the lesion prediction image and the annotated image, obtaining a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area respectively; adding the obtained pseudo-label image of the missed detection area and the pseudo-label image of the false detection area to the training set, and training the first segmentation model until convergence.
[0017] In a third aspect, the present application provides an electronic device comprising a memory for storing one or more programs; a processor; and when the one or more programs are executed by the processor, the method as described in any one of the first aspects is implemented.
[0018] Compared with the prior art, this application has at least the following advantages or beneficial effects:
[0019] This application proposes a self-training learning method for medical image segmentation, which gradually increases the proportion of malignant lesion segmentation training data so that the model gradually strengthens the recognition of malignant lesion features during the training process, thereby effectively solving the problem of limited recognition ability caused by data imbalance. It can also prevent the propagation of label noise at different stages and eliminate the need for expensive repository-based label refinement. Furthermore, since this application gradually increases the proportion of malignant lesion data during the training process and uses pseudo-label images for targeted optimization, the model can gradually learn more refined and accurate lesion features during the training process.
[0020] Among them, this application also forms multiple sets of training data sets and test data sets through iterative training, and uses different data combinations for training, so that the model can be fully trained under different data distributions, thereby improving the generalization ability of the model.
[0021] In addition, this application generates pseudo-label images of missed and falsely detected areas by calculating the intersection difference between the lesion prediction image and the annotated image, and adds these pseudo-label images to the training set for targeted optimization. This strategy not only allows the model to focus on its own weaknesses, but also continuously optimizes the model during training by continuously iteratively updating the pseudo-label images, thereby improving segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is a flowchart of an embodiment of a self-training learning method for medical image segmentation according to the present application;
[0024] Figure 2 It is a self-training course learning framework in one embodiment of this application;
[0025] Figure 3 This is a schematic diagram of the feature fusion process in one embodiment of the present application;
[0026] Figure 4 This is a structural block diagram of an embodiment of a self-training learning system for medical image segmentation according to the present application;
[0027] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present application.
[0028] Icon: 201, processor; 202, memory; 203, communication interface. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0030] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features thereof may be combined with each other.
[0031] Example 1
[0032] At present, the segmentation of lesions such as breast tumors mainly relies on deep learning models, such as convolutional neural networks (CNNs). In order to improve the adaptability of the model on different datasets, the existing technology usually adopts the unsupervised domain adaptation (UDA) method, which focuses on adapting the model trained on the labeled source domain to the unlabeled target domain. Furthermore, the passive domain adaptation (SFDA) method is a more practical setting because it no longer requires access to the source data during adaptation. However, the inventors found that the latest SFDA (SOTA, State of the Art, refers to the model that performs best on a specific task or dataset) methods mainly focus on self-training based on pseudo-label refinement, which usually has two problems: 1) noisy pseudo-labels are inevitable, which may lead to early training time memory; 2) the refinement process requires maintaining a repository, which will cause a great burden when resources are limited.
[0033] To address these issues, this application proposes a self-training learning method for medical image segmentation. By iterative training, gradually increasing the proportion of malignant lesion segmentation training data, and utilizing a weakly supervised pseudo-label confidence optimization method and an optimized pseudo-label update scheme, the segmentation accuracy and generalization ability of the model can be effectively improved. Moreover, this scheme can promote learning from a limited number of pseudo-labels selected based on reliability. This simple and effective step successfully prevents the propagation of label noise at different stages and eliminates the need for expensive repository-based label refinement.
[0034] Specifically, see Figure 1 The self-training learning method for medical image segmentation includes the following steps: obtaining an original training data set and an original test data set; the original training data set includes benign lesion segmentation training data and malignant lesion segmentation training data. The original training data set is divided into multiple data sets, and iterative training is performed in combination with the original test data set to form multiple training data sets and test data sets. The training process is executed using each training data set and test data set formed by iterative training. The training process includes: gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model; using the first segmentation model to predict the test data set to obtain a corresponding lesion prediction image; by calculating the intersection difference between the lesion prediction image and the annotated image, a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area are obtained respectively; the obtained pseudo-label image of the missed detection area and the pseudo-label image of the false detection area are added to the training set, and the first segmentation model is trained until convergence.
[0035] In the above embodiment, the model's segmentation accuracy and generalization capability are improved by employing multiple strategies, including iterative training, gradually increasing the proportion of malignant data, and using pseudo-labeled images for targeted optimization. The process includes: first, obtaining an original training dataset containing benign lesion segmentation training data and malignant lesion segmentation training data, as well as an original test dataset for validating model performance. Next, the original training dataset is divided into multiple subsets. This is done to form multiple different training and test dataset combinations in subsequent iterative training, fully utilizing the data and improving the model's generalization capability. Then, an iterative training process is performed using these multiple training and test datasets. In each training phase, the proportion of malignant lesion segmentation training data is gradually increased. This strategy aims to gradually adapt the model and strengthen its ability to recognize malignant lesion features during training. Then, through multiple iterations of training phases, the initial medical image segmentation model is trained until convergence, resulting in a first segmentation model. Next, the first segmentation model is used to perform predictions on the test dataset to obtain the corresponding predicted lesion images. Next, by calculating the intersection difference between the predicted lesion image and the annotated image, the model can identify areas that were missed and areas that were falsely detected. Pseudo-labeled images for these areas are then generated, respectively. These pseudo-labeled images are then added to the training set for further model optimization. By retraining the model until convergence, the model's segmentation accuracy and generalization capabilities can be further improved.
[0036] In summary, this application gradually increases the proportion of malignant lesion segmentation training data, so that the model gradually strengthens the recognition of malignant lesion features during the training process, thereby effectively solving the problem of limited recognition ability caused by data imbalance. It can also prevent the propagation of label noise at different stages and eliminate the need for expensive repository-based label refinement. Furthermore, since this application gradually increases the proportion of malignant data during the training process and uses pseudo-label images for targeted optimization, the model can gradually learn more refined and accurate lesion features during the training process.
[0037] Among them, this application also forms multiple sets of training data sets and test data sets through iterative training, and uses different data combinations for training, so that the model can be fully trained under different data distributions, thereby improving the generalization ability of the model.
[0038] In addition, this application generates pseudo-label images of missed and falsely detected areas by calculating the intersection difference between the lesion prediction image and the annotated image, and adds these pseudo-label images to the training set for targeted optimization. This strategy not only allows the model to focus on its own weaknesses, but also continuously optimizes the model during training by continuously iteratively updating the pseudo-label images, thereby improving segmentation accuracy.
[0039] Based on the aforementioned scheme, in some implementations of the present application, the original training dataset is divided into multiple datasets, and iterative training is performed in combination with the original test dataset to form multiple groups of training datasets and test datasets, including: dividing the original training dataset into a first training dataset and a second training dataset according to the number of people; using the original training dataset and the original test dataset as the first group of training datasets and test datasets; fusing the original test dataset and the first training dataset to obtain a new test dataset, and using the second training dataset as the corresponding test dataset to obtain a second group of training datasets and test datasets; fusing the original test dataset and the second training dataset to obtain a new test dataset, and using the first training dataset as the corresponding test dataset to obtain a third group of training datasets and test datasets.
[0040] In the above implementation, the process of evenly dividing the original training dataset into multiple datasets and then performing iterative training on the original test dataset to form multiple training and test datasets has been defined and optimized in greater detail. The original training dataset is first divided equally into two subsets based on the number of participants: the first training dataset and the second training dataset. This equal division ensures consistency in data volume and distribution between the two subsets, providing a foundation for subsequent iterative training.
[0041] Then, based on the two equally divided training datasets, combined with the original test dataset, iterative training can be performed to form more sets of training datasets and test datasets. Among them, the first set of training datasets and test datasets directly uses the original training dataset as training data and the original test dataset as test data to form the first set of training datasets and test datasets.
[0042] In constructing the second training and test datasets, the original test dataset and the first training dataset are fused together, and the second training dataset is used as the corresponding test dataset (this is actually a simplification; more accurately, the second training dataset is used as the training set for the next round of training, and the fused dataset is used as the new test set). This fusion and redistribution strategy aims to evaluate and improve the model's generalization ability by introducing more diverse data.
[0043] In constructing the third set of training and test datasets, the original test dataset and the second training dataset were combined to create a new test dataset. The first training dataset was also used as the training set for this iteration. This step further strengthened the model's adaptability to diverse data and helped identify potential weaknesses in the model's processing of different data combinations.
[0044] Based on the aforementioned scheme, in some implementations of the present application, the proportion of malignant lesion segmentation training data is gradually increased through multiple training stages, and the initial medical image segmentation model is trained until convergence to obtain a first segmentation model, including: using the benign lesion segmentation training data in the currently grouped training data set to train the original medical image segmentation model until convergence; using all benign lesion segmentation training data and part of the malignant lesion segmentation training data to train the model, and the malignant lesion segmentation training data is gradually increased in multiple training stages until all are used; using all benign lesion segmentation training data and malignant lesion segmentation training data to train the model until convergence; performing data enhancement processing on all benign lesion segmentation training data and malignant lesion segmentation training data, and using the data after data enhancement processing to train the model until convergence, to obtain the first segmentation model.
[0045] In the above implementation, during the initial training phase, only the benign lesion segmentation training data from the currently grouped training dataset is used to train the original medical image segmentation model. The main purpose of this phase is to allow the model to first learn the characteristics of benign lesions, laying the foundation for the subsequent introduction of malignant lesion data.
[0046] Next, the proportion of malignant lesion segmentation training data is gradually increased for model training. Specifically, we begin with all benign data, then gradually introduce a portion of malignant data. Over multiple training stages, the proportion of malignant data is gradually increased until all data is used. This gradual introduction helps the model gradually adapt to the characteristics of malignant data and reduces model fluctuations and instabilities during training.
[0047] When the proportion of malignant data increases to a certain level (for example, reaching a certain preset ratio or using all data), comprehensive training begins using all benign and malignant lesion segmentation training data. The main purpose of this stage is to allow the model to learn the characteristics of both benign and malignant lesions, thereby improving the model's segmentation accuracy and generalization ability.
[0048] Finally, based on comprehensive training, data augmentation is performed on all benign and malignant lesion segmentation training data to increase data diversity and richness. Data augmentation techniques can include rotation, scaling, translation, flipping, and color transformation. The model is then trained to convergence using the augmented data to obtain the first segmentation model. The main goal of this stage is to further improve the segmentation performance and robustness of the model by increasing data diversity and richness.
[0049] In summary, the above implementation method not only improves the segmentation accuracy and generalization ability of the model by gradually increasing the proportion of malignant lesion segmentation training data, comprehensive training and data augmentation processing strategies, but also reduces the oscillation during the model training process and improves the robustness of the model, providing more comprehensive and effective support for self-training learning and optimization of medical image segmentation.
[0050] Based on the aforementioned scheme, in some implementations of the present application, the method of calculating the intersection difference between the lesion prediction image and the annotated image to obtain the pseudo-label image of the missed detection area and the pseudo-label image of the false detection area respectively includes: for each lesion segmentation prediction image in the test set, calculating the intersection with the corresponding annotated image to obtain the common area; subtracting the common area from the annotated image to obtain the pseudo-label image of the missed detection area; and subtracting the common area from the predicted image to obtain the pseudo-label image of the false detection area.
[0051] In the above implementation, for each lesion segmentation prediction image in the test set, an intersection calculation is performed with the corresponding annotated image. The intersection area represents the part that is considered to be a lesion in both the predicted image and the annotated image. After obtaining the intersection area, the intersection area is subtracted from the annotated image, and the result is a pseudo-label image of the missed detection area. The missed detection area represents the part that is considered to be a lesion in the annotated image but is not detected in the predicted image. These areas reflect the shortcomings of the model in detecting lesions and areas that need improvement. Similarly, after obtaining the intersection area, the intersection area is subtracted from the predicted image, and the result is a pseudo-label image of the false detection area. The false detection area represents the part that is considered to be a lesion in the predicted image but is not in the annotated image. These areas reflect the misjudgment and noise that may be generated by the model when detecting lesions.
[0052] The generation of pseudo-labeled images for missed and falsely detected areas enables targeted model optimization. By incorporating these pseudo-labeled images into the training set, the model can learn more features and details, thereby improving segmentation performance and accuracy. Furthermore, by visualizing pseudo-labeled images for missed and falsely detected areas, one can intuitively understand the model's performance and shortcomings in detecting lesions, thereby improving the model's interpretability and credibility. This not only provides a clear direction and goal for model optimization, but also improves model performance, promotes continuous improvement, and enhances model interpretability.
[0053] Based on the aforementioned scheme, in some implementation methods of the present application, the pseudo-label images of the missed-detected area and the pseudo-label images of the false-detected area are added to the training set, and the first segmentation model is trained until convergence, including: iteratively updating the pseudo-label images of the missed-detected area and the pseudo-label images of the false-detected area, and in each iteration, using the data in the training data set, and the updated pseudo-label images of the missed-detected area and the pseudo-label images of the false-detected area to retrain the first segmentation model until convergence; wherein, in each iteration, including using independent test set data to evaluate the performance of the model after each iteration, if the accuracy of the model on the test set is improved compared with the previous iteration, the parameters of the current model are retained as the starting point for the next iteration; and using the model after each iteration to calculate the accuracy of the prediction results of the training data set, and updating / not updating the pseudo-label images of the missed-detected area and the pseudo-label images of the false-detected area according to the calculated accuracy of the prediction results.
[0054] In the above implementation, the pseudo-label images for missed and falsely detected areas are first iteratively updated. This means that in each iteration, these pseudo-label images are adjusted and updated based on the current model's performance to better guide model training. In each iteration, the first segmentation model is retrained using data from the training dataset and the updated pseudo-label images for missed and falsely detected areas until the model converges. This step enables the model to gradually learn more features and details, thereby improving segmentation performance. Furthermore, after each iteration, the model's performance is evaluated using independent test data to ensure that the model generalizes well to unseen data. If the model's accuracy on the test set improves compared to the previous iteration, the current model parameters are retained as the starting point for the next iteration. Furthermore, the model after each iteration is used to calculate the accuracy of the prediction results for the training dataset. This accuracy metric reflects the model's performance on the current training data. Based on the calculated prediction accuracy, a decision is made as to whether to update the pseudo-label images for missed and falsely detected areas. If the accuracy of the model improves, it means that the current pseudo-label images have already guided the training of the model well, so updating may not be necessary; if the accuracy of the model does not improve or the improvement is not obvious, then it is necessary to update the pseudo-label images to introduce more useful information to further guide the training of the model.
[0055] In summary, the above implementation method not only continuously optimizes the performance of the model by iteratively updating pseudo-label images and retraining the model, but also improves the generalization ability of the model, and adopts an adaptive pseudo-label update strategy to reduce unnecessary computational overhead.
[0056] Based on the aforementioned scheme, in some implementations of the present application, the accuracy of the prediction results of the training data set is calculated using the model after each iteration, and the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area are updated / not updated according to the accuracy of the calculated prediction results, including: if the accuracy of the fused prediction image is higher than the accuracy of the intermediate prediction image, and higher than the accuracy of the fused prediction image retained in the last update, the pseudo-label images of the missed detection area and the pseudo-label images of the false detection area are updated; otherwise, they are not updated.
[0057] In the above implementation, by deciding whether to update the pseudo-label image based on the prediction accuracy, it not only avoids unnecessary updates but also ensures the quality of the pseudo-labels, promotes the continuous improvement of the model, and improves the training efficiency.
[0058] Based on the aforementioned scheme, in some implementations of the present application, the confidence calculation steps of the pseudo-label images of the missed detection area and the pseudo-label images of the misdetected area include: calculating the pseudo-label efficiency, and calculating the pseudo-label confidence by fusing all the average precisions and pseudo-label efficiency.
[0059] It should be noted that the pseudo-label efficiency refers to the ratio of the correctly labeled area in the pseudo-label image to the entire pseudo-label image. In order to calculate this ratio, the pseudo-label image (pseudo-label image of missed area and pseudo-label image of misdetected area) can be compared with the real labeled image, and the number of correctly labeled pixels can be counted, and then divided by the total number of pixels in the pseudo-label image. Among them, the correctly labeled area may include completely correct annotations (i.e., areas that are completely consistent with the real annotations) and partially correct annotations (i.e., areas that partially overlap with the real annotations). When calculating the pseudo-label efficiency, you can choose whether to count the partially correct annotations into the valid area according to actual needs.
[0060] Each pixel can be considered a sample, and the model's prediction accuracy for each pixel can be calculated. The average accuracy of all pixels can then be calculated. For pseudo-labeled images of missed and falsely detected regions, the average accuracy can be calculated separately. This involves comparing the pseudo-labeled images of missed and falsely detected regions with the true annotated image, statistically determining whether the prediction for each pixel is correct, and calculating the average accuracy based on this information.
[0061] After obtaining the pseudo-label effectiveness and average precision, they can be combined to calculate the pseudo-label confidence. Specifically, the pseudo-label effectiveness can be multiplied by the average precision (or a weighted average of them) to obtain a comprehensive evaluation metric, namely the pseudo-label confidence. The higher the confidence of the pseudo-label images in the missed detection area and the false detection area, the higher the reliability and accuracy of the pseudo-label images in the missed detection area and the false detection area. This helps to more rationally utilize the pseudo-label images in the subsequent model training and optimization processes.
[0062] Based on the foregoing scheme, in some implementations of the present application, the loss calculation of the training process includes: when training is not performed without adding pseudo-label images of missed detection areas and pseudo-label images of false detection areas, the SoftMax cross entropy loss is calculated for the intermediate prediction features calculated by the model; when training is performed with pseudo-label images of missed detection areas and pseudo-label images of false detection areas, the SoftMax cross entropy loss is calculated for the intermediate prediction features calculated by the model, and the SoftMax cross entropy loss and consistency loss are calculated for the fused prediction features, and the SoftMax cross entropy loss or L1 loss (i.e., absolute error loss) is calculated for the prediction features of the missed detection areas and the prediction features of the false detection areas.
[0063] In the above implementation, considering that in the early stages of training, before pseudo-labeled images of missed and falsely detected regions are added, the primary focus is on the model's basic ability to segment benign and malignant lesions. At this point, the SoftMax cross-entropy loss is calculated on the intermediate predicted features calculated by the model. SoftMax cross-entropy loss is a commonly used loss function in classification tasks that measures the difference between the probability distribution of the model's predictions and the probability distribution of the true labels.
[0064] When pseudo-label images of missed detection areas and pseudo-label images of false detection areas are added for training, the above implementation method introduces more supervisory information to guide the training of the model. As when pseudo-label images are not added, the SoftMax cross entropy loss is still calculated for the intermediate prediction features of the model to keep the model's focus on the basic segmentation task. At the same time, the SoftMax cross entropy loss is calculated for these fused prediction features to evaluate the segmentation performance of the model after the fusion of information. And the consistency loss is calculated to encourage the model to produce consistent prediction results under different inputs. For the prediction features of missed detection areas and the prediction features of false detection areas, the SoftMax cross entropy loss or L1 loss is calculated respectively. The SoftMax cross entropy loss is used to evaluate the classification performance of the model on these areas, while the L1 loss (ie, absolute error loss) is used to measure the absolute difference between the model prediction results and the true annotations.
[0065] In summary, in the above implementation, by introducing multiple loss functions to comprehensively evaluate and optimize the model's performance, the model can excel in multiple aspects (such as basic segmentation capabilities, fusion information processing capabilities, and the ability to identify missed and falsely detected areas). This helps improve the overall performance and accuracy of the model.
[0066] In order to make the present application more intuitive for those skilled in the art, a specific example will be used to illustrate it. It should be noted that the embodiments of the present application can be applied to the training of various medical image segmentation models. For the convenience of description and understanding, the subsequent examples are described using the segmentation of breast tumor lesions as an example, but those skilled in the art can extend it to the training of other medical image segmentation models, and the specific examples are not limited here.
[0067] First, define the breast tumor segmentation training set (i.e., the original training data set) as where N s represents the number of breast ultrasound images in the training set, x i and q i Denote the i-th breast ultrasound image and the corresponding breast tumor segmentation annotation image (Ground-Truth). Define q i The size of is H×W, where H and W represent the length and width of the labeled image respectively. Then, the breast tumor segmentation training set is further split into benign breast tumor segmentation training data set and malignant breast tumor segmentation training data set (i.e. benign lesion segmentation training data and malignant lesion segmentation training data), which are respectively denoted as and D s1 represents the benign breast tumor segmentation training dataset, D s2 represents the malignant breast tumor segmentation training dataset, N s1 and N s2 Represents the number of breast ultrasound images in the benign breast tumor segmentation training dataset and the malignant breast tumor segmentation training dataset respectively. Similarly, define is the breast tumor segmentation test set (i.e., the original test data set), N l Denotes the number of breast ultrasound images in the training set. Define f θ :x i →q i , to optimize the model's accuracy by training a breast tumor segmentation network.
[0068] Self-training course learning plan:
[0069] Considering that self-training with a whole batch of pseudo labels will eventually produce noisy labels, affecting the effectiveness of the model. To alleviate this situation, this example proposes a self-training curriculum learning framework for breast tumor segmentation, which encourages learning effective information from high-confidence pseudo labels. Figure 2 As shown in the figure, the proposed self-training curriculum learning framework includes curriculum learning, feature fusion, pseudo label generation, pseudo label update, pseudo label confidence calculation and loss calculation.
[0070] In order to better identify different forms of breast tumors, a curriculum learning scheme is first introduced at the data training level and pseudo-label optimization level. At the same time, in order to prevent the generated pseudo-labels from overfitting, the breast tumor segmentation training set is and breast tumor segmentation test set Expand into three sets of training sets and test sets for iterative training.
[0071] First, the breast tumor segmentation training set Divide the data into two sets according to the number of people, denoted as and Then, fusion and data to form a new training set Fusion and data to form a new training set Thus, three sets of training sets and test sets are formed, namely the first set of training sets The first test set The second training set The second test set The third training set The third test set
[0072] First, at the data training level, consider training the initial breast tumor segmentation model as a breast tumor teacher segmentation network through a course learning program, which is implemented in four steps. Taking the first set of data as an example, define Represents the model learned by the first set of breast tumor segmentation data at the tth update Representation Model Model parameters updated for the tth time:
[0073] The first step is to use the benign breast tumor segmentation training dataset D s1 As training data, use Swin-Unet as the backbone network and model Train until convergence.
[0074] The second step considers the data D of benign tumors s1 and malignant tumor data D s2 Fusion, using benign tumor data D s1 and partial data of malignant tumors (D s2In the selection of malignant tumor data, the course learning scheme is considered and the malignant tumor data is gradually increased in multiple training stages. s2 Randomly select 10% of the data and the benign tumor data D s1 The training set is constructed by fusion. Subsequently, in each epoch of training, the proportion of malignant breast tumor data and all benign breast tumor data randomly extracted from the malignant breast tumor database is increased by 1% compared with the previous epoch to form the training set until the proportion of malignant breast tumors is increased to 100%, and the model is gradually trained.
[0075] The third step uses all the benign tumor data D in the training set s1 and malignant tumor data D s2 For training, we use the breast tumor segmentation training set D s Breast tumor segmentation model Train until convergence.
[0076] The fourth step is to train the breast tumor database using data enhancement methods, including rotation transformation, flip transformation, scaling transformation, scale transformation, noise perturbation and color change. The initial number of samples is expanded to N s Twice, every 10 epochs, increase by 2N s The number of samples until the number of data augmentation samples in each epoch reaches 12N s Finally, we use 12 times the number of data augmentation images to model Continue training until the model converges. During each epoch of training, the data augmentation parameters are randomly adjusted, meaning that the data augmentation samples are different in each iterative training.
[0077] Waiting for model After convergence, the breast tumor segmentation test set D l As input, the image Compute lesion prediction image set And save it to the database, and calculate the corresponding Dice precision set and retain, where r i =Dice(p i ,q i ).
[0078] Similarly, the second group of breast tumor segmentation training set D lu And the third group of breast tumor segmentation training set D lv Perform training to obtain the model trained with the second set of data And the model trained with the second set of data Then use the model and model The second group of breast tumor segmentation test set D v And the third group of breast tumor segmentation test set D u The images were tested to obtain the second set of test set lesion prediction sets. and the third set of test set lesion prediction sets Finally, P u and P v The corresponding Dice accuracy is calculated based on the lesion image, which is recorded as and
[0079] Pseudo label calculation:
[0080] Then use P l 、P u and P v Calculate the set of pseudo-label images of missed detection areas and false detection areas of the three test sets and
[0081] For P l 、P u and P v Each breast tumor segmentation prediction image p i , and compare it with the corresponding annotation image q i Calculate the intersection and get their common area C i Then, use q i Minus C i , you can get the pseudo-label image of the missed area Similarly, make p i Minus C i , you can get the false detection area pseudo label image Thus, we can get P l 、P u and P v The corresponding set Q of pseudo-label images of missed detection areas and pseudo-label images of misdetected areas l , Q u and Q v .
[0082] Because D l 、D u and D v The corresponding breast ultrasound images cover all the data of the training set and the test set, so P l 、P u and P v Calculated Q l , Q uand Q v It can also cover three sets of training sets. So, and Treated as pseudo-label images of missed detection areas and pseudo-label images of misdetected areas, added to the training set D s 、D lu and D lv In the , three new training sets are formed, respectively denoted as and Then use and The training data is 12 times enhanced, and the model is further Model and model Continue training until the model converges.
[0083] Self-training learning:
[0084] Finally, by incorporating a self-training learning scheme, the pseudo-label images of missed and falsely detected areas are continuously optimized iteratively, thereby improving the performance of the breast tumor segmentation network. The self-training learning process mainly includes feature fusion, pseudo-label update, pseudo-label confidence calculation, and loss calculation. The following are the main steps:
[0085] Feature fusion:
[0086] like Figure 3 As shown, the lesion area prediction feature F in the network p , missed detection area prediction feature F m And the predicted features of the misdetected region F f As input, it is input to the feature fusion module. First, F p 、F m and F f The three feature layers are cascaded to obtain feature F c . Then feature F c It is followed by three fully connected layers, the output channels of which are 4096, 512 and 3 respectively, which are used to output 4096-dimensional, 512-dimensional and 3-dimensional features. At the same time, the first two fully connected layers are followed by Leak ReLu layers to enhance the nonlinear ability of the network. Then, after the 3-dimensional features, a Softmax layer is added to normalize the interval of the feature values to between 0 and 1, obtaining a 3-dimensional weight array [ω1, ω2, ω3]. Finally, F p 、F m and F f Perform weighted processing to obtain fusion prediction features The formula is as follows:
[0087]
[0088] That is, the weighted lesion region features are added to the weighted missed detection region features and then subtracted from the weighted false detection region features to obtain the missed detection region prediction features.
[0089] Pseudo label update:
[0090] Through self-training training method to pseudo-label images of missed areas and false positive region pseudo-label image Carry out continuous iterative updates.
[0091] The specific steps to calculate and update pseudo labels are as follows:
[0092] Take the first set of training data As input, after the model converges, the model after each epoch is used For the test set D l If the test set D l Model on Compared If the overall accuracy of Model On the test set D l An iterative update is considered an improvement in accuracy.
[0093] If you save the updated new model Then, we use the new model To pseudo-label Update. and Respectively represent by x i The lesion area prediction features and fusion prediction features are calculated. and Perform Argmax operation, which means passing x i The calculated intermediate prediction image p ti and fusion prediction image Then calculate p ti and The accuracy r ti and Denoted as r ti =Dice(p ti ,q i )and And use r ti and Remaining from the previous model Pseudo-labeled images of missed areas for breast tumor segmentation tasks and false positive region pseudo-label image to update.
[0094] make and Respectively represent the image through x i The prediction features of missed detection area and false detection area are calculated. and Perform Argmax operation to obtain the predicted image of missed detection area of breast tumor segmentation with category values 0 and 1 And the predicted image of the false detection area Then calculate separately and With q i The intersection of and q i Public area C i1 as well as and q i Public area c i2 Then, let Represents the input image x i Through the model Calculate the pseudo label of the missed area make Indicates that x i Calculate the pseudo label of the misdetected area
[0095] Assuming the fusion prediction image Accuracy Higher than the intermediate prediction image p ti The accuracy r ti , then it is determined that the prediction features of the missed detection area are generated and false positive region prediction features is effective. At the same time, if the fusion prediction image Accuracy Higher than the accuracy of the fusion prediction image retained in the database at the last update When , the pseudo-label image of the missed area is considered and false positive region pseudo-label image to update.
[0096] The tth updated and It can be defined as:
[0097]
[0098] That is, for the input image x i In terms of, if the fusion prediction image is satisfied at the same time Accuracy Higher than p ti The accuracy r tiThe accuracy of the fusion prediction results retained in the database at the last update When , the pseudo-label image of the missed area and false positive region pseudo-label image to update.
[0099] At the same time, update and After that, the tth retention To update, define it as:
[0100]
[0101] That is, if x i Pseudo-label image of the missed area and false positive region pseudo-label image When updating, the Dice accuracy of the updated fusion prediction features is also retained accordingly. Otherwise, the Dice accuracy stored in the database during the last update is retained. When performing the first self-training update, let Use retention before self-training learning r in i To calculate the Dice accuracy update.
[0102] Through the above operations, we can get the first set of training set data Model after iterative update The first test set D l In the model The set of pseudo-label images of missed detection areas and false detection areas calculated after the tth iteration update and D l In the model The Dice precision set calculated after the t-th iteration update
[0103] Similarly, using the second set of training data The iteratively updated model can be calculated The second test set D v On the model The set of pseudo-label images of missed detection areas and false detection areas calculated after the t-th iteration update and D v In the model The Dice precision set calculated after the t-th iteration update Using the third set of training data The iteratively updated model can be calculated The third test set D u On the model The set of pseudo-label images of missed detection areas and false detection areas calculated after the t-th iteration update and D u In the model The Dice precision set calculated after the t-th iteration update
[0104] The process is the same as the pseudo-label calculation process, because D l 、D u and D v The corresponding breast ultrasound images cover all the data of the training set and the test set, so the updated Q l , Q u and Q v It can also cover three training sets.
[0105] Fusion Q u and Q v , you can get The corresponding set of pseudo-label images of missed detection areas and pseudo-label images of misdetected areas is denoted as Fusion Q l and Q u , that is, The corresponding set of pseudo-label images of missed detection areas and pseudo-label images of misdetected areas is denoted as Fusion Q l and Q v , that is, The corresponding set of pseudo-label images of missed detection areas and pseudo-label images of misdetected areas is denoted as Then it will and The pseudo-label images of the missed detection areas and the pseudo-label images of the misdetected areas are replaced by Q s , Q lu and Q lv The data of the training set after the model is updated for the tth time can be obtained. and
[0106] Pseudo label confidence calculation:
[0107] Because the pseudo-label images for missed and falsely detected areas of the breast tumor segmentation task are generated, there is no corresponding supervised information to calculate the accuracy. However, the pseudo-labels for the breast tumor segmentation task are used to assist in the estimation of the breast tumor segmentation task. To this end, the label information of the breast tumor segmentation task is used to calculate the confidence of the pseudo-label images for missed and falsely detected areas.
[0108] Let x il Represents x iFor the image after data enhancement, the pseudo-label efficiency is first calculated, which is defined as:
[0109]
[0110] Where L = 12, which represents the number of data enhancements. Let p til and Indicates that x il The calculated intermediate prediction image and fused prediction image are and r til Respectively represent p til and Dice accuracy. ρ is a discriminant, when When , ρ=1, otherwise ρ=0.
[0111] Then, by combining all The average precision and pseudo label efficiency are used to calculate the pseudo label confidence, which is defined as:
[0112]
[0113] Then calculate the average confidence of the pseudo-label after the t-th model update, which is defined as:
[0114]
[0115] Where N represents the number of training samples, and the values of N in the three training sets are equal to N s 、N lu and N lv .
[0116] Finally, for x i The pseudo label confidence of when When , it is considered that the tth updated and The confidence level is high; when When , it is considered that the tth updated and The confidence level is low.
[0117] Loss calculation:
[0118] The proposed self-training curriculum learning framework uses different losses during training and is implemented in two stages.
[0119] First, when the pseudo-label images of missed detection areas and false detection areas are not added for training, the SoftMax cross entropy loss is calculated for the intermediate prediction features.
[0120] Second, when adding pseudo-label images of missed detection areas and pseudo-label images of false detection areas for training, in addition to calculating the SoftMax cross entropy loss for the intermediate prediction features, the SoftMax cross entropy loss and consistency loss are also calculated for the fused prediction features. At the same time, the SoftMax cross entropy loss or L1 loss is calculated for the prediction features of missed detection areas and false detection areas.
[0121] First, when training without adding pseudo-label images of missed detection areas and pseudo-label images of misdetected areas, directly use To calculate the SoftMax cross entropy loss function, it is defined as:
[0122]
[0123] in, It is q i The result of one-hot encoding is: Yes Calculate the result of the SoftMax operation, where B represents the number of samples in the same Batch.
[0124] After adding the pseudo-label images of the missed detection area and the pseudo-label images of the misdetected area for model training, continue to fusion prediction features Calculate the cross entropy loss, defined as:
[0125]
[0126] in, Express Calculate the result of the SoftMax operation.
[0127] Considering the fusion prediction image There may be discontinuities in the prediction within a region, so consistency loss is used to optimize the model training. and q i Multiplying by a 3×3 convolution [[0, -1, 0], [-1, 4, -1], [0, -1, 0]] respectively, and then calculating the L2 distance loss, we can get the consistency loss, which is defined as:
[0128]
[0129] in, Represents the convolution operation.
[0130] Next, consider calculating the loss of the pseudo-label images of the missed detection area and the false detection area. When the confidence of the pseudo-label images of the missed detection area and the false detection area is high, the SoftMax cross entropy loss function is used for optimization. When the confidence of the pseudo-label images of the missed detection area and the false detection area is low, the L1 distance loss is used for optimization, which is defined as:
[0131]
[0132] in, and are respectively and The result of one-hot encoding. and are respectively and Calculate the result of the SoftMax operation.
[0133] Finally, when calculating the total loss, the consistency loss of the fused prediction features and the pseudo-label loss are considered as auxiliary losses. The total loss updated using the t-th pseudo-label is defined as:
[0134]
[0135] Exemplarily, the weight values of γ and μ may be set to 0.3.
[0136] Example 2
[0137] See also Figure 4 , an embodiment of the present application provides a self-training learning system for medical image segmentation, which includes:
[0138] The data acquisition module is configured to obtain an original training dataset and an original test dataset; the original training dataset includes benign lesion segmentation training data and malignant lesion segmentation training data. The data preprocessing module is configured to divide the original training dataset into multiple datasets, and perform iterative training in combination with the original test dataset to form multiple training datasets and test datasets. The model training module is configured to execute a training process using each training dataset and test dataset formed by iterative training, the training process including: gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model; using the first segmentation model to predict the test dataset to obtain a corresponding lesion prediction image; by calculating the intersection difference between the lesion prediction image and the annotated image, obtaining a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area respectively; adding the obtained pseudo-label image of the missed detection area and the pseudo-label image of the false detection area to the training set, and training the first segmentation model until convergence.
[0139] The specific implementation process of the above system can be referred to the self-training learning method for medical image segmentation provided in Example 1, which will not be described in detail here.
[0140] Example 3
[0141] See also Figure 5 , an embodiment of the present application provides an electronic device, which includes at least one processor 201 and at least one memory 202; wherein the processor 201 and the memory 202 are directly connected to each other, or communicate with each other through a communication interface 203, or are electrically connected through one or more communication buses or signal lines to achieve data transmission or interaction; the memory 202 stores program instructions that can be executed by the processor 201, and the processor 201 calls the program instructions to execute a self-training learning method for medical image segmentation. For example, it implements:
[0142] Obtain an original training dataset and an original test dataset; the original training dataset includes benign lesion segmentation training data and malignant lesion segmentation training data. Divide the original training dataset into multiple datasets, and perform iterative training in combination with the original test dataset to form multiple training datasets and test datasets. Utilize each training dataset and test dataset formed by iterative training to execute a training process, the training process comprising: gradually increasing the proportion of malignant lesion segmentation training data through multiple training stages, training the initial medical image segmentation model until convergence, and obtaining a first segmentation model; using the first segmentation model to predict the test dataset to obtain a corresponding lesion prediction image; calculating the intersection difference between the lesion prediction image and the annotated image to obtain a pseudo-label image of the missed detection area and a pseudo-label image of the false detection area; adding the obtained pseudo-label image of the missed detection area and the pseudo-label image of the false detection area to the training set, and training the first segmentation model until convergence.
[0143] Among them, the memory 202 can be, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0144] The processor 201 can be an integrated circuit chip with signal processing capabilities. The processor 201 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0145] I understand. Figure 5 The structure shown is only for illustration, and the electronic device may also include Figure 5 More or fewer components than shown, or with Figure 5 Different configurations shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0146] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above and that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the present application is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A self-training learning method for medical image segmentation, characterized in that: The following steps are involved: Get the original training data set and the original test data set; define the original training data set as where N s represents the number of images in the training set, x i and q i Represents the i-th image and the corresponding labeled image respectively; define q i The size of is H×W, where H and W represent the length and width of the labeled image respectively; definition is the original test data set, N l Represents the number of images in the test set; the original training data set includes benign lesion segmentation training data and malignant lesion segmentation training data; respectively denoted as and D s1 represents the benign lesion segmentation training data, D s2 represents the malignant lesion segmentation training data; N s1 and N s2 Represents the number of images in the benign segmentation training dataset and the malignant segmentation training dataset respectively; The original training dataset is divided into multiple datasets, and iterative training is performed on the original test dataset to form multiple sets of training datasets and test datasets; Including first Divide the data into two sets according to the number of people, denoted as and Then, fusion and data to form a new training set Fusion and data to form a new training set Thus, three sets of training sets and test sets are formed, namely the first set of training sets The first test set The second training set The second test set The third training set The third test set The training data sets and test data sets formed by iterative training are used to execute a training process, the training process including: Through multiple training stages, the proportion of malignant lesion segmentation training data is gradually increased, and the initial medical image segmentation model is trained until convergence. Utilizing the Model Predict the test data set and obtain the corresponding lesion prediction image At the same time, calculate the corresponding Dice precision set and retain, where r i =Dice(p i ,q i ); The second set of training sets D lu And the third training set D lv Perform training to obtain the model trained with the second set of data And the model trained with the second set of data Then use the model and model For the second test set D v And the third test set D u The images were tested to obtain the second set of test set lesion prediction sets. and the third set of test set lesion prediction sets Finally, P u and P v The corresponding Dice accuracy is calculated based on the lesion image, which is recorded as and By calculating the intersection difference between the lesion prediction image and the annotated image, the pseudo-label image of the missed detection area and the pseudo-label image of the misdetected area are obtained respectively; including using P l 、P u and P v Calculate the set of pseudo-label images of missed detection areas and false detection areas of the three test sets and For P l 、P u and P v Each predicted image p on i , and compare it with the corresponding annotation image q i Calculate the intersection and get their common area c i ; Then, use q i Subtract c i , you can get the pseudo-label image of the missed area Similarly, make p i Subtract c i , you can get the false detection area pseudo label image The pseudo-label images of missed detection areas and false detection areas are added to the training set to train the model. Model and model Until convergence; including and Treated as pseudo-label images of missed detection areas and pseudo-label images of misdetected areas, added to the training set D s 、D lu and D lv In the , three new training sets are formed, respectively denoted as and Then use and The training data is enhanced and the model is continued Model and model Continue training until the model converges.
2. The method according to claim 1, characterized in that The ratio of malignant lesion segmentation training data is gradually increased through multiple training stages, and the initial medical image segmentation model is trained until convergence. include: The original medical image segmentation model is trained until convergence using the benign lesion segmentation training data in the current grouped training data set; The model is trained using all benign lesion segmentation training data and part of the malignant lesion segmentation training data. The malignant lesion segmentation training data is gradually increased in multiple training stages until all of it is used. Use all benign lesion segmentation training data and malignant lesion segmentation training data to train the model until convergence; Data enhancement processing is performed on all benign lesion segmentation training data and malignant lesion segmentation training data, and the model is trained to convergence using the data after data enhancement processing to obtain the model 3. The method according to claim 1, characterized in that The method of calculating the intersection difference between the lesion prediction image and the annotated image to obtain a pseudo-label image of the missed detection area and a pseudo-label image of the misdetected area includes: For each lesion segmentation prediction image in the test set, calculate the intersection with the corresponding annotated image to obtain the common area; Subtract the common area from the labeled image to obtain a pseudo-label image of the missed area; and The common area is subtracted from the predicted image to obtain the pseudo-label image of the misdetected area.
4. The method according to claim 1, wherein The obtained pseudo-label images of missed detection areas and false detection areas are added to the training set to train the model. Model and model Until convergence, including: In each iteration, the performance of the model after each iteration is evaluated using independent test set data. If the accuracy of the model on the test set improves compared to the previous iteration, the parameters of the current model are retained as the starting point for the next iteration; and The model after each iteration is used to calculate the accuracy of the prediction results of the test data set, and the pseudo-label images of the missed detection area and the pseudo-label images of the misdetected area are updated or not according to the accuracy of the calculated prediction results.
5. The method according to claim 4, characterized in that The method of calculating the accuracy of the prediction results of the training data set using the model after each iteration, and updating or not updating the pseudo-label images of the missed detection area and the pseudo-label images of the misdetected area according to the accuracy of the calculated prediction results, includes: If the accuracy of the fused prediction image is higher than the accuracy of the intermediate prediction image and higher than the accuracy of the fused prediction image retained during the last update, the pseudo-label images of the missed detection area and the pseudo-label images of the misdetected area are updated; otherwise, they are not updated.
6. The method according to claim 1, characterized in that The confidence calculation steps of the pseudo-label image of the missed detection area and the pseudo-label image of the false detection area include: calculating the pseudo-label efficiency, and calculating the pseudo-label confidence by fusing all the average precisions and pseudo-label efficiency.
7. The method according to claim 1, characterized in that The loss calculation of the training process includes: When training without adding pseudo-label images of missed detection areas and false detection areas, the SoftMax cross entropy loss is calculated for the intermediate prediction features calculated by the model; When adding pseudo-label images of missed detection areas and pseudo-label images of false detection areas for training, the SoftMax cross entropy loss is calculated for the intermediate prediction features calculated by the model, and the SoftMax cross entropy loss and consistency loss are calculated for the fused prediction features, as well as the SoftMax cross entropy loss or L1 loss is calculated for the prediction features of missed detection areas and false detection areas.
8. A self-training learning system for medical image segmentation, characterized in that: include: The data acquisition module is configured to: acquire an original training data set and an original test data set; Define the original training dataset as where N s represents the number of images in the training set, x i and q i Represents the i-th image and the corresponding labeled image respectively; define q i The size of is H×W, where H and W represent the length and width of the labeled image respectively; definition is the original test data set, N l Represents the number of images in the test set; the original training data set includes benign lesion segmentation training data and malignant lesion segmentation training data; respectively denoted as and D s1 represents the benign lesion segmentation training data, D s2 represents the malignant lesion segmentation training data; N s1 and N s2 Represents the number of images in the benign segmentation training dataset and the malignant segmentation training dataset respectively; The data preprocessing module is configured to: divide the original training data set into multiple data sets, and perform iterative training on the original test data set to form multiple training data sets and test data sets; Including first Divide the data into two sets according to the number of people, denoted as and Then, fusion and data to form a new training set Fusion and data to form a new training set Thus, three sets of training sets and test sets are formed, namely the first set of training sets The first test set The second training set The second test set The third training set The third test set The model training module is configured to execute a training process using each set of training data sets and test data sets formed by iterative training. The training process includes: Through multiple training stages, the proportion of malignant lesion segmentation training data is gradually increased, and the initial medical image segmentation model is trained until convergence. Utilizing the Model Predict the test data set and obtain the corresponding lesion prediction image At the same time, calculate the corresponding Dice precision set and retain, where r i =Dice(p i ,q i ); The second set of training sets D lu And the third training set D lv Perform training to obtain the model trained with the second set of data And the model trained with the second set of data Then use the model and model For the second test set D v And the third test set D u The images were tested to obtain the second set of test set lesion prediction sets. and the third set of test set lesion prediction sets Finally, P u and P v The corresponding Dice accuracy is calculated based on the lesion image, which is recorded as and By calculating the intersection difference between the lesion prediction image and the annotated image, the pseudo-label image of the missed detection area and the pseudo-label image of the misdetected area are obtained respectively; including using P l 、P u and P v Calculate the set of pseudo-label images of missed detection areas and false detection areas of the three test sets and For P l 、P u and P v Each predicted image p on i , and compare it with the corresponding annotation image q i Calculate the intersection and get their common area c i ; Then, use q i Subtract c i , you can get the pseudo-label image of the missed area Similarly, make p i Subtract c i , you can get the false detection area pseudo label image The pseudo-label images of missed detection areas and false detection areas are added to the training set to train the model. Model and model Until convergence; including and Treated as pseudo-label images of missed detection areas and pseudo-label images of misdetected areas, added to the training set D s 、D lu and D lv In the , three new training sets are formed, respectively denoted as and Then use and The training data is enhanced and the model is continued Model and model Continue training until the model converges.
9. An electronic device, characterized in that: include: a memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Pulmonary nodule benign and malignant identification model training method, application method and system
CN116468103A
Medical image segmentation method and system
CN118334349A