An Adaptive Memory-Based Unsupervised Person Re-identification Method Based on Group-Aware Labels
By combining grouped perception labels and adaptive memory storage structure, the problem of noisy labels in unsupervised pedestrian re-identification is solved, improving the model's adaptability and recognition accuracy in new scenarios.
Patent Information
- Application Number
- CN202210089329.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-01-25
AI Technical Summary
Existing unsupervised pedestrian re-identification technologies suffer from insufficient model generalization ability due to noisy labels, and are difficult to effectively utilize sample information in unknown domains when there are no labels.
An adaptive memory-based unsupervised pedestrian re-identification method with grouped sensing labels is adopted. Multiple pseudo-labels are generated through DBSCAN clustering. Combined with an adaptive memory storage structure and a teacher-student network, the method utilizes weighted dictionary updates and weighted alignment loss to reduce the impact of noisy labels and enhance the model's adaptability in new scenarios.
The neural network with noisy labels was optimized, which improved the adaptability of the pedestrian re-identification model in new scenarios, enhanced the mining of relationships between samples in unknown domains, reduced the impact of noisy pseudo-labels, and improved the recognition accuracy.
Smart Images

Figure CN116563882B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence, computer vision, and image processing, specifically to an adaptive memory unsupervised pedestrian re-identification method based on grouped sensing labels. Background Technology
[0002] Person re-identification (Re-ID) is a technique that matches images of target people using non-overlapping cameras. It has attracted widespread attention due to its extensive applications in surveillance and public safety. In the past few years, person re-identification technology has achieved quite satisfactory results in supervised learning scenarios. However, manually annotating cross-camera labels is extremely laborious and time-consuming. Furthermore, in real-world urban surveillance scenarios, the sheer volume of pedestrians and the sheer number of cameras make labeling such datasets extremely difficult. Therefore, researching how to better achieve person re-identification in unsupervised scenarios has become an important research direction in this field.
[0003] Existing datasets are collected from different environments and contain varying biases. Person re-identification models trained on the source domain are often affected by domain transfer, leading to a significant drop in performance across different target domains. Therefore, training models with good domain generalization ability is a pressing issue. To overcome this problem, unsupervised domain adaptation (UDA) is one of the most popular solutions, addressing the situation where data classifications differ between the source and target domains. However, UDA is typically used in closed-set scenarios, assuming the classes in the source and target domains are the same. In unsupervised domain adaptation person re-identification tasks, the datasets used are usually open sets, making it more challenging than traditional UDA.
[0004] Besides UDA, there are generally two approaches to unsupervised adaptive person re-identification tasks. Some methods focus on transferring information from the labeled domain to the unlabeled domain to smooth inter-domain bias and minimize differences, while utilizing generative adversarial networks (GANs) to preserve the identity information of the source domain and learn the style of the target domain. This approach is limited by the learning style, which is still different from the unlabeled domain, and may not adapt to unlabeled real-world scenarios. Secondly, some methods attempt to leverage relationships between unknown domains to assign pseudo-labels to unlabeled samples, and then train the Re-ID model using supervised methods.
[0005] The above method has the following drawbacks:
[0006] (1) When using existing clustering methods to generate pseudo-labels directly, it is difficult to guarantee the accuracy of the clustering results. If the clustering results are used as pseudo-labels for samples in unknown domains, this will cause significant noise in the subsequent training phase. These noisy labels will impair the performance of the trained Re-ID model.
[0007] (2) The only difference between unsupervised and supervised Re-ID models during the training phase is the accuracy of the labels. In the case of no labels, clustering algorithms are used to assign labels, but these methods result in a large number of noisy samples. Many methods select only high-confidence samples as the training set, discarding low-confidence samples. However, these discarded samples are often difficult to distinguish and significantly different from other samples. If they are discarded, a well-trained Re-ID model may encounter problems when faced with similar images in the test set. Summary of the Invention
[0008] The purpose of this invention is to provide an adaptive memory-based unsupervised pedestrian re-identification method based on grouped sensing labels, in order to solve the problem in the prior art where noisy labels hinder the training process, thereby limiting the model's generalization ability and resulting in insufficient model performance.
[0009] This invention is implemented as follows: An adaptive memory-based unsupervised person re-identification method based on group-aware labels, comprising the following steps:
[0010] A. Using unlabeled target domain image data as samples, the DBSCAN clustering algorithm was applied to the samples by setting different clustering conditions to generate group-aware labels, resulting in a pedestrian dataset with multiple groups of labels.
[0011] B. Calculate the distance between the cluster centers of the pedestrian dataset and the samples in the same cluster. The samples in the same cluster have different weights. Construct a weight dictionary a.
[0012] C. Construct a teacher-student network based on an adaptive memory storage structure, which includes a teacher network E. t Student Network E s and memory storage module, including teacher network E t And student network E s They have the same network structure; the memory storage module is initialized using the clustered features, and the memory storage structure corresponding to the sample is updated using the weight dictionary a;
[0013] D. During training, three pedestrian datasets with multiple sets of labels, generated by setting different clustering conditions, are represented as follows: and Input to Teacher Network E t And student network Es Training is conducted through a teacher network E t To store the student network E during the training process s The parameters in the model include three output features in both the student and teacher networks that describe the same pedestrian image from multiple perspectives. Alignment learning between the teacher and student networks is used to smooth out the effects of noise.
[0014] E. Repeat steps A through D according to the preset number of iterations, and then apply this to the teacher network E. t And student network E s Conduct training.
[0015] F. After training is complete, input the test set data and perform the test.
[0016] Furthermore, the present invention can be implemented according to the following technical solution:
[0017] In step A, the multi-density DBSCAN clustering algorithm is used to generate multiple sets of cluster pseudo-labels. The target domain image data is input, and the clustering conditions S = {s1, s2, ... s} are set. t The formula for the clustering process is:
[0018] C,L = Clustering(S)
[0019] Where C and L represent the cluster center and the pseudo-label obtained from the clustering, respectively;
[0020] By introducing slack variables γ1 and γ2, when the clustering condition is ε, ε-γ1 and ε+γ2 generate clusters for the same dataset; when ε is the normal setting for clusters, ε+γ2 relaxes the clustering criteria, so that each cluster result contains more samples, while ε-γ1 tightens the clustering criteria, so that each cluster result contains fewer samples, thereby generating a pedestrian dataset with multiple sets of labels.
[0021] In step B, the unlabeled samples are clustered into N clusters, denoted as C = {c 1 ,c 2 ,...,c i}, i∈[1,N]; for each cluster, its central feature is:
[0022]
[0023] Among them, c i K represents the i-th cluster in the clustering results, where K is the cluster number of clusters. i The number of samples in It is C i The central feature in; for image g, g and c i The distance between them is calculated as follows:
[0024]
[0025] Among them, f g It is a characteristic of g;
[0026] The distance between a sample and the original features in its corresponding memory storage structure is calculated as follows:
[0027]
[0028] in It is C i Features in the memory storage structure corresponding to the pseudo-labels; image g and cluster c i The distance to the k-th sample is:
[0029]
[0030] Get d i Then, sort the elements in descending order and save them as ds. i ; via d i and ds i The weight dictionary 'a' is calculated as follows:
[0031]
[0032] in, yes In ds i Index in;
[0033] The output of the previous step is a weight dictionary 'a' corresponding to different groups of labels. In each iteration, this weight dictionary 'a' can be used to update the features in the memory storage structure.
[0034] In step C, after clustering, the memory storage module is initialized using the clustered pseudo-labels, that is,
[0035] M i ←U(X i )
[0036] Where U(·) is the uniform sampling function, X i This represents the feature vectors of all instances contained in the i-th cluster;
[0037] The update is performed by combining sample weights. For a sample g belonging to class c, its corresponding memory storage feature M is... c Updated to:
[0038]
[0039] Where β∈[0,1] is the update parameter, β=0 means discarding the original features in the memory dictionary, and β=1 means giving up updating the memory dictionary.
[0040] In step D, during training, the cosine similarity between the features of g and the features M stored in the memory structure is first calculated; then, the predicted probability of the corresponding category is calculated using the log-Softmax function.
[0041]
[0042] Where τ is a hyperparameter, and if there are 3 sets of labels, then there will be 3 feature storage modules in the method; the total loss is calculated as follows:
[0043]
[0044] In addition to the memory storage structure, through the teacher network E t To store the student network E during the training process s The parameters are expressed as E, representing the average network parameters at the current iteration T. t (·|W t ), calculated as
[0045] E t (T)=αE t (T-1)[W t ]+(1-α)W s
[0046] Where E t (T-1)[W t ] represents the parameters of the mean network in (T-1) iterations, W t W s They are E t and E s The parameter α is the momentum parameter in the range [0, 1].
[0047] The weight dictionary α is dynamically updated according to the different training rounds, so that the teacher network E t Storage from student network E s More different parameters; when the Re-ID model is weak, the teacher network E t Reduce the impact of a large number of noise tags in the early stages;
[0048] A weighted alignment loss is used to constrain the Re-ID model to increase the distance between the target sample and such samples; the weights are calculated as follows:
[0049]
[0050] Where P is the positive set and N is the negative set. and Representing the distance between positive and negative pairs, the weighted Softmax triplet loss, based on the weights, is defined as:
[0051]
[0052] Where θ s and θ t These are the parameters of the student network and the mean network, L bec It is the binary cross-entropy loss, T i (θ s ) is defined as:
[0053]
[0054] The input to the current step is the pedestrian dataset with multiple labels generated in the above steps. The distance between the cluster center and the samples in the same category is calculated, so that the samples in the same cluster have different weights. In this way, the weight dictionary a is constructed, and the memory storage structure is updated using a.
[0055] After a set of labeled clusters, the unlabeled samples are clustered into N clusters, which can be represented as C = {c 1 ,c 2 ,...,c i}, i∈[1,N]; for each cluster, its central feature is:
[0056]
[0057] Among them, c i K represents the i-th cluster in the clustering results, where K is the cluster number of clusters. i The number of samples in It is C i The central feature in; therefore, for image g, g and c i The distance between them is calculated as follows:
[0058]
[0059] Among them, f g These are features of g; the distance between a sample and the original features in its corresponding memory storage structure is calculated as follows:
[0060]
[0061] in It is C i Therefore, the image g and cluster c have features in the memory storage structure corresponding to the pseudo-labels. i The distance to the k-th sample is:
[0062]
[0063] Get d i Then, sort the elements in descending order and save them as ds. i ; via d i and ds i The weight dictionary 'a' is calculated as follows:
[0064]
[0065] in, yes In ds i The index in the memory storage structure is used; the output of the current step is a weight dictionary corresponding to different groups of labels. In each iteration, the features in the memory storage structure are updated using this weight dictionary.
[0066] This invention optimizes neural networks with noisy labels, explores discriminative features in multi-labeled pedestrian images, and improves the adaptability of pedestrian re-identification models to new scenes. It employs an adaptive memory framework, establishing a multi-branch structure with a memory mechanism through a memory storage structure to resist noisy labels, thereby mitigating the impact of noisy pseudo-labels and highly variable samples on accuracy. The constructed multi-memory dictionary and weight dictionary 'a' better optimize neural networks with noisy data, and uses a dictionary update strategy to adaptively update the neural network parameters and weighted loss based on the confidence level of the samples.
[0067] This invention employs an adaptive network with group-aware labels. To uncover more relationships between samples in an unknown domain, a group label is generated for each sample in the unknown domain, and more complementary and diverse features are learned through clustering. Multiple types of group labels are combined, and a corresponding memory structure is constructed for each type of label. This memory structure is adaptively updated based on the confidence level of the sample to reduce the influence of noisy labels.
[0068] The network of this invention consists of a student network and a teacher network. Its goal is to learn real-time information and store the training parameters of the student network in intermediate stages, which can reduce the error parameters caused by noise labels in multiple iterations, thereby mitigating the influence of noise labels. Attached Figure Description
[0069] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0070] like Figure 1 As shown, the adaptive memory unsupervised person re-identification method based on group-aware labels of the present invention includes the following steps:
[0071] A. Using unlabeled target domain image data as samples, the DBSCAN clustering algorithm was used to extract features from the samples by setting different clustering conditions, generating group-aware labels, and obtaining a pedestrian dataset with multiple sets of labels.
[0072] Specifically, since the number of pedestrian categories in the target domain is uncertain, the multi-density DBSCAN clustering algorithm is used to generate multiple sets of cluster pseudo-labels. The target domain image data is input, and the clustering condition S = {s1, s2, ... s} is set. t The formula for the clustering process is:
[0073] C,L = Clustering(S)
[0074] Where C and L represent the cluster center and the pseudo-label obtained from the clustering, respectively;
[0075] In this clustering method, we also introduce slack variables γ1 and γ2. When the clustering condition is ε, ε-γ1 and ε+γ2 generate clusters for the same dataset. For example, when ε is the normal setting for clustering, ε+γ2 relaxes the clustering criteria, allowing each cluster result to contain more samples, while ε-γ1 tightens the clustering criteria, allowing each cluster result to contain fewer samples, thereby generating a pedestrian dataset with multiple sets of labels.
[0076] B. Calculate the distance between the cluster centers of the pedestrian dataset and the samples in the same cluster. Samples in the same cluster have different weights. Construct a weight dictionary a.
[0077] Taking a set of labels as an example, after clustering, the unlabeled samples are clustered into N clusters, denoted as C = {c 1 ,c 2 ,...,c i}, i∈[1,N]; for each cluster, its central feature is:
[0078]
[0079] Among them, c i K represents the i-th cluster in the clustering results, where K is the cluster number of clusters. i The number of samples in It is C i The central feature in; for image g, g and c i The distance between them is calculated as follows:
[0080]
[0081] Among them, f g It is a characteristic of g;
[0082] In addition to the center distance, the distance between a sample and the original features in its corresponding memory storage structure is calculated as follows:
[0083]
[0084] in It is C i Features in the memory storage structure corresponding to the pseudo-labels; image g and cluster c i The distance to the k-th sample is:
[0085]
[0086] Get d i Then, sort the elements in descending order and save them as ds. i ; via d i and ds i The weight dictionary 'a' is calculated as follows:
[0087]
[0088] in, yes In ds i Index in;
[0089] The output of the previous step is a weight dictionary 'a' corresponding to different groups of labels. In each iteration, this weight dictionary 'a' can be used to update the features in the memory storage structure.
[0090] C. Construct a teacher-student network based on an adaptive memory storage structure, which includes a teacher network E. t Student Network E s and memory storage module, including teacher network E t And student network E s They have the same network structure; the memory storage module is initialized using the clustered features, and the memory storage structure corresponding to the sample is updated using the weight dictionary a.
[0091] In this method, after clustering, a dataset with multiple labels is generated. Taking one label as an example, after clustering, the memory storage module is initialized using the clustered pseudo-labels, i.e.,
[0092] M i ←U(X i )
[0093] Where U(·) is the uniform sampling function, X i This represents the feature vectors of all instances contained in the i-th cluster;
[0094] This invention updates the data by incorporating sample weights. For a sample g belonging to category c, its corresponding memory storage feature M... c Updated to:
[0095]
[0096] Where β∈[0,1] is the update parameter, β=0 means discarding the original features in the memory dictionary, and β=1 means giving up updating the memory dictionary.
[0097] D. During training, three pedestrian datasets (represented as follows) with multiple sets of labels, generated by setting different clustering conditions, are used. and Input into the teacher network E t And student network E s Training is conducted through a teacher network E t To store the student network E during the training process s The parameters in the model include three output features in both the student and teacher networks that describe the same pedestrian image from multiple perspectives. Alignment learning between the teacher and student networks is used to smooth out the effects of noise.
[0098] During training, the cosine similarity between the features of g and the features M stored in the memory structure is first calculated; then, the predicted probability of the corresponding class is calculated using the log-Softmax function.
[0099]
[0100] Where τ is a hyperparameter, and if there are 3 sets of labels, then there will be 3 feature storage modules in the method; the total loss is calculated as follows:
[0101]
[0102] In addition to the memory storage structure, through the teacher network E t To store the student network E during the training process s The parameters are expressed as E, representing the average network parameters at the current iteration T. t (·|W t ), calculated as
[0103] E t (T)=αE t (T-1)[W t ]+(1-α)W s
[0104] Where E t (T-1)[W t ] represents the parameters of the mean network in (T-1) iterations, W t W s They are E t and E sThe parameters, α, are momentum parameters in the range [0, 1]. α is dynamically updated depending on the number of training epochs, which encourages the mean network to store more diverse parameters from the student networks. Thus, even when the Re-ID model is weak, the mean network can reduce the impact of numerous noisy labels early on.
[0105] This invention utilizes a weighted alignment loss as a constraint, which requires that during model training, the higher the similarity of positive samples, the smaller their weights. If the similarity of negative samples is too high, it indicates that they are very close to the target sample. Therefore, it is necessary to assign greater weights to these types of samples to train the model and increase the distance between the target sample and these samples.
[0106] The weight dictionary α is dynamically updated according to the different training rounds, so that the teacher network E t Storage from student network E s More different parameters; when the Re-ID model is weak, the teacher network E t Reduce the impact of a large number of noise tags in the early stages;
[0107] A weighted alignment loss is used to constrain the Re-ID model to increase the distance between the target sample and such samples; the weights are calculated as follows:
[0108]
[0109]
[0110] Where P is the positive set and N is the negative set. and Representing the distance between positive and negative pairs, the weighted Softmax triplet loss, based on the weights, is defined as:
[0111]
[0112] Where θ s and θ t These are the parameters of the student network and the mean network, L bec It is the binary cross-entropy loss, T i (θ s ) is defined as:
[0113]
[0114] The input to the current step is the pedestrian dataset with multiple labels generated in the above steps. The distance between the cluster center and the samples in the same category is calculated, so that the samples in the same cluster have different weights. In this way, the weight dictionary a is constructed, and the memory storage structure is updated using a.
[0115] After a set of labeled clusters, the unlabeled samples are clustered into N clusters, which can be represented as C = {c 1 ,c 2 ,...,c i}, i∈[1,N]; for each cluster, its central feature is:
[0116]
[0117] Among them, c i K represents the i-th cluster in the clustering results, where K is the cluster number of clusters. i The number of samples in It is C i The central feature in; therefore, for image g, g and c i The distance between them is calculated as follows:
[0118]
[0119] Among them, f g These are features of g; the distance between a sample and the original features in its corresponding memory storage structure is calculated as follows:
[0120]
[0121] in It is C i The image g has features in the memory storage structure corresponding to the pseudo-labels; therefore, the image g and cluster c... i The distance to the k-th sample is:
[0122]
[0123] Get d i Then, sort the elements in descending order and save them as ds. i ; via d i and ds i The weight dictionary 'a' is calculated as follows:
[0124]
[0125] in, yes In ds i The index in the memory storage structure is used; the output of the current step is a weight dictionary corresponding to different groups of labels. In each iteration, the features in the memory storage structure are updated using this weight dictionary.
[0126] E. Repeat steps A through D according to the preset number of iterations, and then apply this to the teacher network E. t And student network E sTraining is then performed. Steps A through D have described the process of one iteration of training. Step E trains the network according to the set clustering algorithm, the maximum number of training rounds, and the number of iterations to be performed in each training round.
[0127] F. After training is complete, input the test set data and perform the test.
Claims
1. A packet-aware tag-based adaptive memory unsupervised pedestrian re-identification method, characterized in that, Comprising the following steps: A. With the target domain picture data without label as sample, through setting different clustering conditions, the sample is operated by DBSCAN clustering algorithm, generating group perception label, obtaining pedestrian dataset with multiple group labels; B. The distance between the clustering center of the pedestrian dataset and the samples in the same cluster is calculated, the samples in the same cluster have different weights, and a weight dictionary a is constructed; C. constructing a teacher-student network based on an adaptive memory storage structure, the network comprising a teacher network E t , a student network E s , and a memory storage module, wherein the teacher network E t and the student network E s have the same network structure; initializing the memory storage module using clustered features, and updating the memory storage structure corresponding to the sample using a weight dictionary a; D、In the training process, three pedestrian data sets with multiple sets of labels generated by setting different clustering conditions are represented as and Input into the teacher network E t and the student network E s , the parameters in the student network E t during the training process are stored through the teacher network E s , there are 3 output features in the student network and the teacher network respectively, which describe the same pedestrian picture from multiple angles, and the alignment learning between the teacher network and the student network is used to smooth the influence of noise; E. repeating the steps A-D for a predetermined number of iterations, training the teacher network E t and the student network E s , F. After training, the test set data is input for testing; In step B, the unlabeled samples are clustered into N clusters, denoted as C = {c 1 ,c 2 ,...,c i}, i e [1, N] ; for each cluster, the center feature is: where c i represents the i-th cluster in the clustering result, K is the number of samples in c i , is the center feature in c i ; for an image g, the distance between g and c i is calculated as: wherein f g is a characteristic of g; The distance between the sample and the original feature in the corresponding memory storage structure is calculated as: wherein is c i Features in the memory storage structure corresponding to the pseudo label of c; image g and cluster c i The distance of the kth sample in the cluster is: get d i After, sort the elements in descending order and save as ds i ; compute weight dictionary a as: i and ds i wherein is in ds i index; The output of the previous step is the weight dictionary a corresponding to different group labels, which can be used to update the features in the memory storage structure in each iteration; In step C, after clustering, the memory storage module is initialized by using the pseudo label after clustering, that is, M i ←U(X i ) where U(·) is a uniform sampling function, X i represents all instance feature vectors contained in the i-th cluster; In conjunction with the updating of the sample weight, for a sample g belonging to the category c, the corresponding memory storage feature M c is updated to: Where β∈[0,1] is an update parameter, β=0 means discarding the original features in the memory dictionary, and β=1 means abandoning the update of the memory dictionary.
2. The packet perception tag based adaptive memory unsupervised pedestrian re-identification method according to claim 1, characterized in that, in In step A, a multi-density DBSCAN clustering algorithm is used to generate multiple sets of clustering pseudo-labels, input target domain picture data, set clustering conditions S = {s1, s2, … s t ,} and the formula of the clustering process is: C, L = Clustering(S) Where C and L represent the clustering center and the pseudo label obtained by clustering respectively; The relaxation variables γ1 and γ2 are introduced, when the clustering condition is ε, ε-γ1 and ε+γ2 generate clustering for the same dataset; When ε is the normal setting of the cluster, ε+γ2 relaxes the clustering standard, so that each clustering result contains more samples, and ε-γ1 tightens the clustering standard, so that each clustering result contains a small amount of samples, thereby generating a pedestrian dataset with multiple group labels.
3. The packet-based perception tag based adaptive memory unsupervised pedestrian re-identification method according to claim 1, characterized in that, In step D, during training, first calculate the cosine similarity between the features of g and the features M saved in the memory storage structure; Then use the log-Softmax function to calculate the prediction probability of the corresponding category: Where τ is a hyperparameter, if there are 3 group labels, 3 feature storage modules corresponding to 3 groups will be stored in the method; The total loss is calculated as: In addition to the memory storage structure, the parameters of the student network E t at the current iteration T are stored by the teacher network E s during the training process, and the parameters of the average network at the current iteration T are denoted as E t (·|W t ), which is calculated as E t (T) = aE t (T-1)[W t ]+(1-a)W s where E t (T-1) [W t ] denotes the parameters of the mean network in the (T-1)th iteration, W t , W s are the parameters of E t and E s , respectively, and a is a momentum parameter in the range [0, 1]; The weight dictionary a is dynamically updated according to different training rounds, so that the teacher network E t stores more different parameters from the student network E s ; when the Re-ID model is weak, the teacher network E t reduces the influence of a large number of noise labels at an early stage; The weighted alignment loss is used to constrain the Re-ID model to increase the distance between the target sample and this kind of sample; The weight is calculated as follows: where P is the positive set, N is the negative set, and denotes the distance between positive pairs and negative pairs, the weighted Softmax triplet loss is defined as: where θ s and θ t are parameters of the student network and mean network, L bec is the binary cross-entropy loss, T i (θ s ) is defined as: The input of the current step is the pedestrian dataset with multiple group labels generated in the above steps, the distance between the clustering center and the samples in the same category is calculated, so that the samples in the same cluster have different weights, in this way, the weight dictionary a is constructed, and a is used to update the memory storage structure; After clustering of the set of labels, the unlabeled samples are clustered into N clusters, denoted as C = {c 1 ,c 2 ,...,c i}, i e [1, N]; for each cluster, the center feature is: where c i represents the i-th cluster in the clustering result, K is the number of samples in c i , is the center feature in c i ; thus, for an image g, the distance between g and c i is calculated as: where f g is a feature of g; the distance between the sample and the original feature in the memory storage structure corresponding to the sample, calculated as: wherein is c i has a feature in the memory storage structure corresponding to the pseudo label, therefore, the image g is clustered into the cluster c i The distance between the kth sample in the cluster c and the image g is: get d i After, sort the elements in descending order and save as ds i ; compute weight dictionary a as: i and ds i wherein is In ds i is an index; the output of the current step is a weight dictionary for different group labels, which is used to update the features in the memory storage structure in each iteration.