CN-119785086-B - Semi-supervised medical image classification method and system based on similarity threshold pseudo labels
Abstract
The invention relates to the technical field of medical image recognition, in particular to a semi-supervised medical image classification method and a semi-supervised medical image classification system based on similarity threshold false labels, which utilize more unlabeled data and calculate the representative probability distribution of each class according to the labeled data, wherein the labeled data can provide more reliable class information; and selecting unlabeled data according to the confidence threshold to give a pseudo tag, and then selecting the probability distribution of the unlabeled data with low confidence and the unlabeled data with the similarity of the corresponding class representative probability distribution larger than the similarity threshold to give the pseudo tag so as to select more high-quality unlabeled data to participate in model training. The method can utilize more high-quality unlabeled data on the confidence threshold method without reducing the accuracy of the pseudo tag, thereby improving the robustness of model training and improving the accuracy of medical image classification.
Inventors
- GAO YUFEI
- ZHAO SHANYU
- SHI YUJIE
- SHI LEI
- CHENG QIONG
- ZHANG YAMENG
- ZHAO GUOHUA
- JIANG HUIQIN
- MA LING
Assignees
- 郑州大学
Dates
- Publication Date
- 20260512
- Application Date
- 20241213
Claims (9)
- 1. A semi-supervised medical image classification method based on similarity threshold pseudo labels, comprising: Acquiring a medical image data set, and dividing the medical image data set into a training set, a verification set and a test set according to a preset proportion, wherein the training set is divided into an unlabeled data set and a marked data set marked with medical image classification labels according to a marked proportion; The method comprises the steps of constructing a medical image classification model and setting a model training loss function, wherein the model training loss function comprises a supervision loss, a high-confidence-level unsupervised loss and a low-confidence-level unsupervised loss, the supervision loss is obtained by training the model based on a marked data set, the high-confidence-level unsupervised loss is obtained by training the model by using part of unmarked data with confidence level larger than a confidence level threshold in unmarked data sets, and the low-confidence-level unsupervised loss is obtained by training the model by using another part of unmarked data with confidence level smaller than the confidence level threshold but similarity larger than a similarity threshold in unmarked data sets; training the medical image classification model based on the model training loss function by utilizing a training set, and verifying and optimizing the performance of the trained model by utilizing a verification set and a test set to obtain a medical image classification target model; Inputting the medical image data to be processed into a medical image classification target model, and predicting and outputting a classification label of the medical image to be processed by using the medical image classification target model; Training the loss function based on the model and training the medical image classification model using the training set, comprising: Sampling a marked data set and an unmarked data set in a training set according to the batch size, performing weak enhancement on the marked data obtained by sampling to obtain weak enhancement marked data, and performing weak enhancement and strong enhancement on the unmarked data obtained by sampling to obtain weak enhancement unmarked data and strong enhancement unmarked data respectively, wherein the weak enhancement is to perform image enhancement by performing random overturn and translation on an image, and the strong enhancement is to perform image enhancement by randomly selecting and combining multiple image transformation operations, wherein the multiple image transformation operations comprise image rotation, image overturn, image clipping and image color transformation; Inputting the weak enhancement marked data into a medical image classification model to obtain corresponding first medical classification output probability distribution, and inputting the weak enhancement unmarked data into the medical classification model to obtain corresponding second medical classification output probability distribution; Calculating a supervision loss based on the first medical classification output probability distribution, and taking an average of probability distributions of the first medical classification output probability distribution, the confidence level of which is greater than a confidence level threshold and predicted as a correct label class, as class-representative probability distribution of the corresponding label class; Outputting probability distribution according to the second medical classification aiming at unlabeled data with confidence coefficient larger than the confidence coefficient threshold value to predict corresponding pseudo tags of the unlabeled data, inputting the unlabeled data corresponding strong enhancement of the predicted pseudo tags into a medical image classification model to obtain corresponding probability distribution, and calculating high-confidence-coefficient unsupervised loss with the corresponding pseudo tags; Aiming at unlabeled data with confidence coefficient smaller than a confidence coefficient threshold, carrying out similarity calculation on second medical classification output probability distribution and class probability distribution corresponding to the highest probability class, predicting a pseudo tag for unlabeled data with similarity larger than the similarity threshold, inputting corresponding strong enhancement of unlabeled data of the predicted pseudo tag to a medical image classification model to obtain corresponding probability distribution, and calculating low confidence coefficient unsupervised loss with the corresponding pseudo tag; And acquiring model training total loss based on the supervision loss, the high-confidence non-supervision loss and the low-confidence non-supervision loss, and performing iterative training based on model training total loss back propagation updating model parameters.
- 2. The semi-supervised medical image classification method based on similarity threshold pseudo labels of claim 1, wherein acquiring a medical image dataset, classifying the medical image dataset into a training set, a validation set, and a test set according to a predetermined scale, comprises: Collecting a plurality of medical image data sets of different types, and undersampling each medical image data set to obtain medical images of the number specified by each category label sign; The medical images of the specified number of each category label sign are divided into a training set, a verification set and a test set according to a preset proportion.
- 3. The semi-supervised medical image classification method based on similarity threshold pseudo labels of claim 1, wherein constructing a medical image classification model comprises: A medical image classification model is constructed based on WIDERESNET wide residual networks, the medical image classification model including a plurality of residual blocks, and each residual block including a convolution layer, a batch normalization layer, and a nonlinear activation function.
- 4. The similarity threshold pseudo tag-based semi-supervised medical image classification method as set forth in claim 1, wherein the set model training loss function is expressed as: +a +β Wherein a and beta are weight coefficients, In order to monitor the loss of the device, For high confidence without a loss of supervision, There is no supervision penalty for low confidence.
- 5. The similarity threshold pseudo tag-based semi-supervised medical image classification method as recited in claim 1, wherein the high confidence non-supervised loss computation process is expressed as: Wherein B is the batch size, Representation of And The cross entropy of the two probability distributions, μ is the ratio of unlabeled data to labeled data in training, b is the single data during traversal of the entire batch, The probability distribution is output for the second medical classification, As a threshold value of the confidence level, To marked data The strong enhancement unlabeled data obtained after the strong enhancement is performed, Enhancing unlabeled data for strength And (3) inputting the output probability distribution obtained by the model, wherein y represents the model output probability distribution.
- 6. The similarity threshold pseudo tag-based semi-supervised medical image classification method as set forth in claim 5, wherein the low confidence non-supervised loss computation process is expressed as: Wherein, the A similarity (pasteurization distance) calculation representing two probability distributions, Representation of The probability distribution corresponding to the category(s), Is a similarity threshold.
- 7. A semi-supervised medical image classification system based on similarity threshold pseudo labels is characterized by comprising a sample collection module, a model construction module, a model training module and an image classification module, wherein, The sample collection module is used for obtaining a medical image data set, dividing the medical image data set into a training set, a verification set and a test set according to a preset proportion, wherein the training set is divided into an unlabeled data set and a marked data set marked with medical image classification labels according to a marked proportion; The model construction module is used for constructing a medical image classification model and setting a model training loss function, wherein the model training loss function comprises a supervision loss, a high-confidence-degree unsupervised loss and a low-confidence-degree unsupervised loss, the supervision loss is obtained by training the model based on a marked data set, the high-confidence-degree unsupervised loss is obtained by training the model by using part of unmarked data with the confidence degree larger than a confidence degree threshold in unmarked data sets, and the low-confidence-degree unsupervised loss is obtained by training the model by using another part of unmarked data with the confidence degree smaller than the confidence degree threshold but the similarity larger than a similarity threshold in unmarked data sets; The model training module is used for training the medical image classification model based on the model training loss function by utilizing the training set, and verifying and optimizing the performance of the trained model by utilizing the verification set and the test set to obtain a medical image classification target model; The image classification module is used for inputting the medical image data to be processed into a medical image classification target model, and predicting and outputting classification labels of the medical images to be processed by using the medical image classification target model; Training the loss function based on the model and training the medical image classification model using the training set, comprising: Sampling a marked data set and an unmarked data set in a training set according to the batch size, performing weak enhancement on the marked data obtained by sampling to obtain weak enhancement marked data, and performing weak enhancement and strong enhancement on the unmarked data obtained by sampling to obtain weak enhancement unmarked data and strong enhancement unmarked data respectively, wherein the weak enhancement is to perform image enhancement by performing random overturn and translation on an image, and the strong enhancement is to perform image enhancement by randomly selecting and combining multiple image transformation operations, wherein the multiple image transformation operations comprise image rotation, image overturn, image clipping and image color transformation; Inputting the weak enhancement marked data into a medical image classification model to obtain corresponding first medical classification output probability distribution, and inputting the weak enhancement unmarked data into the medical classification model to obtain corresponding second medical classification output probability distribution; Calculating a supervision loss based on the first medical classification output probability distribution, and taking an average of probability distributions of the first medical classification output probability distribution, the confidence level of which is greater than a confidence level threshold and predicted as a correct label class, as class-representative probability distribution of the corresponding label class; Outputting probability distribution according to the second medical classification aiming at unlabeled data with confidence coefficient larger than the confidence coefficient threshold value to predict corresponding pseudo tags of the unlabeled data, inputting the unlabeled data corresponding strong enhancement of the predicted pseudo tags into a medical image classification model to obtain corresponding probability distribution, and calculating high-confidence-coefficient unsupervised loss with the corresponding pseudo tags; Aiming at unlabeled data with confidence coefficient smaller than a confidence coefficient threshold, carrying out similarity calculation on second medical classification output probability distribution and class probability distribution corresponding to the highest probability class, predicting a pseudo tag for unlabeled data with similarity larger than the similarity threshold, inputting corresponding strong enhancement of unlabeled data of the predicted pseudo tag to a medical image classification model to obtain corresponding probability distribution, and calculating low confidence coefficient unsupervised loss with the corresponding pseudo tag; And acquiring model training total loss based on the supervision loss, the high-confidence non-supervision loss and the low-confidence non-supervision loss, and performing iterative training based on model training total loss back propagation updating model parameters.
- 8. An electronic device, comprising: At least one processor, and a memory coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to implement the method of any one of claims 1-6.
- 9. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed, the method according to any one of claims 1 to 6 is enabled.
Description
Semi-supervised medical image classification method and system based on similarity threshold pseudo labels Technical Field The invention relates to the technical field of medical image recognition, in particular to a semi-supervised medical image classification method and system based on similarity threshold pseudo labels. Background Deep learning has achieved significant results in the field of medical image classification, however, construction of large-scale medical image datasets is costly, and labeling of medical images generally requires the involvement of specialized doctors or specialists, consuming a significant amount of time and human resources. In the case of current medical image data annotation acquisition difficulties, the application of semi-supervised medical image classification aims to improve the performance of the classification model with small amounts of marked data and large amounts of unmarked data. Currently advanced semi-supervised learning methods are based on specific natural image classification tasks, which have not been well studied in the field of medical image classification. Therefore, how to effectively popularize the advanced semi-supervised image classification method into the field of medical image classification, so that the method can be suitable for medical image classification tasks and has extremely high research value and development prospect. Therefore, the semi-supervised classification study on the medical images is very significant, a large amount of time and manpower resources can be saved, the model performance is improved, and a doctor can be helped to diagnose a patient more accurately and timely. In the medical image field, semi-supervised learning methods can help to improve model performance with unlabeled medical image data. Pseudo-tag and consistency regularization are two key techniques of semi-supervised learning. Incorrect iterative training of models with pseudo tags presents a problem of validation bias. To address this problem, some methods use a high threshold to choose to assign a false label, which may increase the reliability of the false label, because samples below the high threshold are more likely to be samples for which the model is more deterministic. This can reduce noise introduced by the pseudo tag. However, such methods have a significant disadvantage in that they always rely on a high threshold to produce a false tag, resulting in a significant amount of unlabeled data with a low threshold being ignored. While decreasing the threshold, while increasing unlabeled data utilization, may result in a decrease in the accuracy of the pseudo tag. Disclosure of Invention Therefore, the invention provides a semi-supervised medical image classification method and a semi-supervised medical image classification system based on similarity threshold pseudo labels, which solve the problem that unlabeled data utilization rate is low in classification and identification of medical images by the existing semi-supervised learning method. According to the design scheme provided by the invention, in one aspect, a semi-supervised medical image classification method based on similarity threshold pseudo labels is provided, and the method comprises the following steps: Acquiring a medical image data set, and dividing the medical image data set into a training set, a verification set and a test set according to a preset proportion, wherein the training set is divided into an unlabeled data set and a marked data set marked with medical image classification labels according to a marked proportion; The method comprises the steps of constructing a medical image classification model and setting a model training loss function, wherein the model training loss function comprises a supervision loss, a high-confidence-level unsupervised loss and a low-confidence-level unsupervised loss, the supervision loss is obtained by training the model based on a marked data set, the high-confidence-level unsupervised loss is obtained by training the model by using part of unmarked data with confidence level larger than a confidence level threshold in unmarked data sets, and the low-confidence-level unsupervised loss is obtained by training the model by using another part of unmarked data with confidence level smaller than the confidence level threshold but similarity larger than a similarity threshold in unmarked data sets; training the medical image classification model based on the model training loss function by utilizing a training set, and verifying and optimizing the performance of the trained model by utilizing a verification set and a test set to obtain a medical image classification target model; Inputting the medical image data to be processed into a medical image classification target model, and predicting and outputting a classification label of the medical image to be processed by using the medical image classification target model. As the semi-supervised medical