DeepNCM: Deep Nearest Class Mean Classifiers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
figs
tf
.gitignore
.gitmodules
LICENSE
README.md
cifar10_deepncm.py
cifar10_download_and_extract.py
deepncm_do.sh
deepncm_experiments.txt
resnet_deepncm_run_loop.py
resnet_deepx.py
resnet_model.py
resnet_ncm.py

README.md

DeepNCM: Deep Nearest Class Means

This software provides DeepNCM models based on the TensFlow Models Official ResNet implementation.

Citation

When using this code, or the ideas of DeepNCM, please cite the following paper (openreview)

@INPROCEEDINGS{guerriero18openreview,
 author = {Samantha Guerriero and Barbara Caputo and Thomas Mensink},
 title = {DeepNCM: Deep Nearest Class Mean Classifiers},
 booktitle = {International Conference on Learning Representations - Workshop (ICLRw)},
 year = {2018},
 }

Dependencies / Notes

DeepNCM is written in python, and follows (as closely as possible) the Tensorflow official ResNet implementation.

  • The code is developed with Python 3.6 and TensorFlow 1.6.0 (with GPU support) on Linux
    • Reported to work also with Python 2.7. For Python 2.7 change resnet_ncm.py, line 113 ncm['method'].casefold() to ncm['method'].lower()
  • Requires TensorFlow Models
    • Included as submodule, so to get the required version, after cloning/getting DeepNCM do
      git submodule update --init
  • For reasons of my convenience, model_dir and data_dir are required to be model_dir = /tmp/deepncm/cifar10_data data_dir = /tmp/deepncm/cifar10_deepncm -- errors might pop-up when other directories are used.
  • The experiments (deepncm_do.sh) uses GNU Parallel for parallelisation (Tange, GNU Parallel - The Command-Line Power Tool, 2011)

Experimental overview on Cifar10/Cifar100

Below are the full experiments, using two learning rates, different condensation (omreset) and decay rates. DeepNCM Experimental Overiew Comparison of the following methods: Softmax (sof), Online Means (onl), Mean Condensation (con), Decay Mean (dec), in the legend the maximum Top-1 accuracy is reported.

The code for the figures above can be found in figs/deepncm_overview.ipynb

Future research (ideas)

  • Current optimiser and learning-rate schedule is optimised for softmax learning.
  • Gradient clipping is now set to (-1.0,1.0), this is not tuned
  • Experiments on larger datasets, e.g., ImageNet
  • Class incremental / Open Set learning

Please contact me when you're interested to collaborate on this!

Copyright (2017-2018)

Thomas Mensink, University of Amsterdam, thomas.mensink@uva.nl
Some preliminary source code is written by Samantha Guerriero and Thomas Mensink.