Stereolabs ZED - YOLO 3D
This package lets you use YOLO (v2, v3 or v4), the deep learning object detector using the ZED stereo camera in Python 3 or C++.
The setup detailed setup instructions are available in the Darknet repository.
This is a brief explanation on how to enable the ZED camera support.
- Windows 7 10, Ubuntu LTS, L4T
- ZED SDK and its dependencies (CUDA)
- Darknet : https://github.com/AlexeyAB/darknet and its dependencies (cuDNN and OpenCV)
Preparing Darknet installation
In order to get the best performance, cuDNN should be install before compiling darknet. Heads over to this TensorFlow documentation article which explains how to setup both CUDA and cuDNN on Ubuntu and Windows.
OpenCV binaries can be downloaded and install from opencv.org.
Alternatively, on Ubuntu :
sudo apt install pkg-config libopencv-dev
On Windows, download and install CMAKE using the binary available here.
On Ubuntu, cmake can be installed using the package manager, i.e :
sudo apt install cmake
However the default version of cmake might be too old, it can easily be updated using the script (located in this repository):
sudo bash cmake_apt_update.sh
Download and compile darknet, following the instructions:
ZED Support Using CMake (recommended)
If the ZED SDK is installed, CMake will automatically detect it and compile with the ZED support. During the CMake configuration, a message will confirm that the ZED SDK was found.
... -- A library with BLAS API found. -- ZED SDK enabled -- Found OpenMP_C: -fopenmp (found version "4.5") ...
ZED support Using Makefile
To enable the ZED support in YOLO using the Makefile, simply enable
ZED_CAMERA, it's also recommended to enable
CUDNN for improved performances.
2. Launching the sample
Download the yolo weights, yolov4 for instance, and put them in the local folder.
./uselib data/coco.names cfg/yolov4.cfg yolov4.weights zed_camera
SVO files are also supported :
./uselib data/coco.names cfg/yolov4.cfg yolov4.weights /path/to/svo/file.svo
How to use YOLO 3D in Python
The native support is currently only in C++.
For the Python version please refer to instructions in zed_python_sample
A DockerFile is provided in the docker folder
The original YOLO 3D C++ sources are available in the legacy branch
If you need assistance go to our Community site at https://community.stereolabs.com/