GithubHelp home page GithubHelp logo

joseastorgat / rpg_event_representation_learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uzh-rpg/rpg_event_representation_learning

0.0 1.0 0.0 667 KB

Repo for learning event representations

License: MIT License

Python 100.00%

rpg_event_representation_learning's Introduction

Event Representation Learning

Event Representation Learning

This repository contains learning code that implements event representation learning as described in Gehrig et al. ICCV'19. The paper can be found here

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.

The N-Cars dataset can be downloaded here.

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.

rpg_event_representation_learning's People

Contributors

danielgehrig18 avatar

Watchers

 avatar

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.