Skip to content
Repo for learning event representations
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
log added log directory Jul 31, 2019
resources youtube_preview Aug 21, 2019
utils Add files via upload Sep 4, 2019
.gitignore added log directory Jul 31, 2019
LICENSE Create LICENSE Aug 5, 2019
README.md Update README.md Aug 21, 2019
main.py bug fix Aug 2, 2019
requirements.txt first commit Jul 31, 2019
testing.py first commit Jul 31, 2019

README.md

Event Representation Learning

Event Representation Learning

This repository contains learning code that implements event representation learning as described in Gehrig et al. ICCV'19.

If you use this code in an academic context, please cite the following work:

Daniel Gehrig, Antonio Loquercio, Konstantinos G. Derpanis, Davide Scaramuzza, "End-to-End Learning of Representations for Asynchronous Event-Based Data", The International Conference on Computer Vision (ICCV), 2019

@InProceedings{Gehrig_2019_ICCV,
  author = {Daniel Gehrig and Antonio Loquercio and Konstantinos G. Derpanis and Davide Scaramuzza},
  title = {End-to-End Learning of Representations for Asynchronous Event-Based Data},
  booktitle = {Int. Conf. Comput. Vis. (ICCV)},
  month = {October},
  year = {2019}
}

Requirements

  • Python 3.7
  • virtualenv
  • cuda 10

Dependencies

Create a virtual environment with python3.7 and activate it

virtualenv venv -p /usr/local/bin/python3.7
source venv/bin/activate

Install all dependencies by calling

pip install -r requirements.txt

Training

Before training, download the N-Caltech101 dataset and unzip it

wget http://rpg.ifi.uzh.ch/datasets/gehrig_et_al_iccv19/N-Caltech101.zip 
unzip N-Caltech101.zip

Then start training by calling

python main.py --validation_dataset N-Caltech101/validation/ --training_dataset N-Caltech101/training/ --log_dir log/temp --device cuda:0

Here, validation_dataset and training_dataset should point to the folders where the training and validation set are stored. log_dir controls logging and device controls on which device you want to train. Checkpoints and models with lowest validation loss will be saved in the root folder of log_dir.

Additional parameters

  • --num_worker how many threads to use to load data
  • --pin_memory wether to pin memory or not
  • --num_epochs number of epochs to train
  • --save_every_n_epochs save a checkpoint every n epochs.
  • --batch_size batch size for training

Visualization

Training can be visualized by calling tensorboard

tensorboard --logdir log/temp

Training and validation losses as well as classification accuracies are plotted. In addition, the learnt representations are visualized. The training and validation curves should look something like this:
alt_text

Testing

Once trained, the models can be tested by calling the following script:

python testing.py --test N-Caltech101/testing/ --device cuda:0

Which will print the test score after iteration through the whole dataset.

You can’t perform that action at this time.