Learning a Good Representation for Metric-based Few-shot Classification
Dianqi Liu, Liang Bai, Tianyuan Yu, Aimin Zhang · 2023
Few-shot learning (FSL) has gradually become the most successful application of transfer learning. It focuses on classifying novel classes by only a few images, which do not appear in the training set. Among all kinds of few-shot learning methods, metric-based methods are the most widely used. It aims to learn representations of different categories and classify novel categories by measuring the distance between images and these representations. However, represented by prototypical networks, traditional metric-based methods usually calculate the category representation by overly simplistic approaches. To improve the accuracy of metric-based methods, we propose two models to learn a better representation for different categories: Normalized Prototypical Network (NPN) and Mixed Prototypical Classifier (MP). NPN is a complete network which performs better than many baselines of metric-based methods. MP is a classifier which can be combined with any metric-based model, it greatly improves the accuracy of the combined model on 1-shot FSL benchmarks. Experiments and ablation studies in MiniImageNet and CIFAR-FS prove the effectiveness of our methods.