Layered weighted anti-noise depth metric learning method based on data distribution

By introducing a data distribution-adaptive noise sample loading and sampling strategy into deep metric learning, and optimizing the sampling boundary and loss function, the problems of insufficient training accuracy and robustness in deep metric learning are solved, and the efficient training and generalization ability of the model are improved.

CN114418013BActive Publication Date: 2026-03-31ZHEJIANG LAB +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-22
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing deep metric learning methods use a fixed sampling strategy during training, resulting in a small number of samples, insufficient model training accuracy and robustness, and failure to fully consider the impact of noise in real-world application scenarios.

Method used

A hierarchical weighted noise-resistant deep metric learning method based on data distribution is adopted. By loading randomly synthesized noise samples, updating the data distribution and adopting an adaptive sampling strategy, the sampling boundary is optimized and the hierarchical weight loss function is calculated to improve the model training accuracy and robustness.

Benefits of technology

It improves the training robustness and generalization ability of the model, breaks through the bottleneck of local optima, and enhances the training accuracy and convergence speed of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418013B_ABST
    Figure CN114418013B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of internet big data, in particular to a hierarchical weighted anti-noise deep metric learning method based on data distribution, comprising: loading randomly synthesized noise samples into a training data set; describing data distribution based on distance relationship between data, updating the record of data distribution along with the progress of training; removing noise samples in each training batch based on the distribution matrix of data distribution; adaptively guiding the learning of sampling strategy and completing sampling based on data distribution; minimizing the loss function of the model to update the model parameters and synchronously updating the data distribution. The deep metric learning method can improve the training accuracy and robustness of the model, thereby ensuring the training effect of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet big data technology, specifically to a hierarchical weighted noise-resistant deep metric learning method based on data distribution. Background Technology

[0002] Metric learning methods learn a feature mapping approach that maps samples in a dataset to a feature representation space, ensuring that similar samples are close together and dissimilar samples are far apart, thus achieving positive and negative sample separation. Metric learning plays a crucial role in visual analysis, aiming to learn a distance metric to measure the similarity between image pairs, thereby improving the accuracy of subsequent classification or clustering tasks. Metric learning can be widely applied in various visual applications, such as face recognition, person re-identification, object tracking, object recognition, and kinship verification.

[0003] With the development of deep learning, deep metric learning methods have been widely used in the field of computer vision. For example, Chinese patent CN108304864A discloses a method and apparatus for deep adversarial metric learning, which includes: extracting depth features of images from the training set and generating triples; transforming negative samples in the triples into hard samples that are informative for metric training using a generator; obtaining the representation of the hard samples in the metric space and training the entire network simultaneously to obtain the representation of the image in the metric space.

[0004] The existing deep adversarial metric learning methods described above can supplement existing hard samples, thereby effectively improving the robustness of the metric. However, the applicant found that the sampling boundaries set in the sampling strategies of existing deep metric learning methods are fixed and do not adapt to the model training process. This leads to a shortage of samples in the later stages of training, causing the model training to bottleneck and resulting in poor training accuracy. Furthermore, existing solutions only supplement hard samples without fully considering noise in real-world application scenarios, resulting in insufficient training robustness. Therefore, designing a deep metric learning method that can improve both training accuracy and robustness is a pressing technical problem that needs to be solved. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the technical problem to be solved by the present invention is: how to provide a hierarchical weighted noise-resistant depth metric learning method based on data distribution, so as to improve the training accuracy and training robustness of the model, thereby ensuring the training effect of the model.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0007] A hierarchical weighted, noise-resistant deep metric learning method based on data distribution includes the following steps:

[0008] S1: Load randomly synthesized noise samples into the training dataset;

[0009] S2: The data distribution is characterized based on the distance relationship between data points, and the data distribution record is updated as the training process progresses;

[0010] S3: Based on the distribution matrix of the data distribution, remove noisy samples from each training batch;

[0011] S4: Learn the sampling strategy based on the adaptive guidance of data distribution and complete the sampling;

[0012] S5: Minimize the model's loss function to update the model parameters and update the data distribution in sync.

[0013] Preferably, step S1 specifically includes the following steps:

[0014] S101: Extract features from the pre-trained neural network, and cluster images of randomly selected real categories in the training dataset into a large number of small clusters by extracting features;

[0015] S102: Merge the samples in each small cluster into a randomly selected true class to complete the noisy sample loading.

