Installation of SDK on Linux Ubuntu
This section describes how to install Metavision SDK on Linux Ubuntu 20.04 and 22.04 64-bit.
Metavision SDK comes as pre-built Ubuntu packages of our whole software offer including the Prophesee Camera Plugin. It does not require compilation and installation of our open source project OpenEB. Though if you want to work from source (for example to compile on other platforms than the one we support), you should use OpenEB and follow the specific guide on the Installation of OpenEB.
Table of Contents
Please note the base system requirements for using Metavision:
Operating system: Linux Ubuntu 20.04 or 22.04 64-bit
Architecture: amd64 (a.k.a. x64)
Graphic card: must support OpenGL 3.0 minimum
CPU: must support AVX2
For Windows, see the page SDK installation on Windows. For other operating systems and architectures, you must clone our open source project OpenEB and contact us if you run into compatibility issues.
Whether you are installing the SDK for the first time or are currently using a previous version,
to install Metavision SDK on Linux, you need our APT repository configuration file
If you are upgrading Metavision from a previous version, you should first read carefully the Release Notes as some changes may impact your usage of our SDK (e.g. API updates) and cameras (e.g. firmware update might be necessary).
Then, you will need to remove the previously installed Prophesee software:
sudo apt remove '~nprophesee-.*' '~nmetavision-.*' --purge
The “apt upgrade” mechanism is currently not supported by our SDK. Hence, removing the old version of Metavision SDK is mandatory even for patch upgrade (e.g. from x.y.0 to x.y.1)
Install additional packages required to manage videos and diagnose OpenGL drivers:
sudo apt -y install libcanberra-gtk-module mesa-utils ffmpeg
To execute our Python Samples and use the Python API, you will need Python and some additional libraries. We support Python 3.8 and 3.9 on Ubuntu 20.04 and Python 3.9 and 3.10 on Ubuntu 22.04. If Python is not available on your system, install it:
sudo apt -y install python3-pip sudo apt -y install python3.X-dev # where X is 8, 9 or 10 depending on your Python version (3.8, 3.9 or 3.10)
Then install some extra libraries (note that you can skip this step if you don’t plan to use our Python samples/API and are willing to use Metavision Studio only for now):
python3 -m pip install pip --upgrade python3 -m pip install "opencv-python==220.127.116.11" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" "h5py==3.7.0" pandas scipy python3 -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5"
You can use anaconda to install Python and
conda to manage your Python packages, but be sure to use a Python version that we support.
You will need to adapt the library installation steps accordingly and use
conda whenever we use
In addition, check that conda
/usr/lib/python3/dist-packages/. If not, add it. For example with
sys.path.append() method of python module
import sys print(sys.path) # Add /usr/lib/python3/dist-packages/ to PYTHONPATH if the output of print(sys.path) does not mention it. sys.path.append("/usr/lib/python3/dist-packages/")
In this documentation, we chose to use pip as a package manager. We recommend using it with virtualenv to avoid conflicts with other installed Python packages.
To compile the C++ code samples, you need to install
CMake and some libraries:
sudo apt -y install cmake libboost-program-options-dev libeigen3-dev libprotobuf-dev protobuf-compiler
Start by configuring the APT software repository of your system:
First, clean your sources list and preferences directories from potential earlier installation of Prophesee software:
remove any prophesee file (e.g.
designer.list) from the folder
/etc/apt/sources.list.dcd /etc/apt/sources.list.d sudo rm prophesee.list essentials.list metavision.list designer.list
Remove any Prophesee file (e.g.
prophesee) from the folder
/etc/apt/preferences.dsudo rm /etc/apt/preferences.d/prophesee
Remove any Prophesee Server listed in the file
Then, add Prophesee’s servers to the list of APT repositories by copying the
metavision.listfile downloaded in the previous section to the folder
/etc/apt/sources.list.dsudo cp metavision.list /etc/apt/sources.list.d
If you are on Ubuntu 20, you need to add an extra APT repository to retrieve OGRE dependency during SDK install:sudo add-apt-repository -y ppa:s-schmeisser/ogre-1.12
Update the list of repositories and packages:sudo apt update
Now you are ready to install Metavision SDK:
sudo apt -y install metavision-sdk
If you are looking for a specific version of the SDK which is not the last one, in addition to downloading the proper .list file as mentioned in the Required Artifact section, check the Release Notes to know the exact version number to install and pin this version in the APT server configuration by launching this command:
sudo sh -c "echo 'Package: metavision-* Pin: version 4.1.0 Pin-Priority: 1001' > /etc/apt/preferences.d/prophesee"
And then update the list of repositories and install Metavision SDK:
sudo apt update sudo apt -y install metavision-sdk
If the above command returns the error E: unable to locate package metavision-sdk, it might mean that you did not properly install the APT server list. More probably, you tried to install Metavision SDK on a platform that we don’t support. In that case, ensure that your OS is Ubuntu 20.04 or 22.04 on amd64/x64. For example, if you are trying to install on a NVidia Jetson or a Raspberry Pi, you will get this error as both are not amd64-based but arm-based. If you want to work on a non-supported platform, you should compile OpenEB, our open-source project.
Regarding our Python API, the previous command installs the Python bindings of our C++ libraries for the default version of Python of your Ubuntu version (Python 3.8 on Ubuntu 20.04 and 3.10 on Ubuntu 22.04). If you want to use another supported Python version (namely 3.9), you should install an extra package:
sudo apt -y install metavision-sdk-python3.9
To use our HDF5 ECF codec plugin with some HDF5 tools (for example
you have to install our HDF5 plugin and may have to modify the
For Ubuntu 20.04:sudo apt install hdf5-plugin-ecf hdf5-plugin-ecf-dev export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/lib/x86_64-linux-gnu/hdf5/plugins
For Ubuntu 22.04:sudo apt install hdf5-plugin-ecf hdf5-plugin-ecf-dev export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins
You are now ready to use Metavision SDK. The best way to start getting familiar with the event-based technology is to open an event-based camera with Metavision Studio to begin data collection and visualization. You can choose to dive directly in the SDK by following a getting started guide or looking at a Code Sample.
If you want to use the Machine Learning modules, please follow the next section that describes the required additional dependencies.
Additional Dependencies for Machine Learning Module
To use Machine Learning features, you need to install some additional dependencies. If you have some Nvidia hardware with GPUs, you can optionally install CUDA (11.6 or 11.7) and cuDNN to leverage them with PyTorch and LibTorch. Make sure that you install a version of CUDA that is compatible with your GPUs by checking Nvidia compatibility page.
At the moment, we don’t support OpenCL and AMD GPUs.
Packages for Python
Metavision ML has additional Python requirements that can be installed with pip:
python3 -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning==1.8.6" "tqdm==4.63.0" "kornia==0.6.8" python3 -m pip install "llvmlite==0.39.1" "pycocotools==2.0.4" "seaborn==0.11.2" "torchmetrics==0.7.2" "pillow==9.3.0"
LibTorch for C++
To compile and run the neural network inference in a C++ pipeline, you need LibTorch (PyTorch’s C++ frontend)
Download the LibTorch version corresponding to your CUDA version (or take the CPU version if you don’t have CUDA):
Unzip the archive to a new folder LIBTORCH_DIR_PATH that you will reference when compiling the C++ inference sample. For example, for the CPU version:unzip libtorch-cxx11-abi-shared-with-deps-1.13.1+cpu.zip -d LIBTORCH_DIR_PATH
LibTorch is delivered with a copy of libgtest libraries. Those should be removed to avoid conflicts:rm LIBTORCH_DIR_PATH/libtorch/lib/libgtest.a rm LIBTORCH_DIR_PATH/libtorch/lib/libgtest_main.a
We also provide pre-trained models for inference in automotive applications. They can be downloaded during the sign-up. (if you are a Prophesee customer, retrieve the link to the model by accessing to your SDK version in the Knowledge Center Download section).