Installation of SDK on Linux Ubuntu
This section describes how to install Metavision SDK on Linux Ubuntu 18.04 and 20.04 64-bit.
Metavision SDK comes as pre-built Ubuntu packages of our whole software offer including the Prophesee Camera Plugins. It does not require compilation and installation of OpenEB. The quickest way to begin working with Prophesee technology is to install Metavision Studio only. Follow the guide on the Installation of Studio To install the open source project, OpenEB, 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 18.04 or 20.04 64-bit
Architecture: amd64 (a.k.a. x64)
Graphic card: must support OpenGL 3.0 minimum
CPU: must support AVX2
For the Windows installation, 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.
First of all, 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:
on Ubuntu 18.04:sudo apt remove 'prophesee-*' 'metavision-*' --purge
on Ubuntu 20.04:sudo apt remove '~nprophesee-.*' '~nmetavision-.*' --purge
Removing the old version of Metavision SDK is mandatory even for patch upgrade (e.g. from 2.3.1 to 2.3.2)
Install additional packages required to manage videos and diagnose OpenGL drivers:
sudo apt -y install libcanberra-gtk-module mesa-utils ffmpeg
For the Python API, you will need Python and some additional libraries. If Python is not available on your system, install it (we support Python 3.6 and 3.7 on Ubuntu 18.04 and Python 3.7 and 3.8 on Ubuntu 20.04). Then install some extra libraries:
sudo apt -y install python3-pip python3-tk sudo apt -y install python3.X-dev # where X is 6, 7 or 8 depending on your Python version (3.6, 3.7 or 3.8) python3 -m pip install pip --upgrade python3 -m pip install "opencv-python>=184.108.40.206" "sk-video==1.1.10" "fire==0.4.0" "numpy<=1.21" pandas scipy h5py 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 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
To install Metavision SDK, you must configure the APT software repositories 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 new
metavision.listfile that you have been provided during the sign-up to the folder
/etc/apt/sources.list.dsudo cp metavision.list /etc/apt/sources.list.d
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 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 18.04 or 20.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 try to compile OpenEB, our open-source project.
For a given minor release of Metavision Intelligence (e.g. 3.0), all the patch versions (e.g. 3.0.0 and 3.0.1) can be installed from our APT repository and by default the most recent one will be installed. To install a specific patch version (here 3.0.0), you have to pin this version in the APT server configuration:
sudo sh -c "echo 'Package: metavision-* Pin: version 3.0.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 you want to install an old minor version of Metavision Intelligence (e.g. 3.0 whereas current is 3.1),
you need to use the APT
.list file corresponding to that version. If you don’t have it, you will have to go
through the sign-up page of the given version (links for previous minor versions:
3.0). Then you should follow the
installation guide of this version.
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.6 on Ubuntu 18.04 and 3.8 on Ubuntu 20.04). If you want to use another supported Python version (namely 3.7), you should install an extra package:
sudo apt -y install metavision-sdk-python3.7
You are now ready to use Metavision Intelligence. 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 Tutorial or looking at a Code Sample.
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, install CUDA (10.2 or 11.1) 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 requires PyTorch 1.8.2 LTS. This version was deprecated by PyTorch team but can still be downloaded in the Previous Versions page of pytorch.org (in future releases of Metavision ML, more recent version of PyTorch will be leveraged). Retrieve and execute the pip command for the installation:
Metavision ML has additional Python requirements that can be installed with pip:
python3 -m pip install numba llvmlite profilehooks "pytorch_lightning==1.5.10" python3 -m pip install "pycocotools==2.0.4" "tqdm==4.63.0" python3 -m pip install "torchmetrics==0.7.2" "seaborn==0.11.2" "kornia==0.6.1"
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.10.0+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