Failed to run sample applications in deepstream-6.2

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version deepstream-6.2
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 520.61.05
• Issue Type( questions, new requirements, bugs) questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I’m trying to run the basic sample applications in deepstream-6.2 platform, yet failed to run it. Here are the steps.

  1. download deepstream-6.2 SDK
    https://developer.nvidia.com/deepstream-getting-started
  2. download deepstream NGC image
    docker pull nvcr.io/nvidia/deepstream:6.2-devel
  3. download python bindings
    GitHub - NVIDIA-AI-IOT/deepstream_python_apps: DeepStream SDK Python bindings and sample applications
  4. launch the container, within the container,
    install necessary packages according to this site
    deepstream_python_apps/bindings at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub
  5. at last, run deepstream-test3 application,
    /ds62/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3# python3 deepstream_test_3.py -i file:///tmp/sample_720p.h264

got this error:

Frame Number= 12 Number of Objects= 12 Vehicle_count= 9 Person_count= 3
0:00:04.127391407 11813 0x3481c00 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: Internal data stream error.
0:00:04.127434045 11813 0x3481c00 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: streaming stopped, reason not-negotiated (-4)
Error: gst-stream-error-quark: Internal data stream error. (1): gstnvinfer.cpp(2369): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason not-negotiated (-4)
Frame Number= 13 Number of Objects= 10 Vehicle_count= 8 Person_count= 2
Exiting app

Frame Number= 14 Number of Objects= 8 Vehicle_count= 6 Person_count= 2
nvstreammux: Successfully handled EOS for source_id=0

Did I miss anything?

Step 1&3 are not necessary, you only need to start the docker with the recommendation command on page DeepStream | NVIDIA NGC:

xhost +
docker run --gpus all -it --rm --net=host --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-6.2 nvcr.io/nvidia/deepstream:6.2-devel

Then install the additional packages (note from Docker Containers — DeepStream 6.2 Release documentation) and python binding by script (refer to DeepStream 6.2 is now available for download! - #6 by yingliu)

./user_additional_install.sh
./user_deepstream_python_apps_install.sh -v 1.1.6

Below is the command I tested in my docker:

root@ubuntu:/opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3# python3 ./deepstream_test_3.py -i file:///op
t/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264

Thanks Ying. I tried your way, still got some error.

/opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3# python3 ./deepstream_test_3.py -i file:///tmp/tmp
tmp.ac5nJnJ6iQ/ tmp02xk5uav/
root@eai-awai-fof:/opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3# py
thon3 ./deepstream_test_3.py -i file:///opt/nvidia/deepstream/deepstream-6.2/samples/streams/sample_720p.h264
{‘input’: [‘file:///opt/nvidia/deepstream/deepstream-6.2/samples/streams/sample_720p.h264’], ‘configfile’: None, ‘pgie’: None, ‘no_display’: False, ‘file_loop’: False, ‘disable_probe’: False, ‘silent’: False}

(gst-plugin-scanner:1950): GStreamer-WARNING **: 14:33:41.451: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1950): GStreamer-WARNING **: 14:33:41.519: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libtritonserver.so: cannot open shared object file: No such file or directory
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating EGLSink

Adding elements to Pipeline

Linking elements in the Pipeline

Now playing…
0 : file:///opt/nvidia/deepstream/deepstream-6.2/samples/streams/sample_720p.h264
Starting pipeline

libEGL warning: DRI2: failed to authenticate
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
WARNING: …/nvdsinfer/nvdsinfer_model_builder.cpp:1487 Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:05.072368872 1949 0x267f4a0 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:05.208453438 1949 0x267f4a0 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:05.208513808 1949 0x267f4a0 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
WARNING: [TRT]: The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
0:00:32.038840520 1949 0x267f4a0 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1955> [UID = 1]: serialize cuda engine to file: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine successfully
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:32.207607793 1949 0x267f4a0 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:dstest3_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

**PERF: {‘stream0’: 0.0}

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

Decodebin child added: nvv4l2decoder0

In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7f3a83fc05e0 (GstCapsFeatures at 0x1035c20)>
Frame Number= 0 Number of Objects= 12 Vehicle_count= 8 Person_count= 4
Frame Number= 1 Number of Objects= 11 Vehicle_count= 8 Person_count= 3
Frame Number= 2 Number of Objects= 11 Vehicle_count= 7 Person_count= 4
Frame Number= 3 Number of Objects= 13 Vehicle_count= 8 Person_count= 5
cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1
Frame Number= 4 Number of Objects= 12 Vehicle_count= 8 Person_count= 4
Frame Number= 5 Number of Objects= 12 Vehicle_count= 8 Person_count= 4
Frame Number= 6 Number of Objects= 11 Vehicle_count= 7 Person_count= 4
Frame Number= 7 Number of Objects= 11 Vehicle_count= 7 Person_count= 4
Frame Number= 8 Number of Objects= 10 Vehicle_count= 6 Person_count= 4
Frame Number= 9 Number of Objects= 12 Vehicle_count= 8 Person_count= 4
Frame Number= 10 Number of Objects= 15 Vehicle_count= 11 Person_count= 4
Frame Number= 11 Number of Objects= 13 Vehicle_count= 10 Person_count= 3
Frame Number= 12 Number of Objects= 12 Vehicle_count= 9 Person_count= 3
Frame Number= 13 Number of Objects= 10 Vehicle_count= 8 Person_count= 2
0:00:32.695356217 1949 0x1f86000 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: Internal data stream error.
0:00:32.695368943 1949 0x1f86000 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: streaming stopped, reason not-negotiated (-4)
Error: gst-stream-error-quark: Internal data stream error. (1): gstnvinfer.cpp(2369): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason not-negotiated (-4)
Frame Number= 14 Number of Objects= 8 Vehicle_count= 6 Person_count= 2
Exiting app

nvstreammux: Successfully handled EOS for source_id=0

By the way, is it the same procedure for trying this on deepstream-5.1?

Step1&3 are also not necessary for deepstream-5.1? Is there any other extra step to do?

Never mind, figured out it’s due to there was no display, after I ran the command with --no-display parameter, it’s working well.

This case can be closed now.