paper link: https://openreview.net/forum?id=JWOiYxMG92s
To install requirements:
pip install -r requirements.txt
Donwload the dataset and create base/val/novel splits:
miniImageNet
- Change directory to filelists/miniImagenet/
- Run 'source ./download_miniImagenet.sh'
CUB
- Change directory to filelists/CUB/
- Run 'source ./download_CUB.sh'
To train the feature extractor in the paper, run this command:
python train.py --dataset [miniImagenet/CUB]
-
Create an empty 'checkpoints' directory.
-
Run:
python save_plk.py --dataset [miniImagenet/CUB]
https://drive.google.com/drive/folders/1IjqOYLRH0OwkMZo8Tp4EG02ltDppi61n?usp=sharing
If you chose to download the extracted features, you are not required to download the dataset and train the network. After downloading the extracted features, please adjust your file path according to the code.
To evaluate our distribution calibration method, run:
python evaluate_DC.py
If our paper is useful for your research, please cite our paper:
@inproceedings{
yang2021free,
title={Free Lunch for Few-shot Learning: Distribution Calibration},
author={Shuo Yang and Lu Liu and Min Xu},
booktitle={International Conference on Learning Representations},
year={2021},
url={https://openreview.net/forum?id=JWOiYxMG92s}
}