Home

Awesome

Neural Collapse Inspired Feature-Classifier Alignment for Few-Shot Class-Incremental Learning

Authors: Yibo Yang, Haobo Yuan, Xiangtai Li, Zhouchen Lin, Philip Torr, Dacheng Tao

Accepted by ICLR 2023 (top25%), Kigali, Rwanda.

[PDF] [CODE]

PWC

PWC

PWC


News: We have done a substantial extension based this work, see the new paper, and the code in this repo.

Environment

You do not need to install the environment. What you need is to start a docker container. I already put the docker image online.

DATALOC={YOUR DATA LOCATION} LOGLOC={YOUR LOG LOCATION} bash tools/docker.sh

If you want to build it by yourself (otherwise ignore it). Please run:

docker build -t harbory/openmmlab:2206 --network=host .

Data Preparation

You do not need to prepare CIFAR datasets since it is managed by torch.

For other datasets, please refer to hub(Link). It is worth noting that the Mini ImageNet dataset is with various versions. Here we follow CEC, which is widely adopted in FSCIL. Please keep in mind that the usage of datasets is governed by their corresponding agreements. Data sharing here is for research purposes only.

Please put the datasets into the {YOUR DATA LOCATION} you provided above.

Getting Start

Let's go for 🏃‍♀️running code.

[Update🙋‍♀️] We test the training scripts after the release, please refer to logs.

CIFAR

Run:

bash tools/dist_train.sh configs/cifar/resnet12_etf_bs512_200e_cifar.py 8 --work-dir /opt/logger/cifar_etf --seed 0 --deterministic && bash tools/run_fscil.sh configs/cifar/resnet12_etf_bs512_200e_cifar_eval.py /opt/logger/cifar_etf /opt/logger/cifar_etf/best.pth 8 --seed 0 --deterministic
Session012345678
NC-FSCIL82.5276.8273.3469.6866.1962.8560.9659.0256.11

[Base Log] [Incremental Log]

Mini Imagenet

Run:

bash tools/dist_train.sh configs/mini_imagenet/resnet12_etf_bs512_500e_miniimagenet.py 8 --work-dir /opt/logger/m_imagenet_etf --seed 0 --deterministic && bash tools/run_fscil.sh configs/mini_imagenet/resnet12_etf_bs512_500e_miniimagenet_eval.py /opt/logger/m_imagenet_etf /opt/logger/m_imagenet_etf/best.pth 8 --seed 0 --deterministic
Session012345678
NC-FSCIL84.0276.8072.0067.8366.3564.0461.4659.5458.31

[Base Log] [Incremental Log]

CUB

Run:

bash tools/dist_train.sh configs/cub/resnet18_etf_bs512_80e_cub.py 8 --work-dir /opt/logger/cub_etf --seed 0 --deterministic && bash tools/run_fscil.sh configs/cub/resnet18_etf_bs512_80e_cub_eval.py /opt/logger/cub_etf /opt/logger/cub_etf/best.pth 8 --seed 0 --deterministic
Session012345678910
NC-FSCIL80.4575.9872.3070.2868.1765.1664.4363.2560.6660.0159.44

[Base Log] [Incremental Log]

Citation

If you think the code is useful in your research, please consider to refer:

@inproceedings{yang2023neural,
  title = {Neural Collapse Inspired Feature-Classifier Alignment for Few-Shot Class-Incremental Learning},
  author = {Yang, Yibo and Yuan, Haobo and Li, Xiangtai and Lin, Zhouchen and Torr, Philip and Tao, Dacheng},
  booktitle = {ICLR},
  year = {2023},
}