Coder Social home page Coder Social logo

Revisiting Distillation and Incremental Classifier Learning

Accepted at ACCV18. Pre-print is available at : http://arxiv.org/abs/1807.02802

Citing the paper :

@inproceedings{javed2018revisiting,
  title={Revisiting distillation and incremental classifier learning},
  author={Javed, Khurram and Shafait, Faisal},
  booktitle={Asian Conference on Computer Vision},
  pages={3--17},
  year={2018},
  organization={Springer}
}

Interface to Run Experiments

usage: runExperiment.py [-h] [--batch-size N] [--lr LR]
                        [--schedule SCHEDULE [SCHEDULE ...]]
                        [--gammas GAMMAS [GAMMAS ...]] [--momentum M]
                        [--no-cuda] [--random-init] [--no-distill]
                        [--distill-only-exemplars] [--no-random]
                        [--no-herding] [--seeds SEEDS [SEEDS ...]]
                        [--log-interval N] [--model-type MODEL_TYPE]
                        [--name NAME] [--outputDir OUTPUTDIR] [--upsampling]
                        [--pp] [--distill-step] [--hs]
                        [--unstructured-size UNSTRUCTURED_SIZE]
                        [--alphas ALPHAS [ALPHAS ...]] [--decay DECAY]
                        [--alpha-increment ALPHA_INCREMENT] [--l1 L1]
                        [--step-size STEP_SIZE] [--T T]
                        [--memory-budgets MEMORY_BUDGETS [MEMORY_BUDGETS ...]]
                        [--epochs-class EPOCHS_CLASS] [--dataset DATASET]
                        [--lwf] [--no-nl] [--rand] [--adversarial]

Default configurations can be used to run with same parameters as used by iCaRL. Simply run:

python run_experiment.py

Dependencies

  1. Pytorch 0.3.0.post4
  2. Python 3.6
  3. torchnet (https://github.com/pytorch/tnt)
  4. tqdm (pip install tqdm)

Please see requirements.txt for a complete list.

Setting up enviroment

The easiest way to install the required dependencies is to use conda package manager.

  1. Install Anaconda with Python 3
  2. Install pytorch and torchnet
  3. Install tqdm (pip install progressbar2) Done.

Branches

  1. iCaRL + Dynamic Threshold Moving is implemented in "Autoencoders" branch.

=======

Selected Results

Removing Bias by Dynamic Threshold Moving

alt text Result of threshold moving with T = 2 and 5. Note that different scale is used for the y axis, and using higher temperature in general results in less bias.

Confusion Matrix with and without Dynamic Threshold Moving

alt text Confusion matrix of results of the classifier with (right) and without (left) threshold moving with T=2. We removed the first five classes of MNIST from the train set and only distilled the knowledge of these classes using a network trained on all classes. Without threshold moving the model struggled on the older classes. With threshold moving, however, not only was it able to classify unseen classes nearly perfectly, but also its performance did not deteriorate on new classes

FAQs

How do I implement more models?

A. Add the model in model/ModelFactory and make sure the forward method of the model satisfy the API of model/resnet32.py

How do I add a new dataset?

A. Add the new dataset in DatasetFactory and specify the details in the dataHandler/dataset.py class. Make sure the dataset implements all the variables set by other datasets.

References

[1] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015

[2] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. Icarl: Incremental classifier and representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2001–2010, 2017.

[3] Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017.

incremental-learning's Projects

agem icon agem

Official implementation of the Averaged Gradient Episodic Memory (A-GEM) in Tensorflow

continual-learning icon continual-learning

PyTorch implementation of various methods for continual learning (XdG, EWC, online EWC, SI, LwF, DGR, DGR+distill, RtF, iCaRL).

distillation icon distillation

Keras + tensorflow experiments with knowledge distillation on EMNIST dataset

ewc icon ewc

TensorFlow implementation of Elastic Weight Consolidation

iccv2019-inc icon iccv2019-inc

ICCV 2019 Overcoming Catastrophic Forgetting with Unlabeled Data in the Wild

il-semsegm icon il-semsegm

Code for the paper "Incremental Learning Techniques for Semantic Segmentation", Michieli U. and Zanuttigh P., ICCVW, 2019

incremental-learning icon incremental-learning

Pytorch implementation of ACCV18 paper "Revisiting Distillation and Incremental Classifier Learning."

kdtf icon kdtf

Knowledge Distillation using Tensorflow

keras-imprinting icon keras-imprinting

论文Low-Shot Learning with Imprinted Weights 的keras 版简要实现;

mer icon mer

Fork of the GEM project (https://github.com/facebookresearch/GradientEpisodicMemory) including Meta-Experience Replay (MER) methods from the ICLR 2019 paper (https://openreview.net/pdf?id=B1gTShAct7)

owm icon owm

Code for Continual Learning of Context-dependent Processing in Neural Networks

piggyback icon piggyback

Code for Piggyback: Adapting a Single Network to Multiple Tasks by Learning to Mask Weights

structure_knowledge_distillation icon structure_knowledge_distillation

The official code for the paper 'Structured Knowledge Distillation for Semantic Segmentation'. (CVPR 2019 ORAL) and extension to other tasks.

supportnet icon supportnet

SupportNet: solving catastrophic forgetting in class incremental learning with support data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.