LibFewShot: A Comprehensive Library for Few-shot Learning

Wenbin Li, Ziyi, Wang, Xuesong Yang, Chuanqi Dong +7 more
9/10/2021
100 citations
cs.CV

Official code: RL-VIG/LibFewShot (1,073 stars, Python, MIT, PyTorch, last commit 2025-10-27).

Abstract

Few-shot learning, especially few-shot image classification, has received increasing attention and witnessed significant advances in recent years. Some recent studies implicitly show that many generic techniques or ``tricks'', such as data augmentation, pre-training, knowledge distillation, and self-supervision, may greatly boost the performance of a few-shot learning method.

Show full abstract

Moreover, different works may employ different software platforms, backbone architectures and input image sizes, making fair comparisons difficult and practitioners struggle with reproducibility. To address these situations, we propose a comprehensive library for few-shot learning (LibFewShot) by re-implementing eighteen state-of-the-art few-shot learning methods in a unified framework with the same single codebase in PyTorch. Furthermore, based on LibFewShot, we provide comprehensive evaluations on multiple benchmarks with various backbone architectures to evaluate common pitfalls and effects of different training tricks. In addition, with respect to the recent doubts on the necessity of meta- or episodic-training mechanism, our evaluation results confirm that such a mechanism is still necessary especially when combined with pre-training. We hope our work can not only lower the barriers for beginners to enter the area of few-shot learning but also elucidate the effects of nontrivial tricks to facilitate intrinsic research on few-shot learning. The source code is available from https://github.com/RL-VIG/LibFewShot.

View on arXivView PDF

Code Implementations(1)

RL-VIG/LibFewShotOfficial100%
PyTorchMIT

[TPAMI 2023] LibFewShot: A Comprehensive Library for Few-shot Learning.

1,073199PythonAug 4, 20211 years agoMIT
few-shot-learningfine-tuningimage-classificationmeta-learningpytorch

Similar Papers

Cite this paper

@article{li2021libfewshot,
  title  = {LibFewShot: A Comprehensive Library for Few-shot Learning},
  author = {Wenbin Li and Ziyi and Wang and Xuesong Yang and Chuanqi Dong and Pinzhuo Tian and Tiexin Qin and Jing Huo and Yinghuan Shi and Lei Wang and Yang Gao and Jiebo Luo},
  year   = {2021},
  eprint = {2109.04898},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.04898}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.04898.svg)](https://codeofpaper.com/paper/2109.04898)

Discussion