[0016] Preferably, the extracted features are L2 normalized features of GoogleNet obtained from ImageNet pre-training;

[0017] The number of clusters is half the number of images in the corresponding real category.

[0018] Preferably, step S2 specifically includes the following steps:

[0019] S201: Initialize the distance mean matrix M and distance variance matrix V to record the mean and variance of the distances between different classes;

[0020] in, C represents the number of classes in the samples of the training dataset;

[0021] S202: For each training batch, extract the classes appearing in that training batch from the distance mean matrix M and the distance variance matrix V using the class label index, and generate a training mean matrix that records the mean and variance changes of the distances between samples in the training batch. and training variance matrix

[0022] in, B represents the number of classes in the training batch;

[0023] S203: Based on the actual distance relationships of the data during the training process, record the training mean matrix at the current training round t. and training variance matrix The temporal update status is recorded, and the distance mean matrix M at training epoch t is updated accordingly. t and distance variance matrix V t .

[0024] Preferably, the distance mean matrix M is updated using the following formula. t :

[0025]

[0026] in,

[0027] In the formula: and D represents the changes in the training mean matrix at rounds t and t-1, respectively; mean β1 represents the mean of the actual calculated distances between samples of different classes, i.e., the true value of the training mean matrix; β1 is used to measure the ratio between the change in the training mean matrix and the true value; γ1 is used to measure the ratio between the change in the training mean matrix and the original value. After each training iteration, γ1 is decayed by a factor of 0.9.

[0028] Update the distance variance matrix V using the following formula. t :

[0029]

[0030] in,

[0031] In the formula: and D represents the changes in the training variance matrix at rounds t and t-1, respectively; std β1 represents the variance of the actual calculated distance values ​​between samples of different classes, i.e., the true value of the training variance matrix; β2 is used to measure the ratio between the change value of the training variance matrix and the true value; γ2 is used to measure the ratio between the change value of the training variance matrix and the original value. γ2 is smaller than γ1, and γ2 is decayed by a factor of 0.9 after each training.

[0032] Preferably, in step S3, before each information update, the selected sample x is determined. i Similarity to other samples in the same class; then calculate sample x based on the similarity. i The probability that the label is k When probability Greater than the current training process When, sample x i Add the clean sample with label k to the training process; otherwise, add sample x. i These are treated as noise samples and discarded.

[0033] Preferably, sample x is calculated using the following formula. i Similarity:

[0034]

[0035] In the formula: T(x i (k) represents sample x i Similarity to samples with the same label k in the training batch; N k f(x) represents the number of samples of this class in the training batch; i ) represents sample x i eigenvectors; S(f(x) i ),v j ) represents sample x i Feature vectors and sample x j Similarity;

[0036] The sample x is calculated using the following formula. i The probability that the label is k:

[0037]

[0038] Preferably, step S4 specifically includes the following steps:

[0039] S401: Train the mean matrix Expanded into a matrix Train the variance matrix Expanded into a matrix

[0040] in, The size is T×T; T represents the number of classes in the training batch; This represents the actual distance of the input data;

[0041] S402: Calculate the sampling strategy for positive samples p represents a variable that changes as the training process progresses;

[0042] S403: Calculate the sampling strategy for negative samples n represents the variable that changes as the training process progresses;

[0043] S404: Sampling is completed based on a sampling strategy that uses positive and negative samples.

[0044] Preferably, in step S5, the loss function of the model is calculated based on the amount of information carried by the sample and the weights are assigned hierarchically.

[0045] Preferably, step S5 specifically includes the following steps:

[0046] S501: Set the negative sample weight coefficients for the stratification based on the amount of information carried by the samples, and calculate the corresponding negative sample loss function based on the negative sample weight coefficients.

[0047] The negative sample weight coefficient is ω ij =-exp(ψ×(α-d) ij )),x j ∈N i,c ;

[0048] The negative sample loss function is

[0049] In the formula: ψ represents the hyperparameter controlling the degree of weighting; α represents the sampling boundary of the current training process;

[0050] S502: Set the positive sample weight coefficient according to the distance between samples, and calculate the corresponding positive sample loss function based on the positive sample weight coefficient;

[0051] The positive sample weight coefficient is

[0052] The positive sample loss function is

[0053] S503: The loss function of the model is obtained by adding the loss function of negative samples and the loss function of positive samples;

