Do Your Best and Get Enough Rest for Continual Learning

May 22, 2025 · View on GitHub

This folder contains official pyTorch implementations for "Do Your Best and Get Enough Rest for Continual Learning" accepted in CVPR'25. (see our paper, slides, poster).


Illustration of View-Batch Model

1. Tutorial

  1. Clone this repository and install the requirements.

    git clone https://github.com/hankyul2/ViewBatchModel.git
    cd ViewBatchModel
    pip install -r requirements.txt
    
  2. Train ResNet18 on S-CIFAR-10 using iCaRL as baseline methods with 200 buffers.

    iCaRL

    CUDA_VISIBLE_DEVICES=0 python utils/main.py --model icarl --load_best_args --dataset seq-cifar10 --buffer_size 200 --seed 1993 --savecheck 1 --ckpt_name icarl_r1_s1993
    

    Ours-iCaRL

    CUDA_VISIBLE_DEVICES=4 python utils/main.py --model icarl --load_best_args --dataset seq-cifar10 --buffer_size 200 --aug-repeat 4 --prog-aug 5 --seed 1993 --flag hard_aug --savecheck 1 --ckpt_name icarl_r4_hard_aug_s1993
    
  3. Validate the trained network using the saved checkpoint.

    iCaRL

    CUDA_VISIBLE_DEVICES=0 python utils/main.py --model icarl --load_best_args --dataset seq-cifar10 --buffer_size 200 --seed 1993 --loadcheck checkpoints/icarl_r1_s1993_cifar10_t0.pth --start_from 0 --stop_after 0 --inference_only 1
    

    Ours-iCaRL

    CUDA_VISIBLE_DEVICES=4 python utils/main.py --model icarl --load_best_args --dataset seq-cifar10 --buffer_size 200 --seed 1997 --loadcheck checkpoints/icarl_r4_hard_aug_s1997_cifar10_t0.pth --start_from 0 --stop_after 0 --inference_only 1
    
  4. See scripts/icarl for more commands to reproduce Table 6 in the paper. Also, check datasets/utils/continual_dataset.py#L24 for view-batch replay and models/icarl.py#L78 for view-batch SSL.

2. Reproduced Results

After the paper has been accepted, we rerun everything to provide complete logs and checkpoints for our Table 6 in the paper. Our exact environments are:

  • torch==1.12.1+cu113
  • torchvision==0.13.1+cu113
  • timm==1.0.7
  • numpy==1.24.4

Experimental Results

The table below reproduces Table 6 of our paper, which contains the main ablation study for the proposed method.

MethodView-batch ReplayStrong AugmentView-batch SSLForgetting(⬇️)CIL(⬆️)TIL(⬆️)AVG
iCaRL28.05±4.2163.58±2.6490.32±3.1976.95-
iCaRL22.16±0.9165.33±1.0589.33±0.5877.33+0.38
iCaRL18.72±1.7667.21±0.4291.63±0.9879.42+2.47
iCaRL18.29±0.9167.16±0.7591.02±0.9779.09+2.14
iCaRL13.81±1.5869.25±0.4192.73±0.5780.99+4.04

Log

Below, the WanDB project link provides the complete logs that are made during the training of the above tables. It includes:

  • command line
  • metrics
  • console outputs
  • environments

WanDB Project Link: https://wandb.ai/gregor99/view_batch_model.

Checkpoint

The tables below provide the checkpoints saved at the end of tasks during the training of the above tables.

seed=1993
methodView-batch ReplayStrong AugmentationView-batch SSLtask 1task 2task 3task 4task 5
iCaRL---ckptckptckptckptckpt
iCaRL-v-ckptckptckptckptckpt
iCaRLv--ckptckptckptckptckpt
iCaRLvv-ckptckptckptckptckpt
iCaRLvvvckptckptckptckptckpt
seed=1996
methodView-batch ReplayStrong AugmentationView-batch SSLtask 1task 2task 3task 4task 5
iCaRL---ckptckptckptckptckpt
iCaRL-v-ckptckptckptckptckpt
iCaRLv--ckptckptckptckptckpt
iCaRLvv-ckptckptckptckptckpt
iCaRLvvvckptckptckptckptckpt
seed=1997
methodView-batch ReplayStrong AugmentationView-batch SSLtask 1task 2task 3task 4task 5
iCaRL---ckptckptckptckptckpt
iCaRL-v-ckptckptckptckptckpt
iCaRLv--ckptckptckptckptckpt
iCaRLvv-ckptckptckptckptckpt
iCaRLvvvckptckptckptckptckpt

3. Acknowledgement

This project is heavily based on Mammoth. We sincerely appreciate the authors of the mentioned works for sharing such great library as open-source project.