Noise label-containing image classification method based on sample hierarchical learning and correction
By considering the difficulty of samples in image classification, sample hierarchical learning and correction are carried out, the confusion in the sample selection process in the prior art is solved, and the generalization ability and classification performance of the model are improved.
Patent Information
- Application Number
- CN202411827148.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The prior art ignores the difficulty of samples in image classification, resulting in the misclassification of simple noise samples and difficult clean samples, which in turn produces overfitting.
By calculating the consistency of JS divergence and historical prediction results of image samples, the image dataset is divided into simple clean samples, simple noise samples, difficult clean samples and difficult noise samples, and supervised and unsupervised training loss functions are constructed separately to perform sample hierarchical learning and correction.
It effectively avoids confusion in the sample selection process, improves the model's ability to distinguish different categories, and enhances the generalization ability of the model and the accuracy of label correction.
Smart Images

Figure CN119762856A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image classification, and in particular relates to a noisy label image classification method based on sample hierarchical learning and correction. Background Art
[0002] Image classification is one of the core tasks in the field of computer vision. Thanks to the rapid development of deep learning technology in recent years, it has made significant progress. However, to achieve high-precision image classification, it depends on large-scale and accurately labeled datasets. But in reality, it is difficult and expensive to obtain such datasets. Therefore, collecting large-scale data from Internet applications has become an alternative, but such data often contains a large number of noisy labels, that is, wrong labels.
[0003] Although deep neural networks have powerful fitting capabilities and can fit any data, including completely random noise data, the noise labels in the training data set will cause the model to learn incorrect feature representations, seriously damaging the model performance. To address this problem, existing methods mainly use sample selection and correction strategies, distinguishing clean data from noisy data, performing supervised learning on the former, and unsupervised or semi-supervised learning on the latter. However, these methods often ignore the difficulty of the samples and simply distinguish clean and noisy samples with a small loss criterion, which may cause simple noise samples and difficult clean samples to be misclassified, resulting in more serious overfitting in the label correction process. Summary of the invention
[0004] In order to solve the problems existing in the background technology, solve the problem of ignoring the difficulty of samples in the sample selection and correction process in the prior art, and improve the classification performance of the model, the present invention provides a noisy label image classification method based on sample hierarchical learning and correction, including:
[0005] S1: Obtain an image dataset with noisy labels and build an image classification model;
[0006] S2: training the image classification model, and classifying the test image by using the trained image classification model. The training of the image classification model includes:
[0007] S21: preheat training the image classification model to enable the image classification model to acquire feature extraction and feature classification capabilities;
[0008] S22: Input the image dataset into the image classification model, calculate the JS divergence between the predicted result and the actual label of each image sample, divide the image dataset into a small loss clean subset and a large loss noise subset, and record the predicted result of each image sample;
[0009] S23: According to each image sample in the most recent T a The consistency of the prediction results recorded in the round of training divides the image dataset into a consistent clean subset and an inconsistent noisy subset;
[0010] S24: dividing the image dataset into a simple clean sample subset, a simple noise sample subset, a difficult clean sample subset and a difficult noise sample subset using a sample classification strategy according to the small loss clean subset, the large loss noise subset, the consistent clean subset and the inconsistent noise subset;
[0011] S25: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the simple noise sample subset are corrected and transferred to the simple clean sample subset;
[0012] S26: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the difficult noise sample subset are corrected and transferred to the difficult clean sample subset;
[0013] S27: Construct a supervised training loss function based on the updated simple clean sample subset and the difficult clean sample subset; construct an unsupervised training loss function based on the simple noise sample subset and the difficult noise sample subset; linearly weight the supervised training loss function and the unsupervised training loss function to obtain a total loss function to train the image classification model, and repeat steps S21 to S27 until the preset number of training rounds is reached to obtain a trained image classification model.
[0014] The present invention has at least the following beneficial effects
[0015] The present invention proposes a sample difficulty grading method, which accurately divides samples into simple clean samples, simple noise samples, difficult clean samples and difficult noise samples by comprehensively considering the consistency of JS divergence and historical prediction results. This method effectively avoids the confusion between simple noise samples and difficult clean samples in the sample selection process. By constructing supervised and unsupervised training loss functions for sample subsets of different difficulties, not only a rich set of clean samples is provided for the model to learn, but also difficult clean samples are covered, which helps the model to learn more accurate category boundaries and improve the ability to distinguish different categories. For simple noise samples and difficult noise samples, the present invention sets different correction rounds and correctable confidence thresholds respectively. Simple samples are corrected in the early stage of model learning, ensuring that the model corrects difficult samples after fully learning the corrected simple samples. This hierarchical learning strategy makes the learning process of the model smoother, enhances the generalization ability of the model, and improves the accuracy of label correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION
[0017] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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 only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0018] See also Figure 1 The present invention provides a noisy label image classification method based on sample hierarchical learning and correction, comprising:
[0019] S1: Obtain an image dataset with noisy labels and build an image classification model;
[0020] Preferably, the image classification model comprises: a feature extractor F(·), a feature projector H p (·) and classifier H c (·); the feature extractor F(·) is used to extract features from samples, and the classifier H c (·) is used to classify the features extracted by the feature extractor F(·), and the feature projector H p (·) is used to reduce the dimension of the features extracted by the feature extractor F(·) to obtain the low-dimensional features of the sample.
[0021] In this embodiment, the image dataset with noisy labels contains images of multiple categories, but the labels may contain noise. An image classification model is constructed. The image classification model consists of three main parts: feature extractor F(·), feature projector H p (·) and classifier H c (·); the feature extractor F(·) is used to extract features from the input image samples and generate high-dimensional feature vectors; a convolutional neural network (CNN) can be used as a feature extractor. CNN can extract local and global features from images through multi-layer convolution and pooling operations, such as the feature extractor of the ResNet series; the feature projector H p(·) is used to reduce the dimensionality of the high-dimensional feature vector generated by the feature extractor to obtain a low-dimensional feature vector. This helps to reduce the amount of computation while retaining key information. A fully connected layer or dimensionality reduction technique (such as principal component analysis PCA, t-SNE, etc.) can be used as a feature projector. 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 vector generated by the feature projector and output the category label of the sample. A fully connected layer plus a softmax function can be used as a classifier. The softmax function can convert the output into a probability distribution to obtain the predicted probability of each category.
[0022] S2: training the image classification model, and classifying the test image by using the trained image classification model. The training of the image classification model includes:
[0023] S21: preheat training the image classification model to enable the image classification model to acquire feature extraction and feature classification capabilities;
[0024] Preferably, the preheating training of the image classification model includes:
[0025] S211: Freeze classifier H c (·), the image dataset with noisy labels Discard the label to get an unlabeled dataset N represents the number of samples, x i represents the i-th sample, y i Represents sample x i The label of the unlabeled dataset D w_u The feature extractor F(·) and the feature projector H are trained by unsupervised contrastive learning. p (·) for training, the loss function is contrast loss, and the training is repeated T w1 Rounds;
[0026] In this embodiment, strong enhancement and weak enhancement are used to construct positive and negative sample pairs. Strong enhancement samples and original samples constitute negative sample pairs, while weak enhancement samples and strong enhancement samples (or original samples, but strong enhancement samples are usually selected for consistency) constitute positive sample pairs. This helps the model learn more discriminative feature representations. Use a contrastive loss function (such as InfoNCE loss) to train the feature extractor F(·) and the feature projector H p (·).
[0027] S212: Freeze the feature extractor F(·) and feature projector H p (·), based on a dataset of images with noisy labels For the classifier H c(·) Perform supervised training, use cross entropy loss as the loss function, and repeat the training for Tw2 rounds.
[0028] Preferably, the feature extractor F(·) and the feature projector H are trained by unsupervised contrastive learning. p (·) Training includes:
[0029] The sample x i Perform strong enhancement and weak enhancement respectively to obtain strong enhancement samples and weakly enhanced samples Strongly enhanced samples With the original sample x i Constitute negative sample pairs, weakly enhanced samples With the original sample Constitute a positive sample pair; the contrast loss function is used to shorten the feature distance of the positive sample pair output by the feature projector and to increase the feature distance of the negative sample pair output by the feature projector.
[0030] In this embodiment, the contrast loss function includes:
[0031]
[0032] Among them, loss sim represents the contrast loss function, sim(.) represents the cosine similarity function; d∈(0,1) represents the temperature coefficient; exp(.) represents the exponential function; |D| represents the number of samples in the data set D.
[0033] In this embodiment, for sample x i Strong enhancement includes: rotation, scaling, cropping, color jitter, etc. For example, the image is rotated by a certain angle, such as ±30 degrees, ±45 degrees, etc. to simulate a wider range of image changes. In this embodiment, the sample x i Weak enhancement includes: slight rotation, slight scaling, slight cropping or slight color adjustment, slightly rotating the image by a certain angle, such as ±5 degrees, ±10 degrees. The purpose of weak enhancement is to increase the diversity of data without significantly changing the image content, while avoiding the introduction of too much noise or interference information.
[0034] S22: Input the image dataset into the image classification model, calculate the JS divergence between the predicted result and the actual label of each image sample, divide the image dataset into a small loss clean subset and a large loss noise subset, and record the predicted result of each image sample;
[0035] Preferably, calculating the JS divergence between the prediction result and the actual label of each image sample includes:
[0036]
[0037] Among them, d i represents the JS divergence of the i-th sample, JSD() represents the divergence function, and KLD(·) is the KL divergence function; represents the prediction result of the i-th image sample output by the classifier, and yi represents the actual label of the i-th image sample.
[0038] Preferably, the image data set is divided into a small loss clean subset and a large loss noise subset, comprising: traversing each category of the image data set, sorting the image samples under each category from small to large according to their JS divergence, and selecting the samples with the first R proportion to add to the small loss clean subset, and the remaining samples to the large loss noise subset, and after traversing all categories, the divided small loss clean subset and large loss noise subset are obtained; wherein, the calculation process of R is as follows;
[0039] S221: Calculate the divergence threshold based on the JS divergence of all image samples in the image dataset:
[0040]
[0041] Among them, d t represents the divergence threshold at the tth iteration, d avg Represents the average value of JS divergence of all image samples in the image dataset; d min represents the minimum value of JS divergence of all image samples in the image dataset; τ represents the filter coefficient with a value of 0.3 to 0.6; d μ Indicates that the threshold value is adjusted to 0.5;.
[0042] S222: collect the image data sets whose JS divergence value is less than the divergence threshold d t The proportion of image samples in the image dataset is taken as R.
[0043] In this embodiment, by dividing the data set into a small loss clean subset and a large loss noise subset, the model can focus more on learning clean, high-quality data, thereby improving its generalization ability and accuracy. The small loss clean subset usually contains samples that are easier to classify, which help the model learn more meaningful feature representations. The large loss noise subset contains samples that are noisy or difficult to classify, which may have a negative impact on the training of the model. By dividing these samples separately, their interference with model training can be reduced, thereby improving the stability and robustness of the model.
[0044] S23: According to each image sample in the most recent T a The consistency of the prediction results recorded in the round of training divides the image dataset into a consistent clean subset and an inconsistent noisy subset;
[0045] Preferably, the step S23 comprises:
[0046] S231: The most recent T a Image samples with the same predicted labels recorded in the round of training are added to the consistent clean subset as consistent clean samples, and the consistency of consistent clean samples is defined as 1;
[0047] S232: Will be in the near future a Image samples with different predicted labels recorded in rounds of training are added to the inconsistent noise subset as inconsistent noise samples, and the consistency of inconsistent noise samples is defined as 0. In this embodiment, the consistent clean subset usually contains image samples that are easier to classify and have more obvious features. The prediction results of these samples in multiple trainings are stable, which helps the model learn more robust feature representations. By focusing on these consistent samples for training, the model can reduce its dependence on noisy data, thereby improving its generalization ability on new data. The inconsistent noise subset contains image samples whose prediction results are unstable in multiple trainings. These samples may be caused by incorrect data labeling, poor image quality, or insufficient model capabilities. By dividing these samples separately, we can further analyze the source of the noise data and take corresponding measures to deal with it, such as data cleaning, enhancing model capabilities, etc.
[0048] S24: dividing the image dataset into a simple clean sample subset, a simple noise sample subset, a difficult clean sample subset and a difficult noise sample subset using a sample classification strategy according to the small loss clean subset, the large loss noise subset, the consistent clean subset and the inconsistent noise subset;
[0049] Preferably, the step S24 comprises:
[0050] The intersection of the consistent clean subset and the small loss clean subset is taken as the simple clean sample subset; these samples are easy to classify and have consistent classification results.
[0051] The difference between the small loss clean subset and the consistent clean subset is taken as the simple noise sample subset; these samples are easy to classify, but the classification results are inconsistent and may be noise samples.
[0052] The intersection of the consistent clean subset and the large loss noise subset is taken as the difficult clean sample subset; these samples are difficult to classify, but the classification results are consistent, and they may be boundary samples or complex samples.
[0053] The remaining samples in the image data set after the simple clean sample subset, the simple noise sample subset and the difficult clean sample subset are taken as the difficult noise sample subset; these samples are difficult to classify and the classification results are inconsistent, so they are likely to be noise samples.
[0054] In this embodiment, by dividing the data set into four subsets, the model can focus more on learning the features of simple clean samples and difficult clean samples, thereby improving the overall performance. For simple noise samples and difficult noise samples, further processing can be performed to reduce the impact of noise on model training.
[0055] S25: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the simple noise sample subset are corrected and transferred to the simple clean sample subset;
[0056] Preferably, the step of correcting the labels of some image samples in the simple noise sample subset based on the prediction consistency strategy and transferring the labels to the simple clean sample subset comprises:
[0057] S251: Subset the simple noise sample D e,n Image samples in Perform strong enhancement and weak enhancement respectively to obtain strong enhancement samples and weakly enhanced samples
[0058] S252: Strongly enhance the sample and weakly enhanced samples Input the image classification model respectively to obtain the corresponding prediction results and
[0059] S253: Based on the strong enhancement sample and weakly enhanced samples The consistency judgment sample of the prediction results Is it a correctable sample? If and only if the following conditions are met, the sample For correctable samples, use labels Correction Sample labels and place the samples Transfer to a simple clean sample subset, the conditions are as follows:
[0060] Condition 1: and Among them, the max(·) function is to obtain the confidence of the maximum probability category in the prediction result, τ e Indicates the confidence threshold of simple sample correction, with a value of 0.95;
[0061] Condition 2: argmax(.) represents the argmax function;
[0062] Condition 3: β h =1,β h Represents an image sample In the recent Ta The consistency of the predicted labels recorded in the round of training, when consistent, β h =1, when inconsistent, β h =0.
[0063] In this embodiment, by correcting the wrong labels in the simple noise sample subset, more correct training samples can be provided to the model, thereby helping the model learn more accurate feature representations and classification decisions. By performing prediction consistency judgment on the enhanced image, reliable samples can be further screened out, and the wrong labels therein can be corrected to enhance the robustness of the model to noise and changes.
[0064] S26: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the difficult noise sample subset are corrected and transferred to the difficult clean sample subset;
[0065] Preferably, the step of correcting labels of some image samples in the difficult noise sample subset based on the prediction consistency strategy and transferring the labels to the difficult clean sample subset comprises:
[0066] S261: Subset the difficult noise sample D h,n Image samples in Perform strong enhancement and weak enhancement respectively to obtain strong enhancement samples and weakly enhanced samples
[0067] S262: Strongly enhance the sample and weakly enhanced samples Input the image classification model respectively to obtain the corresponding prediction results and
[0068] S263: Based on the strong enhancement sample and weakly enhanced samples The consistency judgment sample of the prediction results Is it a correctable sample? If and only if the following conditions are met, the sample For correctable samples, use labels Correction Sample labels and place the samples Transfer to the difficult clean sample subset, the conditions are as follows:
[0069] Condition 1: and Among them, the max(·) function is to obtain the confidence of the maximum probability category in the prediction result, τ h Indicates the confidence threshold of difficult correction samples, with a value of 0.9;
[0070] Condition 2: argmax(.) represents the argmax function;
[0071] Condition 3: β j =1,β j Represents an image sample In the recent T a The consistency of the predicted labels recorded in the round of training, when consistent, β j =1, when inconsistent, β j =0.
[0072] In this embodiment, by correcting the wrong labels caused by incorrect labeling or misjudgment in the initial stage of the model. By focusing on those samples that are difficult to classify (i.e., difficult samples), the model can be made more sensitive to these samples, thereby improving its overall robustness and accuracy. Transferring the corrected samples to the difficult clean sample subset can make subsequent training more efficient and targeted.
[0073] S27: Construct a supervised training loss function based on the updated simple clean sample subset and the difficult clean sample subset; construct an unsupervised training loss function based on the simple noise sample subset and the difficult noise sample subset; linearly weight the supervised training loss function and the unsupervised training loss function to obtain a total loss function to train the image classification model, and repeat steps S21 to S27 until the preset number of training rounds is reached to obtain a trained image classification model.
[0074] Preferably, the total loss function comprises:
[0075] loss = λ clean loss clean +λ noise loss noise
[0076]
[0077]
[0078] Among them, loss represents the total loss function; λ clean and λ noise Represents the weight parameter; loss clean Represents the supervised training loss function; loss noise represents the unsupervised training loss function; |D e,c | represents a simple and clean subset D e,c The number of samples in L ce represents the cross entropy loss function; ω e and ω h represents the weight parameter; |D h,c | indicates the difficult clean subset Dh,c The number of samples in |D e,n | represents a simple noise subset D e,n The number of samples in |D h,n | represents the difficult noise subset D h,n The number of samples in ; Denotes a simple and clean subset D e,c The kth simple clean sample in ; Representation sample Labels; Denotes the difficult clean subset D h,c The lth difficult clean sample in ; Representation sample Labels; Denotes a simple noise subset D e,n The hth simple noise sample in L sim represents the contrast loss function; Representation sample Strongly enhanced samples; Representation sample Weakly enhanced samples; Representation sample Strongly enhanced samples; Representation sample Weakly enhanced samples.
[0079] In this embodiment, by focusing on supervised learning of clean samples, the model is able to learn the correct classification boundaries. At the same time, by processing noisy samples through unsupervised learning, the model is able to learn more robust feature representations, thereby reducing sensitivity to incorrect labels. Since the model processes both simple and difficult samples, as well as correct and incorrect labels during training, it is more likely to remain robust to various input changes. Through unsupervised methods such as contrastive learning, the model is able to learn similarities between samples, which helps it identify and correct samples with incorrect labels. Through a divide-and-conquer strategy, the model can make more efficient use of training data, potentially reducing the training time and resources required to achieve the same level of performance.
[0080] In this embodiment, the weight parameter ω e and ω h It is expressed as:
[0081]
[0082]
[0083] Among them, ω base The basic weight coefficient is taken as 0.5, ω a To adjust the weight coefficient, take the value 0.2, T endis the total number of training rounds, and t is the current number of training rounds. In this embodiment, a dynamic weight parameter ω is introduced e and ω h In the early stage of training, the model pays more attention to the subset of difficult and clean samples D h,c ; This helps the model learn more challenging feature representations. As training progresses, the model gradually turns to a simple and clean sample subset D e,c , to ensure good performance on samples that are easy to classify. This strategy helps balance the model's learning of difficult and easy samples and improves the model's generalization ability. Since the model can dynamically adjust its attention to different sample subsets during training, it is more likely to learn the correct classification boundaries and reduce the error rate on the test set. The model pays more attention to difficult samples in the early stages of training, and it can learn important feature representations faster. As training progresses, the model gradually turns to simple samples, which helps consolidate what it has learned and further improves the accuracy of the model, helping to speed up the training process.
[0084] In this embodiment, the contrast loss function includes:
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094] Similarly, we can get:
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104] Among them, lOsS sim represents the contrast loss function, sim(.) represents the cosine similarity function; d∈(0,1) represents the temperature coefficient; exp(.) represents the exponential function.
[0105] In summary, the present invention proposes a sample difficulty grading method, which accurately divides samples into simple clean samples, simple noise samples, difficult clean samples and difficult noise samples by comprehensively considering the consistency of JS divergence and historical prediction results. This method effectively avoids the confusion between simple noise samples and difficult clean samples in the sample selection process. By constructing supervised and unsupervised training loss functions for sample subsets of different difficulties, not only a rich set of clean samples is provided for the model to learn, but also difficult clean samples are covered, which helps the model to learn more accurate category boundaries and improve the ability to distinguish different categories. For simple noise samples and difficult noise samples, the present invention sets different correction rounds and correctable confidence thresholds respectively. Simple samples are corrected in the early stage of model learning, ensuring that the model corrects difficult samples after fully learning the corrected simple samples. This hierarchical learning strategy makes the learning process of the model smoother, enhances the generalization ability of the model, and improves the accuracy of label correction.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A method for classifying noisy labeled images based on sample hierarchical learning and correction, characterized in that: The following steps are involved: S1: Obtain an image dataset with noisy labels and build an image classification model; S2: training the image classification model, and classifying the test image by using the trained image classification model. The training of the image classification model includes: S21: preheat training the image classification model to enable the image classification model to acquire feature extraction and feature classification capabilities; S22: Input the image dataset into the image classification model, calculate the JS divergence between the predicted result and the actual label of each image sample, divide the image dataset into a small loss clean subset and a large loss noise subset, and record the predicted result of each image sample; S23: According to each image sample in the most recent T a The consistency of the prediction results recorded in the round of training divides the image dataset into a consistent clean subset and an inconsistent noisy subset; S24: dividing the image dataset into a simple clean sample subset, a simple noise sample subset, a difficult clean sample subset and a difficult noise sample subset using a sample classification strategy according to the small loss clean subset, the large loss noise subset, the consistent clean subset and the inconsistent noise subset; S25: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the simple noise sample subset are corrected and transferred to the simple clean sample subset; S26: If the current number of training rounds is greater than or equal to T a , then based on the prediction consistency strategy, the labels of some image samples in the difficult noise sample subset are corrected and transferred to the difficult clean sample subset; S27: Construct a supervised training loss function based on the updated simple clean sample subset and the difficult clean sample subset; construct an unsupervised training loss function based on the simple noise sample subset and the difficult noise sample subset; linearly weight the supervised training loss function and the unsupervised training loss function to obtain a total loss function to train the image classification model, and repeat steps S21 to S27 until the preset number of training rounds is reached to obtain a trained image classification model.
2. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 1, characterized in that: The image classification model includes: a feature extractor F(·), a feature projector H p (·) and classifier H c (·); the feature extractor F(·) is used to extract features from samples, and the classifier H c (·) is used to classify the features extracted by the feature extractor F(·), and the feature projector H p (·) is used to reduce the dimension of the features extracted by the feature extractor F(·) to obtain the low-dimensional features of the sample.
3. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 2, characterized in that: The calculation of the JS divergence between the prediction result and the actual label of each image sample includes: Among them, D i represents the JS divergence of the i-th sample, JSD() represents the divergence function, and KLD(·) is the KL divergence function; Represents the prediction result of the i-th image sample output by the classifier, y i represents the actual label of the i-th image sample.
4. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 2, characterized in that: The method of dividing the image data set into a small loss clean subset and a large loss noise subset includes: traversing each category of the image data set, sorting the image samples under each category from small to large according to their JS divergence, and selecting the samples with the first R ratio to add to the small loss clean subset, and adding the remaining samples to the large loss noise subset, and after traversing all categories, obtaining the divided small loss clean subset and large loss noise subset; wherein the calculation process of R is as follows; S221: Calculate the divergence threshold based on the JS divergence of all image samples in the image dataset: Among them, d t represents the divergence threshold at the tth iteration, d avg Represents the average value of JS divergence of all image samples in the image dataset; d min represents the minimum value of JS divergence of all image samples in the image dataset; τ represents the filter coefficient; d μ Indicates adjusting the threshold value; S222: collect the image data sets whose JS divergence value is less than the divergence threshold d t The proportion of image samples in the image dataset is taken as R.
5. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 1, characterized in that: The step S23 comprises: S231: The most recent T a Image samples with the same predicted labels recorded in the round of training are added to the consistent clean subset as consistent clean samples, and the consistency of consistent clean samples is defined as 1; S232: Will be in the near future a Image samples with different predicted labels recorded in rounds of training are added to the inconsistent noise subset as inconsistent noise samples, and the consistency of inconsistent noise samples is defined as 0.
6. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 1, characterized in that: The step S24 comprises: The intersection of the consistent clean subset and the small loss clean subset is taken as the simple clean sample subset; The difference between the small loss clean subset and the consistent clean subset is taken as the simple noise sample subset; The intersection of the consistent clean subset and the large loss noise subset is taken as the difficult clean sample subset; The remaining samples in the image dataset after the simple clean sample subset, the simple noise sample subset and the difficult clean sample subset are taken as the difficult noise sample subset.
7. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 1, characterized in that: The prediction consistency strategy based on which labels of some image samples in the simple noise sample subset are corrected and transferred to the simple clean sample subset includes: S251: Subset the simple noise sample D e,n Image samples in Perform strong enhancement and weak enhancement respectively to obtain strong enhancement samples and weakly enhanced samples S252: Strongly enhance the sample and weakly enhanced samples Input the image classification model respectively to obtain the corresponding prediction results and S253: Based on the strong enhancement sample and weakly enhanced samples The consistency judgment sample of the prediction results Is it a correctable sample? If and only if the following conditions are met, the sample For correctable samples, use labels Correction Sample labels and place the samples Transfer to a simple clean sample subset, the conditions are as follows: Condition 1: and Among them, the max(·) function is to obtain the confidence of the maximum probability category in the prediction result, τ e represents the confidence threshold for simple sample correction; Condition 2: argmax(.) represents the argmax function; Condition 3: β h =1,β h Represents an image sample In the recent T a The consistency of the predicted labels recorded in the round of training, when consistent, β h =1, when inconsistent, β h =0.
8. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 1, characterized in that: The prediction consistency strategy based on which labels of some image samples in the difficult noise sample subset are corrected and transferred to the difficult clean sample subset includes: S261: Subset D of difficult noise samples h,n Image samples in Perform strong enhancement and weak enhancement respectively to obtain strong enhancement samples and weakly enhanced samples S262: Strongly enhance the sample and weakly enhanced samples Input the image classification model respectively to obtain the corresponding prediction results and S263: Based on the strong enhancement sample and weakly enhanced samples The consistency judgment sample of the prediction results Is it a correctable sample? If and only if the following conditions are met, the sample For correctable samples, use labels Correction Sample labels and place the samples Transfer to the difficult clean sample subset, the conditions are as follows: Condition 1: and Among them, the max(·) function is to obtain the confidence of the maximum probability category in the prediction result, τ h Indicates the confidence threshold for difficult corrected samples; Condition 2: argmax(.) represents the argmax function; Condition 3: β j =1,β j Represents an image sample In the recent T a The consistency of the predicted labels recorded in the round of training, when consistent, β j =1, when inconsistent, β j =0.
9. The method for classifying noisy labeled images based on sample hierarchical learning and correction according to claim 2, characterized in that: The total loss function includes: loss=λ clean loss clean +λ noise loss boise Among them, loss represents the total loss function; λ clean and λ noise Represents the weight parameter; loss clean Represents the supervised training loss function; loss noise represents the unsupervised training loss function; |D e,c | represents a simple and clean subset D e,c The number of samples in L ce represents the cross entropy loss function; ω e and ω h represents the weight parameter; |D h,c | indicates the difficult clean subset D h,c The number of samples in |D e,n | represents a simple noise subset D e,n The number of samples in |D h,n | represents the difficult noise subset D h,n The number of samples in ; Denotes a simple and clean subset D e,c The kth simple clean sample in ; Representation sample Labels; Denotes the difficult clean subset D h,c The lth difficult clean sample in ; Representation sample Labels; Denotes a simple noise subset D e,n The hth simple noise sample in L sim represents the contrast loss function; Representation sample Strongly enhanced samples; Representation sample Weakly enhanced samples; Representation sample Strongly enhanced samples; Representation sample Weakly enhanced samples.
Citation Information
Patent Citations
Long-tail distribution image classification method with noise label
CN113516207A
Noise-containing label image identification method based on adaptive category equalization
CN116912568A
Systems and methods for noise-robust contrastive learning
US20210374553A1
Cited By
Data set detection method and device, electronic equipment, storage medium and program product
CN121188610A