EV-utils is a collection of utilities for working event based data inspired by the event_utils library. This library aims at being camera independent (yet also supporting specific camera vendors) with minimal dependencies but also performent. The library is divided into severla modules some of which can be used without installing all the dependencies. These include:
└── io
├── reader
└── writer
└── types
└── vis
├── histogram
└── reconstructor
git clone --recurse-submodules git@git.ee.ethz.ch:pbl/research/event-camera/evutils.git
cd evutils
pip install .
pip install -e . # Use this to install an editable version of the packageEvent augmentations
Wrappers for various dataset loaders
The io module provides methods for reading and writing events into various event formats. It provides a simple .read() and .write() interface as well as more advanced interfaces using iterators and slicing.
from evutils.io.reader import EventReader_RAW
ev_file = EventReader_RAW("raw_file.raw", delta_t=10e3)
events = ev_file.read()Various utility functions
Generating random events and adding noise to event recordings
This provides several standard types for representing Events in numpy arrays
The vis moduels provides several methods for visualizing the events (for example as histograms), but also provides a streamlined interface for more complex visualization techneques, such as using the E2Vid reconstructor.
You need to download the pretrained weights:
wget "http://rpg.ifi.uzh.ch/data/E2VID/models/E2VID_lightweight.pth.tar" -O models/E2VID_lightweight.pth.tarfrom evutils.vis.reconstructor import RPG_Reconstructor
reconstructor = RPG_Reconstructor(1280, 720)
img = reconstructor.gen_frame(events)You can run tests on using the pytest utility:
pytest -sThanks to all the contributors for supporting this project:
- Elia Franc
- Jakub Mandula