Skip to content

jaekyeom/MABAS

Model-Agnostic Boundary-Adversarial Sampling for Test-Time Generalization in Few-Shot Learning

In ECCV 2020 (Oral)

This is the code for our paper,

This is the application of our method to Dynamic Few-Shot Visual Learning without Forgetting.

Citing the paper

If you find our work or this code useful in your research, please cite

@inproceedings{kim2020_mabas,
    title={Model-Agnostic Boundary-Adversarial Sampling For Test-Time Generalization in Few-Shot Learning},
    author={Kim, Jaekyeom and Kim, Hyoungseok and Kim, Gunhee},
    booktitle={Computer Vision--ECCV 2020: 16th European Conference, Glasgow, UK, August 23--28, 2020, Proceedings, Part I 16},
    pages={599--617},
    year={2020},
    organization={Springer}
}

Environment setup

You can create a conda environment by

conda env create -f environment.yml

and activate it with

conda activate mabas-fswf

Downloading datasets

Meta-training

Command Dataset Type
python train.py --config miniImageNet_ResNetLikeCosineClassifier miniImageNet Base
python train.py --config miniImageNet_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "miniImageNet_ResNetLikeCosineClassifier" miniImageNet 5-shot
python train.py --config miniImageNet_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "miniImageNet_ResNetLikeCosineClassifier" miniImageNet 1-shot
python train.py --config CIFARFS_ResNetLikeCosineClassifier CIFAR-FS Base
python train.py --config CIFARFS_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "CIFARFS_ResNetLikeCosineClassifier" CIFAR-FS 5-shot
python train.py --config CIFARFS_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "CIFARFS_ResNetLikeCosineClassifier" CIFAR-FS 1-shot
python train.py --config FC100_ResNetLikeCosineClassifier FC100 Base
python train.py --config FC100_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "FC100_ResNetLikeCosineClassifier" FC100 5-shot
python train.py --config FC100_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "FC100_ResNetLikeCosineClassifier" FC100 1-shot

Test-time fine-tuning with MABAS

Command Dataset Type
python evaluate_finetune.py --config miniImageNet_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "miniImageNet_ResNetLikeCosineClassifier/miniImageNet_ResNetLikeCosineClassifierGenWeightAttN5" miniImageNet 5-shot
python evaluate_finetune.py --config miniImageNet_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "miniImageNet_ResNetLikeCosineClassifier/miniImageNet_ResNetLikeCosineClassifierGenWeightAttN1" miniImageNet 1-shot
python evaluate_finetune.py --config CIFARFS_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "CIFARFS_ResNetLikeCosineClassifier/CIFARFS_ResNetLikeCosineClassifierGenWeightAttN5" CIFAR-FS 5-shot
python evaluate_finetune.py --config CIFARFS_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "CIFARFS_ResNetLikeCosineClassifier/CIFARFS_ResNetLikeCosineClassifierGenWeightAttN1" CIFAR-FS 1-shot
python evaluate_finetune.py --config FC100_ResNetLikeCosineClassifierGenWeightAttN5 --parent_exp "FC100_ResNetLikeCosineClassifier/FC100_ResNetLikeCosineClassifierGenWeightAttN5" FC100 5-shot
python evaluate_finetune.py --config FC100_ResNetLikeCosineClassifierGenWeightAttN1 --parent_exp "FC100_ResNetLikeCosineClassifier/FC100_ResNetLikeCosineClassifierGenWeightAttN1" FC100 1-shot

Acknowledgments

This source code is based on the implementations for Dynamic Few-Shot Visual Learning without Forgetting and Meta-learning with differentiable convex optimization.

About

No description, website, or topics provided.

Resources

License

MIT and 2 other licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE_fswf
Apache-2.0
LICENSE_metaoptnet

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages