An image label noise learning method based on particle computing and contrastive learning
By embedding a particle sphere computation layer and an improved contrastive loss function into the image label noise learning network, the label noise problem in deep neural networks is solved, the robustness and performance of the model are improved, and stable feature representation is achieved in the label noise environment.
Patent Information
- Application Number
- CN202411714645.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing technologies lack versatility and robustness in dealing with label noise in deep neural networks, leading to decreased model performance and biased judgment.
We employ a method based on particle-sphere computation and contrastive learning. By embedding particle-sphere computation layers in the feature learner and classifier, we convert input samples into particle-sphere samples. By utilizing the feature space information of the samples and combining it with an improved contrastive loss function, we improve the network's robustness to label noise.
This method achieves better capture of similarity and difference between samples in the presence of labeled noise, and provides a general, stable and high-performance robust feature representation method, thereby improving the model's noise resistance.
Smart Images

Figure CN119478545B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of artificial intelligence and computer vision, and particularly relates to an image label noise learning method based on particle ball calculation and contrast learning. BACKGROUND
[0002] In recent years, deep neural network models have achieved great success in many fields due to their powerful feature representation and learning ability. At the same time, the performance of deep neural network models often depends on high-quality labeled data. There is a saying in the industry that artificial intelligence is described as "as much artificial (i.e. labeling) as much intelligence", which illustrates the importance of data labeling for artificial intelligence. Data labeling usually has two ways, manual labeling and model automatic labeling. The former is inevitably affected by factors such as the professional knowledge level of the labeling personnel, data quality, and even malicious data poisoning, resulting in a certain proportion of error-labeled data (label noise). The latter is also affected by factors such as the accuracy of the labeling model and "pattern collapse", also resulting in a certain proportion of error-labeled data (label noise). Too much error-labeled data (label noise) will change or even confuse the data distribution of the training set, thereby causing the model performance to decline in related tasks, and even producing a specific tendency of discrimination.
[0003] Currently, there are two main solutions to label noise, namely noise tolerance and noise filtering. Noise tolerance refers to establishing a robust algorithm model that is not very sensitive to error-labeled samples, thereby weakening the impact of label noise on the model. Its representatives include robust loss function, regularization, etc. For example, the robust loss function reduces the negative impact of noise samples by designing a more stable optimization strategy for noise in the objective function, while the regularization technique avoids overfitting due to noise data by constraining the model complexity. However, noise tolerance methods usually need to make assumptions about the characteristics of noise, and their performance may decline significantly when the actual situation does not match the assumptions. Noise filtering is to remove or correct noise samples in the data before returning them to the model for training. Its representatives include ensemble learning, adaptive learning, etc. For example, the ensemble learning method reduces the influence of noise samples by voting on multiple learners, while the adaptive learning method enhances learning on clean samples by dynamically adjusting sample weights. However, noise filtering usually needs to adjust parameters or rules according to the specific data distribution, resulting in unstable effects when migrating to other tasks or data sets.
[0004] In summary, the two types of methods are still insufficient in dealing with the label noise problem in massive data training samples represented by deep neural network models. This is mainly because the two types of methods have strong dependence on task scenarios, data distribution and noise characteristics, and often need to be customized for specific problems in practical applications, lacking sufficient universality. Therefore, a general representation learning method robust to label noise is urgently needed to solve this problem. SUMMARY
[0005] To solve the above technical problems, the present application proposes an image label noise learning method based on granular ball calculation and contrastive learning. The method comprises: obtaining picture data and preprocessing it, inputting the preprocessed picture data into a trained image label noise learning model to obtain the image classification result;
[0006] The training process of the image label noise learning network comprises:
[0007] S1: Obtain an image training data set, and respectively preprocess two strong data enhancement sample sets and one weak data enhancement sample set;
[0008] S2: Use the first feature learner to extract the first feature Z S1 from the first strong data enhancement sample X S1 ; use the second feature learner to extract the second feature Z S2 from the second strong data enhancement sample X S2 ; and use the first feature learner to extract the third feature Z W from the weak data enhancement sample X W ;
[0009] S3: input the third feature Z W into the granular ball calculation layer, perform multi-granularity division at the feature level, generate a plurality of clustering clusters, each clustering cluster corresponds to a granular ball sample, and calculate the feature matrix and label of the granular ball sample according to the feature matrix and label of the sample in the cluster;
[0010] S4: input the feature matrix and label of the granular ball sample into the classification layer to obtain the image classification result p; calculate the cross-entropy loss
[0011] S5: input the first feature Z S1 into the prediction layer to obtain the first prediction feature Q S1 ; based on the first prediction feature Q S1 and the second feature Z S2 , calculate the contrastive loss between the predicted probability distribution and the target representation distribution of the same category sample using the image classification result p as an indicator function
[0012] S6: obtaining a total loss according to the contrast loss and the cross-entropy loss weighted According to the total loss, the image label noise learning network is optimized by back propagation.
[0013] The present application has the beneficial effects that: in the training process of the image label noise learning network, the present application converts the input original sample into a granular ball sample by embedding a granular ball calculation layer between the feature learner and the classifier, so that the image label noise learning network can use the feature space information of the sample to improve the robustness of the network to label noise; the present application uses a contrast learning framework to extract sample features, and uses a contrast loss function based on the improved granular ball to calculate the contrast loss, so that the network can better capture the similarity and difference between samples in the presence of label noise. Compared with the prior art, the present application efficiently utilizes the semantic information of the feature space of the sample, and realizes a general, stable and high-performance robust feature representation method without additional data or further optimization. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 Fig. 1 is a schematic diagram of the training process of the image label noise learning network in the embodiments of the present application. DETAILED DESCRIPTION
[0015] The terms "first", "second", "third", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged as appropriate, which is only a distinguishing way used in the description of the embodiments of the present application to describe the objects with the same attributes.
[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0017] The present application proposes an image label noise learning method based on granular ball calculation and contrast learning, as shown in Figure 1 The method comprises: obtaining picture data and preprocessing it, inputting the preprocessed picture data into a trained image label noise learning model to obtain the result of image classification.
[0018] Figure 1In this invention, the embodiments include two stages: a training stage for the image label noise learning network and a practical application stage (using the trained image label noise learning network for prediction). In the training stage, the entire training adopts the SimSiam contrastive learning framework; firstly, training data is collected and preprocessed to obtain two strongly augmented data sample sets (X...). S1 and X S2 ) and weak data augmentation sample set (X W The first strong data augmentation sample X is processed using the first feature learner. S1 Extracting the first feature Z S1 The second strong data augmentation sample X is applied using a second feature learner (the parameters of the first and second feature learners are shared). S2 Extracting the second feature Z S2 ; Enhance weak data samples X using the first feature learner W Extracting the third feature Z w The third feature Z w The input particle sphere computation layer performs multi-granularity partitioning at the feature level, generating several clusters. Each cluster corresponds to a particle sphere sample. The feature matrix and label of the particle sphere sample are calculated based on the feature matrix and label of the samples within the cluster. The feature matrix and label of the particle sphere sample are then input into the classification layer to obtain the image classification result p. The classification loss (i.e., cross-entropy loss) is calculated based on the image classification result and the label of the particle sphere sample. ); the first feature Z S1 Input to the prediction layer to obtain the first predicted feature Q S1 Based on the first predicted feature Q S1 Second feature Z S2 Using the image classification result p as an indicator function, the contrast loss between the predicted probability distribution of samples of the same class and the target representation distribution is calculated. Using cross-entropy loss And comparative loss Backpropagation optimizes network parameters. "Stopgrad" means "freeze," implying that the path is frozen during backpropagation using the loss function, and no parameter optimization is performed. In practical applications, the target image data (i.e., the input image data) is preprocessed and then input into a trained feature learner to extract image features. These features are then input into a trained classification layer for classification prediction, and the result is output.
[0019] The training process of the image label noise learning network includes:
[0020] S1: Obtain the image training dataset, and preprocess it to obtain two strong data augmentation sample sets and one weak data augmentation sample set.
[0021] By artificially changing part of the correct labels in the clean data set or using the existing label noise data set, an image training data set is obtained:
[0022] D={sample:[x1,x2,x3,…x n ],label:[y1,y2,y3…y n ]}
[0023] Wherein, D represents the image training data set, sample represents the content information set of the image sample in D, x n is the pixel matrix of the nth image sample, label represents the label set of the image sample in D, and y n is the label of the nth image sample.
[0024] A batch of data X is randomly extracted from the image training data set D for the current batch training.
[0025] X=Sampling(D,N)
[0026] Wherein, X represents a batch of data randomly extracted from the image training data set D, and N represents the size of the current batch, i.e. the number of image samples in the current batch.
[0027] The samples in X are preprocessed:
[0028] S101: Apply twice strong data augmentation to each image sample, mainly including random flipping, random scaling and cropping, random noise adding, and random adjusting of picture brightness, contrast, saturation and color, etc. Two strong data augmentation version samples are obtained:
[0029] X S1 =StrongAugmentation(X)
[0030] X S2 =StrongAugmentation(X)
[0031] X S1 represents the first strong data augmentation sample set, and X S2 represents the second data strong augmentation sample set.
[0032] S102: Apply once weak data augmentation to each image sample, mainly including random flipping and random scaling and cropping, etc. A weak data augmentation version sample is obtained:
[0033] X W =WeakAugmentation(X)
[0034] X W represents the weak data augmentation sample set.
[0035] S2: using the first feature learner on the first strong data augmented sample X S1 extracting the first feature Z S1 ; using the second feature learner on the second strong data augmented sample X S2 extracting the second feature Z S2 ; using the first feature learner on the weak data augmented sample X W extracting the third feature Z W .
[0036] The SimSiam contrastive learning framework is used to extract the feature representation of the strong data augmented sample, obtaining the output feature and the predicted feature.
[0037] SimSiam (Simple Siamese) is a self-supervised contrastive learning method. It uses a twin network structure, which contains two identical branches, each branch consists of a backbone network (usually a convolutional neural network such as ResNet) and a projection head. The two branches share weights to ensure that when inputting different strong augmented images, they can still generate comparable feature representations. That is, the first strong augmented sample X S1 is obtained and input into the first feature learner to extract the first feature Z S1 ; the second strong augmented sample X S2 is obtained and input into the second feature learner to extract the second feature Z S2 :
[0038] Z S1 = Φ1(X S1 );
[0039] Z S2 = Φ2(X S2 )
[0040] Where the parameters of the first feature learner Φ1 and the second feature learner Φ2 are the same. When backpropagating, the parameters of Φ2 are frozen, only the parameters of Φ1 are updated. After a round of training, the parameters of Φ1 are synchronized to Φ2 to achieve parameter sharing; finally, the shape of the feature matrix is [N, dim size ], and dim size is the dimension size of the sample feature output by the backbone network.
[0041] The convolutional neural network is used to extract the feature of the input weak data augmented sample, that is, the weak augmented sample X W is obtained and input into the first feature learner to extract the third feature Z W :
[0042] Z W= Φ1(X W )
[0043] wherein Z W represents the shape of [N, dim size ], dim size represents the dimension size of the sample feature output by the first feature learner (i.e., the convolutional neural network).
[0044] S3: input the third feature Z W into the granule ball calculation layer, perform multi-granularity division at the feature level, generate a plurality of clustering clusters, each clustering cluster corresponds to a granule ball sample, and the feature matrix and label of the granule ball sample are calculated according to the feature matrix and label of the sample in the cluster.
[0045] A granule ball calculation layer is designed between the first feature learner and the classifier, and the input batch image samples are divided into granule ball samples gb i with multiple different quantities, each granule ball sample corresponds to multiple picture samples, and the granule ball sample is used instead of a single sample point as the input of the classifier; the sample label with the largest proportion in the granule ball is defined as the label of the granule ball sample gb i .
[0046]
[0047] wherein c j represents the sample category contained in the i-th granule ball sample gb i , the number of samples of each category c j in the granule ball sample is represented by Number(c j ), and the number of samples contained in the granule ball sample gb i is represented by Number(gb i ).
[0048] The purity of the granule ball sample gb i is defined as
[0049]
[0050] wherein y represents the purity of the i-th granule ball sample, Number(y j ) represents the number of samples in the i-th granule ball sample gb i with the label y j , and Number(gb i ) represents the number of samples contained in the i-th granule ball sample gb i .
[0051] Particle generation is based on efficient M-means (where m is the number of tags in a certain sphere), ensuring the overall efficiency of the particle generation process.
[0052] The third feature Z W The input particle sphere computation layer performs multi-granularity partitioning at the feature level, generating several clusters. The process is as follows:
[0053] The sample feature matrix Z W As the initial sample of spheres, the percentage of the most frequent type of sample in the current sphere is calculated to see if it reaches the purity threshold τ. If not, M-means clustering (where k is the k-means of the number of label types m in the sphere sample) is performed on the sphere sample to generate a new batch of sphere samples. Then, the purity requirements are checked against the new batch of sphere samples. This process is repeated until all spheres meet the required purity.
[0054] Each cluster represents a sphere sample (gb). i Furthermore, each sphere sample corresponds to a varying number of image samples. The sphere sample size (gb) is obtained by averaging the features of the image samples within each sphere sample. i Features
[0055] In some preferred embodiments, the granule sample gb i Features Specifically:
[0056]
[0057] in, Represents the feature of the i-th particle sample, gb i Let v represent the i-th particle sample. j Represents the sample size of the pellet (gb). i The feature vector of the j-th image sample, Number(gb) i ) represents the i-th particle sample gb i The number of image samples in the dataset.
[0058] Therefore, the purpose of the sphere computation layer (GBC) is to map the sample features Z to the sphere sample features GB. The sphere computation layer maps the sample features Z to the sphere sample features GB, and the construction of the sphere samples needs to meet the following constraints: (1) Each sphere sample should cover as many samples as possible, and its number should be as small as possible; (2) Each sphere sample meets the purity requirements.
[0059] In some preferred embodiments, the general description of the sphere computing layer GBC is as follows:
[0060] GBC:Z→GB
[0061] Constraints:
[0062] Constraints:
[0063] wherein Z represents image sample features, represents mapping, GB represents granulocyte sample features, N represents the number of image samples, M represents the number of granulocyte sample, represents the purity of the i-th granulocyte sample gb i , and τ represents a set purity threshold.
[0064] S4: input the feature matrix of the granulocyte sample and its label into the classification layer to obtain an image classification result; and calculate a cross-entropy loss
[0065] In deep learning, a classifier usually uses a fully connected layer to implement, which accepts a feature vector as input and outputs a predicted probability of each class; in an image classification task, cross-entropy loss is a commonly used loss function for measuring the difference between the predicted probability distribution and the real label distribution, which is a common loss function in supervised learning:
[0066]
[0067] wherein C represents the total number of classes, y i represents an indicator variable (usually "1" or "0") in the real distribution, y i represents whether the sample belongs to class i, represents the predicted probability of the model, i.e., the probability of the sample being predicted as class i.
[0068] S5: input the first feature Z S1 into the prediction layer to obtain a first prediction feature Q S1 ; based on the first prediction feature Q S1 and the second feature Z S2 , calculate a contrastive loss between the predicted probability distribution of the same class sample and the target representation distribution using the image classification result p as an indicator function
[0069] The purpose of the contrastive learning framework SimSiam is to pull the features of the same class closer and the features of different classes farther apart, so that the prediction vector output by the same input image sample after being processed by the feature learning and prediction layer and the feature vector output by the feature learning can match each other.
[0070] Specifically, the first feature Z S1The first prediction feature Q is obtained through the prediction layer S1 The first prediction feature and the second output feature Z S2 The cross-prediction is performed on the same category of samples (i.e. positive samples) in the same batch.
[0071] The cross-prediction is performed on the same category of samples (i.e. positive samples) in the same batch. i and the sample x j Each of them has a prediction feature vector (from the first prediction feature) and a feature vector (from the second feature), and then the cosine similarity is cross-calculated.
[0072] In some preferred embodiments, the first feature Z S1 is input into the prediction layer to obtain the first prediction feature Q S1 The cosine similarity of the prediction result is calculated, and an initial contrastive loss function of the sample pair (x i , x j ) is defined based on the cosine similarity.
[0073] The formula for calculating the cosine similarity is:
[0074]
[0075] wherein D(q, z) represents the cosine similarity of q and z, q represents the first prediction feature vector of the input sample obtained through the feature learning device and the prediction layer, z represents the second feature vector of the input sample obtained through the second feature learning device, and ||.||2 represents the calculation of the L2 norm.
[0076] The initial contrastive loss function of the sample pair (x i , x j ) is:
[0077]
[0078] wherein L represents the initial contrastive loss function of the sample pair (x i , x j ), q i represents the first prediction feature vector of the i-th input sample x i obtained through the feature learning device and the prediction layer, i.e. q i belongs to Q S1 , and z j represents the feature vector of the j-th input sample x j obtained through the second feature learning device, i.e. z j belongs to Z S2 , and q j represents the j-th input sample xj The first predicted feature vector, i.e., q j belongs to Q S1 , z i represents the i-th input sample x i The feature vector obtained by the second feature learner, i.e., z i belongs to Z S2 , stopgrad(z j ) means stopping the gradient tracking and calculation of the tensor z j in the computational graph, stopgrad(z i ) means stopping the gradient tracking and calculation of the tensor z i in the computational graph, represents an indicator function used to indicate whether a certain condition is true.
[0079] represents that only when the labels of the two samples are the same (i.e., y i = y j ), the loss obtained by the two samples will be calculated into the total loss. Such design enables the network to focus on enhancing the similarity between samples of the same class while ignoring samples of different classes during training.
[0080]
[0081] The loss obtained by the two samples will be calculated into the total loss. Such design enables the network to focus on enhancing the similarity between samples of the same class while ignoring samples of different classes during training.
[0082] Only when the indicator function is true, i.e., the label of sample x i and the label of sample x j are the same, the two samples are identified as positive sample pairs and the contrastive loss of the two samples is added to the total loss. However, in actual situations, there may be label noise in the real data set, so the true situation of each picture cannot be obtained, i.e., taking as the indicator function will cause the features of different classes to be pulled closer.
[0083] To alleviate the above problems, a contrastive loss function based on particle ball improvement is designed:
[0084] The content and feature space of the sample are inherent properties, and the label is annotated by human judgment or generated by machine judgment. Because the cognitive ability and professional level of human beings are limited, the sample is often mislabeled, but the content of the sample, such as its feature space, will not change under the influence of labeling. Based on the content similarity, the samples are divided into multiple granular balls in the feature dimension, and the label of the granular ball sample is determined by the majority of the sample labels inside it. This means that multiple samples can share the same label, thereby significantly reducing the influence of single sample label noise on the model. At the same time, the label noise ratio of the granular ball sample is also greatly reduced, so the label of the granular ball to which the sample belongs can be used to replace the original label of the sample, thereby alleviating the problem that different categories of features are pulled in under the background of label noise.
[0085] In some preferred embodiments, the initial contrast loss function of the sample pair (x i ,x j ) is improved, which is specifically:
[0086]
[0087]
[0088] wherein, represents the contrast loss function of the improved sample pair (x i ,x j ), gb m represents the granular ball to which the i-th input sample x i belongs, gb n represents the granular ball to which the j-th input sample x j belongs, y gbm represents the label of the m-th granular ball sample gb m , represents the label of the n-th granular ball sample gb n , represents an indicator function used to indicate whether a specific condition is true or not.
[0089] In the training process of the image label noise learning network, the network adjusts the weights through the back propagation algorithm to minimize the loss function. In the initial stage, when there are mislabeled data in the data set, the network tends to learn the basic features of the data first, that is, it will usually concentrate on learning the correctly labeled samples first, because the correctly labeled samples can provide more effective and reliable gradient information to guide the network to update the parameters in the direction of reducing the loss loss when the network calculates the loss. Therefore, the granular ball sample output probability obtained by the network at the initial stage of training is less affected by label noise and has high reliability.
[0090] Consider two samples of the same class. Since they have the same label, the network's predicted output probabilities should also be similar, resulting in a relatively large vector product of their probabilities. Conversely, considering samples from two different classes, the network's predicted output probabilities may be relatively dispersed, leading to a relatively small vector product. Therefore, the predicted probabilities of samples of the same class tend to be closer, making their vector product larger; while the predictions of samples from different classes usually influence each other, resulting in a smaller vector product.
[0091] In some preferred embodiments, the sample pair (x) is further improved. i ,x j The initial contrastive loss function is as follows:
[0092]
[0093] in, This indicates the improved sample pair (x) i ,x j The contrastive loss function, This represents the sample size (gb) of the m-th sphere. m purity, Represents the sample size gb of the nth sphere. n The purity of the vector, T represents the vector transpose, used to calculate the vector inner product or similarity, and ε is the confidence threshold. When the vector product of the classification outputs of the particles to which the two samples belong is greater than ε, the two samples are considered to belong to the same class.
[0094] Since particle-based computation relies on high-quality data features for multi-granularity partitioning, the model's feature extraction capability continuously improves as training progresses, further reducing the proportion of label noise in particle samples. Even if the model begins to fit incorrect particle samples later on, erroneous labels are unlikely to dominate the model's training. This improvement further enhances the robustness of contrastive loss to label noise.
[0095] S6: Based on the aforementioned comparison loss and cross-entropy loss Weighted average to obtain total loss The image label noise learning network is optimized by backpropagation based on the total loss.
[0096] The cross-entropy loss function and the contrastive loss function are fused at a specific ratio to obtain the total model loss function. The formula for calculating the total loss L is:
[0097]
[0098] In the formula, This represents the cross-entropy loss function, where α represents the first weight parameter and β represents the second weight parameter. represents a further improved contrast loss function, that is, the contrast loss of all sample pairs {(x i ,x j )} is averaged.
[0099] In the training process of the image label noise learning network: an image training data set is obtained; the training samples are preprocessed to obtain strong data enhanced sample pairs and weak data enhanced samples; a feature learner is used to extract the feature representation of the weak data enhanced samples to obtain a feature matrix; according to a granuloma purity threshold, a granuloma calculation layer is used to perform multi-granularity division (use a sphere to divide the metric space cluster) on the weak data enhanced samples in the same batch at the feature level, thereby generating a plurality of clustering clusters; each clustering cluster corresponds to a granuloma sample, and the feature matrix and label of the granuloma sample are calculated according to the feature matrix and label of the sample in the cluster; the feature matrix of the granuloma sample is input into a classifier for processing to obtain an image classification result; the cross-entropy loss is calculated according to the image classification result and the label of the granuloma sample; a contrast learning framework SimSiam is used to extract the feature representation of the strong data enhanced sample pairs to obtain output features and predicted features; a contrast loss function based on the improved granuloma is designed to process the feature representation of the sample pairs to obtain a contrast loss; the total loss of the model is calculated according to the contrast loss and the cross-entropy loss, and the model parameters are adjusted to obtain the trained image label noise learning network.
[0100] The inference prediction (actual application) process of the image label noise learning network includes: obtaining test data (to-be-detected images) and preprocessing the test data; the preprocessed test data is input into the trained feature learner to obtain a feature representation, and each test sample will be considered as an independent granuloma sample, so that the granuloma calculation layer is not required to be processed; the feature representation is input into the trained classifier to obtain an image classification result.
[0101] Compared with the prior art, the application efficiently utilizes the feature space semantic information of the samples, and realizes a general, stable and high-performance image label noise learning method without additional data or further optimization.
[0102] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium, which can include ROM, RAM, magnetic disks or optical disks, etc.
[0103] Although the embodiments of the application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.
Claims
1. An image label noise learning method based on particle ball calculation and contrastive learning, characterized in that, The method comprises the following steps: The image classification result is obtained by inputting the preprocessed picture data into the trained image label noise learning network. The training process of the image label noise learning network comprises the following steps: S1: An image training data set is obtained, and two strong data enhancement sample sets and one weak data enhancement sample set are obtained through preprocessing respectively; S2: using the first feature learner on the first strong data augmentation sample extracting the first feature ; using the second feature learner on the second strong data augmentation sample extracting the second feature ; using the first feature learner on the weak data augmentation sample extracting the third feature ; S3: the third feature The input granule calculation layer performs multi-granularity division at the feature level, generates a plurality of clustering clusters, each clustering cluster corresponds to a granule sample, and the feature matrix and label of the granule sample are calculated according to the feature matrix and label of the sample in the cluster. The general description of the granule calculation layer is as follows: wherein, denotes an image sample feature, denotes a mapping, denotes a granulocyte sample feature, denotes a number of image samples, denotes a number of granulocyte samples, denotes a purity of the i-th granulocyte sample denotes a purity threshold value, denotes a purity threshold value, denotes a number of image samples in the i-th granulocyte sample denotes a number of image samples in the i-th granulocyte sample denotes a number of image samples in the i-th granulocyte sample S4: input the feature matrix of the granulocyte sample and its label into the classification layer to obtain an image classification result p; calculate a cross-entropy loss according to the image classification result and the label of the granulocyte sample ; S5: obtaining a first feature inputting the prediction layer to obtain a first prediction feature ; based on the first prediction feature and the second feature , taking the image classification result p as an indicator function to calculate the contrast loss between the predicted probability distribution of the same category sample and the target representation distribution ; S6: according to the contrast loss and cross-entropy loss weighted to get total loss , according to which the image label noise learning network is optimized by back propagation.
2. The granulometric computation and contrastive learning based image label noise learning method according to claim 1, wherein, Characteristics of the granulocyte sample In particular: wherein, represents a feature of the th granulocyte sample, represents the th granulocyte sample, represents a granulocyte sample th image sample of the th granulocyte sample, represents the th granulocyte sample represents the number of image samples in the 3. The granulometric computation and contrastive learning based image label noise learning method according to claim 1, wherein, The first feature Input to the prediction layer to obtain the first predicted feature Based on the first prediction feature Second feature Calculate the cosine similarity between the first predicted feature vector and the second feature of samples of the same type, and define sample pairs based on this cosine similarity. The initial contrastive loss function, where, Indicates the first One input sample, Indicates the first There are 1 input sample, and .
4. The granulometric computation and contrastive learning based image label noise learning method according to claim 3, characterized in that, The calculation formula of the cosine similarity is as follows: wherein, represents a predicted feature vector a cosine similarity with a feature vector a cosine similarity with a feature vector represents a first predicted feature vector of an input sample obtained by a feature learner and a prediction layer, represents a second feature vector of an input sample obtained by a second feature learner, represents a calculation of an L2 norm.
5. The granulometric computation and contrastive learning based image label noise learning method according to claim 3, characterized in that, The sample pair The initial contrastive loss function for the pair is: wherein, represents an initial contrastive loss function of a sample pair , represents an input sample , represents a first predicted feature vector of the input sample , represents a feature vector of the input sample , represents a first predicted feature vector of the input sample , represents a feature vector of the input sample , represents stopping gradient tracking and computation of a tensor , represents an indicator function, which is used to indicate whether a specific condition is met or not. If the condition is met, the initial contrastive loss of the sample pair is added to the total contrastive loss. If the condition is not met, the initial contrastive loss of the sample pair will not be included in the total loss.
6. The granulometric computation and contrastive learning based image label noise learning method according to claim 5, characterized in that, improving the initial contrast loss function of the sample pair is specifically: wherein, represents a contrastive loss function for improved sample pairs , represents a label for the th input sample belonging granule, belonging granule, represents a label for the th granule sample , represents a label for the th granule sample , represents an indicator function.
7. The granulometric computation and contrastive learning based image label noise learning method according to claim 6, characterized in that, Further improving the initial contrastive loss function for the pair of samples is specifically: wherein, represents a contrastive loss function for further improved sample pairs , represents the purity of the th granulocyte sample , represents the purity of the th granulocyte sample , represents vector transposition for calculating vector inner product or similarity, is a confidence threshold, represents an indicator function.
8. The granulometric computation and contrastive learning based image label noise learning method according to claim 1, characterized in that, The method comprises the following steps: According to the contrast loss and the cross-entropy loss The total loss is weighted The calculation formula of the total loss is: wherein denotes the cross-entropy loss function, denotes a first weight parameter, denotes a second weight parameter, denotes the total contrast loss function after further improvement, i.e. the average over the contrast losses for all sample pairs .
Citation Information
Patent Citations
Fast K-nearest neighbor classifier method for large-scale data
CN116363420A
Robust image classification method on label noisy data
CN116468938A