- DeepStream 2.0
Download and install DeepStream 2.0
Install GStreamer pre-requisites using:
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
Update path to TensorRT and DeepStream install directories in makefiles of both gst-yoloplugin and the yoloplugin_lib
TENSORT_INSTALL_DIR:= /path/to/TensorRT-4.0/
DEEPSTREAM_INTALL_DIR:= /path/to/DeepStream_Release_2.0/
Following steps describe how to run the YOLO plugin in the deepstream app
-
The section below in the config file corresponds to ds-example(yolo) plugin in deepstream. The config file is located at
config/deepstream-app_yolo_config.txt
. Make any changes to this section if required.[ds-example] enable=1 processing-width=1280 processing-height=720 full-frame=1 unique-id=15 gpu-id=0
-
Update path to the video file source in the URI field under
[source0]
group of the config file
uri=file://relative/path/to/source/video
-
Go to the
sources/gst-yoloplugin/yoloplugin_lib/data
folder and add your yolo .cfg and .weights file.For yolo v2,
Download the config file from the darknet repo located athttps://github.com/pjreddie/darknet/blob/master/cfg/yolov2.cfg
Download the weights file by running the commandwget https://pjreddie.com/media/files/yolov2.weights
For yolo v3,
Download the config file from the darknet repo located athttps://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg
Download the weights file by running the commandwget https://pjreddie.com/media/files/yolov3.weights
-
Set the right macro in the
network_config.h
file to choose a model architecture -
Update the paths of the .cfg and weights file and other network params in
network_config.cpp
file if required. -
Add absolute paths of images to be used for calibration in the
calibrationImages.txt
file within thesources/gst-yoloplugin/yoloplugin_lib/data
folder. -
Go the
sources/gst-yoloplugin
directory and run
make && sudo make install
-
Go to the root folder of this repo and run
deepstream-app -c config/deepstream-app_yolo_config.txt