Skip to content

metodj/AnytimeClassification

Repository files navigation

Anytime Classification

Code for paper Towards Anytime Classification in Early-Exit Architectures by Enforcing Conditional Monotonicity.

Code for pretrained models is taken from the following repos:

Main Dependencies

  • Python = 3.6
  • Pytorch = 1.7

Setup

  1. Clone or download this repo. cd yourself to it's root directory.
  2. Create and activate python conda enviromnent: conda create --name anytime-class python=3.8
  3. Activate conda environment: conda activate anytime-class
  4. Install dependencies, using pip install -r requirements.txt

Code

  • Main (anytime) functions are implemented in anytime_predictors.py
  • Figures from the main paper are reproduced in paper_plots.ipynb. For code to run, the following steps need to be performed:
    • Download ImageNet validation dataset and store it in data\ImageNet\val
    • Download pretrained models (e.g., MSDNet) from here and store them in pretrained_models directory. Alternatively, use repos of pretrained models to train those from scratch

Acknowledgements

The Robert Bosch GmbH is acknowledged for financial support.

About

Code for "Towards Anytime Classification" paper (NeurIPS 2023)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors