Implementation of AR1* and CWR* Continual Learning techniques for the NICv2 scenario
BSD-3-CLAUSE-CLEAR License
This is the original Caffe implementation of AR1* and CWR* Continual Learning techniques.
A custom Caffe distribution packaged as a Docker image is used. More info and source code can be found here. The Docker image is already available on the Docker Hub here.
See the Running the experiments section for a detailed guide on how to reproduce our experiments.
An official PyTorch implementation of the AR1* and CWR* algorithms is also available here!
Our article "Rehearsal-Free Continual Learning over Small Non-I.I.D. Batches" is now available here!
@InProceedings{lomonaco2019nicv2,
title = {Rehearsal-Free Continual Learning over Small Non-I.I.D. Batches},
author = {Vincenzo Lomonaco and Davide Maltoni and Lorenzo Pellegrini},
journal = {1st Workshop on Continual Learning in Computer Vision at CVPR2020},
url = "https://arxiv.org/abs/1907.03799",
year = {2019}
}
Some helper scripts are provided under the Run experiments
folder.
You can run an experiment as follows.
Install the Nvidia Docker Toolkit from here
Move inside the Run experiments
folder:
cd "Run experiments"
python prepare_experiment.py method scenario path-to-core50 [--nvidia_docker x]
where method can be "CWR", "AR1" or "Naive" and scenario can be "79", "196" or "391". You can also execute the script with a single argument "-h" to view a description of the expected parameters.
You can set the desidered Nvidia Docker run method by passing either:
When passing the "path-to-core50" argument, make sure that the selected folder contains the following content:
core50_labels.txt
, containing the Core50 labels. Can be downloaded here
core50_128x128
containing the 128x128 version of the CORe50 dataset. Can be downloaded here
Running the python script will have the following effects:
Project Source/NIC_v2/NIC_v2_X
folderexp_configuration.json"
file inside the Project Source
folderrun_experiment.sh
file inside the Run experiments
folder. Should be already executable when createdExecute the run_experiment.sh
script as follows:
./run_experiment.sh
This will run the experiment on "run0" inside our docker image in interactive mode (issuing CTRL+C or closing the terminal will terminate the experiment).
The content can be summarized as follows:
Project Source
folder)
inc_training_Core50.py
contains the entry point;nicv2_configuration.py
contains the experiment configuration loader;batch_filelists
subdirectory)
test_filelist_20.txt
);models/MobileNetV1.caffemodel
)NIC_v2
folder)Run experiments
folder)The Core50 Dataset can be downloaded from https://vlomonaco.github.io/core50/index.html#download In our test we used the 128x128 version, zip archive.