Skip to content
/ BMS Public

Code for 'Squeezing Backbone Feature Distributions to the Max for Efficient Few-Shot Learning'

Notifications You must be signed in to change notification settings

yhu01/BMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Squeezing Backbone Feature Distributions to the Max for Efficient Few-Shot Learning

This repository is the official implementation of Squeezing Backbone Feature Distributions to the Max for Efficient Few-Shot Learning.

Requirements

To install requirements:

pip install -r requirements.txt

Pre-trained Models

You can download the extracted features here:

  • Extracted novel class features on miniImageNet, tieredImagenet, cub and cifar-fs .

  • Create a 'checkpoint' folder

  • Untar the downloaded file and move it into the 'checkpoint' folder.

Boosted Min-size Sinkhorn

📋 To launch the BMS algorithm, run:

python test_standard_bms.py --dataset [mini/tiered/cub/cifar-fs] --model wrn --method [BMS/BMS_] --preprocess PEME --shot [1/5] --epoch [0/20/40] 

Results

Our model achieves the following performance on :

Dataset 1-shot Accuracy 5-shot Accuracy
miniImageNet 83.35+-0.25% 89.53+-0.13%
tieredImageNet 86.07+-0.25% 91.09+-0.14%
CUB 91.91+-0.18% 94.62+-0.09%
CIFAR-FS 87.83+-0.22% 91.20+-0.15%

References

Leveraing the Feature Distribution in Transfer-based Few-Shot Learning

Sinkhorn Distances: Lightspeed Computation of Optimal Transport

SimpleShot: Revisiting Nearest-Neighbor Classification for Few-Shot Learning

Notes on optimal transport

About

Code for 'Squeezing Backbone Feature Distributions to the Max for Efficient Few-Shot Learning'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages