Adaptive Rate Events Splitter using Python

The sample 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).

The source code of this sample can be found in <install-prefix>/share/metavision/sdk/core/python_samples/metavision_adaptive_rate when installing Metavision SDK from installer or packages. For other deployment methods, check the page Path of Samples.

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):


python3 spinner.raw


python spinner.raw

To check for additional options:


python3 -h


python -h