A few-shot classification algorithm: Exploiting Unsupervised Inputs for Accurate Few-Shot Classification
Dataset: miniImageNet, CUB, CIFAR-FS
Donwloading the dataset and create base/val/novel splits:
miniImageNet
CUB
CIFAR-FS
Training backbone
For miniImageNet/CUB
python train.py --dataset [miniImagenet/CUB] --method [S2M2_R/rotation] --model [WideResNet28_10/ResNet18] --train_aug
For CIFAR-FS
python train_cifar.py --dataset cifar --method [S2M2_R/rotation] --model [WideResNet28_10/ResNet18] --train_aug
Saving the novel class features of a trained backbone for the evaluation
python save_plk.py --dataset [miniImagenet/CUB] --method S2M2_R --model [WideResNet28_10/ResNet18]
Fetching trained WideResNet_28_10 backbones and saved novel class features
Create an empty 'checkpoints' directory inside 'transfer-sgc'
The backbone and features for each dataset can be downloaded from this link: 'https://drive.google.com/file/d/1wVJlDnU00Gurs0pw54ZMqf4XsWhJWHIh/view?usp=sharing '
Untar the downloaded file and move it into 'checkpoints' folder.
Evaluating the few-shot classification performance
python test_standard.py
A Closer Look at Few-shot Classification
Charting the Right Manifold: Manifold Mixup for Few-shot Learning
Manifold Mixup: Better Representations by Interpolating Hidden States
SimpleShot: Revisiting Nearest-Neighbor Classification for Few-Shot Learning