Running Deepstream 5.1 Sample Application [ nvinfer plugin problem ]

Platform:

  1. Hardware: i5 9600, RTX 2080Ti (Dual GPU)
  2. Software: Deepstream SDK 5.1, CUDA 11.1, Ubuntu 18.04

Our Goal: Our goal is to run Deepstream 5.1 Sample applications in all user accounts of Ubuntu 18.04. For example we want to run Deepstream test application 1 from the location /opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-test1.

What we did:

  1. We installed all the pre-requisites and Deepstream 5.1 using the official install guide [ Quickstart Guide — DeepStream 5.1 Release documentation ]. Note that all the user accounts share the same deepstream installation directory and libraries [ /opt/nvidia/deepstream/deepstream-5.1 ]. The installation was done using the main administrator account using sudo privileges.
  2. We tried to run Deepstream test application 1 [ /opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-test1 ]on several user accounts in our workstation.
  3. Some accounts ran the application just fine but some user accounts showed error [ Error: One element could not be created. ]
  4. We tried to run config text file based pipeline from /opt/nvidia/deepstream/deepstream-5.1/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt and it showed the following error on some accounts:

** ERROR: <create_primary_gie_bin:120>: Failed to create ‘primary_gie’

** ERROR: <create_primary_gie_bin:182>: create_primary_gie_bin failed

** ERROR: <create_pipeline:1294>: create_pipeline failed

** ERROR: main:636: Failed to create pipeline

On other accounts, where deepstream-test-1 ran, this application also ran perfectly.

  1. On all problamatic user accounts we investigated using gst-inspect-1.0 {plugin_name} and found that the accounts which shows error message can not find the nvinfer plugin. Other nvidia plugins such as nvstreammux, nvdsosd, nvvidconv was found though. Only nvinfer was missing from the problematic user accounts. On the good user accounts, we were able to find nvinfer.
  2. Later we compiled gst-nvinfer from the directory /opt/nvidia/deepstream/deepstream-5.1/sources/gst-plugins/gst-nvinfer and used make install command which copied the compiled libnvdsgst_infer.so file to /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/ directory. This solved the problem on all problamatic accounts.
  • We found original default nvinfer-so file and our having compiled gst-nvinfer-so file.
  • The original one has 7 MB, while ours has 1 MB.
  1. If we remove the newly installed nvinfer (libnvdsgst_infer.so), the old problem arises again and it happens in all accounts now even in accounts which previously worked. We have to keep the libnvdsgst_infer.so file in order to make everything work.
  2. We found another nvdsinfer plugin in the directory /opt/nvidia/deepstream/deepstream-5.1/sources/libs/nvdsinfer

Our Questions:

  1. why do some accounts in a Ubuntu installation have access to nvinfer while other accounts do not? Even though they share the same installation directory [ /opt/nvidia/deepstream/deepstream-5.1 ]?
  2. What is the difference between the three nvinfer we found?
  3. Default nvinfer comes with Deepstream installation
  4. libnvdsgst_infer which is generated from /opt/nvidia/deepstream/deepstream-5.1/sources/gst-plugins/gst-nvinfer
  5. nvdsinfer from /opt/nvidia/deepstream/deepstream-5.1/sources/libs/nvdsinfer
  6. How Deepstream decides which nvinfer to use from the three? How to change it?
  7. How to roll back to default nvinfer installation?
  1. /opt/nvidia/deepstream/deepstream-5.1 directory need “root” access. You can check the authority of the folders and use “ldd” tool to check the library status.
  2. libnvdsgst_infer.so is the gst-nvinfer plugin, libnvds_infer.so is the nvinfer library which will be used by libnvdsgst_infer.so.
    I don’t what do you mean by “Default nvinfer”. Can you list the name and directory?
  3. The /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream is linked to /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins. So gstreamer can find it. All deepstream plugins are in /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins. Please check /usr/lib/x86_64-linux-gnu/pkgconfig/gstreamer-1.0.pc by yourself.
  4. Just put the plugin library in the correct directory and run “rm -rf ~/.cache/gstreamer-1.0/” to clear the cache. You can refresh the plugin.

Please make sure you know basic knowledge and coding skills of gstreamer before you start with deepstream.

Chen San,

The problem is resolved by reinstalling Deepstream 5.1.

I am answering the question you asked in point no 2. By “default Nvinfer” I meant the nvinfer came with installation of Deepstream App. The location is /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_infer.so. There is another nvinfer located in /opt/nvidia/deepstream/deepstream-5.1/sources/gst-plugins/gst-nvinfer/libnvdsgst_infer.so. I want to know if they are the same shared object library or is their any difference between these two?

Thank you for your help.

1 Like

/opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnvdsgst_infer.so is the working one. /opt/nvidia/deepstream/deepstream-5.1/sources/gst-plugins/gst-nvinfer/libnvdsgst_infer.so is the built library of the source code.

1 Like