[0054] The loss function of the model is L(x) i ,x j ) = L N (x i ,x j )+L P (x i ,x j ).

[0055] Compared with existing technologies, the hierarchical weighted noise-resistant depth metric learning method of the present invention has the following advantages:

[0056] This invention loads randomly synthesized noise samples into the training dataset, allowing the noise samples to participate in model training along with the training dataset. This fully considers the impact of noise in the actual application scenarios of the model, thereby improving the training robustness and generalization ability of the model.

[0057] This invention characterizes the data distribution based on the distance relationships between data points and continuously updates it along with the training process. Then, based on the data distribution, it adaptively guides the learning of the sampling strategy and completes the sampling. On one hand, by continuously updating the data distribution, this invention can take into account the differences in relationships between different classes, enabling adaptive recording based on the current distance distribution and improving the model's training effect. On the other hand, by adaptively sampling through changes in the updated data distribution, this invention can reduce the proportion of noisy samples in each sampling process. By adaptively adjusting the sampling boundary and optimizing the sampling strategy in the metric learning method, it breaks the bottleneck of the model being limited to local optima and can fully mine information-rich negative samples, thereby effectively improving the model's training accuracy.

[0058] This invention calculates the model's loss function based on the amount of information carried by the samples and the hierarchical allocation of weights, which enables the model to converge faster while ensuring that the training direction is not affected, thus balancing the model's training efficiency and effectiveness. Attached Figure Description

[0059] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0060] Figure 1 This is a logical block diagram of a hierarchical weighted noise-resistant deep metric learning method based on data distribution. Detailed Implementation

[0061] The following detailed explanation illustrates the specific implementation methods:

[0062] Example:

[0063] This embodiment discloses a hierarchical weighted noise-resistant deep metric learning method based on data distribution.

[0064] like Figure 1 As shown, the hierarchical weighted noise-resistant deep metric learning method based on data distribution includes the following steps:

[0065] S1: Load randomly synthesized noise samples into the training dataset;

[0066] S2: The data distribution is characterized based on the distance relationship between data points, and the data distribution record is updated as the training process progresses;

[0067] S3: Based on the distribution matrix of the data distribution, remove noisy samples from each training batch;

[0068] S4: Learn the sampling strategy based on the adaptive guidance of data distribution and complete the sampling;

[0069] S5: Minimize the model's loss function to update the model parameters and simultaneously update the data distribution. Calculate the model's loss function based on the information carried by the samples and hierarchically assign weights.

[0070] It should be noted that the training batch in this invention is a hyperparameter used to define the number of samples to be processed before updating the internal model parameters. It can be understood as dividing the entire training dataset into several batches for training, with each batch being a training batch. For example, in a training dataset with 2000 training samples, if the 2000 samples are divided into training batches of size 500, then completing one epoch requires 4 iterations.

[0071] This invention loads randomly synthesized noise samples into the training dataset, allowing these noise samples to participate in model training alongside the training dataset. This fully considers the impact of noise in real-world application scenarios, thereby improving the model's training robustness and generalization ability. Simultaneously, this invention characterizes the data distribution based on the distance relationships between data points and continuously updates it along with the training process. This data distribution then adaptively guides the learning of sampling strategies and completes sampling. On one hand, by continuously updating the data distribution, the differences in relationships between different classes can be taken into account, enabling adaptive recording based on the current distance distribution and improving the model's training effect. On the other hand, adaptive sampling through changes in the updated data distribution reduces the proportion of noise samples in each sampling process. The adaptive adjustment of the sampling boundary optimizes the sampling strategy in the metric learning method, breaking the bottleneck of the model being limited to local optima and fully mining information-rich negative samples, thus effectively improving the model's training accuracy. Finally, this invention calculates the model's loss function based on the information carried by the samples and hierarchically assigns weights, further accelerating the model's convergence speed while ensuring that the model's training direction is not affected, thus balancing training efficiency and effectiveness.

[0072] Step S1 specifically includes the following steps:

[0073] S101: Extract features from the pre-trained neural network, and cluster images of randomly selected real categories in the training dataset into a large number of small clusters by extracting features;

[0074] S102: Merge the samples in each small cluster into a randomly selected true class to complete the loading of noisy samples. In this embodiment, through continuous iterative training, the number of classes is reduced by one in each iteration. In this way, the small cluster model obtains a training dataset containing noisy labeled samples that more closely resembles the real distribution.

