Self-training and k-nearest neighbor based semi-supervised classification method and system for tumor malignancy
By filtering pseudo-labeled samples using cross-entropy and k-nearest neighbor algorithms, the number of benign and malignant samples is balanced and the quality is improved. This solves the sample bias problem in self-training methods and improves the accuracy and stability of tumor benign and malignant classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2026-03-24
AI Technical Summary
Existing self-training methods do not consider sample categories when adding pseudo-labeled samples, causing the classifier to favor a certain type of sample. Furthermore, the quality of pseudo-labeled samples is poor, affecting the accuracy of tumor benign and malignant classification.
The cross-entropy algorithm and the k-nearest neighbor algorithm are used to screen pseudo-labeled samples to ensure that the same number of benign and malignant samples are added. High-quality pseudo-labeled samples are selected according to the distribution of sample types. The sample set is updated through iterative training until the conditions are met.
It improved the identification rate of benign and malignant tumors, alleviated model bias, and enhanced the accuracy and stability of the classifier.
Smart Images

Figure CN116645561B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of medical image data, and particularly relates to a tumor benign and malignant semi-supervised classification method and system based on self-training and k-nearest neighbors. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] Machine learning-based auxiliary diagnosis technology has been paid more and more attention. Computer-aided diagnosis can help practitioners improve the accuracy and objectivity of diagnosis and relieve the heavy work pressure of practitioners. Doctors obtain tumor information through various imaging technologies such as ultrasound, CT, and nuclear magnetic resonance, and determine the benign and malignant of the tumor according to professional knowledge and clinical experience. A fully supervised classification method uses extracted tumor image features to train a classification model to determine the benign and malignant of the tumor. However, training a classification model requires sufficient labeled images, i.e. doctors need to label the benign and malignant of the tumor images, which will consume a lot of manpower and resources. A semi-supervised classification method uses limited labeled data and a large amount of unlabeled data to learn a classification model, which can achieve satisfactory classification performance and relieve the pressure caused by labeling a large amount of data.
[0004] Self-training method is one of the widely studied semi-supervised classification methods. The basic idea is to iteratively use labeled samples to train a classifier, classify unlabeled samples, select pseudo-labeled samples with high posterior probability from the classified unlabeled samples, add the pseudo-labeled samples to the labeled sample set, retrain the classifier and classify the unlabeled samples, and stop until the iteration stopping condition is met. The original self-training method mainly has two problems: first, when adding pseudo-labeled samples, the sample class is not considered, which may result in a significant number of samples of one class being added to the pseudo-labeled samples, which may cause the classifier to be biased towards the class with more samples when the samples are added to the labeled sample set to retrain the classifier, and such classification bias will continue to accumulate; second, when adding pseudo-labeled samples, only the classification result of the sample, i.e. the posterior probability, is considered, which may result in poor quality of the added pseudo-labeled samples, and considering the type distribution information of the sample can improve the confidence of the added pseudo-labeled samples. SUMMARY
[0005] To overcome the deficiencies of the prior art, the present application provides a tumor benign and malignant semi-supervised classification method and system based on self-training and k-nearest neighbors.
[0006] To achieve the above object, one or more embodiments of the present application provide the following technical solutions:
[0007] The first aspect of the present application provides a tumor benign and malignant semi-supervised classification method based on self-training and k-nearest neighbors, comprising:
[0008] Step 1, obtaining a sample set of tumor images, the sample set including a labeled sample set and an unlabeled sample set;
[0009] Step 2, self-training the current sample set to obtain a current classifier;
[0010] Step 3, classifying the current unlabeled sample set by using the current classifier to obtain a pseudo-labeled sample set, screening out pseudo-labeled samples meeting the adding condition by using a cross-entropy algorithm and a k-nearest neighbor algorithm, expanding the current labeled sample set, obtaining an updated labeled sample set; meanwhile, deleting the corresponding added pseudo-labeled samples from the current unlabeled sample set, obtaining an updated unlabeled sample set;
[0011] Step 4, taking the updated labeled sample set and the updated unlabeled sample set as the current sample set; training the current labeled sample set to obtain a current classifier;
[0012] Step 5, repeating steps 3 to 4 until a training end condition is met, using the classifier trained by the last updated labeled sample set as a final classifier;
[0013] Step 6, inputting tumor image data to be classified into the final classifier to obtain a tumor benignity classification result.
[0014] The second aspect of the application provides a tumor benignity and malignancy semi-supervised classification system based on self-training and k-nearest neighbor, comprising:
[0015] A sample set obtaining module is configured to obtain a sample set of tumor images, the sample set including a labeled sample set and an unlabeled sample set;
[0016] A classifier obtaining module is configured to self-train a current sample set to obtain a current classifier;
[0017] A sample set updating module is configured to classify a current unlabeled sample set by using a current classifier to obtain a pseudo-labeled sample set, screen out pseudo-labeled samples meeting an adding condition by using a cross-entropy algorithm and a k-nearest neighbor algorithm, expand a current labeled sample set, obtain an updated labeled sample set; meanwhile, delete the corresponding added pseudo-labeled samples from the current unlabeled sample set, obtain an updated unlabeled sample set;
[0018] A loop training module is configured to take the updated labeled sample set and the updated unlabeled sample set as a current sample set;
[0019] Train the current labeled sample set to obtain a current classifier, constantly update the sample set, until a training end condition is met, use the classifier trained by the last updated labeled sample set as a final classifier;
[0020] The tumor classification module is configured to input the tumor image data to be classified into the final classifier to obtain a benign or malignant tumor classification result.
[0021] The third aspect of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the steps of the self-training and k-neighbor based semi-supervised classification method for benign and malignant tumors according to the first aspect of the present application.
[0022] The fourth aspect of the present application provides an electronic device, which includes a memory, a processor, and a program stored in the memory and executable on the processor, and the processor implements the steps of the self-training and k-neighbor based semi-supervised classification method for benign and malignant tumors according to the first aspect of the present application when executing the program.
[0023] The above one or more technical solutions have the following beneficial effects:
[0024] In the self-training process, the same number of pseudo-labeled samples are added to each of the two classes (benign and malignant), which can alleviate the model bias; when selecting samples, not only the classification cross-entropy is considered, but also the type distribution of the pseudo-labeled samples is determined based on the k-neighbor, which is beneficial to improve the quality of the added samples, and therefore, the self-training and k-neighbor based semi-supervised classification method can improve the recognition rate of benign and malignant tumors.
[0025] The advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0026] The drawings constituting a part of the specification of the present application are used to provide a further understanding of the present application, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute an improper limitation on the present application.
[0027] Figure 1 The flowchart of the self-training and k-neighbor based semi-supervised classification method for benign and malignant tumors of the first embodiment.
[0028] Figure 2 The flowchart of the sample set iterative training of the first embodiment. DETAILED DESCRIPTION
[0029] Explanation of technical terms:
[0030] (1) The class is the label of the labeled sample in the full-supervised or semi-supervised classification, such as a benign tumor, and the type is determined according to the distribution of the sample in the feature space, including safe, boundary and outlier sample types. The sample distributed in the homogeneous region (all benign or malignant samples) is called a safe sample, the sample distributed near the classification interface of the two types of samples is called a boundary sample, and the sporadic heterogeneous sample far from the homogeneous region is called an outlier sample. The three types of samples can be determined by the k-nearest neighbor method.
[0031] (2) In this embodiment, classifying the tumor image features means labeling the benign and malignant classes of the tumor image, and determining the type of the pseudo-labeled sample means determining the safe, outlier and boundary types of the pseudo-labeled sample by using the K-nearest neighbor algorithm.
[0032] Embodiment one
[0033] As shown in Figure 1 , the embodiment discloses a tumor benign and malignant semi-supervised classification method based on self-training and k-nearest neighbor, which comprises:
[0034] Step 1, obtaining a sample set of tumor images, the sample set comprising a labeled sample set and an unlabeled sample set;
[0035] Step 2, self-training the current sample set to obtain a current classifier;
[0036] Step 3, classifying the current unlabeled sample set by using the current classifier to obtain a pseudo-labeled sample set, and using the cross-entropy algorithm and the k-nearest neighbor algorithm to screen out pseudo-labeled samples meeting the adding condition to expand the current labeled sample set, and obtaining an updated labeled sample set; at the same time, the corresponding added pseudo-labeled samples are deleted from the current unlabeled sample set, and an updated unlabeled sample set is obtained;
[0037] Step 4, taking the updated labeled sample set and the updated unlabeled sample set as the current sample set; training the current labeled sample set to obtain a current classifier;
[0038] Step 5, repeating steps 3 to 4 until the training end condition is met, and using the classifier trained by the last updated labeled sample set as the final classifier;
[0039] Step 6, inputting the tumor image data to be classified into the final classifier to obtain the tumor benign and malignant classification result.
[0040] In step 1: obtain a sample set composed of extracted tumor image features, in this embodiment, the tumor image feature sample set includes a small number of samples with benign and malignant annotations and a large number of samples without benign and malignant annotations, the tumor image features include information about the size, shape, location, calcification, etc. of the tumor obtained from a hospital digital imaging instrument, and can also include morphological or texture features of the tumor extracted according to existing machine learning feature extraction methods such as a histogram of oriented gradients (HOG) or a deep convolutional neural network.
[0041] In step 2: self-training is performed on the current sample set to obtain a current classifier, including:
[0042] The current sample set in the self-training process is an initial sample set L0∪U0of the obtained tumor images, and a preset classifier is used for self-training on the initial sample set L0∪U0to obtain a current classifier f0; the preset classifier is a commonly used classifier such as a support vector set or a decision tree.
[0043] Suppose that the initial labeled sample set is L0={(x1,y1),(x2,y2),...,(x l ,y l )} and there are l labeled samples, where y i ∈{0,1} and 0 represents a negative class (benign) sample and 1 represents a positive class (malignant) sample; the initial unlabeled sample set is U0={x1,x2,...,x u} and there are u unlabeled samples.
[0044] The self-training method is used to train the semi-supervised data set L0∪U0to obtain an initial classifier f0.
[0045] In step 3: the current classifier is used to classify the samples in the current unlabeled sample set to obtain pseudo-labeled samples, the cross-entropy of each pseudo-labeled sample is calculated according to its class label and class posterior probability, and the type of the pseudo-labeled sample is determined according to the k-nearest neighbor class information of the pseudo-labeled sample in the initial labeled sample set.
[0046] Step 3 includes:
[0047] Step 301: calculate the cross-entropy of the pseudo-labeled sample, specifically:
[0048] The current classifier is used to classify the samples in the current unlabeled sample set to obtain the benign and malignant annotations of each unlabeled sample X i (i=1,2,...) in the current unlabeled sample set and the posterior probability p i∈ [0, 1], each unlabeled sample in the current unlabeled sample set is assigned a benign or malignant label and is called a pseudo-labeled sample, and the unlabeled sample X i is calculated according to the following formula i :
[0049]
[0050] wherein the positive class posterior probability p i is calculated according to the following formula
[0051] For a support vector machine, wherein w and b are support vector machine parameters;
[0052] For a decision tree, wherein n is the number of samples falling on the leaf node where the unlabeled sample X i falls, and n1 is the number of positive class samples falling on the leaf node where the unlabeled sample X i falls.
[0053] Step 302: Determine the type of the pseudo-labeled sample, specifically:
[0054] Calculate the Euclidean distance d i between each unlabeled sample X j (i = 1, 2,...) in the current unlabeled sample set and each labeled sample x ij (j = 1, 2,..., l) in the initial labeled sample set:
[0055]
[0056] wherein X in and x jn represent the nth-dimensional features of the samples X i and x j , respectively, and the sample feature dimension is s. Select the k (assuming k = 5) labeled samples with the smallest Euclidean distance as the nearest neighbor samples of the unlabeled sample X i , and determine the type (i.e., safe, boundary, outlier) of the pseudo-labeled sample by judging the number of nearest neighbor samples with the same class as the pseudo-labeled sample among the k nearest neighbor samples;
[0057] It should be noted that, in the process of calculating the Euclidean distance between the unlabeled sample and the labeled sample in each iteration, only the labeled samples in the initial labeled sample set are used to calculate the Euclidean distance.
[0058] The type of the pseudo-labeled sample is determined according to the following formula: if 4 or 5 of the 5 nearest neighbor samples have the same class as the pseudo-labeled sample , then the pseudo-labeled sample the type of the pseudo-labeled sample is safe, if the categories of 2 or 3 neighbor samples in the 5 neighbor samples are the same as the category of the pseudo-labeled sample, then the pseudo-labeled sample is considered to be of the type of safe, otherwise the pseudo-labeled sample is considered to be of the type of boundary, and the pseudo-labeled sample is considered to be of the type of outlier.
[0059] Step 303: updating the current labeled sample set and the current unlabeled sample set, specifically:
[0060] For each type of pseudo-labeled sample, in the order of safe, boundary, and outlier, the pseudo-labeled sample is added to the current labeled sample set in the order of cross-entropy from small to large, the current labeled sample set is updated to obtain an updated labeled sample set, and the corresponding added pseudo-labeled sample is deleted from the current unlabeled sample set to obtain an updated unlabeled sample set.
[0061] The added number is a human-set hyperparameter, and the added number of pseudo-labeled samples of the benign and malignant categories is the same, specifically:
[0062] Suppose the number of pseudo-labeled samples added for the benign and malignant categories is m, and m increases uniformly with the increase of the iteration number, and the increase amplitude is a hyperparameter, which is set by a human.
[0063] The way of adding benign pseudo-labeled samples is: after the benign pseudo-labeled samples are divided according to the safe, boundary, and outlier type information of the samples, the benign pseudo-labeled samples in each type are arranged in the order of cross-entropy from small to large, and are sequentially added to the current labeled sample set until the added number is m.
[0064] If the number of benign pseudo-labeled samples of the type of safe is less than m, then samples of the type of boundary are sequentially added to the current labeled sample set; if the sum of the number of samples of the types of safe and boundary is less than m, then samples of the type of outlier are sequentially added to the current labeled sample set; if the sum of the number of benign pseudo-labeled samples of all types is less than m, then the iteration is ended.
[0065] It can be understood that the way of adding malignant pseudo-labeled samples is the same as the way of adding benign pseudo-labeled samples, which will not be repeated.
[0066] In step 4: the updated labeled sample set and the unlabeled sample set are used as the current sample set, the current labeled sample set is trained to obtain a current classifier; in this embodiment, the updated labeled sample set is trained by using a preset classifier.
[0067] In step 5: steps 3 and 4 are repeated multiple times until an iteration stop condition is reached, i.e. the pseudo-labeled samples do not meet the addition condition and cannot be used to expand the current labeled sample set, and the classifier trained using the last updated labeled sample set is used as the final classifier;
[0068] It should be noted that in the tth(t = 1, 2, 3…) iteration training process, the classifier f t-1 The sample set in the t-1th training process is updated, and the updated sample set is used as the current sample set L t ∪U t , the current labeled sample set L t is trained to obtain the current classifier f t , and the current sample set is updated until the training end condition is met;
[0069] In particular, in the first iteration process, the initial classifier f0obtained by the 0th training (i.e. self-training) is used to update the initial sample set L0∪U0, and the updated sample set is used as the current sample set L1∪U1.
[0070] In the iteration training process, it is assumed that the added pseudo-labeled sample set is denoted as P, the labeled sample set after adding the pseudo-labeled sample (i.e. the updated labeled sample set) is denoted as: L t = L t-1 ∪P; the unlabeled sample set obtained by deleting the pseudo-labeled sample from the current unlabeled sample set U t-1 is denoted as: U t = U t-1 \P; the updated labeled sample set L t = L t-1 ∪P is trained using a pre-set classifier to obtain the current classifier f t , t = 1, 2, 3…, and after iteration, the final tumor benignity classifier is trained according to the final labeled sample set;
[0071] In step 6: the tumor image data to be classified is input into the final classifier, the class of the tumor image feature to be evaluated is classified, and the benignity class of the tumor is output.
[0072] Embodiment Two
[0073] The embodiment discloses a tumor benignity and malignancy semi-supervised classification system based on self-training and k-nearest neighbor, comprising:
[0074] A sample set acquisition module configured to acquire a sample set of tumor images, the sample set comprising a labeled sample set and an unlabeled sample set;
[0075] The classifier obtaining module is configured to perform self-training on the current sample set to obtain a current classifier.
[0076] The sample set updating module is configured to classify the current unlabeled sample set by using the current classifier to obtain a pseudo-labeled sample set, filter out pseudo-labeled samples meeting an adding condition by using a cross-entropy algorithm and a k-nearest neighbor algorithm, expand the current labeled sample set by using the pseudo-labeled samples meeting the adding condition, obtain an updated labeled sample set, and delete the corresponding added pseudo-labeled samples from the current unlabeled sample set to obtain an updated unlabeled sample set.
[0077] The loop training module is configured to take the updated labeled sample set and the updated unlabeled sample set as the current sample set.
[0078] The current labeled sample set is trained to obtain the current classifier, the sample set is continuously updated, and the training is ended until a training end condition is met, and a classifier trained by using the last updated labeled sample set is taken as a final classifier.
[0079] The tumor classification module is configured to input tumor image data to be detected into the final classifier to obtain a benign or malignant classification result of the tumor.
[0080] Embodiment three
[0081] An object of the embodiment is to provide a computer-readable storage medium.
[0082] The computer-readable storage medium stores a computer program, and the program is executed by a processor to implement the steps in the tumor benign or malignant semi-supervised classification method based on self-training and k-nearest neighbors according to the embodiment 1 of the present disclosure.
[0083] Embodiment four
[0084] An object of the embodiment is to provide an electronic device.
[0085] The electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, and the processor implements the steps in the tumor benign or malignant semi-supervised classification method based on self-training and k-nearest neighbors according to the embodiment 1 of the present disclosure when executing the program.
[0086] The steps and methods involved in the devices of the above embodiments two, three and four correspond to the embodiment one, and the specific embodiments can be referred to the related description part of the embodiment one. The term “computer-readable storage medium” should be understood as including a single medium or multiple media of one or more instruction sets; and should also be understood as including any medium capable of storing, encoding or carrying instruction sets for execution by a processor and causing the processor to perform any method in the present disclosure.
[0087] Those skilled in the art should understand that the modules or steps of the present application described above can be realized by a general computer device, or alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device, or they can be respectively manufactured into individual integrated circuit modules, or a plurality of modules or steps among them can be manufactured into a single integrated circuit module. The present application is not limited to any specific combination of hardware and software.
[0088] The specific embodiments of the present application described above in conjunction with the accompanying drawings are not intended to limit the protection scope of the present application. Those skilled in the art should understand that various modifications or changes made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A tumor benignity-malignancy semi-supervised classification method based on self-training and k-nearest neighbors, characterized in that, The method comprises the following steps: Step 1, obtaining a sample set of tumor images, wherein the sample set comprises a labeled sample set and an unlabeled sample set; Step 2, self-training the current sample set to obtain a current classifier; Step 3, classifying the current unlabeled sample set by using the current classifier to obtain a pseudo-labeled sample set, screening pseudo-labeled samples meeting an adding condition by using a cross-entropy algorithm and a k-nearest neighbor algorithm, expanding the current labeled sample set by using the pseudo-labeled samples, obtaining an updated labeled sample set, and deleting the corresponding added pseudo-labeled samples from the current unlabeled sample set to obtain an updated unlabeled sample set; The step of screening pseudo-labeled samples meeting the condition by using the cross-entropy algorithm and the k-nearest neighbor algorithm comprises the following steps: calculating the cross-entropy of each pseudo-labeled sample according to a class label and a class posterior probability of the pseudo-labeled sample; determining the type of the pseudo-labeled sample according to k-nearest neighbor class information of the pseudo-labeled sample in the initial labeled sample set, wherein the type is determined according to the distribution of the sample in a feature space, and the type comprises a safe type, a boundary type and an outlier type; sorting the pseudo-labeled samples according to the type and the cross-entropy, and adding a certain number of pseudo-labeled samples to the labeled sample set, wherein the number is a hyperparameter set by a person. Step 4, taking the updated labeled sample set and the updated unlabeled sample set as the current sample set, and training the current labeled sample set to obtain a current classifier; Step 5, repeating steps 3 to 4 until a training end condition is met, and taking the classifier trained by using the last updated labeled sample set as a final classifier; Step 6, inputting tumor image data to be classified into the final classifier to obtain a tumor benignity classification result.
2. The semi-supervised classification method of benign and malignant tumors based on self-training and k-nearest neighbors as claimed in claim 1, characterized in that, The training end condition comprises that the pseudo-labeled samples do not meet the adding condition, and the current labeled sample set cannot be expanded by using the pseudo-labeled samples.
3. The self-training and k-nearest neighbor based semi-supervised classification method for tumor malignancy according to claim 1, wherein, The cross entropy of each pseudo-labeled sample is calculated according to the class label and the class posterior probability of the pseudo-labeled sample comprising: wherein, denotes a pseudo-labeled sample, denotes the posterior probability that the class is malignant.
4. The semi-supervised classification method of benign and malignant tumors based on self-training and k-nearest neighbors as claimed in claim 3, characterized in that, The step of determining the type of the pseudo-labeled sample according to the k-nearest neighbor class information of the pseudo-labeled sample in the initial labeled sample set comprises the following steps: calculating the Euclidean distance of each unlabeled sample in the unlabeled sample set to the initial labeled sample, and selecting k initial labeled samples with the smallest Euclidean distance as the k-nearest neighbor samples of the unlabeled sample; determining the type of the pseudo-labeled sample by judging the number of the k-nearest neighbor samples with the same class as the pseudo-labeled sample.
5. The semi-supervised classification method of benign and malignant tumors based on self-training and k-nearest neighbors as claimed in claim 4, characterized in that, The step of determining the type of the pseudo-labeled sample by judging the number of the k-nearest neighbor samples with the same class as the pseudo-labeled sample comprises the following steps: assuming that k=5, if 5 or 4 samples in the 5 nearest neighbor samples have the same class as the pseudo-labeled sample, the type of the pseudo-labeled sample is determined as safe, if 3 or 2 samples in the 5 nearest neighbor samples have the same class as the pseudo-labeled sample, the type of the pseudo-labeled sample is determined as boundary, otherwise, the type of the pseudo-labeled sample is determined as outlier.
6. The self-training and k-nearest neighbor based semi-supervised classification method of benign and malignant tumors according to claim 5, characterized in that, The step of sorting the pseudo-labeled samples according to the type and the cross-entropy, and adding a certain number of pseudo-labeled samples to the labeled sample set comprises the following steps: For each category of pseudo-labeled samples, the pseudo-labeled samples are sorted according to the safety, boundary and outlier types, and the pseudo-labeled samples are selected in each type of pseudo-labeled samples in the order of cross-entropy from small to large and added to the labeled sample set, and the number of additions is a hyperparameter artificially set, and the number of additions of the pseudo-labeled samples of the benign and malignant categories is the same.
7. A self-training and k-nearest neighbor based semi-supervised classification system for tumor malignancy, characterized in that, The method comprises the following steps: The sample set acquisition module is configured to acquire a sample set of tumor images, wherein the sample set comprises a labeled sample set and an unlabeled sample set; The classifier acquisition module is configured to perform self-training on the current sample set to obtain a current classifier; The sample set update module is configured to classify the current unlabeled sample set by using the current classifier to obtain a pseudo-labeled sample set, filter out pseudo-labeled samples meeting an addition condition by using a cross-entropy algorithm and a k-nearest neighbor algorithm, expand the current labeled sample set, obtain an updated labeled sample set, and delete the corresponding added pseudo-labeled samples from the current unlabeled sample set to obtain an updated unlabeled sample set; The step of filtering out the pseudo-labeled samples meeting the condition by using the cross-entropy algorithm and the k-nearest neighbor algorithm comprises the following steps: Calculate the cross-entropy of each pseudo-labeled sample according to the category label and the category posterior probability of the pseudo-labeled sample; Determine the type of the pseudo-labeled sample according to the k-nearest neighbor category information of each pseudo-labeled sample in the initial labeled sample, wherein the type is determined according to the distribution of the sample in a feature space and comprises a safe, boundary and outlier sample type; Sort the pseudo-labeled samples according to the type and the cross-entropy of the pseudo-labeled samples, add a certain number of pseudo-labeled samples to the current labeled sample set, and the number of additions is a hyperparameter artificially set; and The loop training module is configured to take the updated labeled sample set and the updated unlabeled sample set as the current sample set; Train the current labeled sample set to obtain the current classifier, continuously update the sample set, and stop until a training end condition is met, and train the classifier obtained by using the last updated labeled sample set to obtain a final classifier; 8. A computer-readable storage medium having stored thereon a program, characterized in that, The tumor classification module is configured to input tumor image data to be classified into the final classifier to obtain a tumor benign and malignant classification result.
9. An electronic device comprising a memory, a processor, and a program stored in the memory and capable of running on the processor, characterized by The program is executed by the processor to implement the steps in the tumor benign and malignant semi-supervised classification method based on self-training and k-nearest neighbors in any one of claims 1-6. The processor executes the program to implement the steps in the tumor benign and malignant semi-supervised classification method based on self-training and k-nearest neighbors in any one of claims 1-6.
Citation Information
Patent Citations
Semi-supervised classification method of unbalance data
CN101980202A
Graph-based direct-push type semi-supervised pedestrian re-identification method
CN111027421A