Tried Deepstream sample deepstream_test_1.py but failed

Dear Sir,
I try to execute deepstream using the following instruction :
$ python3 deepstream_test_1.py HK002.mp4

But got the following error message :

Using winsys: x11
Opening in BLOCKING MODE
Creating LL OSD context new
0:00:04.150498450 12857 0x3349ad90 INFO nvinfer gstnvinfer.cpp:519:gst_nvinfer_logger: NvDsInferContext[UID 1]:initialize(): Trying to create engine from model files
0:00:04.150791999 12857 0x3349ad90 WARN nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger: NvDsInferContext[UID 1]:generateTRTModel(): INT8 not supported by platform. Trying FP16 mode.
0:00:04.150848199 12857 0x3349ad90 ERROR nvinfer gstnvinfer.cpp:511:gst_nvinfer_logger: NvDsInferContext[UID 1]:generateTRTModel(): Cannot access caffemodel file ‘/home/astro/deepstream/t1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel’
0:00:04.150898044 12857 0x3349ad90 ERROR nvinfer gstnvinfer.cpp:511:gst_nvinfer_logger: NvDsInferContext[UID 1]:initialize(): Failed to create engine from model files
0:00:04.150947263 12857 0x3349ad90 WARN nvinfer gstnvinfer.cpp:692:gst_nvinfer_start: error: Failed to create NvDsInferContext instance
0:00:04.150970702 12857 0x3349ad90 WARN nvinfer gstnvinfer.cpp:692:gst_nvinfer_start: error: Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
Error: gst-resource-error-quark: Failed to create NvDsInferContext instance (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(692): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED


1.Is there anythin I haven’t installed?

2.Can someone provide an instruction that can execute the example,let me make sure that the execution environment is correct.

Thank you.

Hi
you need h264 elementary source.
To run the test app:
$ python3 deepstream_test_1.py <h264_elementary_stream>

1 Like

How do I adjust if I want to use h265?
Thank you.

deepstream_test_1.py

test3 use uridecodebin which support H265 codec, you can try with test3 sample.

1 Like
  1. I tried to execute test3 sample, but got the following error message:
    ==========================================================
    $ python3 deepstream_test_3.py rtsp://admin:aa12345678@192.168.2.4:554/h265/ch1/main/av_stream
    Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Unable to create pgie
Creating tiler

Creating nvvidconv

Creating nvosd

Creating transform

Creating EGLSink

Traceback (most recent call last):
File “deepstream_test_3.py”, line 346, in
sys.exit(main(sys.argv))
File “deepstream_test_3.py”, line 285, in main
pgie.set_property(‘config-file-path’, “dstest3_pgie_config.txt”)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

==========================================================

  1. I still get an error when i execute the following command:
    :~/deepstream_sdk_v4.0.2_jetson/samples/configs/deepstream-app$ deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
    deepstream-app: error while loading shared libraries: libnvinfer.so.6: cannot open shared object file: No such file or directory

==========================================================

  1. I tried to follow the content below, but still can’t solve it, how can i eliminate these problems?

Thank you.

tensorflow.python.framework.errors_impl.NotFoundError: libnvinfer.so.5: cannot open shared object file: No such file or directory

Traceback (most recent call last):

File “deepstream_test_3.py”, line 346, in
sys.exit(main(sys.argv))
File “deepstream_test_3.py”, line 285, in main
pgie.set_property(‘config-file-path’, “dstest3_pgie_config.txt”)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

I still get an error when i execute the following command:

:~/deepstream_sdk_v4.0.2_jetson/samples/configs/deepstream-app$ deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
deepstream-app: error while loading shared libraries: libnvinfer.so.6: cannot open shared object file: No such file or directory

–> make sure you got right version TensorRT installed

I thougth TensorRT was the default installation project, obviously not.

I use JetPack4.3, the current version is as follows:

(1)Jetson Nano Developer Edition

(2)$ cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

(3)$ cat /usr/local/cuda/version.txt
CUDA Version 10.2.89

===============================================================

I thought i should download “nv-tensorrt-repo-ubuntu1804-cuda10.2-trt6.0.1.8-ga-20191108_1-1_amd64.deb”
But it cannot be installed.

Which version should be download?

Thank you.

this package is for x86 platform, if your device is jetson, sdkmanager will install whole for you if you choose all, os and software, I remember for software default if you choose, it will install all, i see you have cuda installed, not sure why can’t you find TensorRT, any output for this,
dpkg -l|grep infer

1 Like

Dear Sir,

$ dpkg -l|grep infer
ii libnvinfer-bin 7.1.0-1+cuda10.2 arm64 TensorRT binaries
ii libnvinfer-dev 7.1.0-1+cuda10.2 arm64 TensorRT development libraries and headers
ii libnvinfer-doc 7.1.0-1+cuda10.2 all TensorRT documentation
ii libnvinfer-plugin-dev 7.1.0-1+cuda10.2 arm64 TensorRT plugin libraries
ii libnvinfer-plugin7 7.1.0-1+cuda10.2 arm64 TensorRT plugin libraries
ii libnvinfer-samples 7.1.0-1+cuda10.2 all TensorRT samples
ii libnvinfer7 7.1.0-1+cuda10.2 arm64 TensorRT runtime libraries
ii python-libnvinfer 7.1.0-1+cuda10.2 arm64 Python bindings for TensorRT
ii python-libnvinfer-dev 7.1.0-1+cuda10.2 arm64 Python development package for TensorRT
ii python3-libnvinfer 7.1.0-1+cuda10.2 arm64 Python 3 bindings for TensorRT
ii python3-libnvinfer-dev 7.1.0-1+cuda10.2 arm64 Python 3 development package for TensorRT

=================================

It seems that TensorRT 7.1 is installed.

Te error message is about libnvinfer.so.6, does it mean that the current version i too new, so it’s not supported?

Jetpack 4.3 with TensorRT version 6.0, version 4.4 with TensorRT 7.1, you used Jetpack 4.4 i guess, but DS 5.0 not released, it will be soon, you can wait for new DS release or you can reflash Jetpack 4.3

1 Like