[0075] In the specific implementation process, the extracted features are L2 normalized features of GoogleNet obtained from ImageNet pre-training;

[0076] The number of clusters is half the number of images in the corresponding real category:

[0077]

[0078] In the formula: t represents the number of iterations; Let x represent the cluster center of the k-th class, for each sample x. i It is assigned to the nearest center.

[0079] This invention loads randomly synthesized noise samples into the training dataset, allowing the noise samples to participate in model training along with the training dataset. This fully considers the impact of noise in the actual application scenarios of the model, thereby improving the training robustness and generalization ability of the model.

[0080] Step S2 specifically includes the following steps:

[0081] S201: Initialize the distance mean matrix M and distance variance matrix V to record the mean and variance of the distances between different classes;

[0082] in, C represents the number of classes in the samples of the training dataset;

[0083] S202: For each training batch, extract the classes appearing in that training batch from the distance mean matrix M and the distance variance matrix V using the class label index, and generate a training mean matrix that records the mean and variance changes of the distances between samples in the training batch. and training variance matrix

[0084] in, B represents the number of classes in the training batch;

[0085] S203: Based on the actual distance relationships of the data during the training process, record the training mean matrix at the current training round t. and training variance matrix The temporal update status is recorded, and the distance mean matrix M at training epoch t is updated accordingly. t and distance variance matrix V t .

[0086] Specifically, since there is no information about previous training rounds during the first training session, the value is directly updated to the current round value during the first training session, and then iteratively updated in the following manner.

[0087] The distance mean matrix M is updated using the following formula. t :

[0088]

[0089] in,

[0090] In the formula: and D represents the changes in the training mean matrix at rounds t and t-1, respectively; mean β1 represents the mean of the actual calculated distances between samples of different classes, i.e., the true value of the training mean matrix; β1 is used to measure the ratio between the change in the training mean matrix and the true value; γ1 is used to measure the ratio between the change in the training mean matrix and the original value. After each training iteration, γ1 is decayed by a factor of 0.9.

[0091] Update the distance variance matrix V using the following formula. t :

[0092]

[0093] in,

[0094] In the formula: and D represents the changes in the training variance matrix at rounds t and t-1, respectively; std β1 represents the variance of the actual calculated distance values ​​between samples of different classes, i.e., the true value of the training variance matrix; β2 is used to measure the ratio between the change value of the training variance matrix and the true value; γ2 is used to measure the ratio between the change value of the training variance matrix and the original value. γ2 is smaller than γ1, and γ2 is decayed by a factor of 0.9 after each training.

[0095] Record the changes in value for each round of updates, i.e., use the training mean matrix. and training variance matrix The stored information is used as the change value to update the distance mean matrix M and the distance variance matrix V. The training mean matrix... and training variance matrix The two matrices need to be updated by using previous information as the change value and adding the current true value.

[0096] This invention utilizes the concept of genetic algorithms to continuously integrate changing values ​​and recorded values, enabling the model to continuously learn the data distribution during training. This allows the model to consider the differences in relationships between different classes and make adaptive records based on the current distance distribution, thereby improving the training effect of the model and laying the foundation for subsequent sampling strategies.

[0097] In the specific implementation process, before each information update, the selected sample x is determined. i Similarity to other samples in the same class; then calculate sample x based on the similarity. i The probability that the label is k When probability Greater than the current training process When, sample x i Add the clean sample with label k to the training process; otherwise, add sample x. i These are treated as noise samples and discarded.

[0098] in, This indicates that in round t, The values ​​between the i-th class and the k-th class are recorded in the matrix.

[0099] In this embodiment, the average similarity value in the current training process is selected. Since the average distance between different classes in the current training process has been defined, the selection of this boundary value is equivalent to the reciprocal of the average distance value.

[0100] In the specific implementation process, sample x is calculated using the following formula. i Similarity:

[0101]

[0102] In the formula: T(x i (k) represents sample x i Similarity to samples with the same label k in the training batch; N k f(x) represents the number of samples of this class in the training batch; i ) represents sample x i eigenvectors; S(f(x) i ),v j ) represents sample x i Feature vectors and sample x j Similarity;

[0103] The sample x is calculated using the following formula. i The probability that the label is k:

[0104]

[0105] Step S4 specifically includes the following steps:

[0106] S401: Train the mean matrix Expanded into a matrix Train the variance matrix Expanded into a matrix

