A distribution-adaptive progressive long-tail image recognition method
By introducing data distribution perception factors and non-equidistant edge loss in deep learning image recognition model, the problem of high recognition error rate in long-tail distribution data scenarios is solved, and the model's effective learning of tail categories is realized, which is suitable for streaming data scenarios.
Patent Information
- Application Number
- CN202211575232.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-12-08
AI Technical Summary
Existing deep learning image recognition models have high recognition error rates in long-tail distribution data scenarios, and existing methods increase model complexity, inference time, or require early acquisition of data distribution, making it difficult to apply in streaming data scenarios.
By introducing data distribution perception factors in the image recognition model training process, dynamically tracking and capturing data distribution, applying category-related, data distribution adaptive non-equidistant edge losses, and performing category-related, data distribution adaptive reweighting, and gradually tilting the model toward the tail category.
It effectively reduces the recognition error rate under the long-tail distribution, avoids underfitting the head category and overfitting the tail category, and does not require the data distribution to be obtained in advance, and is suitable for scenarios where data distribution is difficult to obtain.
Smart Images

Figure CN116258868B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer software technology, and relates to image recognition technology, in particular to a distribution-adaptive progressive long-tail image recognition method. Background Art
[0002] With the rapid development of deep learning technology, intelligent image recognition technology based on deep learning models has become closely related to our lives, such as face recognition, disease recognition, and goods recognition in vending machines. However, previous deep learning recognition models are usually learned using a large amount of training data that has been manually collected, carefully screened, and labeled with balanced distribution. However, in real application scenarios, there are more long-tail distributed data, that is, a small number of categories occupy a large amount of training data, and most categories have only a small amount of training data. The training data as a whole presents an unbalanced long-tail distribution. In the long-tail real-world scenario, the deep learning model lacks rich and balanced distributed training data, which causes the recognition model to be more inclined to identify objects as head categories with rich training data, and the overall recognition error rate rises sharply. In various long-tail scenarios, building a balanced data set requires a lot of manpower and material resources, and is even infeasible. Therefore, designing a deep learning method that can cope with long-tail distributed data has great practical significance and value.
[0003] As for the current technical problems, the existing methods are mainly divided into model structure improvement, data generation, and rebalancing methods. Model improvement methods usually adopt a multi-branch structure. Such methods increase the complexity and number of parameters of the model, are not easy to optimize, and also increase the time required for recognition reasoning. Data generation methods are usually cumbersome and complex, and the noise in the generated data cannot be effectively controlled. Rebalancing methods include resampling and reweighting. The resampling method is prone to cause the model to underfit the head category or overfit the tail category. At the same time, some studies have found that simply applying resampling and reweighting to the model will damage the feature learning of the recognition model. In addition, most of the current long-tail recognition methods require the specific data distribution to be obtained in advance, which makes the existing methods impossible to implement in some real-world scenarios where data distribution is difficult to obtain, such as streaming data scenarios.
[0004] Based on the above analysis, the present invention aims to provide a simple and efficient method to deal with the long-tail distribution problem. The present invention discovers the distribution of the original data hidden in the model parameters, designs a distribution-aware factor to dynamically track and capture the distribution of the original data, and then proposes a distribution-adaptive progressive long-tail image recognition method. Summary of the invention
[0005] The technical solution of the present invention is: a distribution-adaptive progressive long-tail image recognition method, which trains the model for image recognition under long-tail distribution by progressively applying category-related, data-distribution-adaptive non-equidistant edge loss to the model according to the data distribution perception factor during the image recognition model training process and performing category-related, data-distribution-adaptive reweighting on the loss. The present invention enables the model to gradually tilt toward the tail lacking training data during the learning process, thereby overcoming the long-tail effect brought to the recognition model by the long-tail distribution of the training data.
[0006] Specifically, the present invention comprises the following steps:
[0007] Step 1, data preparation: prepare the long-tail image dataset to be identified, including training set and test set. The dataset should contain image data and label data corresponding to the image. Perform basic data preprocessing such as cropping, flipping and normalization.
[0008] Step 2, model construction: Build a standard image recognition model, which consists of a feature extractor and a classifier. Select a basic convolutional neural network as the feature extractor and a fully connected layer as the classifier, and randomly initialize the model parameters.
[0009] Step 3, initial training: randomly sample a batch of preprocessed image data from the training set, extract image features through the feature extractor, then input into the classifier, give the prediction result, calculate the equidistant edge loss between the prediction result and the label data; drive the model parameters to update learning based on the loss. Perform batch iterative learning until the current number of iterations reaches the preset number of iterations in the initial training.
[0010] Step 4, mid-training: Get the current iteration round. If it is a distribution-aware factor update round, get the current parameters of the classifier, calculate the distribution of the Euclidean distance between the prototypes of each category in the classifier, and scale it to get the distribution-aware factor of the next iteration cycle; use the awareness factor to update the margin factor in the edge loss to get the category-related, data distribution-adaptive non-equidistant edge loss; calculate the loss between the prediction result and the label data; drive the model parameters to update the learning according to the loss. Perform batch iterative learning until the current iteration round number reaches the mid-training preset round number.
[0011] Step 5, late training: Calculate the distribution-aware factor based on the classifier parameters at the beginning of the late training, and use it to update the margin factor in the edge loss after scaling. The margin factor remains constant in the late training; scale the distribution-aware factor obtained in the late training to obtain the reweighted factor of the loss in the late training; calculate the category-related, data distribution-adaptive reweighted non-equidistant edge loss between the prediction result and the label data; drive the model parameters to update the learning based on the loss. Perform batch iterative learning until the current number of iterations reaches the preset total number of training rounds.
[0012] Step 6, testing phase: On the balanced test set, extract image features from the preprocessed test data through the trained feature extractor, then give the classification results through the classifier, calculate the matching rate between the classification results and the true labels, and evaluate the model performance.
[0013] Specifically, in step 1, data preparation: prepare a long-tail image data set to be identified, pre-processed image data P and corresponding label data Y.
[0014] Specifically, in step 2, the model is constructed by using the basic convolutional neural network as the feature extractor M, the fully connected layer as the classifier F, and randomly initializing the model parameters. The parameters of the classifier W∈R D×C , where D is the dimension of the image features and C is the number of categories in the dataset.
[0015] Specifically, in step 3, at the beginning of training: a batch of preprocessed image data is randomly sampled from the training set, with a single sample p i For example, the corresponding label is y i , image features x extracted by feature extraction model i =M(p i ), input the classifier, and obtain various prediction results. The current image p i The score belonging to the jth class is:
[0016]
[0017] where w j is the prototype of category j in the classifier, that is, the data in the jth column of the parameter matrix. Calculate the prediction result and label data y i The equidistant edge loss between them, for sample p i , and its equidistant edge loss is:
[0018]
[0019] Where ε is a scaling hyperparameter, m equalis a constant, and the margin factor in the equidistant margin loss during the initial training process has the same value for samples of each category.
[0020] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset number of rounds T0 in the initial training, the model enters the next stage of training, and the mid-term training.
[0021] Specifically, in step 4, in the middle of training: get the current training round t, if t can be calculated by the distribution-aware factor cycle t r Divide by , and get the parameter W of the classifier in the current model t , calculate the sum of the Euclidean distances between the prototype of each category and the prototypes of other categories. For example, in the current iteration round t, the prototype of category j The sum of the Euclidean distances to prototypes of other categories for:
[0022]
[0023] Where EucDis(·) represents the calculation of the Euclidean distance between two vectors. Thus, the distance factor related to the category and perceptual data distribution is obtained. The present invention finds that this factor can capture the imbalance of the original data and reflect the current model classifier learning state to a certain extent, that is, the sum of the Euclidean distances between the prototypes of the tail category and the prototypes of other categories is less than the corresponding value of the head category, showing an unbalanced distribution, which also causes the model to have lower discrimination of the tail category than the head category. The distance factor is normalized to obtain a category-related, data distribution-adaptive distribution-aware factor:
[0024]
[0025] Where min(·) and max(·) represent the minimum and maximum values in the vector, respectively, and δ is a constant. Then, by scaling factor γ, we get the margin factor of the non-equidistant edge loss that is class-dependent and data distribution-adaptive. The new margin factor calculated in the current round is used to update the previous margin factor for subsequent loss calculations. Based on the above margin factors, a larger margin factor can be applied to the tail categories or categories with weak classifier discrimination, so as to encourage the model to pay more attention to the learning of these categories. If the current round cannot be calculated by the distribution-aware factor cycle t r If the margin factor is not updated, the margin factor of the current round is m. t Margin factor with respect to its most recent update Keep consistent, Indicates rounding down. At this time, in the middle of training, the sample pi The class-dependent, data distribution-adaptive marginal loss is:
[0026]
[0027] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset number of rounds T1 in the mid-term training, the model enters the next stage of training, and the late stage of training.
[0028] Specifically, in step 5, in the late stage of training: according to the model classifier parameters at the end of the training round T1, i.e., the mid-term training, the distance factor of the category-related and perceptual data distribution in the late stage of model training is calculated. And the category-dependent, data distribution-adaptive distribution-aware factor:
[0029]
[0030] The margin factor in the later stage of training is And the distribution-aware factor is used as a reweighting factor for the loss in the later stage of training, aiming to give greater weight to the loss of samples in the tail category or the category with weak classifier discriminability, so as to encourage the model to learn more discriminative features of the tail category. i The class-dependent, data distribution-adaptive marginal loss is:
[0031]
[0032] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset total number of training rounds T, the model training ends.
[0033] Specifically, in step 6, the testing phase: use the trained feature extractor M and the fully connected layer as the classifier F to classify the test data and evaluate the model performance.
[0034] The present invention does not introduce additional model parameters. It only needs to adjust the loss function during the model training process. The simplest model structure is still used during model inference, and the model inference time is not increased.
[0035] The present invention does not require obtaining data distribution in advance and can be widely used in real-world scenarios where data distribution is difficult to obtain directly.
[0036] The progressive learning strategy proposed in the present invention gradually tilts toward the tail during the model learning process, avoiding underfitting of the head category and overfitting of the tail category.
[0037] The present invention has the characteristic of distribution self-adaptation, which makes the method general and can also be used in scenarios where data distribution is unknown or data distribution is balanced.
[0038] The present invention aims to teach students in accordance with their aptitude and prescribe the right medicine when differences occur between head categories and tail categories during the model learning process, dynamically monitor the learning status through distribution-aware factors, fine-tune the learning objective function in a timely and regular manner, and later strengthen the learning of tail categories that lack training data through category-related and distribution-adaptive reweighting, thereby alleviating the long-tail problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 Flowchart of the distribution-adaptive progressive long-tail image recognition method;
[0041] Figure 2 This is a flowchart of the training process of the intelligent classification model based on the long-tail image dataset ImageNet-LT;
[0042] Figure 3 This is a flowchart of the intelligent classification reasoning process for the test set images in the long-tail image dataset ImageNet-LT. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] At present, most deep learning image recognition models are trained and learned based on carefully selected, balanced data sets. When such models are applied to real scenarios and encounter long-tail data distribution, model predictions are dominated by the head categories with abundant training samples, and the recognition performance of the tail categories with insufficient training data is greatly reduced. In real application scenarios, unbalanced (long-tail) distributions can be seen everywhere, and the corresponding balanced data sets are difficult to build. For example, in disease recognition scenarios, the data of some rare diseases is far less than that of common diseases; in action recognition scenarios, the data of some actions in non-public places is far less than that of common actions in public places; in species recognition scenarios, the data of endangered species is far less than that of common species. Therefore, algorithms applied to long-tail image recognition have great practical significance and value.
[0045] The existing methods have added extra parameters for structural improvements, and the complex structure also increases the time for model inference, which is not convenient for application in real scenarios; simple resampling or reweighting methods can easily lead to underfitting of the model to the head category or overfitting of the tail category; and most of the current methods require obtaining the data distribution in advance, which is difficult to achieve in scenarios such as streaming data. The present invention proposes a simple and efficient distribution-adaptive progressive long-tail image recognition method, which does not introduce additional parameters, maintains the original model structure during testing, and does not increase the model inference time; gradually imposes increasingly stringent constraints on the tail to avoid underfitting of the head category and overfitting of the tail category; explores the original data distribution hidden in the model parameters, and designs distribution-aware factors that can adapt to the data distribution without explicitly obtaining the data distribution in advance. Figure 1 As shown, the specific steps of the present invention are as follows:
[0046] S101: At the beginning of training, a class-independent equidistant margin loss is applied to the model.
[0047] Specifically, at the beginning of training: randomly sample a batch of preprocessed image data from the training set, with a single sample p i For example, the corresponding label is y i , image features x extracted by feature extraction model i =M(p i ), input the classifier, and obtain various prediction results. The current image p i The score belonging to the jth class is:
[0048]
[0049] where w j is the prototype of category j in the classifier, that is, the data in the jth column of the parameter matrix. Calculate the prediction result and label data y i The equidistant edge loss between them, for sample p i, and its equidistant edge loss is:
[0050]
[0051] Where ε is a scaling hyperparameter, m equal is a constant, and the margin factor in the equidistant margin loss during the initial training process has the same value for samples of each category.
[0052] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset number of rounds T0 in the initial training, the model enters the next stage of training, and the mid-term training.
[0053] S102: In the middle of training, the data distribution awareness factor is periodically calculated, and a category-dependent, data distribution-adaptive non-equidistant edge loss is applied to the model based on the data distribution awareness factor.
[0054] Specifically, in the middle of training: get the current training round t, if t can be calculated by the distribution-aware factor cycle t r Divide by , and get the parameter W of the classifier in the current model t , calculate the sum of the Euclidean distances between the prototype of each category and the prototypes of other categories. For example, in the current iteration round t, the prototype of category j The sum of the Euclidean distances to prototypes of other categories for:
[0055]
[0056] Where EucDis(·) represents the calculation of the Euclidean distance between two vectors. Thus, the distance factor related to the category and perceptual data distribution is obtained. Normalizing it to obtain a category-dependent, data distribution-adaptive distribution-aware factor:
[0057]
[0058] Where min(·) and max(·) represent the minimum and maximum values in the vector, respectively, and δ is a constant. Then, by scaling factor γ, we get the margin factor of the non-equidistant edge loss that is class-dependent and data distribution-adaptive. The new margin factor calculated in the current round is used to update the previous margin factor for subsequent loss calculations. If the current round cannot be calculated by the distribution-aware factor, the period t r If the margin factor is not updated, the margin factor of the current round is m. t Margin factor with respect to its most recent update Keep consistent, Indicates rounding down. At this time, in the middle of training, the sample p i The class-dependent, data distribution-adaptive marginal loss is:
[0059]
[0060] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset number of rounds T1 in the mid-term training, the model enters the next stage of training, and the late stage of training.
[0061] S103: In the later stage of training, according to the parameters of the classifier at the beginning of the later stage of training, the data distribution perception factor is calculated, and a category-dependent, data distribution-adaptive non-equidistant edge loss is applied to the model, and the loss is re-weighted according to the category-dependent, data distribution-adaptive loss.
[0062] Specifically, in the late stage of training: according to the model classifier parameters at the end of the training round T1, that is, the mid-term training, the category-related and perceptual data distribution distance factor of the late stage of model training is calculated. And the category-dependent, data distribution-adaptive distribution-aware factor:
[0063]
[0064] The margin factor in the later stage of training is And the distribution-aware factor is used as a reweighting factor for the loss in the later stage of training. Therefore, in the later stage of training, the sample p i The class-dependent, data distribution-adaptive marginal loss is:
[0065]
[0066] When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples. Get the current training round t. If t is equal to the preset total number of training rounds T, the model training ends.
[0067] like Figure 2 The figure below is a flowchart of the training process of the intelligent classification model based on the long-tail image dataset ImageNet-LT, which specifically includes:
[0068] S201: Preparation and data preprocessing of the long-tail image dataset ImageNet-LT.
[0069] Specifically, the long-tail image dataset ImageNet-L has a total of 1000 categories of image data, with a total of 115.8K images. Its training set data presents a long-tail distribution, with the largest category having 1280 samples and the smallest category having only 5 samples. Its test set is a balanced distribution, which is used to fairly detect the performance of the model in each category. First, basic preprocessing is performed on the image, including cropping the image to a resolution of 224x224 and performing random flipping enhancement, and then using the mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225] for data normalization.
[0070] S202: Randomly sample a batch of image data and their label data from the training set.
[0071] Specifically, 256 samples are randomly sampled from the training set, along with their corresponding label data.
[0072] S203: Use ResNeXt-50 as the backbone model to extract the features of the current batch data and give the classification results.
[0073] Specifically, the standard ResNeXt-50 is used as the backbone model, which includes a feature extractor and a classifier, and the feature dimension output by the feature extractor is 2048. The classifier finally gives the score distribution of each sample belonging to 1000 categories.
[0074] S204: Determine the edge loss function using a distribution-adaptive progressive long-tail image recognition method, and calculate the loss of batch samples.
[0075] according to Figure 1 The distribution-adaptive progressive long-tail image recognition method shown in FIG. 1 determines the loss function and calculates the score distribution of the samples given by the model and the loss of the one-hot label. The total number of training rounds T is set to 90, the number of rounds T1 in the initial training period is 10, the number of rounds T2 in the middle training period is 70, and the distribution-aware factor calculation period t r is 5, the constant δ is set to 1, and the scaling factor γ is set to 0.5.
[0076] S205: Use the stochastic gradient descent (SGD) algorithm to calculate the reverse gradient of the current batch data and update the backbone model parameters.
[0077] Specifically, the weight decay parameter in the SGD algorithm is 0.0005, the momentum parameter is set to 0.9, the initial learning rate of the model training is 0.1, and the cosine strategy is used for the learning rate adjustment during training.
[0078] S206: Iterate steps S202 to S205 to obtain a converged backbone model, including a feature extractor M and a classifier F.
[0079] Specifically, iterate steps S202 to S205 until the number of training rounds reaches a preset total number of training rounds of 90, and save the optimal model parameters for testing.
[0080] like Figure 3 As shown in the figure, the intelligent classification reasoning process of the test set images in the long-tail image dataset ImageNet-LT specifically includes:
[0081] S301: Obtain an image to be classified and perform preprocessing.
[0082] Specifically, the image to be tested is preprocessed according to the preprocessing method in S201.
[0083] S302: The feature extractor M extracts the features of the current image.
[0084] Specifically, the feature extractor extracts the 2048-dimensional feature f of the sample through convolutional network calculation for subsequent classification.
[0085] S303: Classifier F calculates confidence probabilities of various categories of images based on the features.
[0086] Specifically, the parameters W∈R of the classifier F 2048×1000 , the sample feature f and the classifier prototype W are matrix multiplied to obtain the similarity result logits. After normalizing the logits using the softmax function, the confidence probability of each category of the sample is obtained.
[0087] S304: Give a predicted category according to the confidence probability.
[0088] Specifically, the subscript of the maximum confidence probability is taken as the predicted category of the sample, and the matching rate between the predicted category and the true category on the test set is counted to obtain the accuracy of the model on the test set. On the test set of the long-tail image dataset ImageNet-LT, the accuracy of the ResNeXt-50 baseline model is 44.2%, and the accuracy of the ResNeXt-50 model trained by the distribution-adaptive progressive long-tail image recognition method is 50.5%, which has greatly improved the performance.
[0089] The distribution-adaptive progressive long-tail image recognition method and device of the present invention can be directly applied to the existing image recognition model, without additional parameters, and without the need to obtain data distribution in advance. The progressive guidance model focuses on tail learning, effectively avoiding underfitting of the head category and overfitting of the tail category. It is simple and efficient, easy to apply, and can greatly improve the model performance. At the same time, the dynamic distribution perception factor makes the method distribution-adaptive. In general, the method can also be used for recognition scenarios where the training data distribution is unknown or balanced.
Claims
1. A distribution-adaptive progressive long-tail image recognition method, characterized in that: The method comprises the following steps: Prepare a long-tail image dataset to be identified, including a training set and a test set. The dataset contains image data and label data corresponding to the image. Perform basic cropping, flipping, and normalization data preprocessing on the data. Build a long-tail image deep learning recognition model and train the recognition model using a distribution-adaptive progressive loss function strategy. Initial stage of training: randomly sample a batch of preprocessed image data from the training set, extract image features through the feature extractor, then input into the classifier, give the prediction results, and calculate the equidistant edge loss between the prediction results and the label data; Mid-training: Get the current iteration round. If it is a distribution-aware factor update round, get the current parameters of the classifier, calculate the distribution of the Euclidean distance between the prototypes of each category in the classifier, and scale them to get the distribution-aware factor for the next iteration cycle; and use the awareness factor to update the margin factor in the edge loss to get a category-related, data distribution-adaptive non-equidistant edge loss; Late training: Calculate the distribution perception factor of the late training according to the parameters of the classifier at the beginning of the late training, use it as the reweighting factor of the loss of the late training, and scale it to obtain the margin factor of the edge loss of the late training. Keep the reweighting factor and margin factor constant in the late training, calculate the category-related and data distribution-adaptive reweighted non-equidistant edge loss between the prediction result and the label data, and drive the model parameters to update and learn according to the loss. A batch of preprocessed image data is randomly sampled from the test set and input into the trained long-tail image deep learning recognition model to obtain the recognition results.
2. The distribution-adaptive progressive long-tail image recognition method according to claim 1, characterized in that: The initial stage of training specifically includes: randomly sampling a batch of pre-processed image data from the training set, with a single sample p i For example, the corresponding label is y i , image features x extracted by feature extraction model i =M(p i ), input the classifier, get the prediction probability of each category, the current image p i The score belonging to the jth class is: where w j is the prototype of category j in the classifier, that is, the data in the jth column of the parameter matrix; calculate the prediction result and label data y i The equidistant edge loss between them, for sample p i , and its equidistant edge loss is: Where ε is a scaling hyperparameter, m equal is a constant. The edge factor in the equidistant edge loss in the initial training process has the same value for each category of samples. During batch training, the gradient back propagation algorithm is used to learn the model parameters according to the loss mean of the batch samples to obtain the current training round t. If t is equal to the preset initial training round number T0, the model enters the next stage of training, that is, the mid-training stage.
3. The distribution-adaptive progressive long-tail image recognition method according to claim 1, characterized in that: The mid-term training specifically includes: obtaining the current training round t, if t can be distributed perception factor calculation cycle t r Divide by , and get the parameter W of the classifier in the current model t , calculate the sum of the Euclidean distances between the prototype of each category and the prototypes of other categories. For example, in the current iteration round t, the prototype of category j The sum of the Euclidean distances to prototypes of other categories for: Where EucDis(·) represents the calculation of the Euclidean distance between two vectors, thereby obtaining a category-dependent, data-distribution-aware distance factor Normalizing it to obtain a category-dependent, data distribution-adaptive distribution-aware factor: Where min(·) and max(·) represent the minimum and maximum values in the vector, respectively, and δ is a constant. Then, by scaling factor γ, we get the margin factor of the non-equidistant edge loss that is class-dependent and data distribution-adaptive. Use the new margin factor calculated in the current round to update the previous margin factor for subsequent loss calculations; if the current round cannot be distributed by the perception factor calculation cycle t r If the margin factor is not updated, the margin factor of the current round is m. t Margin factor with respect to its most recent update Keep consistent, Indicates rounding down; at this time, in the middle of training, sample p i The class-dependent, data distribution-adaptive marginal loss is: When performing batch training, the gradient back-propagation algorithm is used to learn the model parameters according to the mean loss of the batch samples to obtain the current training round t. If t is equal to the preset number of rounds T1 in the middle of the training, the model enters the next stage of training, that is, the late stage of training.
4. The distribution-adaptive progressive long-tail image recognition method according to claim 1, characterized in that: The latter stage of training specifically includes: calculating the distance factor of the category-related and perceptual data distribution of the latter stage of model training according to the model classifier parameters at the end of the middle stage of training, which is T1, the training round. And the category-dependent, data distribution-adaptive distribution-aware factor: The margin factor in the later stage of training is And the distribution-aware factor is used as a reweighting factor for the loss in the later stage of training. Therefore, in the later stage of training, the sample p i The class-dependent, data distribution-adaptive marginal loss is: When performing batch training, the gradient back propagation algorithm is used to learn the model parameters according to the mean loss of the batch samples to obtain the current training round t. If t is equal to the preset total number of training rounds T, the model training ends.