This README.md is a description of a simple code file code_done_simple.py
, which contains the implementation of DONE as the most important part of the paper.
In addition to the simple code file, the supplementary material contains the following three Jupyter Notebook files.
code_done_simple.ipynb
: for jupyter notebook of the simple version.code_done_complete.ipynb
: a complete code file for the reproduction of the results in the paper.code_done_complete_ReducedFor10min.ipynb
: a complete code file in which only the values of variables such as the number of tests are reduced so that all executions can be completed in approximately 10 minutes (excluding the download of CIFAR images at the first execution).--- Mistake found ---
We noticed that the calculation results using the following conditions were incorrect in the paper: modelname = 'efnetb0'
(backbone model was EfficientNet) with witype = 'QIWI'
(type of weight imprinting was Qi's method). Therefore, a part of Figure 2(b)-(ii) and the relevant text should change slightly. However, the abstract and conclusion of the paper (all but a small part in results) do not change at all. This supplementary material also contains a revised manuscript file (NeurIPS2022_DONE_220526_revised_supplement.pdf
, the changes are highlighted).
numpy(1.20.3)
/ tensorflow-gpu(2.7.0)
/ opencv-python(4.5.5.62)
To install requirements (probably no problem even if the package versions are different):
pip install -r requirements.txt
pip install -r requirements.txt
For example, we have confirmed that
code_done_simple.py
can be executed in Anaconda by creating a new environment withconda create -n test_env python=3.9.12
and installing the requirements with the above command.
We have also prepared the following two requirements files:
requirements_simple_jupyter.txt
: for running code_done_simple.ipynb
.requirements_complete.txt
: for runnnig all the code files including code_done_complete.ipynb
.Run this command:
python code_done_simple.py
python code_done_simple.py
By this command, you get CIFAR images, pre-trained backbone model, new-class-added model with training by DONE, and evaluation results..
Executing code_done_simple.py
should output the following results:
Input image | Model | Top 1 answer | Top 1 softmax value |
---|---|---|---|
baby (new class) | Original model | nipple | 11.7% |
baby (new class) | Added model | baby | 99.9% (in 1003 classes) |
lion (original class) | Original model | lion | 89.5% |
lion (original class) | Added model | lion | 89.5% (the same) |
See
code_done_complete.ipynb
for a complete reproduction of the results in the paper.
The code will be released later as OSS, but we are still in the process of applying for permission at our institution, and thus please treat it as confidential material only for peer review now.