This branch includes the implementation of our DGR under the continual learning setup using pre-trained models
FineTune
: Baseline method which simply updates parameters on new tasks.iCaRL
: iCaRL: Incremental Classifier and Representation Learning. CVPR 2017 [paper]Coil
: Co-Transport for Class-Incremental Learning. ACMMM 2021 [paper]DER
: DER: Dynamically Expandable Representation for Class Incremental Learning. CVPR 2021 [paper]FOSTER
: Feature Boosting and Compression for Class-incremental Learning. ECCV 2022 [paper]MEMO
: A Model or 603 Exemplars: Towards Memory-Efficient Class-Incremental Learning. ICLR 2023 Spotlight [paper]SimpleCIL
: Revisiting Class-Incremental Learning with Pre-Trained Models: Generalizability and Adaptivity are All You Need. arXiv 2023 [paper]L2P
: Learning to Prompt for Continual Learning. CVPR 2022 [paper]DualPrompt
: DualPrompt: Complementary Prompting for Rehearsal-free Continual Learning. ECCV 2022 [paper]CODA-Prompt
: CODA-Prompt: COntinual Decomposed Attention-based Prompting for Rehearsal-Free Continual Learning. CVPR 2023 [paper]ADAM
: Revisiting Class-Incremental Learning with Pre-Trained Models: Generalizability and Adaptivity are All You Need. arXiv 2023 [paper]RanPAC
: RanPAC: Random Projections and Pre-trained Models for Continual Learning. NeurIPS 2023 [paper]LAE
: A Unified Continual Learning Framework with General Parameter-Efficient Tuning. ICCV 2023 [paper]SLCA
: SLCA: Slow Learner with Classifier Alignment for Continual Learning on a Pre-trained Model. ICCV 2023 [paper]Ease
: Expandable Subspace Ensemble for Pre-Trained Model-Based Class-Incremental Learning. CVPR 2024 [paper]DGR
: Gradient Reweighting: Towards Imbalanced Class-Incremental Learning. CVPR 2024 (Our Method)[paper]
-
Edit the
[MODEL NAME].json
file for global settings and hyperparameters. -
Run:
python main.py --config=./exps/[MODEL NAME].json
-
hyper-parameters
When using PILOT, you can edit the global parameters and algorithm-specific hyper-parameter in the corresponding json file.
These parameters include:
-
model_name: The model's name should be selected from the 12 methods listed above, i.e.,
finetune
,icarl
,coil
,der
,dgr
,foster
,memo
,simplecil
,l2p
,dualprompt
,coda-prompt
andadam
. - init_cls: The number of classes in the initial incremental stage. As the configuration of CIL includes different settings with varying class numbers at the outset, our framework accommodates diverse options for defining the initial stage.
-
increment: The number of classes in each incremental stage
, > 1. By default, the number of classes is equal across all incremental stages. - backbone_type: The backbone network of the incremental model. It can be selected from a variety of pre-trained models available in the Timm library, such as ViT-B/16-IN1K and ViT-B/16-IN21K. Both are pre-trained on ImageNet21K, while the former is additionally fine-tuned on ImageNet1K.
- seed: The random seed is utilized for shuffling the class order. It is set to 1993 by default, following the benchmark setting iCaRL.
- fixed_memory: a Boolean parameter. When set to true, the model will maintain a fixed amount of memory per class. Alternatively, when set to false, the model will preserve dynamic memory allocation per class.
-
memory_size: The total number of exemplars in the incremental learning process. If
fixed_memory
is set to false, assuming there areclasses at the current stage, the model will preserve exemplars for each class. L2P, DualPrompt, SimpleCIL, ADAM, and CODA-Prompt do not require exemplars. Therefore, parameters related to the exemplar are not utilized. -
memory_per_class: If
fixed memory
is set to true, the model will preserve a fixed number ofmemory_per_class
exemplars for each class.
-
model_name: The model's name should be selected from the 12 methods listed above, i.e.,
- CIFAR100: will be automatically downloaded by the code.
- CUB200: Google Drive: link or Onedrive: link
- ImageNet-R: Google Drive: link or Onedrive: link
- ImageNet-A: Google Drive: link or Onedrive: link
- OmniBenchmark: Google Drive: link or Onedrive: link
- VTAB: Google Drive: link or Onedrive: link
- ObjectNet: Onedrive: link You can also refer to the filelist if the file is too large to download.
The main implementation of this repository and existing methods are obtained from "https://github.com/sun-hailong/LAMDA-PILOT", for more information please refer to the original repo.