A long-tail image recognition method based on text-guided Fourier data enhancement
By using text-guided Fourier data augmentation and a supervised contrastive learning framework, new data is generated and the model is trained, which solves the problems of overfitting and poor generalization of deep learning image recognition algorithms under long-tailed distributions and achieves efficient end-to-end recognition performance improvement.
Patent Information
- Application Number
- CN202410014192.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-01-04
AI Technical Summary
Existing deep learning image recognition algorithms suffer from overfitting and poor generalization under long-tailed distributions, especially in terms of insufficient recognition performance for tail categories. Furthermore, existing methods rely on pre-trained models and involve complex acquisition of additional data, making it difficult to quickly adapt to new scenarios.
By mining textual information of category names and image frequency domain information, new data is generated using two-dimensional Fourier transform. Combined with a supervised contrastive learning framework, an end-to-end long-tail image recognition model is constructed for data augmentation and model training.
It improves sample diversity and model performance for tail categories, simplifies the training process, reduces reliance on pre-trained models and additional data, improves recognition accuracy, and reduces transfer costs.
Smart Images

Figure CN117689957B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software technology and relates to image recognition technology, specifically a long-tail image recognition method based on text-guided Fourier data augmentation. Background Technology
[0002] In real-world scenarios, data often exhibits an unbalanced long-tail distribution, meaning that a small number of head categories occupy a large number of samples, while most tail categories have only a small number of samples. This poses a significant challenge to data-dependent deep learning algorithms, causing existing deep learning image recognition algorithms to be dominated by a few head categories during the learning process, tending to identify images as head categories. At the same time, they overfit to the small number of samples from tail categories, lacking generalization ability, and resulting in a significant drop in overall image recognition performance.
[0003] Current image recognition algorithms designed for long-tailed distributions still suffer from the following major problems: overfitting and loss of effective information. Data resampling methods downsample head categories and oversample tail categories, leading to overfitting to tail categories while underutilizing the rich samples in head categories. The training process is complex; two-stage algorithms require feature learning and classifier learning, but real-world applications prefer simpler and more efficient single-stage methods. Dependence on pre-trained models and additional data is also a concern; some existing methods rely heavily on the performance of pre-trained models, and additional data needs to be crawled from the internet for different new datasets, presenting challenges and limitations.
[0004] Based on the above analysis, this invention aims to provide a simple and efficient method to address the long-tail distribution problem. This invention explores and utilizes the category name textual information and image frequency domain information contained within the long-tail dataset itself to generate new data for the tail categories as a supplement. This data is then used in a supervised contrastive learning framework, enabling the end-to-end long-tail image recognition model to outperform complex two-stage and multi-expert models, and requiring fewer training iterations. Summary of the Invention
[0005] The technical solution of this invention is: a long-tail image recognition method based on text-guided Fourier data augmentation. This method guides image data augmentation based on two-dimensional Fourier transform by mining semantic relevance in the textual information of category names. It generates new samples for tail categories with scarce training data and fully learns from the data using a supervised contrastive learning framework, improving the performance of an end-to-end long-tail image recognition model that does not rely on pre-trained model initialization. This invention deeply mines and fully utilizes the effective information contained in the dataset itself, increasing the diversity of samples while increasing the number of tail category images. Using a supervised contrastive learning framework, it enables the end-to-end long-tail image recognition model to surpass complex two-stage and multi-expert models.
[0006] Specifically, the present invention includes the following steps:
[0007] Step 1, Determining the Training Data Distribution: First, determine how many categories will be augmented and how many augmented samples will be added to the long-tailed image dataset, i.e., the distribution of the augmented training data. To avoid disrupting the original category distribution order and over-augmentation, a filling strategy is adopted to determine the distribution of the augmented training data.
[0008] Step 2, semantic relevance mining of category name text: The embedding features of category name text are extracted through existing pre-trained language models. The semantic similarity between categories is calculated based on the embedding features, so as to find categories that are semantically related or similar to the current category, and guide subsequent Fourier-based data augmentation.
[0009] Step 3, Candidate Frequency Domain Information Preparation: Since the frequency domain phase information of an image typically contains high-order semantic information, while the frequency domain amplitude information usually contains low-order non-semantic information such as background and style, data augmentation can linearly combine the image phase information with the amplitude information of other images to obtain new data with the same semantics as the original image. For long-tail datasets, a two-dimensional Fourier transform can yield candidate phase and amplitude information for generating new images. Furthermore, tail categories have richer candidate amplitude information than head categories, providing more diverse options for generating new tail category data.
[0010] Step 4, Data Sampling and Text-Guided Online Fourier Image Augmentation: The data is sampled in batches according to the distribution of the augmented training data. If the sampled data is the original data, traditional data augmentation is performed. If it is the data to be generated, text-guided Fourier image augmentation is used to generate new data of the corresponding category, and then traditional data augmentation is performed.
[0011] Step 5, Model Construction: Construct a standard image recognition model, which consists of a feature extractor and a classifier. A basic convolutional neural network is chosen as the feature extractor, and a fully connected layer as the classifier. The model parameters are randomly initialized.
[0012] Step 6, Model training based on supervised contrastive learning: For the sampled augmented original data and generated data, which contain three views obtained with different levels of data augmentation, the features of the three views are extracted by a feature extractor. One of them is input into the classifier to calculate the classification loss. The features of the other two views are used for supervised contrastive learning, and the supervised contrastive learning loss is calculated. The model is driven to learn through these two losses, so that the model pays more attention to semantically relevant information.
[0013] Step 7, Testing Phase: On a balanced test set, image features are extracted from the preprocessed test data using a trained feature extractor. Then, a classifier is used to provide classification results. The matching rate between the classification results and the true labels is calculated to evaluate the model performance.
[0014] Specifically, in step 1, the training data distribution is determined: a filling strategy is adopted to modify the original data distribution. That is, after setting the enhancement ratio factor α, data will be added to the category to be enhanced so that the number of training samples is equal to the minimum number of samples in the remaining categories. This results in the enhanced training data distribution, in which the category to be enhanced has the same number of training samples, including the original data and the data to be generated.
[0015] Specifically, in step 2, the semantic relevance of the category name text is mined: For each category, a text prompt template is designed, such as "a photo of the {CLASS}", and then the category name is filled into the {CLASS} position in the template, thus obtaining the text description set for each category. C represents the number of categories in the dataset. Then, embedding features of the text description sets corresponding to each category are extracted using an existing pre-trained language model.
[0016]
[0017] Where m is the number of text descriptors in each category of text description set, E c ∈R C×D Let c be the text embedding features of category c. Then, based on the regularized text embedding features of each category, the semantic similarity between each category can be calculated, which will be used to guide Fourier-based image generation.
[0018] Specifically, in step 3, candidate frequency domain information preparation involves performing a two-dimensional Fourier transform on the image data to decompose the image into frequency domain phase information and frequency domain amplitude information, preparing for subsequent text-guided Fourier image generation. For each original image x... t Through two-dimensional Fourier transform
[0019]
[0020] in and The frequency domain information of the image is obtained after amplitude and phase transformations, respectively, by image decomposition. and phase information This yields candidate phase and candidate amplitude data for subsequent Fourier image generation. For category c, the candidate phase database contains phase information from the original image data corresponding to that category, while the candidate amplitude database contains amplitude information from the original data other than those for category c. Therefore, the tail category has abundant candidate amplitude data.
[0021] Specifically, in step 4, data sampling and text-guided online Fourier image enhancement are performed: Data is batch-sampled according to the enhanced training data distribution. If the sampled data is the original data, traditional data enhancement is performed; if it is data to be generated, a sample x is sampled from the candidate phase data of the corresponding category. t Its phase information The phase information of the new data is then used as the basis for the semantic similarity obtained from the text embedding features of each category in step 2. This guides the algorithm to sample a data point from the candidate amplitude data corresponding to the Top K categories that are most semantically similar to the current category. Compared with the original sample amplitude information Linear combination is performed to obtain the amplitude information of the new sample:
[0022]
[0023] Where η is the linear associative weight, η ~ U(0,λ), and λ is a hyperparameter controlling the degree of data augmentation. Then, an inverse Fourier transform is performed. Obtain the generated new image data
[0024]
[0025] Specifically, in step 5, model construction involves using a basic convolutional neural network as a feature extractor, a fully connected layer as a classifier, and randomly initializing the model parameters, where the classifier parameters W∈R. D×C , where D is the dimension of the image features and C is the number of categories in the dataset.
[0026] Specifically, in step 6, model training based on supervised contrastive learning is performed: for the original data x in the batch data... t Or newly generated image data Traditional data augmentation, performed to varying degrees or in combinations, yields three different views corresponding to the image data. These three views are then processed by the same feature extractor to obtain three corresponding features, using the original data x... t For example, its three corresponding features are in The classifier is then used to calculate the classification loss. and This is used to calculate supervised contrastive loss; the classification loss employs a loss with probabilistic post-processing. Supervised comparative loss employs balanced comparative loss. For sample x t Its total training loss As shown below:
[0027]
[0028]
[0029]
[0030] Where w y δ represents the column corresponding to category y in the classifier weight parameters. y This is the probability adjustment value corresponding to category y, which is related to the frequency of that category; This represents the number of samples of category y in the sampled batch of data. represents the set of features used for supervised contrastive learning; β and μ are hyperparameters that control the effects of classification loss and supervised contrastive loss, respectively.
[0031] Specifically, in step 7, the testing phase: on a balanced distribution test set, for the preprocessed test data, simply use the trained feature extractor to extract image features, then use the classifier to give the classification results, calculate the matching rate between the classification results and the true labels, and evaluate the model performance.
[0032] This invention does not introduce additional model parameters or inference latency. It only needs to generate more diverse data for the tail category online during model training, and still uses the simplest model structure during model inference, without increasing the model inference time.
[0033] This invention does not require additional offline data crawling and can be widely applied to real-world scenarios where data is difficult to obtain.
[0034] This invention innovatively captures semantic relevance in textual information and uses it to guide the online data generation process based on Fourier transform. On the one hand, it dynamically introduces diversity into the generated data, and on the other hand, it increases the interpretability of the generated data and reduces the noise introduced into the generated data.
[0035] This invention is an end-to-end one-stage method, which is simpler and more efficient than two-stage or multi-expert methods. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0037] Figure 1 This is a flowchart of a long-tail image recognition method based on text-guided Fourier data augmentation;
[0038] Figure 2 A flowchart illustrating the training process of an intelligent classification model based on the long-tailed image dataset ImageNet-LT;
[0039] Figure 3 This is a flowchart of the intelligent classification inference process for test set images in the ImageNet-LT long-tail image dataset. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Deep learning image recognition models designed based on carefully selected, balanced datasets often experience a significant drop in performance when the data exhibits a long-tailed distribution, becoming a key bottleneck for the practical application of these algorithms. Under a long-tailed distribution, these models struggle to cope with the imbalanced data distribution. The training process becomes dominated by samples from the head category, leading the model to tend to identify samples as belonging to that category. Simultaneously, they overfit to the few samples from the tail category, resulting in a substantial decrease in generalization performance and difficulty in recognizing new data not previously seen in the training set.
[0042] Existing algorithms for image recognition under long-tail distributions employ complex multi-expert architectures or additional memory modules, increasing parameters and inference latency; or they use two-stage model training processes, which are complex and require numerous iterations for convergence; or they rely on pre-trained model weights and additional crawled data, resulting in high implementation costs and difficulty in quickly migrating to new application scenarios. This invention proposes a simple and efficient long-tail image recognition method based on text-guided Fourier data augmentation. It does not introduce additional parameters, maintains the original model structure during testing, and does not increase model inference time; it uses an end-to-end one-stage training mode, requiring only one training iteration before application, and accelerates the convergence speed of supervised contrastive learning, achieving better performance with fewer training iterations; it fully mines and utilizes the rich category text information and image frequency domain information inherent in the dataset, generating more diverse data online for tail categories, enabling convenient application to various real-world long-tail distribution scenarios with low migration costs. Figure 1 As shown, the specific steps of this invention are as follows:
[0043] S101: The distribution of training data is determined, and the distribution of the enhanced training data is determined based on the flattening strategy.
[0044] Specifically, a filling strategy is adopted to modify the original data distribution. That is, after setting the enhancement ratio factor α, data will be added to the category to be enhanced so that the number of training samples is equal to the minimum number of samples in the remaining categories. This results in the enhanced training data distribution, in which the category to be enhanced has the same number of training samples, including the original data and the data to be generated.
[0045] S102: Sample according to the distribution of the enhanced training data, and generate new data samples using text-guided Fourier data augmentation.
[0046] Specifically, the first step is to mine the semantic relevance of category names and candidate frequency domain information to prepare for text-guided Fourier data augmentation. For each category, a text prompt template was designed, such as "a photo of the {CLASS}". The category name is filled into the {CLASS} position in the template, resulting in a text description set for each category. C represents the number of categories in the dataset. Embedded features of the text description sets corresponding to each category are extracted using an existing pre-trained language model.
[0047]
[0048] Where m is the number of text descriptors in each category of text description set, E c ∈R C×DThe text embedding features for category c are then used. Based on the regularized text embedding features for each category, the semantic similarity between categories can be calculated, which will be used to guide Fourier-based image generation. By performing a two-dimensional Fourier transform on the image data, the image is decomposed into frequency domain phase information and frequency domain amplitude information. For each original image x... t Through two-dimensional Fourier transform
[0049]
[0050] in and The frequency domain information of the image is obtained after amplitude and phase transformations, respectively, by image decomposition. and phase information This yields candidate phase and candidate amplitude data for subsequent Fourier image generation. For category c, the candidate phase database contains phase information from the original image data corresponding to that category, while the candidate amplitude database contains amplitude information from the original data for categories other than c. Therefore, the tail category has abundant candidate amplitude data. Then, the enhanced training data distribution performs batch sampling. If the sampled data is original data, traditional data augmentation is performed; if it is data to be generated, a sample x is sampled from the candidate phase data of the corresponding category. t Its phase information The phase information of the new data is used as the basis for semantic similarity obtained from the text embedding features of that category. This guides the algorithm to sample a data point from the candidate amplitude data corresponding to the Top K categories that are most semantically similar to the current category. Compared with the original sample amplitude information Linear combination is performed to obtain the amplitude information of the new sample:
[0051]
[0052] Where η is the linear associative weight, η ~ U(0,λ), and λ is a hyperparameter controlling the degree of data augmentation. Then, an inverse Fourier transform is performed. Obtain the generated new image data
[0053]
[0054] S103: Based on original and generated samples, a supervised contrastive learning framework is used to drive model learning.
[0055] Specifically, for the original data x in the batch data t Or newly generated image data Traditional data augmentation, performed to varying degrees or in combinations, yields three different views corresponding to the image data. These three views are then processed by the same feature extractor to obtain three corresponding features, using the original data x... t For example, its three corresponding features are in The classifier is then used to calculate the classification loss. and This is used to calculate supervised contrastive loss; the classification loss employs a loss with probabilistic post-processing. Supervised comparative loss employs balanced comparative loss. For sample x t Its total training loss As shown below:
[0056]
[0057]
[0058]
[0059] Where w y δ represents the column corresponding to category y in the classifier weight parameters. y This is the probability adjustment value for category y, which is related to the frequency of that category; This represents the number of samples of category y in the sampled batch of data. This represents the set of features used for supervised contrastive learning; β and μ are hyperparameters controlling the effects of classification loss and supervised contrastive loss, respectively. The model parameters are learned using the gradient backpropagation algorithm based on the loss mean of the batch samples.
[0060] like Figure 2 The diagram shown is a flowchart of the training process for an intelligent classification model based on the long-tailed image dataset ImageNet-LT, specifically including:
[0061] S201: Preparation and training distribution determination of the long-tailed image dataset ImageNet-LT.
[0062] Specifically, the ImageNet-L long-tail image dataset contains 115.8K images across 1000 categories. Its training set exhibits a long-tail distribution, with the largest category having 1280 samples and the smallest having only 5. The test set is a balanced distribution, ensuring fair evaluation of the model's performance across all categories. After reordering the categories based on sample frequency, an enhancement scaling factor α of 0.2 was determined. An augmentation training data distribution was obtained using a padding strategy, supplementing the data for 200 categories to match the minimum sample count for the remaining categories.
[0063] S202: Randomly sample a batch of samples and their label data from the training distribution.
[0064] Specifically, 256 samples are randomly sampled from the training set, along with their corresponding label data, including category labels and whether labels are to be generated.
[0065] S203: Obtain multi-view data of images using traditional data augmentation and text-guided Fourier data augmentation methods.
[0066] Specifically, in the batch data, the data is determined as either raw data or data to be generated based on whether a label is to be generated. If it is raw data, the corresponding images are preprocessed, including cropping them to a 224x224 resolution and performing different degrees of traditional data augmentation based on AutoAugment to obtain three views of the image. If it is data to be generated, a text-guided Fourier data augmentation method is used to generate new image data. Based on the semantic similarity obtained from the text embedding features, the model is guided to sample an amplitude data point from the candidate amplitude data corresponding to the top 10 categories most semantically similar to the current category and linearly combine it with the amplitude information of the original sample. The hyperparameter λ controlling the degree of data augmentation is set to 0.3. This sample is then combined with the phase information of the original sample to generate a new sample, which is then subjected to different degrees of traditional data augmentation based on AutoAugment to obtain three views of the generated image. The data is then normalized using the mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225].
[0067] S204: Extract multi-view features of the current batch data using ResNeXt-50 as the backbone model.
[0068] Specifically, the standard ResNeXt-50 model is used as the backbone model, which includes a feature extractor and a classifier. For each view, the feature extractor outputs a feature dimension of 2048. The classifier finally provides the score distribution of the corresponding sample belonging to 1000 classes.
[0069] S205: For batch data, one view feature is used to calculate the classification loss through a classifier, and the other two view features are used to calculate the supervised contrast loss.
[0070] Specifically, the view features used for the classification task are processed by a classifier to obtain a classification score distribution for 1000 classes, and then a loss with probabilistic post-processing is calculated. Two view features are used for supervised contrastive learning, and a balanced supervised contrastive loss is calculated. The loss-affecting hyperparameters β and μ were set to 0.8 and 2.0, respectively.
[0071] S206: Calculate the back gradient of the current batch of data using the stochastic gradient descent (SGD) algorithm and update the backbone model parameters.
[0072] Specifically, in the SGD algorithm, the weight decay parameter is 0.0005, the momentum parameter is set to 0.9, the initial learning rate for model training is 0.1, and the learning rate adjustment strategy during training adopts the cosine strategy.
[0073] S207: Iteration steps S202 to S206 yield a convergent backbone model, including a feature extractor and a classifier.
[0074] Specifically, iterate through steps S202 to S206 until the number of training rounds reaches the preset total number of training rounds of 90, then save the optimal model parameters for testing.
[0075] like Figure 3 As shown, the intelligent classification inference process for test set images in the ImageNet-LT long-tail image dataset specifically includes:
[0076] S301: Acquire the image to be classified and perform preprocessing.
[0077] Specifically, the images to be tested are preprocessed, including cropping the images to a resolution of 224x224 and normalizing the data using the mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225].
[0078] S302: Feature extractor extracts features from the current image.
[0079] Specifically, the feature extractor uses a convolutional network to calculate and extract 2048-dimensional features from the samples for subsequent classification.
[0080] S303: The classifier calculates the confidence probability of each class of an image based on its features.
[0081] Specifically, the parameters W∈R of the classifier F 2048×1000 The sample features and the classifier prototype W are multiplied by a matrix 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.
[0082] S304: Give the predicted category based on the confidence probability.
[0083] Specifically, the index of the highest confidence probability is taken as the predicted class for that sample. The matching rate between the predicted class and the true class on the test set is calculated to obtain the model's accuracy on that test set. On the test set of the long-tailed image dataset ImageNet-LT, the accuracy of the ResNeXt-50 baseline model is 44.2%, while the accuracy of the ResNeXt-50 model trained with the text-guided Fourier data augmentation method for long-tailed image recognition is 58.4%, showing a significant performance improvement.
[0084] This invention presents a text-guided Fourier data augmentation-based long-tail image recognition method and apparatus. It can be directly applied to existing image recognition models without adding extra parameters or crawling additional network data. It innovatively uses a text-guided Fourier data augmentation method to generate online data for the tail category, introducing more diverse samples, accelerating model convergence, improving the interpretability of the generated data, and mitigating noise introduced by the generated data. It effectively avoids underfitting of the head category and overfitting of the tail category, is simple and efficient, easy to apply, and can significantly improve model performance while saving computational resources.
Claims
1. A long-tail image recognition method based on text-guided Fourier data augmentation, characterized in that, The method includes the following steps: Prepare the long-tailed image dataset to be recognized and determine the training distribution, including the training set and the test set. The dataset contains image data and the corresponding label data of the images. Determine the category to be enhanced and obtain the enhanced training data distribution based on the flattening strategy. Category semantic relevance mining extracts category name embedding features through a pre-trained language model and calculates semantic relevance between categories based on these features. Its key feature is that for each category, a text prompt template is designed, including "a photo of the {CLASS}", and then the category name is filled into the {CLASS} position in the template, resulting in a text description set for each category. , Given the number of categories in the dataset, we then extract the embedding features of the text description set corresponding to each category using an existing pre-trained language model: in It represents the number of text descriptors in each category of text description set. For category The text embedding features are obtained, and then the semantic similarity between each category can be calculated based on the regularized text embedding features of each category. This will be used to guide Fourier-based image generation. Candidate frequency domain information preparation involves performing a two-dimensional Fourier transform on the image data in the dataset to decompose the image into frequency domain phase information and frequency domain amplitude information. For each category, its candidate phase database contains the phase information of the original image data corresponding to that category, and the candidate amplitude database contains the amplitude information of the original image data of all other categories except that category. Data sampling and text-guided online Fourier image enhancement are performed. Data is batch-sampled according to the distribution of the enhanced training data. If the sampled data is the original data, traditional data enhancement is applied; if it is data to be generated, text-guided Fourier image enhancement is used to generate new data for the corresponding category, followed by traditional data enhancement. Specifically, this includes sampling a sample from the candidate phase data of the category corresponding to the new data. Its phase information The phase information of the new data, and then the semantic relevance obtained based on the text embedding features of each category, guide the algorithm to sample a data point from the candidate amplitude data corresponding to the Top K categories that are most semantically similar to the current category. , with the original sample amplitude information Linear combination is performed to obtain the amplitude information of the new sample: in For linear associative weights, , Hyperparameters for controlling the degree of data augmentation are then used via inverse Fourier transform. Obtain the generated new image data : ; A deep learning recognition model for long-tailed image recognition is constructed, using a basic convolutional neural network as a feature extractor and a fully connected layer as a classifier, with model parameters initialized randomly. The model training based on supervised contrastive learning involves sampling augmented original data and generated data, which includes three views obtained with different levels of data augmentation. Features of the three views are extracted by a feature extractor. One of the features is input into a classifier to calculate the classification loss. The features of the other two views are used for supervised contrastive learning, and the supervised contrastive learning loss is calculated. The model is driven to learn by these two losses. 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 long-tail image recognition method based on text-guided Fourier data augmentation as described in claim 1, characterized in that, The determination of the training distribution specifically includes: adopting a filling strategy to modify the original data distribution, that is, after setting the enhancement ratio factor α, the data to be enhanced for the category will be supplemented so that the number of training samples is equal to the minimum number of samples in the remaining categories, thereby obtaining the enhanced training data distribution, in which the category to be enhanced has the same number of training samples, including the original data and the data to be generated.
3. The long-tail image recognition method based on text-guided Fourier data augmentation as described in claim 1, characterized in that, The preparation of candidate frequency domain information specifically includes: decomposing the image data into frequency domain phase information and frequency domain amplitude information by performing a two-dimensional Fourier transform on the image data, in preparation for subsequent text-guided Fourier image generation; and processing each original image... Through two-dimensional Fourier transform : in and The frequency domain information of the image is obtained after amplitude and phase transformations, respectively, by image decomposition. and phase information This yields candidate phase and candidate amplitude data for subsequent Fourier image generation, where the category... Its candidate phase database contains phase information of the original image data corresponding to that category, and its candidate amplitude database contains information other than that of the category. The amplitude information of the original data is not included in the original data; therefore, the tail category has rich candidate amplitude data.
4. The long-tail image recognition method based on text-guided Fourier data augmentation as described in claim 1, characterized in that, The model training based on supervised contrastive learning specifically includes: for the original data in the batch data... Or newly generated image data Traditional data augmentation, performed to varying degrees or in combinations, yields three different views of the image data. These three views are then processed by the same feature extractor to obtain three corresponding features from the original data. For example, its three corresponding features are , , ,in The classifier is then used to calculate the classification loss. and This is used to calculate supervised contrastive loss; the classification loss employs a loss with probabilistic post-processing. : Supervised comparative loss employs balanced comparative loss. : For the sample Its total training loss As shown below: in The class of weights in the classifier The corresponding column, For category The corresponding probability adjustment value is related to the frequency of that category; Indicates the categories in the sampled batch data The number of samples, This represents the set of features used for supervised contrastive learning; and These are the hyperparameters that control the impact of classification loss and supervised contrastive loss, respectively. The gradient backpropagation algorithm is used to drive the learning of model parameters based on the loss mean of the batch samples.
