Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Semantic Prompt for Few-Shot Image Recognition

About

Few-shot learning is a challenging problem since only a few examples are provided to recognize a new class. Several recent studies exploit additional semantic information, e.g. text embeddings of class names, to address the issue of rare samples through combining semantic prototypes with visual prototypes. However, these methods still suffer from the spurious visual features learned from the rare support samples, resulting in limited benefits. In this paper, we propose a novel Semantic Prompt (SP) approach for few-shot learning. Instead of the naive exploitation of semantic information for remedying classifiers, we explore leveraging semantic information as prompts to tune the visual feature extraction network adaptively. Specifically, we design two complementary mechanisms to insert semantic prompts into the feature extractor: one is to enable the interaction between semantic prompts and patch embeddings along the spatial dimension via self-attention, another is to supplement visual features with the transformed semantic prompts along the channel dimension. By combining these two mechanisms, the feature extractor presents a better ability to attend to the class-specific features and obtains more generalized image representations with merely a few support samples. Through extensive experiments on four datasets, the proposed approach achieves promising results, improving the 1-shot learning accuracy by 3.67% on average.

Wentao Chen, Chenyang Si, Zhang Zhang, Liang Wang, Zilei Wang, Tieniu Tan• 2023

Related benchmarks

TaskDatasetResultRank
Few-shot classificationtieredImageNet (test)
Accuracy88.55
282
Image ClassificationMiniImagenet
Accuracy72.31
206
5-way Few-shot ClassificationMini-Imagenet (test)
1-shot Accuracy72.31
141
Few-shot classificationminiImageNet standard (test)
5-way 1-shot Acc72.31
138
Few-shot classificationMini-Imagenet (test)
Accuracy83.42
113
Few-shot Image ClassificationminiImageNet (test)
Accuracy83.42
111
5-way Few-shot Image ClassificationFC100 (test)
1-shot Accuracy48.53
78
Few-shot Image ClassificationFC100 (test)
Accuracy61.55
69
Few-shot classificationCIFAR FS (test)
Mean Accuracy88.24
51
Few-shot Image ClassificationCIFAR FS (test)--
46
Showing 10 of 19 rows

Other info

Follow for update