PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
Alternatives To Learningtocompare_fsl
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Bringing Old Photos Back To Life12,392
4 months ago85mitPython
Bringing Old Photo Back to Life (CVPR 2020 oral)
10 months ago107otherPython
Official implementation of CVPR2020 paper "VIBE: Video Inference for Human Body Pose and Shape Estimation"
Awesome Image Classification2,138
a year ago1
A curated list of deep learning image classification papers and codes
Deep Flow Guided Video Inpainting2,093
10 months ago57mitPython
pytorch implementation for "Deep Flow-Guided Video Inpainting"(CVPR'19)
a year ago1
码农周刊 - 每周五发送,欢迎订阅!欢迎加入读者圈子,一起交流!
Awesome Pruning1,842
6 months ago6
A curated list of neural network pruning resources.
2 years ago25mitPython
"Neural 3D Mesh Renderer" (CVPR 2018) by H. Kato, Y. Ushiku, and T. Harada.
Awesome Person Re Identification1,013
2 months ago
Awesome Person Re-identification
2 years ago16mitPython
(CVPR'20 Oral) Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild
Epro Pnp947
2 months ago45apache-2.0Python
[CVPR 2022 Oral, Best Student Paper] EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation
Alternatives To Learningtocompare_fsl
Select To Compare

Alternative Project Comparisons


PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)

For Zero-Shot Learning part, please visit here.


Python 2.7

Pytorch 0.3


For Omniglot experiments, I directly attach omniglot 28x28 resized images in the git, which is created based on omniglot and maml.

For mini-Imagenet experiments, please download mini-Imagenet and put it in ./datas/mini-Imagenet and run proc_image.py to preprocess generate train/val/test datasets. (This process method is based on maml).


omniglot 5way 1 shot:

python omniglot_train_one_shot.py -w 5 -s 1 -b 19 

omniglot 5way 5 shot:

python omniglot_train_few_shot.py -w 5 -s 5 -b 15 

omniglot 20way 1 shot:

python omniglot_train_one_shot.py -w 20 -s 1 -b 10

omniglot 20way 5 shot:

python omniglot_train_few_shot.py -w 20 -s 5 -b 5

mini-Imagenet 5 way 1 shot:

python miniimagenet_train_one_shot.py -w 5 -s 1 -b 15

mini-Imagenet 5 way 5 shot:

python miniimagenet_train_few_shot.py -w 5 -s 5 -b 10

you can change -b parameter based on your GPU memory. Currently It will load my trained model, if you want to train from scratch, you can delete models by yourself.


omniglot 5way 1 shot:

python omniglot_test_one_shot.py -w 5 -s 1

Other experiments' testings are similar.


If you use this code in your research, please use the following BibTeX entry.

  title={Learning to Compare: Relation Network for Few-Shot Learning},
  author={Sung, Flood and Yang, Yongxin and Zhang, Li and Xiang, Tao and Torr, Philip HS and Hospedales, Timothy M},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},




Popular Cvpr Projects
Popular Pytorch Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Meta Learning