English

LibFewShot: A Comprehensive Library for Few-shot Learning

Computer Vision and Pattern Recognition 2022-09-16 v3

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. 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.

Keywords

Cite

@article{arxiv.2109.04898,
  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},
  journal= {arXiv preprint arXiv:2109.04898},
  year   = {2022}
}

Comments

17 pages

R2 v1 2026-06-24T05:51:42.806Z