Using Yolov3 with DeepStream SDK

Hello, i would like to use DeepStream SDK with the pretrained Yolov3 for object detection,tracking and counting .
I have GTX 1050 4GB i am a beginner working on this project for my graduation i didn’t know what to do exactly i tried to install the deepstream docker container found on : https://ngc.nvidia.com/catalog/containers/nvidia:deepstream
and followed the steps to build the objectDetector_Yolo but i have problems with some tensorRT libraries even though i have tensorRT-6.0.1.5 installed on my anaconda environment .Any help would be appreciated thank you !

Hi,
Could you be more specific? What steps you did? And what error are you facing?

Hi,

i followed : https://ngc.nvidia.com/catalog/containers/nvidia:deepstream
to pull deepstream container with : docker pull nvcr.io/nvidia/deepstream:5.0-dp-20.04-triton
then i run it with : docker run --gpus all -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.0 nvcr.io/nvidia/deepstream:5.0-dp-20.04-samples
after that i followed this tutorial to build yolov3 : https://www.deeplearning-blog.com/2020/02/03/how-to-detect-objects-with-nvidia-deepstream-4-0-and-yolo-in-5-minutes/
i have deepstream5.0 installed i executed the /.prebuild.sh from : /opt/nvidia/deepstream/deepstream-5.0/sources/objectDetector_Yolo
to download the yolo cfg and weights
then exported the CUDA_VER environment variable with : export CUDA_VER=10.1
then while building the deep stream YOLO inference plugin with : make -C nvdsinfer_custom_impl_Yolo
i got this error related with TensorRT : …/…/includes/nvdsinfer_custom_impl.h:128:10: fatal error: NvCaffeParser.h: No such file or directory
thank you !

Hi @bennaji_mo7amed,
Thanks! I think the commend in the http://nvcr.io/nvidia/deepstream:5.0-dp-20.04-triton is incorrect, it should be

$ docker run --gpus all -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.0 nvcr.io/nvidia/deepstream:5.0-dp-20.04-triton

instead of

$ docker run --gpus all -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.0 nvcr.io/nvidia/deepstream:5.0-dp-20.04-samples

Hi @bennaji_mo7amed
In https://ngc.nvidia.com/catalog/containers/nvidia:deepstream, it mentioned that user need to use the desired container tag in the command line below. So, you need to change it according to container you pulled.

Run the docker container (use the desired container tag in the command line below):

docker run --gpus all -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.0  nvcr.io/nvidia/deepstream:5.0-dp-20.04-samples

Hi thank you for your answer it really helped me !
now whenever i try to make inference with gstreamer i get this error :
command: gst-launch-1.0 filesrc location="/home/amine/Downloads/a.mp4" ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream-5.0/sources/objectDetector_Yolo/config_infer_primary_yoloV3.txt batch-size=1 unique-id=1 ! nvvideoconvert ! nvdsosd ! nveglglessink

error: ERROR: Pipeline doesn’t want to pause.
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;

I don’t understand what it does mean . Thank you for help !

gl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
do you have display connected?
You could replace “nveglglessink” with “fakesink” and try again

Hi ,
thank you about your help ,how can i access to a file stored on my system inside a docker container ?

Hi,
Do you install nvidia display driver with nvidia opengl? if not please reinstall and use nvidia card as display, as your pipeline needs nvidia cards for display.
before you run docker, make sure run xhost + first.

Hi ,
thank you about your help ,how can i access to a file stored on my system inside a docker container ? i mean i can’t use the absolute paths inside the container .

This is a basic docker quetion, could you seach on ethernet?

I can barely find how to do it now i’m facing this error while running the yolo inference with Gstreamer using:
gst-launch-1.0 filesrc location="/opt/nvidia/deepstream/deepstream-
ces/video/a.mp4" ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstre
me=m batch-size=1 width=“1280” height=“720” ! nvinfer config-file-path=/
ia/deepstream/deepstream-5.0/sources/objectDetector_Yolo/config_infer_pr
loV3.txt batch-size=1 unique-id=1 ! nvvideoconvert ! nvdsosd ! fakesink
i’m facing this error :
Got EOS from element “pipeline0”.
Execution ended after 0:08:56.059987683
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

Please check below highlighted part

Hey sorry it is :
gst-launch-1.0 filesrc location="/opt/nvidia/deepstream/deepstream-5.0/sources/video/a.mp4" ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=“1280” height=“720” ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream-5.0/sources/objectDetector_Yolo/config_infer_primary_yoloV3.txt batch-size=1 unique-id=1 ! nvvideoconvert ! nvdsosd ! fakesink

This command works on my side with " 5.0-dp-20.04-triton" docker.

Could you firtsly “export GST_DEBUG=*:3” and run the command again to get mode debug log and try debug it ?

Thanks!