Official PyTorch implementation of our ECCV2024 paper “Rethinking Few-shot Class-incremental Learning: Learning from Yourself”. [Paper]
TL;DR
We proposed a novel metric for a more balanced evaluation of Few-Shot Class-incremental Learning (FSCIL) methods. Further, we also provide analyses of Vision Transformers(ViT) on FSCIL and design the feature rectification module learning from intermediate features.
- Python: 3.8.17
- PyTorch: 2.0.1
- timm: 0.5.4
We follow prior works to conduct experiments on three standard datasets: CIFAR100, mini/ImageNet, and CUB200.
-
CIFAR100 dataset will be downloaded automatically to the directory specified by the arg
-dataroot
. -
mini/ImageNet and CUB200 datasets cannot be downloaded automatically, we follow the CEC, and here is the download link copied from their repo.
After downloading, please put all datasets into the ./data
directory.
- Step1, download checkpoints trained on the base task (task 1) from these URLs: (Baidu(password=0000), Google or OneDrive)
and put them into the
checkpoints
path. Note that if you want to train on task 1, please refer to the Base task training section. - Step2, just run
bash runs/cifar100.sh
for cifar100 training,runs/miniImageNet.sh
for mini/ImageNet training andbash runs/cub200.sh
for CUB200 training.bash runs/cifar100.sh exp_name gpu_id
We proposed a novel evaluation metric called generalized average accuracy (gAcc), which provides a more balanced assessment of FSCIL methods.
The codes for gAcc is the generalised_avg_acc()
function in models/metric.py
, which inputs the range of the parameter
We also provide codes for training our ViT backbone on the base task (task 1, with 60 classes).
To train, please cd baseline_inc
and check the README.md
in ./baseline_inc
.
-
If you use this paper/code in your research, please consider citing us:
@inproceedings{tang2024rethinking,
title={Rethinking Few-shot Class-incremental Learning: Learning from Yourself},
author={Tang, Yu-Ming and Peng, Yi-Xing and Meng, Jingke and Zheng, Wei-Shi},
booktitle={European Conference on Computer Vision},
year={2024}
}