Flow File Visualization

This Python script allows you to Visualize the content of a flow file produced by the Optical Flow Inference Pipeline.

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

Expected Output

The script combines an event file and an optical flow file to produce a visualization that can be saved as a video.

An example of the output is shown below:



Setup & requirements

To run the script, you will need:

Note

Since HDF5 tensor file contains preprocessed features, you need to be sure that the same preprocessing method is used for the flow model and the HDF5 file. For instance, our trained flow model uses event_cube method, so if you want to use HDF5 tensor files as input, they need to be processed with event_cube as well.

How to start

To start the script on a RAW file:

python flow_viz.py /path/to/event_file.raw event_file_flow.hdf5

To find the full list of options, run:

python flow_viz.py -h