Adaptive Rate Events Splitter using Python
The sample metavision_adaptive_rate_events_splitter.py
shows how to use a
metavision_core.event_io.AdaptiveRateEventsIterator
to slice
a stream of events.
This approach is an alternative to fixed delta_t (where events are gathered over a fixed time window)
or fixed N events (where a constant number of events are gathered). Here, the number of events per slice
(as well as the slice duration) is adaptive and depends on the content of the events stream.
It will generate a sequence of reasonably sharp event frames. Those could be used in a variable duration processing pipeline (for example detection and tracking, or optical flow computation). We could also consider dropping some of the frames to cope with limited computational budget (in the case of detection for example).
Expected Output
The sample visualizes the sequence of output event frames along with some statistics, and offers the possibility to save a video.
How to start
To start the sample based on recorded data, provide the full path to a RAW file (here, we use the file from Metavision Datasets):
Linux
python3 metavision_adaptive_rate_events_splitter.py spinner.raw
Windows
python metavision_adaptive_rate_events_splitter.py spinner.raw
To check for additional options:
Linux
python3 metavision_adaptive_rate_events_splitter.py -h
Windows
python metavision_adaptive_rate_events_splitter.py -h