[0107] in, The size is T×T; T represents the number of classes in the training batch; This represents the true distance of the input data; in this embodiment, a training batch of 120 training samples is selected, containing 40 classes, with 3 samples in each class, i.e. Each element in the matrix is ​​expanded into a 3×3 matrix with the same elements, and the 40×40 matrix is ​​expanded into a 120×120 matrix.

[0108] S402: Calculate the sampling strategy for positive samples p represents a variable that changes as the training process progresses. Generally, in the later stages of training, the number of informative but difficult positive samples that can be sampled gradually decreases. At this point, increasing the value of p (adjusting the sampling boundary) expands the sampling range, thereby helping the model break free from the bottleneck of being trapped in local optima. The initial value of p is 2, and it decreases by 0.01 each time to ensure that the sampling boundary is expanded each time, avoiding the situation where no samples can be sampled in the later stages of training.

[0109] S403: Calculate the sampling strategy for negative samples n represents the variables that change as the training process progresses. To enable the model to sample informative and difficult negative samples in the later stages of training, the value of n can be decreased (adjusting the sampling boundary). n is a set of variables that corresponds to the subsequent hierarchical weighting strategy. The initial values ​​are {1.5, 1.8, 2.1}, which are also decreased by 0.01 as the training progresses.

[0110] S404: Sampling is completed based on a sampling strategy that uses positive and negative samples.

[0111] This invention adaptively updates the sampling boundary by changing the data distribution, which reduces the proportion of noisy samples in each sampling process. Furthermore, by adaptively adjusting the sampling boundary to optimize the sampling strategy in the metric learning method, it breaks the bottleneck of the model being limited to local optima and can fully mine information-rich negative samples, thereby effectively improving the training accuracy of the model.

[0112] Step S5 specifically includes the following steps:

[0113] S501: S501: Set the negative sample weight coefficients according to the amount of information carried by the samples, and calculate the corresponding negative sample loss function based on the negative sample weight coefficients; Since there are many negative samples in a training batch, treating negative samples indiscriminately may slow down the convergence speed of the model; however, simply assigning higher weights to negative samples with high difficulty may cause the training direction of the model to shift.

[0114] The negative sample weight coefficient is ωij =-exp(ψ×(α-d) ij )),x j ∈N i,c ;

[0115] The negative sample loss function is

[0116] In the formula: ψ represents the hyperparameter controlling the degree of weight; α represents the sampling boundary of the current training process; for α, during the sampling process, different variables n can be set according to different levels of difficulty, thereby adjusting different sampling boundaries, and thus achieving the purpose of setting different weight coefficients for samples obtained under different sampling boundary constraints.

[0117] S502: Positive sample weight coefficients are set based on the distance between samples, and the corresponding positive sample loss function is calculated based on these weight coefficients. For positive samples, since the number of positive and negative samples in a training batch differs significantly, excessive weighting of positive samples in different layers may weaken their effectiveness. Therefore, for positive samples, this invention simply weights the distance between positive samples to obtain the loss function. Positive samples that are farther apart are more difficult to distinguish in the model and can be considered as difficult samples, carrying more information; distance is equivalent to the amount of information carried.

[0118] The positive sample weight coefficient is

[0119] The positive sample loss function is

[0120] S503: The loss function of the model is obtained by adding the loss function of negative samples and the loss function of positive samples;

[0121] The loss function of the model is L(x) i ,x j ) = L N (x i ,x j )+L P (x i ,x j ).

[0122] The final loss function consists of two parts: one part represents the loss function provided by the positive samples, and the other part represents the loss function provided by the negative samples.

