HongguangZhang / SalNet-cvpr19-master

Pytorch Implementation of CVPR19 "Few-shot Learning via Saliency-guided Hallucination of Samples"
32 stars 6 forks source link

Few-shot Learning via Saliency-guided Hallucination of Samples

Pytorch Implementation of CVPR19 "Few-shot Learning via Saliency-guided Hallucination of Samples"

Pipline of SalNet

This is developed based on the code of Relation Net and SoSN.

Download formatted miniImagenet and the saliency maps:
https://drive.google.com/file/d/1fOWbhpjTaQ9lc7z8Sndi6jWFwtLRsapY/view?usp=sharing
Decompress it into './datas'

Requires.

pytorch-0.4.1
numpy
scipy

For miniImagenet training and testing, run following commands.

cd ./miniimagenet
python miniimagenet_train_few_shot_SalNet_IntraClass.py -w 5 -s 1
python miniimagenet_test_few_shot_SalNet_IntraClass.py -w 5 -s 1

Citation

If you use this code in your research, please cite the following paper.

@InProceedings{Zhang_2019_CVPR,
author = {Zhang, Hongguang and Zhang, Jing and Koniusz, Piotr},
title = {Few-Shot Learning via Saliency-Guided Hallucination of Samples},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}