A noisy label image classification method based on near neighbor anchor label correction
By using a nearest-neighbor anchor label correction method, reliable samples in the noisy subset are screened and transferred to the clean subset. Combining supervised and semi-supervised learning, the problem of noise labels affecting the generalization of the model is solved, and the performance of the image classification model in high-noise environments is improved.
Patent Information
- Application Number
- CN202411827380.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-12
AI Technical Summary
In existing technologies, noisy labels lead to poor generalization of image classification models, especially training failures under high noise rates, and existing methods fail to make full use of noisy datasets, resulting in degraded model performance.
A nearest neighbor anchor label correction method is adopted. By calculating the confidence of each category of samples in the clean subset, potential correctable samples are screened from the noisy subset. The k-nearest neighbor anchor criterion and mixup method are used to transfer samples with consistent predictions from the noisy subset to the clean subset. The model is trained by combining supervised learning and semi-supervised learning.
Effectively utilizing noisy subsets under high noise rates improves the model's generalization ability and performance, while dynamically expanding the clean sample subset enhances the model's learning performance in noisy environments.
Smart Images

Figure CN119762857B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image classification, and in particular relates to a method for classifying noisy labeled images based on nearest neighbor anchor point label correction. Background Technology
[0002] The performance of such models depends on large-scale, accurately labeled datasets, which limits model development. Obtaining large amounts of accurately labeled image data is expensive and time-consuming, especially in specialized fields where annotation by domain experts is required, making large-scale, accurately labeled datasets difficult to acquire.
[0003] To address this issue, a common approach is to crowdsource labeling to non-experts or obtain datasets from internet search engines. While this method solves the problems of difficult and expensive dataset acquisition, it leads to a large number of mislabeled data, i.e., noisy labels. Experiments show that deep neural networks can even learn from completely randomly generated noisy data. Therefore, datasets containing noisy labels can affect the model's ability to learn correct class boundaries, resulting in poor generalization and even training failure when the noise rate is too high.
[0004] Currently, in the field of noise label learning, sample selection-based methods are considered the most promising approach. These methods divide the dataset into clean and noisy subsets using sample selection techniques, such as the small loss criterion, and then apply different learning methods to each. However, current methods do not fully utilize the noisy data subsets. The purely semi-supervised learning approach fails to fully exploit the potential of the noise labels, especially under high noise rates. The lack of sufficient labeled samples leads to low accuracy in predicting pseudo-labels for the noisy subsets, further degrading model performance. Summary of the Invention
[0005] To address the problems existing in the background art, the present invention provides a noisy labeled image classification method based on nearest neighbor anchor point label correction, characterized in that it includes:
[0006] S1: Obtain an image dataset with noise labels and build an image classification model;
[0007] S2: Train the image classification model and classify the test image using the trained image classification model. The training of the image classification model includes three training stages.
[0008] S21: In the first training phase, the image classification model is pre-trained to enable it to acquire feature extraction and feature classification capabilities.
[0009] S22: In the second training phase, based on the small loss criterion, the image dataset with noisy labels is divided into a clean subset and a noisy subset. For the clean subset and the noisy subset, a combination of supervised learning and semi-supervised learning is used to train the image classification model.
[0010] S23: In the third training phase, based on the nearest neighbor anchor criterion, calculate the confidence level of each class of samples in the clean subset; select potential correctable samples from the noisy subset according to the confidence level of each class of samples;
[0011] S24: Based on the k-nearest neighbor anchor point criterion, select the k nearest neighbor samples of the potential correctable sample from the clean subset, and calculate the mixup prediction consistency of the image classification model for the potential correctable sample and its k nearest neighbor samples; and transfer the potential correctable sample with consistent prediction from the noisy subset to the clean subset.
[0012] S25: Update the noisy subset and the clean subset. Train the image classification model using a combination of supervised and semi-supervised learning for the clean subset and the noisy subset. Repeat steps S23-S25 until the preset number of iterations is reached to obtain the trained image classification model.
[0013] The present invention has at least the following beneficial effects
[0014] This invention addresses the problem of imbalanced sample distribution caused by varying learning difficulties and confidence thresholds among different categories of samples within a clean subset. This is achieved by calculating the confidence scores of samples from each category within the clean subset. This allows for linear adjustment of the thresholds for each category based on a global threshold and the confidence score of its own class. Using the calculated category confidence scores, a subset of potentially correctable samples is selected from the noisy subset. Furthermore, the k nearest neighbors of these potentially correctable samples are selected from the clean subset using the k-nearest neighbor anchor criterion. A mixed sample is generated using the mixup method and fed into the network for prediction. Samples whose predictions match the original results and whose confidence scores reach the threshold are then updated to the clean subset. This method dynamically expands the clean sample subset during training and transforms the learning process from unsupervised and semi-supervised to supervised learning for reliable samples in the noisy subset, enabling the model to learn from the samples more comprehensively. Through this method, this invention effectively utilizes the noisy subset even under high noise rates, improving the model's generalization ability and performance. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0016] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0017] Please see Figure 1 This invention provides a noisy labeled image classification method based on nearest neighbor anchor label correction, comprising:
[0018] S1: Obtain an image dataset with noise labels and build an image classification model;
[0019] Preferably, the image classification model includes: a feature extractor. Feature projector and classifier The feature extractor The classifier is used for feature extraction from samples. Used for feature extractors The extracted features are classified, and the feature projector Used for feature extractors The extracted features are then dimensionality-reduced to obtain the low-dimensional features of the sample.
[0020] In this embodiment, the image dataset with noise labels contains images of multiple categories, but the labels may contain noise, and the noise rate of the labels is known. An image classification model is constructed, which consists of three main parts: a feature extractor... Feature projector and classifier Feature extractor Feature extraction is used to extract features from input image samples and generate high-dimensional feature vectors. Convolutional Neural Networks (CNNs) can be used as feature extractors. CNNs, through multiple layers of convolution and pooling operations, are able to extract local and global features from images; for example, the ResNet series of feature extractors; feature projectors. The feature projector is used to reduce the dimensionality of the high-dimensional feature vectors generated by the feature extractor, resulting in low-dimensional feature vectors. This helps reduce computation while preserving key information. Fully connected layers or dimensionality reduction techniques (such as Principal Component Analysis (PCA), t-SNE, etc.) can be used as feature projectors. In this example, a fully connected layer is used for dimensionality reduction, and its output dimension can be adjusted according to actual needs. The classifier is used to classify the low-dimensional feature vectors generated by the feature projector, outputting the class label of the sample. A fully connected layer with a softmax function can be used as the classifier. The softmax function converts the output into a probability distribution, thus obtaining the predicted probability for each class.
[0021] S2: Train the image classification model and classify the test image using the trained image classification model. The training of the image classification model includes three training stages.
[0022] S21: In the first training phase, the image classification model is pre-trained to enable the image model to acquire feature extraction and feature classification capabilities.
[0023] Preferably, the preheating training of the image classification model includes:
[0024] S211: Frozen Classifier Image datasets with noise labels Discarding labels yields an unlabeled dataset. N represents the number of samples. Indicates the first One sample, Indicates sample The labels, based on the unlabeled dataset Using unsupervised contrastive learning to improve the feature extractor and feature projector Training is performed using contrastive loss as the loss function, and training is repeated. Rounds;
[0025] In this embodiment, strong and weak enhancements are used to construct positive and negative sample pairs. Strongly enhanced samples form negative sample pairs with the original samples, while weakly enhanced samples form positive sample pairs with strongly enhanced samples (or the original samples, but typically strong enhancements are chosen to maintain consistency). This helps the model learn more discriminative feature representations. A contrastive loss function (such as InfoNCE loss) is used to train the feature extractor. and feature projector .
[0026] S212: Freeze Feature Extractor and feature projector Based on image datasets with noise labels For classifiers Supervised training is performed using cross-entropy loss as the loss function, and training is repeated. Rounds.
[0027] Preferably, the feature extractor is trained using unsupervised contrastive learning. and feature projector The training includes:
[0028] Sample Strongly enhanced samples were obtained by performing strong enhancement and weak enhancement respectively. and weakly enhanced samples Enhanced samples Compared with the original sample Constructing negative sample pairs, weakly enhanced samples Compared with the original sample Positive sample pairs are formed; the contrastive loss function is used to bring the feature distance of positive sample pairs output by the feature projector closer and to widen the feature distance of negative sample pairs output by the feature projector.
[0029] In this embodiment, the sample Strong enhancements include techniques such as rotation, scaling, cropping, and color dithering. For example, rotating the image by a certain angle, such as ±30 degrees or ±45 degrees, can simulate a wider range of image changes. In this embodiment, the sample... Minor enhancement includes slight rotation, slight scaling, slight cropping, or slight color adjustments, such as rotating the image by a small angle, like ±5 degrees or ±10 degrees. The purpose of minor enhancement is to increase the diversity of data without significantly altering the image content, while avoiding the introduction of excessive noise or interfering information.
[0030] The contrastive loss function described in this embodiment includes:
[0031] =
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040] in, This represents the contrastive loss function. Represents the cosine similarity function; Indicates the temperature coefficient; Represents an exponential function; This represents the number of samples in dataset D.
[0041] S22: In the second training phase, based on the small loss criterion, the image dataset with noisy labels is divided into a clean subset and a noisy subset. For the clean subset and the noisy subset, a combination of supervised learning and semi-supervised learning is used to train the image classification model.
[0042] Preferably, dividing the image dataset with noise labels into a clean subset and a noisy subset includes:
[0043] S221: Input each sample of the image dataset with noisy labels into the pre-trained image classification model, and calculate the divergence between the predicted label output by the classifier and the actual label;
[0044] Preferably, the divergence between the predicted label output by the computational classifier and the actual label includes:
[0045]
[0046] in, Indicates the first The divergence of a sample Represents the divergence function. It is the KL divergence function; The output of the classifier represents the first... Predicted label for each sample, Indicates the first The actual label of each sample.
[0047] In this embodiment, each sample in the image dataset with noisy labels is input into the pre-trained image classification model, and the divergence between the predicted label output by the classifier and the actual label is calculated as an indicator to measure the reliability of the sample label.
[0048] S222: Iterate through each category of the image dataset with noisy labels, sort the samples in each category according to their divergence from smallest to largest, and select the top... Samples representing a certain proportion are added to the clean subset, and the remaining samples are added to the noise subset. After traversing all categories, the resulting clean and noise subsets are obtained. This represents the noise rate of a noisy labeled image dataset.
[0049] In this embodiment, step S22 is used to effectively utilize the image dataset with noisy labels to train a more robust image classification model.
[0050] S23: In the third training phase, based on the nearest neighbor anchor criterion, calculate the confidence level of each class of samples in the clean subset; select potential correctable samples from the noisy subset according to the confidence level of each class of samples;
[0051] Preferably, step S23 includes:
[0052] S231: Samples from the clean subset Input the data into the image classification model to obtain the prediction results for the sample:
[0053]
[0054]
[0055] in, Indicates sample Prediction results for each category; Indicates sample The actual label, Indicates sample Predicted labels; Represents a clean subset; express The first in A clean sample;
[0056] S232: Calculate the global sample confidence of the clean subset:
[0057]
[0058] in, Indicates the first The global sample confidence of the clean subset at the next iteration. This represents the total number of classes in the clean subset of samples. This represents the attenuation coefficient (0.95~0.99). Indicates the number of samples in the clean subset; Represents the maximum value function;
[0059] S233: Calculate the confidence scores for each category within the clean subset based on the global sample confidence scores of the clean subset:
[0060]
[0061]
[0062] in, Indicates the first The clean subset categories in the next iteration Confidence level;
[0063] S234: Subset the noise Noise samples Input the data into an image classification model to obtain the predicted labels and prediction confidence of noisy samples;
[0064]
[0065]
[0066] in, Represents a subset of noise The predicted label of the k-th noise sample in the dataset; express The prediction confidence level; and based on the predicted labels and prediction confidence levels of the noisy samples in the noisy subset, and the confidence levels of each category in the clean subset, a potentially correctable sample set is selected from the noisy subset:
[0067]
[0068] in, Represents a subset of noise; Representing noise samples Predicted labels; This represents a potentially correctable sample set. Represents noise samples in a noise subset. The prediction confidence level; Indicates categories in a clean subset The confidence level.
[0069] S24: Based on the k-nearest neighbor anchor point criterion, select the k nearest neighbor samples of the potential correctable sample from the clean subset, and calculate the mixup prediction consistency of the image classification model for the potential correctable sample and its k nearest neighbor samples; and transfer the potential correctable sample with consistent prediction from the noisy subset to the clean subset.
[0070] Preferably, step S24 includes:
[0071] S241: Include a potentially correctable sample set Potentially correctable samples Input image classification model to obtain feature projector Output low-dimensional feature set , , Indicates the number of potentially correctable samples;
[0072] S242: Select a clean sample subset Clean samples Input image classification model to obtain feature projector Output low-dimensional feature set , ;
[0073] S243: Low-dimensional features of potentially correctable samples Input the KNN module to calculate the potential correctable samples and clean samples. Nearest neighbor sample set ;
[0074] S244: Assign potentially correctable samples to their corresponding... Nearest neighbor samples are mixed up to obtain a mixed up fused sample set. , ,in, express The One nearest neighbor sample; express The One mixup fusion sample; Indicates the weighting factor;
[0075] S245: Input the mixup fused samples of the potentially correctable samples into the image classification model to obtain the prediction results of the mixup fused samples; for the potentially correctable samples... The fusion prediction labels of potentially correctable samples are obtained by averaging the prediction results of the fusion samples across all categories. With fusion confidence :
[0076]
[0077]
[0078] S246: Based on the confidence levels of each category of samples in the clean subset and the fusion prediction of potentially correctable samples, predict the labels. With fusion confidence Obtain a set of correctable samples :
[0079]
[0080] in, Indicates in Sub-iteration category The confidence level is calculated through step S233; Indicates the number of correctable samples;
[0081] S247: Set of correctable samples The samples in the middle are transferred to a clean subset.
[0082] In this embodiment, steps S23 and S24 can effectively filter out potential correctable samples from the noisy subset, and further verify their correctness through the Mixup and k-nearest neighbor anchor criteria, and finally transfer them to the clean subset to improve the performance of the image classification model.
[0083] S25: Update the noisy subset and the clean subset. Train the image classification model using a combination of supervised and semi-supervised learning for the clean subset and the noisy subset. Repeat steps S23-S25 until the preset number of iterations is reached to obtain the trained image classification model.
[0084] Preferably, the step of training the image classification model using a combination of supervised and semi-supervised learning on the clean subset and the noisy subset includes:
[0085] The clean samples in the clean subset are input into the image classification model to obtain the predicted labels of the clean samples. The cross-entropy loss function is constructed based on the predicted labels and the true labels of the clean samples.
[0086]
[0087] in, Represents the cross-entropy loss function. Let cross-entropy be the loss function. For feature extractors, For classifiers; Represents a clean subset; express The first in A clean sample; Indicates the first A clean sample The true label; Indicates the first A clean sample Predicted labels;
[0088] Samples from the clean subset and samples from the noisy subset are mixed to generate a mixed sample set. A semi-supervised loss function is constructed based on the original labels of the mixed samples and their prediction results.
[0089]
[0090]
[0091]
[0092] in, This represents the semi-supervised loss function. Represents a mixed sample set. This indicates the number of samples in the mixed sample set. The cross-entropy loss function; express Mixture functions; and Indicates the first Mixed samples and its corresponding tags ; Represents a subset of noise The first in One noise sample; Indicates sample Predicted labels;
[0093] The noise samples in the noise subset are subjected to strong enhancement and weak enhancement respectively to obtain strongly enhanced noise samples and weakly enhanced noise samples; the strongly enhanced noise samples are then... Compared with the original sample Constructing negative sample pairs, weakly enhanced samples Compared with the original sample Positive sample pairs are constructed, and a contrastive loss function is built to bring the feature distance of positive sample pairs output by the feature projector closer and to widen the feature distance of negative sample pairs output by the feature projector. The contrastive loss function includes:
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103] in, This represents the contrastive loss function. Represents a subset of noise The number of noisy samples; Indicates the temperature coefficient; Represents the cosine similarity function; For the sample Weakly enhanced samples; For the sample Weakly enhanced samples; For the sample Strongly enhanced samples; For the sample Strongly enhanced samples; This represents an exponential function.
[0104] A total loss function is constructed based on the cross-entropy loss function, the semi-supervised loss function, and the contrastive loss function. The image classification model is then subjected to supervised and semi-supervised learning using this total loss function.
[0105]
[0106] in, Represents the total loss function. and This represents an adjustable weight parameter.
[0107] In this embodiment, the cross-entropy loss function is used. The model's performance on clean subsets was measured using a semi-supervised loss function. Information from mixed samples is used to help the model learn on noisy data, and the loss function is learned through comparison. The robustness of the model to noisy samples is enhanced. By combining the cross-entropy loss function, the semi-supervised loss function, and the contrastive loss function, the model will learn from both clean and noisy subsets simultaneously, thereby improving its generalization ability in noisy environments.
[0108] In summary, this invention solves the problem of unbalanced sample distribution caused by different learning difficulties and confidence thresholds among different categories of samples in the clean subset by calculating the confidence scores of samples of each category. This allows the thresholds for each category to be linearly adjusted based on the global threshold and the confidence score of its own class. Using the calculated category confidence scores, a subset of potentially correctable samples is selected from the noisy subset, and the k nearest neighbors of these potentially correctable samples are selected from the clean subset using the k-nearest neighbor anchor criterion. A mixed sample is generated using the mixup method, fed into the network for prediction, and samples whose prediction results are consistent with the original results and whose confidence scores reach the threshold are selected to update the clean subset. This method dynamically expands the clean sample subset during training, while transforming the reliable samples in the noisy subset from unsupervised and semi-supervised learning into supervised learning, enabling the model to learn from the samples more fully. Through the above method, this invention can effectively utilize the noisy subset even under high noise rates, improving the model's generalization ability and performance.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A noisy labeled image classification method based on nearest neighbor anchor label correction, characterized in that, include: S1: Obtain an image dataset with noise labels and build an image classification model; The image classification model includes: a feature extractor. Feature projector and classifier The feature extractor The classifier is used for feature extraction from samples. Used for feature extractors The extracted features are classified, and the feature projector Used for feature extractors The extracted features are then dimensionality-reduced to obtain the low-dimensional features of the sample. S2: Train the image classification model and classify the test image using the trained image classification model. The training of the image classification model includes three training stages. S21: In the first training phase, the image classification model is pre-trained to enable it to acquire feature extraction and feature classification capabilities. S22: In the second training phase, based on the small loss criterion, the image dataset with noisy labels is divided into a clean subset and a noisy subset. For the clean subset and the noisy subset, a combination of supervised learning and semi-supervised learning is used to train the image classification model. S23: In the third training phase, based on the nearest neighbor anchor criterion, calculate the confidence level of each class of samples in the clean subset; select potential correctable samples from the noisy subset according to the confidence level of each class of samples; Step S23 includes: S231: Samples from the clean subset Input the data into the image classification model to obtain the prediction results for the sample: in, Indicates sample Prediction results for each category; Indicates sample The actual label, Indicates sample Predicted labels; Represents a clean subset; express The first in A clean sample; S232: Calculate the global sample confidence of the clean subset: in, Indicates the first The global sample confidence of the clean subset at the next iteration. This represents the total number of classes in the clean subset of samples. Indicates the attenuation coefficient. Indicates the number of samples in the clean subset; Represents the maximum value function; S233: Calculate the confidence scores for each category within the clean subset based on the global sample confidence scores of the clean subset: in, Indicates the first The clean subset categories in the next iteration Confidence level; S234: Subset the noise Noise samples Input the data into an image classification model to obtain the predicted labels and prediction confidence of noisy samples; in, Represents a subset of noise The predicted label of the k-th noise sample in the dataset; express The prediction confidence level; and based on the predicted labels and prediction confidence levels of the noisy samples in the noisy subset, and the confidence levels of each category in the clean subset, a potentially correctable sample set is selected from the noisy subset: in, Represents a subset of noise; Representing noise samples Predicted labels; This represents a potentially correctable sample set. Represents noise samples in a noise subset. The prediction confidence level; Indicates the category of the clean subset Confidence level; S24: Based on the k-nearest neighbor anchor point criterion, select the k nearest neighbor samples of the potential correctable sample from the clean subset, and calculate the mixup prediction consistency of the image classification model for the potential correctable sample and its k nearest neighbor samples; and transfer the potential correctable sample with consistent prediction from the noisy subset to the clean subset. Step S24 includes: S241: Include a potentially correctable sample set Potentially correctable samples Input image classification model to obtain feature projector Output low-dimensional feature set , , Indicates the number of potentially correctable samples; S242: Select a clean sample subset Clean samples Input image classification model to obtain feature projector Output low-dimensional feature set , ; S243: Low-dimensional features of potentially correctable samples Input the KNN module to calculate the potential correctable samples and clean samples. Nearest neighbor sample set ; S244: Assign potentially correctable samples to their corresponding... Nearest neighbor samples are mixed up to obtain a mixed up fused sample set. , ,in, express The One nearest neighbor sample; express The One mixup fusion sample; Indicates the weighting factor; Indicates potentially correctable samples; S245: Input the mixup fused samples of the potentially correctable samples into the image classification model to obtain the prediction results of the mixup fused samples; for the potentially correctable samples... The fusion prediction labels of potentially correctable samples are obtained by averaging the prediction results of the fusion samples across all categories. With fusion confidence : S246: Based on the confidence levels of each category of samples in the clean subset and the fusion prediction of potentially correctable samples, predict the labels. With fusion confidence Obtain a set of correctable samples : in, Indicates in Sub-iteration category The confidence level is calculated through step S233; Indicates the number of correctable samples; S247: Set of correctable samples The samples in the middle are transferred to a clean subset; S25: Update the noisy subset and the clean subset. Train the image classification model using a combination of supervised and semi-supervised learning for the clean subset and the noisy subset. Repeat steps S23-S25 until the preset number of iterations is reached to obtain the trained image classification model.
2. The noisy label image classification method based on nearest neighbor anchor point label correction according to claim 1, characterized in that, The preheating training of the image classification model includes: S211: Frozen Classifier Image datasets with noise labels Discarding labels yields an unlabeled dataset. N represents the number of samples. Indicates the first One sample, Indicates sample The actual labels, based on the unlabeled dataset. Using unsupervised contrastive learning to improve the feature extractor and feature projector Training is performed using contrastive loss as the loss function, and training is repeated. Rounds; S212: Freeze Feature Extractor and feature projector Based on image datasets with noise labels For classifiers Supervised training is performed using cross-entropy loss as the loss function, and training is repeated. Rounds.
3. The noisy labeled image classification method based on nearest neighbor anchor point label correction according to claim 1, characterized in that, The feature extractor utilizes unsupervised contrastive learning. and feature projector The training includes: Sample Strongly enhanced samples were obtained by performing strong enhancement and weak enhancement respectively. and weakly enhanced samples Enhanced samples Compared with the original sample Constructing negative sample pairs, weakly enhanced samples Compared with the original sample Positive sample pairs are formed; the contrastive loss function is used to bring the feature distance of positive sample pairs output by the feature projector closer and to widen the feature distance of negative sample pairs output by the feature projector.
4. The noisy label image classification method based on nearest neighbor anchor point label correction according to claim 1, characterized in that, The step of dividing the image dataset with noise labels into a clean subset and a noisy subset includes: S221: Input each sample of the image dataset with noisy labels into the pre-trained image classification model, and calculate the divergence between the predicted label output by the classifier and the actual label; S222: Iterate through each category of the image dataset with noisy labels, sort the samples in each category according to their divergence from smallest to largest, and select the top... Samples representing a certain proportion are added to the clean subset, and the remaining samples are added to the noise subset. After traversing all categories, the resulting clean and noise subsets are obtained. This represents the noise rate of a noisy labeled image dataset.
5. The noisy label image classification method based on nearest neighbor anchor point label correction according to claim 4, characterized in that, The divergence between the predicted label and the actual label output by the computational classifier includes: in, Indicates the first The divergence of a sample Represents the divergence function. It is the KL divergence function; The output of the classifier represents the first... Predicted label for each sample, Indicates the first The actual label of each sample.
6. The noisy label image classification method based on nearest neighbor anchor point label correction according to claim 1, characterized in that, The method of training the image classification model using a combination of supervised and semi-supervised learning on clean and noisy subsets includes: The clean samples in the clean subset are input into the image classification model to obtain the predicted labels of the clean samples. The cross-entropy loss function is constructed based on the predicted labels and the actual labels of the clean samples. in, Represents the cross-entropy loss function. Let cross-entropy be the loss function. For feature extractors, For classifiers; Represents a clean subset; express The first in A clean sample; Indicates the first A clean sample The actual label; Indicates the first A clean sample Predicted labels; Samples from the clean subset and samples from the noisy subset are mixed to generate a mixed sample set. A semi-supervised loss function is constructed based on the original labels of the mixed samples and their prediction results. in, This represents the semi-supervised loss function. Represents a mixed sample set. This indicates the number of samples in the mixed sample set. The cross-entropy loss function; express Mixture functions; and Indicates the first Mixed samples and its corresponding tags ; Represents a subset of noise The first in One noise sample; Indicates sample Predicted labels; The noise samples in the noise subset are subjected to strong enhancement and weak enhancement respectively to obtain strongly enhanced noise samples and weakly enhanced noise samples; the strongly enhanced noise samples are then... Compared with the original sample Constructing negative sample pairs, weakly enhanced samples Compared with the original sample Positive sample pairs are constructed, and a contrastive loss function is built to bring the feature distance of positive sample pairs output by the feature projector closer and to widen the feature distance of negative sample pairs output by the feature projector. The contrastive loss function includes: in, This represents the contrastive loss function. Represents a subset of noise The number of noisy samples; Indicates the temperature coefficient; Represents the cosine similarity function; For the sample Weakly enhanced samples; For the sample Weakly enhanced samples; For the sample Strongly enhanced samples; For the sample Strongly enhanced samples; A total loss function is constructed based on the cross-entropy loss function, the semi-supervised loss function, and the contrastive loss function. The image classification model is then subjected to supervised and semi-supervised learning using this total loss function. in, Represents the total loss function. and This represents an adjustable weight parameter.
Citation Information
Patent Citations
Image super-resolution reconstruction method based on secondary anchor point neighborhood regression
CN108416736A
Noise-containing label image identification method based on adaptive category equalization
CN116912568A