[0123] This invention calculates the model's loss function based on the difficulty of the samples and hierarchical weight allocation, which can accelerate the model's convergence speed while ensuring that the model's training direction is not affected, thereby balancing the model's training efficiency and effectiveness.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A hierarchical weighted anti-noise depth metric learning method based on data distribution, characterized in that, The method comprises the following steps: S1: loading randomly synthesized noise samples into a training dataset; In step S1, the following steps are specifically included: S101: obtaining extracted features from a pre-trained neural network, and clustering images of a randomly selected real category in the training dataset into a large number of small clusters through the extracted features; S102: merging samples in each small cluster into a randomly selected real category to complete noise sample loading; S2: depicting data distribution based on distance relationship between data, and updating record of data distribution as training process advances; In step S2, the following steps are specifically included: S201: initialize a distance mean matrix recording the mean and variance of the distance between different classes and a distance variance matrix ; wherein, , ; denotes the number of classes of samples in the training data set; S202: For each training batch, use the class label index to extract the class appeared in the training batch from the distance mean matrix and the distance variance matrix to generate the training mean matrix recording the mean and variance of the distance between samples in the training batch and the training variance matrix ; wherein , ; represents the number of classes in the training batch; S203: record the current training round according to the real distance relationship of the data in the training process the lower training mean matrix and the training variance matrix the timing update of the training round, and the corresponding update of the distance mean matrix under the training round and the distance variance matrix ; S3: removing noise samples in each training batch based on a distribution matrix of data distribution; S4: adaptively guiding learning of a sampling strategy based on data distribution and completing sampling; In step S4, the following steps are specifically included: S401 : Augment the training mean matrix to a matrix S402: Augment the training variance matrix to a matrix ; wherein, , the size of ; denotes the number of classes in the training batch; denotes the true distance of the input data; S402: Calculate the sampling strategy of the positive sample ; denotes a variable that changes as the training progresses. S403: Calculate the sampling strategy of negative samples ; denotes a variable that changes as the training progresses. S404: completing sampling based on a sampling strategy of positive samples and negative samples; S5: minimizing a loss function of the model to update model parameters, and synchronously updating data distribution; mapping samples in the dataset to a feature representation space through the trained model, so that similar samples are very close in distance, and dissimilar samples are very far in distance, achieving a result of separating positive samples and negative samples; In step S5, the loss function of the model is calculated based on an information amount carried by the samples and hierarchical allocation of weights; The following steps are specifically included: S501: setting hierarchical negative sample weight coefficients according to the information amount carried by the samples, and calculating a corresponding negative sample loss function based on the negative sample weight coefficients; The negative sample weight coefficient is ; The negative sample loss function is ; In the formula: denotes a hyperparameter that controls the degree of weighting; denotes the sampling boundary of the current training process; S502: setting positive sample weight coefficients according to distance proximity of the samples, and calculating a corresponding positive sample loss function based on the positive sample weight coefficients; The positive sample weight coefficient is ; The positive sample loss function is ; S503: adding the negative sample loss function and the positive sample loss function to obtain the loss function of the model; The loss function of the model is .

2. The hierarchical weighting anti-noise deep metric learning method based on data distribution according to claim 1, wherein: The extracted features are L2 normalized features of GoogleNet pre-trained from ImageNet; The number of small clusters is half of the number of images in the corresponding real category.

3. The hierarchical weighting anti-noise deep metric learning method based on data distribution according to claim 1, wherein: The distance mean matrix is updated by the following equation : ; wherein ; In the formula: and respectively represent and the change value of the training mean matrix under the round; represent the mean value of the different class sample distance values actually calculated, that is, the real value of the training mean matrix; for measuring the proportional relationship between the change value and the real value of the training mean matrix; for measuring the proportional relationship between the change value and the original value of the training mean matrix, after each training, 0.9 times decay is performed; The distance variance matrix is updated by the following equation : ; wherein ; In the formula: and respectively represent and the change value of the training variance matrix under the round; represent the variance of the actual calculated sample distance value between different classes, that is, the actual value of the training variance matrix; for measuring the proportional relationship between the change value and the actual value of the training variance matrix; for measuring the proportional relationship between the change value and the original value of the training variance matrix, than 0.9 times of the decay is performed after each training. ​ 4. The data-distribution-based hierarchical weighted anti-noise depth metric learning method of claim 1, wherein: In step S3, before updating the information each time, it is judged whether the selected sample is similar to other samples of the class; then the label of the sample is calculated based on the similarity ; and the probability of the label is calculated. When probability Greater than the current training process At that time, the sample As a label for Clean samples are added to the training process; otherwise, the samples are... These are treated as noise samples and discarded.

5. The hierarchical weighting anti-noise deep metric learning method based on data distribution according to claim 4, wherein: The similarity of the samples is calculated by the following formula: similarity = 1 - distance ; wherein: represents a sample with the same label in the training batch; represents the number of samples of this class in the training batch; represents a sample represents the similarity between the feature vector of sample the feature vector of sample​​​​ The probability that a sample has the label is calculated by the formula: 。

Citation Information

Patent Citations

  • Deep adversarial metric learning method and device

    CN108304864A