deepstream-yolo-app installation error on Jetson

I’m testing this deepstream-yolo-app (source = https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/yolo).

I got this error :
jetson-nano@jetsonnano-desktop:~/deepstream_reference_apps/yolo/apps/deepstream-yolo/build$ sudo make && sudo make install

Scanning dependencies of target deepstream-yolo-app
[ 50%] Building CXX object CMakeFiles/deepstream-yolo-app.dir/deepstream-yolo-app.cpp.o
/home/jetson-nano/deepstream_reference_apps/yolo/apps/deepstream-yolo/deepstream-yolo-app.cpp: In function ‘GstPadProbeReturn osd_sink_pad_buffer_probe(GstPad*, GstPadProbeInfo*, gpointer)’:
/home/jetson-nano/deepstream_reference_apps/yolo/apps/deepstream-yolo/deepstream-yolo-app.cpp:52:3: error: ‘NvDsObjectParams’ was not declared in this scope
NvDsObjectParams *obj_meta = NULL;
^~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
CMakeFiles/deepstream-yolo-app.dir/build.make:62: recipe for target ‘CMakeFiles/deepstream-yolo-app.dir/deepstream-yolo-app.cpp.o’ failed
make[2]: *** [CMakeFiles/deepstream-yolo-app.dir/deepstream-yolo-app.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/deepstream-yolo-app.dir/all’ failed
make[1]: *** [CMakeFiles/deepstream-yolo-app.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2

Can anyone help me fix this ??

Moving to DeepStream SDK forum for deepstream-yolo-app on Nano issue.

Just to double confirm that you’re using JetPack 4.2.1 with DeepStream SDK 4.0, right?

Yes

I have the same problem. Can someone help? JetPack 4.2.1 with DeepStream SDK 4.0 (Jetson Xavier)

Hi,
I’m using JetPack 4.2.1 with DeepStream SDK 4.0 on a Jetson Nano. and I have the same problem testing deepstream-yolo-app .

For YOLO please use the objectDetector_Yolo example from the DeepStream 4.0. There’s a short How-To on using custom YOLO model in DeepStream.

Hi @cshah,

Thank you for your answer. I followed the How-To document and the README file for the objectDetector_Yolo example and I get this errors:

hmaied@g-jetsonnano-01:/opt/nvidia/deepstream/deepstream-4.0/sources/objectDetector_Yolo$ deepstream-app -c deepstream_app_config_yoloV3.txt
** WARN: <parse_tiled_display:1018>: Unknown key 'gpu-id' for group [tiled-display]
** WARN: <parse_tiled_display:1018>: Unknown key 'nvbuf-memory-type' for group [tiled-display]
** WARN: <parse_source:359>: Unknown key 'gpu-id' for group [source0]
** WARN: <parse_source:359>: Unknown key 'cudadec-memtype' for group [source0]
** WARN: <parse_sink:962>: Unknown key 'gpu-id' for group [sink0]
** WARN: <parse_sink:962>: Unknown key 'nvbuf-memory-type' for group [sink0]
** WARN: <parse_osd:599>: Unknown key 'gpu-id' for group [osd]
** WARN: <parse_osd:599>: Unknown key 'nvbuf-memory-type' for group [osd]
** WARN: <parse_streammux:418>: Unknown key 'gpu-id' for group [streammux]
** WARN: <parse_streammux:418>: Unknown key 'enable-padding' for group [streammux]
** WARN: <parse_streammux:418>: Unknown key 'nvbuf-memory-type' for group [streammux]
** WARN: <parse_gie:783>: Unknown key 'gpu-id' for group [primary-gie]
** WARN: <parse_gie:783>: Unknown key 'nvbuf-memory-type' for group [primary-gie]
** ERROR: <create_osd_bin:66>: Failed to create 'nvosd0'
** ERROR: <create_osd_bin:102>: create_osd_bin failed
** ERROR: <create_processing_instance:688>: create_processing_instance failed
** ERROR: <create_pipeline:985>: create_pipeline failed
** ERROR: <main:593>: Failed to create pipeline
Quitting
App run failed

Did you have any idea what is going wrong ?

thx,

The github yolo https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/yolo was working on DS3 and has not been updated to DS4.0.
Instead of that, All yolo sample code has been added into DS4 SDK. so please download DeepStreamSDK tar ball and uncompress that to get the source code. Follow README in that directory to build.

Thank you for your answer, this errors are relatives to the DS4 SDK example. I Followed the README instruction to build the project.

Regarding Yolo, make sure you build libnvdsinfer_custom_impl_Yolo.so successfully.
I didn’t tried Nano. since osd failed in your side, you may need check DeepStreamSDK4 installed correctly and DS3 removed. Have you tried other samples(FasterRCNN/SSD).
you may need $gst-inspect-1.0 nvdsosd to check osd plugin installed.

I checked libnvdsinfer_custom_impl_Yolo.so is build successfully, DS4 and osd plugin are installed correctly. here are my config files : config_infer_primary_yoloV3.txt

[property]
gpu-id=0
net-scale-factor=1
#0=RGB, 1=BGR
model-color-format=0
custom-network-config=/home/hmaied/Projet/deepstream_reference_apps/yolo/data/yolov3.cfg
model-file=/home/hmaied/Projet/deepstream_reference_apps/yolo/data/yolov3.weights
#model-engine-file=model_b1_int8.engine
labelfile-path=/home/hmaied/Projet/deepstream_reference_apps/yolo/data/labels.txt
int8-calib-file=yolov3-calibration.table.trt5.1
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=1
num-detected-classes=80
gie-unique-id=1
is-classifier=0
maintain-aspect-ratio=1
parse-bbox-func-name=NvDsInferParseCustomYoloV3
custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so

deepstream_app_config_yoloV3.txt :

[tiled-display]
enable=1
rows=1
columns=1
width=1280
height=720
gpu-id=0
#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform
#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory, applicable for Tesla
#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory, applicable for Tesla
#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory, applicable for Tesla
#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetson
nvbuf-memory-type=0

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=file:"http://sc18e62d.rd.francetelecom.fr/img/video.mpeg"
num-sources=1
gpu-id=0
# (0): memtype_device   - Memory type Device
# (1): memtype_pinned   - Memory type Host Pinned
# (2): memtype_unified  - Memory type Unified
cudadec-memtype=0

[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0

[osd]
enable=1
gpu-id=0
border-width=1
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
##Boolean property to inform muxer that sources are live
live-source=0
batch-size=1
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=40000
## Set muxer output width and height
width=1920
height=1080
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0

# config-file property is mandatory for any gie section.
# Other properties are optional and if set will override the properties set in
# the infer config file.
[primary-gie]
enable=1
gpu-id=0
#model-engine-file=model_b1_int8.engine
labelfile-path=/home/hmaied/Projet/deepstream_reference_apps/yolo/data/labels.txt
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
#interval=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV3.txt

[tests]
file-loop=0

thx,

I don’t think this is yolo sample issues since the log didn’t start gst nvinfer plugin yet.
you may need try default deepstream-app on default config files to isolate the issue.
e.g.
deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt deepstream-app -c source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt

for [source0]=>uri, I guess you just put as an example. If you really use http I’m not sure this has been tested. you may try a local video first.

I tested deepstream-app and it works. However, I still have the initial error (‘NvDsObjectParams’ was not declared in this scope) with deepstream-yolo-app.

I have also a problem installing gst-yoloplugin-tegra :
~/deepstream_reference_apps/yolo/plugins/gst-yoloplugin-tegra/build$ make && sudo make install
[ 84%] Built target yolo-lib
Scanning dependencies of target gstnvyolo
[ 92%] Building CXX object CMakeFiles/gstnvyolo.dir/gstyoloplugin.cpp.o
In file included from /home/retd/deepstream_reference_apps/yolo/plugins/gst-yoloplugin-tegra/gstyoloplugin.cpp:26:0:
/home/retd/deepstream_reference_apps/yolo/plugins/gst-yoloplugin-tegra/gstyoloplugin.h:35:10: fatal error: nvbuf_utils.h: No such file or directory
#include “nvbuf_utils.h”

Is this 2 issues related ??

Yes, as I said, deepstream_reference_apps/yolo is not maintained anymore since yolo has been included into DS4.0 SDK. In this case, you don’t need build gst-yoloplugin anymore(I don’t think you can still compile that code. If so, there must be some DS3 libs/headers not cleaned). please download DS4.0SDK tar package and uncompress to check opt/nvidia/deepstream/deepstream-4.0/sources/objectDetector_Yolo/. Then follow README to run yolo sample.