First things first, please allow us to highlight the significant previous works. Our toolkit is based on CEC, FACT, S3C, CLOM, LCwoF and DSN.
Few-shot Class-incremental Learning (FSCIL) is an emerging paradigm that addresses the challenge of learning new classes over time without forgetting previously learned ones. To streamline the development and deployment of FSCIL solutions, we introduce the Few-shot Class-incremental Learning Toolkit (FSCIL-Toolkit). This toolkit serves as a comprehensive platform for researchers and practitioners to experiment with and develop FSCIL strategies, offering a suite of classical FSCIL algorithms, a variety of datasets for thorough performance assessment.
FSCIL-Toolkit currently contains:
- 4 FSCIL methods
- 3 available datasets
- and more to be updated
git clone https://github.com/Leikrit/FSCIL-Toolkit.git
cd FSCIL-Toolkit
Our toolkit is developed under the environment of:
- Python 3.9
- PyTorch 2.5.1 (any version >= 1.8 is okay)
- tqdm
There is no more packages to install.
You should firstly prepare the dataset following CEC. Just leave the folder data
in the same directory with fsciltoolkit.py
.
For each method, please refer to their original Github repository, following the command.
Here, we provide some examples for you:
python fsciltoolkit.py [xxx]
Where [xxx] is the original command for each method, for example:
python fsciltoolkit.py -project base -dataset cifar100 -base_mode 'ft_cos' -new_mode 'avg_cos' -gamma 0.1 -lr_base 0.1 -lr_new 0.1 -decay 0.0005 -epochs_base 100 -schedule Milestone -milestones 60 70 -gpu 0,1,2,3 -temperature 16
python fsciltoolkit.py -project fact -dataset cub200 -base_mode 'ft_cos' -new_mode 'avg_cos' -gamma 0.25 -lr_base 0.005 -lr_new 0.1 -decay 0.0005 -epochs_base 400 -schedule Milestone -milestones 50 100 150 200 250 300 -gpu '3,2,1,0' -temperature 16 -dataroot YOURDATAROOT -batch_size_base 256 -balance 0.01 -loss_iter 0 >>CUB-FACT.txt
Remember to change YOURDATAROOT into yours, or you might encounter some errors.
If you find FSCIL-Toolkit helpful, please cite us.
@software{Li_FSCIL-Toolkit_2024,
author = {Li, Jinyi and Yao, Yiyang and Li, Yulong},
month = dec,
title = {{FSCIL-Toolkit}},
version = {1.0.0},
year = {2024}
}