/multi-modal-early-exit

Code repository for submission

Primary LanguagePythonApache License 2.0Apache-2.0

Multimodal Adaptive Inference for Document Image Classification with Anytime Early Exiting

paper figure

Calibration effect on Ramps vs Gates

  • Gates gates figure

  • Ramps ramps figure

Installation

The scripts require python >= 3.8 to run. We will create a fresh virtualenvironment in which to install all required packages.

mkvirtualenv -p /usr/bin/python3 EE

Using poetry and the readily defined pyproject.toml, we will install all required packages

workon EE 
pip3 install poetry
poetry install

Next step, install those system libraries

sudo apt install tesseract-ocr
pip install -q datasets
pip install -q pytesseract
pip install git-lfs
pip install libtesseract-dev
pip install libleptonica-dev