Similarity threshold false label-based semi-supervised medical image classification method and system
By adopting a semi-supervised learning method based on similarity threshold pseudo-label in medical image classification, the effective use of unlabeled data is solved, and the classification accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202411842063.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-13
AI Technical Summary
The existing semi-supervised learning methods fail to effectively utilize unlabeled data in medical image classification, resulting in low data utilization.
A semi-supervised medical image classification method based on similarity threshold pseudo-label is adopted. By setting confidence thresholds and similarity thresholds, high-quality unlabeled data are selected as pseudo-labels and participating in model training.
While not reducing the accuracy of pseudo-labels, the utilization rate of unlabeled data is improved, and the accuracy and efficiency of medical image classification are improved.
Smart Images

Figure CN119785086A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image recognition, and in particular to a semi-supervised medical image classification method and system based on similarity threshold pseudo-labels. Background Art
[0002] Deep learning has achieved remarkable results in the field of medical image classification. However, it is costly to build a large-scale medical image dataset, and the annotation of medical images usually requires the participation of professional doctors or experts, which consumes a lot of time and human resources. In the current situation where it is difficult to obtain annotations for medical image data, the application of semi-supervised medical image classification aims to improve the performance of the classification model by using a small amount of labeled data and a large amount of unlabeled data. At present, the advanced semi-supervised learning methods are based on specific natural image classification tasks, and these methods have not been well studied in the field of medical image classification. Therefore, how to effectively promote advanced semi-supervised image classification methods to the field of medical image classification and make them applicable to medical image classification tasks has extremely high research value and development prospects. Therefore, the research on semi-supervised classification of medical images is very meaningful, which can save a lot of time and human resources, improve model performance, and thus help doctors make more accurate and timely diagnoses for patients.
[0003] In the field of medical imaging, semi-supervised learning methods can help improve the performance of models by utilizing unlabeled medical image data. Pseudo-labeling and consistency regularization are two key technologies of semi-supervised learning. Incorrect pseudo-label iterative training models will lead to confirmation bias. To solve this problem, some methods use high thresholds to select pseudo-labels, which can increase the reliability of pseudo-labels, because samples under high thresholds are more likely to be samples that the model is more certain of. This can reduce the noise introduced by pseudo-labels. However, such methods have a more obvious disadvantage, that is, they always rely on high thresholds to generate pseudo-labels, resulting in the neglect of a large amount of unlabeled data with low thresholds. Although lowering the threshold increases the utilization rate of unlabeled data, it may lead to a decrease in the accuracy of pseudo-labels. Summary of the invention
[0004] To this end, the present invention provides a semi-supervised medical image classification method and system based on similarity threshold pseudo-labels to solve the problem of low utilization rate of unlabeled data in the existing semi-supervised learning methods for medical image classification and recognition.
[0005] According to the design scheme provided by the present invention, on the one hand, a semi-supervised medical image classification method based on similarity threshold pseudo-label is provided, comprising:
[0006] Obtain a medical image dataset, and divide the medical image dataset into a training set, a validation set, and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio;
[0007] Constructing a medical image classification model and setting a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold;
[0008] Based on the model training loss function, the medical image classification model is trained using the training set, and the trained model is verified and performance tuned using the validation set and the test set to obtain the medical image classification target model;
[0009] The medical image data to be processed is input into the medical image classification target model, and the medical image classification target model is used to predict and output the classification label of the medical image to be processed.
[0010] As a semi-supervised medical image classification method based on similarity threshold pseudo-labels of the present invention, further, a medical image dataset is obtained, and the medical image dataset is divided into a training set, a validation set and a test set according to a preset ratio, including:
[0011] Collect several public medical image datasets of different categories, and undersample each medical image dataset to obtain a specified number of medical images under each category label;
[0012] A specified number of medical images under each category label are divided into training set, validation set and test set according to preset proportions.
[0013] As a semi-supervised medical image classification method based on similarity threshold pseudo-labels of the present invention, further, a medical image classification model is constructed, comprising:
[0014] A medical image classification model is constructed based on a WideResNet wide residual network, wherein the medical image classification model comprises: a plurality of residual blocks, and each residual block comprises a convolutional layer, a batch normalization layer and a nonlinear activation function.
[0015] As a semi-supervised medical image classification method based on similarity threshold pseudo-label of the present invention, further, the set model training loss function is expressed as: Among them, a and β are weight coefficients, To monitor losses, is the high confidence unsupervised loss, is the low confidence unsupervised loss.
[0016] As a semi-supervised medical image classification method based on similarity threshold pseudo-labels of the present invention, further, based on the model training loss function and using the training set to train the medical image classification model, it includes:
[0017] The labeled data set and the unlabeled data set in the training set are sampled according to the batch size, and the sampled labeled data are weakly enhanced to obtain weakly enhanced labeled data. The sampled unlabeled data are weakly enhanced and strongly enhanced to obtain weakly enhanced unlabeled data and strongly enhanced unlabeled data, respectively. The weak enhancement is to perform image enhancement by randomly flipping and translating the image, and the strong enhancement is to perform image enhancement by randomly selecting and combining multiple image transformation operations. The multiple image transformation operations include: image rotation, image flipping, image cropping, and image color transformation.
[0018] Input the weakly enhanced labeled data into the medical image classification model to obtain the output probability distribution corresponding to the first medical classification, and input the weakly enhanced unlabeled data into the medical classification model to obtain the output probability distribution corresponding to the second medical classification;
[0019] The supervision loss is calculated based on the probability distribution output by the first medical classification, and the average of the probability distributions whose confidence of the probability distribution output by the first medical classification is greater than the confidence threshold and predicted to be the correct label category is taken as the class representative probability distribution of the corresponding label category; the confidence of the probability distribution output by the second medical classification is compared with the confidence threshold;
[0020] For unlabeled data with confidence greater than the confidence threshold, predict its corresponding pseudo label according to the second medical classification output probability distribution, input the unlabeled data with the predicted pseudo label into the medical image classification model with strong enhancement, obtain the corresponding probability distribution, and calculate the high confidence unsupervised loss with the corresponding pseudo label;
[0021] For unlabeled data with confidence less than the confidence threshold, the similarity between the second medical classification output probability distribution and the class probability distribution corresponding to the highest probability class is calculated, and pseudo labels are predicted for unlabeled data with similarity greater than the similarity threshold. The unlabeled data with predicted pseudo labels are strongly enhanced and input into the medical image classification model to obtain the corresponding probability distribution, and the low confidence unsupervised loss is calculated with the corresponding pseudo labels.
[0022] The total model training loss is obtained based on the supervised loss, high-confidence unsupervised loss, and low-confidence unsupervised loss, and the model parameters are updated by backpropagation based on the total model training loss for iterative training.
[0023] On the other hand, the present invention also provides a semi-supervised medical image classification system based on similarity threshold pseudo-label, comprising: a sample collection module, a model construction module, a model training module and an image classification module, wherein:
[0024] A sample collection module is used to obtain a medical image dataset and divide the medical image dataset into a training set, a validation set and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio;
[0025] A model construction module, used to construct a medical image classification model and set a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold;
[0026] A model training module is used to train the medical image classification model based on the model training loss function and using the training set, and to verify and optimize the performance of the trained model using the verification set and the test set to obtain a medical image classification target model;
[0027] The image classification module is used to input the medical image data to be processed into the medical image classification target model, and use the medical image classification target model to predict and output the classification target of the medical image to be processed.
[0028] Beneficial effects of the present invention:
[0029] The present invention uses similarity threshold pseudo-label (STPL) to utilize more unlabeled data, calculates the representative probability distribution of each class based on the labeled data, and the labeled data can provide more reliable category information; selects unlabeled data according to the confidence threshold and assigns pseudo-labels, and then selects unlabeled data whose probability distribution of the low confidence part and the representative probability distribution of the corresponding class are more similar than the similarity threshold and assigned pseudo-labels, so as to further select more high-quality unlabeled data to participate in model training. While not reducing the accuracy of the pseudo-label, more high-quality unlabeled data can be utilized on the confidence threshold method, thereby improving the robustness of model training and improving the accuracy and efficiency of medical classification images. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The following is a schematic diagram of the semi-supervised medical image classification process based on similarity threshold pseudo labels in an embodiment;
[0031] Figure 2 This is a schematic diagram of the model training process in the embodiment;
[0032] Figure 3 Schematic diagram of pseudo-label accuracy rates for different confidence thresholds and similarity thresholds in the embodiment;
[0033] Figure 4 Schematic diagram of pseudo-label ratios during training at different confidence thresholds and similarity thresholds in the embodiment. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and technical solutions.
[0035] In order to solve the problem of accuracy and efficiency of medical image classification, an embodiment of the present invention provides a semi-supervised medical image classification method based on similarity threshold pseudo-label, comprising:
[0036] S101. Obtain a medical image dataset, and divide the medical image dataset into a training set, a validation set, and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio.
[0037] Specifically, several public medical image datasets of different categories can be collected, and each medical image dataset can be undersampled to obtain a specified number of medical images under each category label; the specified number of medical images under each category label can be divided into a training set, a validation set, and a test set according to a preset ratio.
[0038] The large medical image dataset MedMNIST contains ten different medical image classification datasets, of which BloodMNIST is based on a dataset of individual normal cells, captured from individuals without infection, blood or tumor diseases, and without any drug treatment at the time of blood collection. It contains a total of 17092 images with an image size of 3X 28X 28 and is divided into 8 categories. It is undersampled to 1200 images per class and the source dataset is divided into training, validation and test sets in a ratio of 7:1:2. DermaMNIST is based on HAM10000, a large collection of multi-source dermoscopic images of common pigmented skin lesions. The dataset consists of 10015 dermoscopic images with an image size of 3X 28X 28, divided into 7 different diseases, forming a multi-class classification task. The images are divided into training, validation and test sets in a ratio of 7:1:2. Pathmnist is based on previous studies and is used to predict survival in colorectal cancer tissue sections. The dataset consists of 107180 images with an image size of 3X28X28 and is divided into 9 categories. It is undersampled to 1000 images per class and divided into training set, validation set and test set in a ratio of 7:1:2. The training set of the dataset is divided into labeled dataset and unlabeled dataset according to the set labeling ratio.
[0039] S102. Construct a medical image classification model and set a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold.
[0040] Specifically, a medical image classification model can be constructed based on the WideResNet wide residual network, and the medical image classification model can be set to include: multiple residual blocks, and each residual block includes a convolutional layer, a batch normalization layer, and a nonlinear activation function. WideResNet fully utilizes the advantages of parallel computing by increasing the width of the network and reduces the model training time.
[0041] The set model training loss function can be expressed as: Among them, a and β are weight coefficients, To monitor losses, is the high confidence unsupervised loss, is the low confidence unsupervised loss.
[0042] S103. Based on the model training loss function, the medical image classification model is trained using the training set, and the trained model is verified and performance tuned using the verification set and the test set to obtain a medical image classification target model.
[0043] Specifically, the model training process can be designed to include:
[0044] The labeled data set and the unlabeled data set in the training set are sampled according to the batch size, and the sampled labeled data are weakly enhanced to obtain weakly enhanced labeled data. The sampled unlabeled data are weakly enhanced and strongly enhanced to obtain weakly enhanced unlabeled data and strongly enhanced unlabeled data, respectively. The weak enhancement is to perform image enhancement by randomly flipping and translating the image, and the strong enhancement is to perform image enhancement by randomly selecting and combining multiple image transformation operations. The multiple image transformation operations include: image rotation, image flipping, image cropping, and image color transformation.
[0045] Input the weakly enhanced labeled data into the medical image classification model to obtain the output probability distribution corresponding to the first medical classification, and input the weakly enhanced unlabeled data into the medical classification model to obtain the output probability distribution corresponding to the second medical classification;
[0046] The supervision loss is calculated based on the probability distribution output by the first medical classification, and the average of the probability distributions whose confidence of the probability distribution output by the first medical classification is greater than the confidence threshold and predicted to be the correct label category is taken as the class representative probability distribution of the corresponding label category; the confidence of the probability distribution output by the second medical classification is compared with the confidence threshold;
[0047] For unlabeled data with confidence greater than the confidence threshold, predict its corresponding pseudo label according to the second medical classification output probability distribution, input the unlabeled data with the predicted pseudo label into the medical image classification model with strong enhancement, obtain the corresponding probability distribution, and calculate the high confidence unsupervised loss with the corresponding pseudo label;
[0048] For unlabeled data with confidence less than the confidence threshold, the similarity between the second medical classification output probability distribution and the class probability distribution corresponding to the highest probability class is calculated, and pseudo labels are predicted for unlabeled data with similarity greater than the similarity threshold. The unlabeled data with predicted pseudo labels are strongly enhanced and input into the medical image classification model to obtain the corresponding probability distribution, and the low confidence unsupervised loss is calculated with the corresponding pseudo labels.
[0049] The total model training loss is obtained based on the supervised loss, high-confidence unsupervised loss, and low-confidence unsupervised loss, and the model parameters are updated by backpropagation based on the total model training loss for iterative training.
[0050] The labeled data set X and the unlabeled data set U can be sampled according to the batch size B; the sampled labeled data are weakly enhanced to obtain Aw (x b ), the sampled unlabeled data are weakly enhanced and strongly enhanced to obtain A w (u b ) and A s (u b ).
[0051] The obtained A w (x b ) is input into the model to obtain the corresponding output probability distribution p b , the obtained A w (u b ) is input into the model to obtain the corresponding output probability distribution q b , A w (x) represents weak enhancement of image x; supervision loss is calculated for the probability distribution of labeled data Among them, p b The model outputs a probability distribution for labeled data, y b For p b Corresponding to the true label, H(p,q) represents the cross entropy of two probability distributions p and q.
[0052] The probability distribution of labeled data p b The confidence level is greater than the confidence threshold τ c The average of the probability distributions predicted as the correct class is taken as the representative probability distribution of the corresponding class; the probability distribution of the unlabeled data q b The confidence and confidence threshold τ c For comparison, samples greater than the confidence threshold are classified according to q b Predict pseudo labels; strongly enhance the corresponding samples of predicted pseudo labels A s (u b ) is input into the model to obtain the corresponding probability distribution p m (y|A s (u b )), the following formula can be used to calculate the high confidence unsupervised loss
[0053]
[0054] μ is the ratio of unlabeled data to labeled data in training, b is a single data sample traversing the entire batch B, and y is the output of model m.
[0055] The probability distribution of unlabeled data q b The confidence and confidence threshold τ c For comparison, the q of samples that are less than the confidence threshold b Calculate the similarity D with the class probability distribution corresponding to the highest probability class B (p,q),DB (p,q) means calculating the similarity (Bhattacharyya distance) of two probability distributions p and q. The similarity obtained is greater than the similarity threshold τ s The sample predicts the pseudo label; the sample corresponding to the predicted pseudo label is strongly enhanced A s (u b ) is input into the model to obtain the corresponding probability distribution p m (y|A s (u b )), and then the following formula can be used to calculate the low confidence unsupervised loss
[0056]
[0057] Fx represents the representative probability distribution corresponding to category x.
[0058] The total training loss is obtained based on the supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, and the model parameters are updated through back-propagation to save the best model with the highest classification accuracy on the validation set. The saved best model is performance tested using the test set, and the test accuracy of medical image classification under the labeled data ratio is obtained, thereby obtaining the target model for medical image classification.
[0059] S104: input the medical image data to be processed into a medical image classification target model, and use the medical image classification target model to predict and output a classification label of the medical image to be processed.
[0060] Furthermore, based on the above method, an embodiment of the present invention also provides a semi-supervised medical image classification system based on similarity threshold pseudo-label, comprising: a sample collection module, a model construction module, a model training module and an image classification module, wherein:
[0061] A sample collection module is used to obtain a medical image dataset and divide the medical image dataset into a training set, a validation set and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio;
[0062] A model construction module, used to construct a medical image classification model and set a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold;
[0063] A model training module is used to train the medical image classification model based on the model training loss function and using the training set, and to verify and optimize the performance of the trained model using the verification set and the test set to obtain a medical image classification target model;
[0064] The image classification module is used to input the medical image data to be processed into the medical image classification target model, and use the medical image classification target model to predict and output the classification target of the medical image to be processed.
[0065] In order to verify the effectiveness of this solution, the following is a further explanation based on experimental data:
[0066] Table 1
[0067]
[0068] Table 1 shows the accuracy of assigning pseudo labels to unlabeled data under different threshold conditions. Figure 3 Illustration of the selection of pseudo labels under different confidence thresholds and similarity thresholds. Above the dotted line is the pseudo label assigned to the unlabeled data under the corresponding threshold conditions. Figure 4 It is the proportion of pseudo labels assigned during model training under different threshold conditions. As shown in Table 1 and Figure 3 As shown, the scheme in this case selects the comparison of unlabeled data on the BloodMNIST dataset, which includes the comparison of the lowering threshold (τ c 0.95,τ c 0.94) selects unlabeled data pseudo labels and those above the threshold (τ c 0.96,τ c 0.95) The accuracy of pseudo labels for some unlabeled data. The experiment was conducted on the BloodMNIST dataset with a 2% labeled data ratio and a confidence threshold τ c Set to 0.95, the threshold condition is compared to τ c Pseudo labels for selected unlabeled data.
[0069] like Figure 4 As shown in the orange and red curves in (b), when the unlabeled data is assigned a similar proportion of pseudo labels, it can be seen from Table 1 that the scheme (τ c 0.95,τ s 0.97) in selecting the pseudo-label accuracy of unlabeled data below the confidence threshold is compared with that obtained by lowering the confidence threshold (τ c 0.95,τ c0.94) is 2% higher than the pseudo-label accuracy of the unlabeled data selected by the scheme in this case. This shows that the scheme in this case has a certain advantage in selecting unlabeled data with low confidence thresholds. Furthermore, Table 1 shows that the pseudo-label accuracy of the unlabeled data below the confidence threshold selected by the scheme in this case is higher than that above the confidence threshold (τ c 0.96,τ c 0.95) is even higher. Since the unlabeled data above the confidence threshold is the part that the model has determined to participate in the training, it means that the unlabeled data with a low confidence threshold selected for training in this case is beneficial to the model.
[0070] Table 2
[0071]
[0072] Table 2 lists the classification accuracy comparison of our solution Simmatch and the latest semi-supervised methods under different labeled data ratios on the BloodMNIST, DermaMNIST and PathMNIST datasets. The latest semi-supervised image classification methods: MixMatch, FixMatch, ReFixMatch and FullMatch. Among them, ReFixMatch and FullMatch are also methods that use more unlabeled data information to improve the performance of the model. It can be seen from the data in the table that the classification accuracy of our solution has reached the best under three different labeled data ratios on three different datasets. The experimental results further confirm the superiority of our solution in using low-confidence unlabeled data.
[0073] The above experimental results show that this scheme can improve the utilization rate of unlabeled data without reducing the accuracy of pseudo-labels by using labeled data and similarity thresholds to utilize more unlabeled data, thereby effectively improving the performance of medical image classification.
[0074] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
[0075] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0076] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation is not considered to be beyond the scope of the present invention.
[0077] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits, and accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software function modules. The present invention is not limited to any specific form of combination of hardware and software.
[0078] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A semi-supervised medical image classification method based on similarity threshold pseudo-label, characterized in that: Include: Obtain a medical image dataset, and divide the medical image dataset into a training set, a validation set, and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio; Construct a medical image classification model and set a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold; Based on the model training loss function, the medical image classification model is trained using the training set, and the trained model is verified and performance tuned using the validation set and the test set to obtain the medical image classification target model; The medical image data to be processed is input into the medical image classification target model, and the medical image classification target model is used to predict and output the classification label of the medical image to be processed.
2. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 1, characterized in that: Obtain a medical image dataset and divide it into a training set, a validation set, and a test set according to a preset ratio, including: Collect several public medical image datasets of different categories, and undersample each medical image dataset to obtain a specified number of medical images under each category label; A specified number of medical images under each category label are divided into training set, validation set and test set according to preset proportions.
3. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 1, characterized in that: Build a medical image classification model, including: A medical image classification model is constructed based on a WideResNet wide residual network, wherein the medical image classification model comprises: a plurality of residual blocks, and each residual block comprises a convolutional layer, a batch normalization layer and a nonlinear activation function.
4. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 1, characterized in that: The set model training loss function is expressed as: Among them, a and β are weight coefficients, To monitor losses, is the high confidence unsupervised loss, is the low confidence unsupervised loss.
5. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 1 or 4, characterized in that: Based on the model training loss function and using the training set to train the medical image classification model, including: The labeled data set and the unlabeled data set in the training set are sampled according to the batch size, and the sampled labeled data are weakly enhanced to obtain weakly enhanced labeled data. The sampled unlabeled data are weakly enhanced and strongly enhanced to obtain weakly enhanced unlabeled data and strongly enhanced unlabeled data, respectively. The weak enhancement is to perform image enhancement by randomly flipping and translating the image, and the strong enhancement is to perform image enhancement by randomly selecting and combining multiple image transformation operations. The multiple image transformation operations include: image rotation, image flipping, image cropping, and image color transformation. Input the weakly enhanced labeled data into the medical image classification model to obtain the output probability distribution corresponding to the first medical classification, and input the weakly enhanced unlabeled data into the medical classification model to obtain the output probability distribution corresponding to the second medical classification; The supervision loss is calculated based on the probability distribution output by the first medical classification, and the average of the probability distributions whose confidence of the probability distribution output by the first medical classification is greater than the confidence threshold and predicted to be the correct label category is taken as the class representative probability distribution of the corresponding label category; the confidence of the probability distribution output by the second medical classification is compared with the confidence threshold; For unlabeled data with confidence greater than the confidence threshold, predict its corresponding pseudo label according to the second medical classification output probability distribution, input the unlabeled data with the predicted pseudo label into the medical image classification model with strong enhancement, obtain the corresponding probability distribution, and calculate the high confidence unsupervised loss with the corresponding pseudo label; For unlabeled data with confidence less than the confidence threshold, the similarity between the second medical classification output probability distribution and the class probability distribution corresponding to the highest probability class is calculated, and pseudo labels are predicted for unlabeled data with similarity greater than the similarity threshold. The unlabeled data with predicted pseudo labels are strongly enhanced and input into the medical image classification model to obtain the corresponding probability distribution, and the low confidence unsupervised loss is calculated with the corresponding pseudo labels. The total model training loss is obtained based on the supervised loss, high-confidence unsupervised loss, and low-confidence unsupervised loss, and the model parameters are updated by backpropagation based on the total model training loss for iterative training.
6. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 5, characterized in that: The high confidence unsupervised loss calculation process is expressed as: Among them, B is the batch size, H(p,q) represents the cross entropy of the probability distributions of p and q, μ is the ratio of unlabeled data to labeled data in training, b is a single data in the process of traversing the entire batch, and q b Output probability distribution for the second medical classification, τ c is the confidence threshold, A s (u b ) is the labeled data u b The strongly enhanced unlabeled data obtained after strong enhancement, p m (y|A s (u b )) is the strongly enhanced unlabeled data A s (u b ) is input into the model to obtain the output probability distribution, and y represents the model output probability distribution.
7. The semi-supervised medical image classification method based on similarity threshold pseudo-label according to claim 6, characterized in that: The low confidence unsupervised loss calculation process is expressed as: Among them, D B (,) indicates the similarity (Bhattacharyya distance) calculation of two probability distributions. represents argmax(q b ) The probability distribution corresponding to the category, τ s is the similarity threshold.
8. A semi-supervised medical image classification system based on similarity threshold pseudo-label, characterized in that: It includes: sample collection module, model building module, model training module and image classification module, among which, A sample collection module is used to obtain a medical image dataset and divide the medical image dataset into a training set, a validation set and a test set according to a preset ratio, wherein the training set is divided into an unlabeled dataset and a labeled dataset annotated with medical image classification labels according to a labeling ratio; A model construction module, used to construct a medical image classification model and set a model training loss function, wherein the model training loss function includes: supervised loss, high-confidence unsupervised loss and low-confidence unsupervised loss, wherein the supervised loss is obtained by training the model based on a labeled data set, the high-confidence unsupervised loss is obtained by training the model with part of the unlabeled data in the unlabeled data set whose confidence is greater than the confidence threshold, and the low-confidence unsupervised loss is obtained by training the model with another part of the unlabeled data in the unlabeled data set whose confidence is less than the confidence threshold but whose similarity is greater than the similarity threshold; A model training module is used to train the medical image classification model based on the model training loss function and using the training set, and to verify and optimize the performance of the trained model using the verification set and the test set to obtain a medical image classification target model; The image classification module is used to input the medical image data to be processed into the medical image classification target model, and use the medical image classification target model to predict and output the classification label of the medical image to be processed.
9. An electronic device, characterized in that: include: at least one processor, and a memory coupled to the at least one processor; The memory stores a computer program, and the computer program can be executed by the at least one processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Medical image segmentation method of semi-supervised convolutional neural network based on comparative learning
CN114266739A
Semi-supervised medical image segmentation method based on heterogeneous cross pseudo-supervised network
CN115359029A
SAR image target recognition method based on semi-supervision
CN115775353A
Image classification method, system and equipment based on dynamic semi-supervised deep learning
CN116188896A
Reweighted semi-supervised image classification method based on pseudo labels
CN116385791A
Cited By
Image labeling method based on limited label data set
CN121686058A
An image labeling method based on a limited label data set
CN121686058B