Deepstream YoloV3Tiny with custom UFF model error.

Hi.

We have trained our own yolo model and we have converted it to UFF format by following the instructions given in the SSD sample. We want to run the yolo deepstream application with this model. I have modified the config_infer_primary_yoloV3_tiny.txt as shown below:

gpu-id=0
net-scale-factor=1
#0=RGB, 1=BGR
model-color-format=0
custom-network-config=yolov3-tiny.cfg
uff-file=yolo_trt_1.uff
#model-file=yolov3-tiny.weights
#model-engine-file=model_b1_fp32.engine
labelfile-path=labels_2.txt

0=FP32, 1=INT8, 2=FP16 mode

network-mode=2
num-detected-classes=4
gie-unique-id=1
is-classifier=0
maintain-aspect-ratio=1
parse-bbox-func-name=NvDsInferParseCustomYoloV3Tiny
custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so

I have also exported the correct CUDA version and ran the makefile for the custom parsers. However when i try to run the deepstream app through the deepstream config file i’m getting the error below:

Using winsys: x11
Creating LL OSD context new
0:00:00.831895575 5577 0x7f3c002240 INFO nvinfer gstnvinfer.cpp:519:gst_nvinfer_logger:<primary_gie_classifier> NvDsInferContext[UID 1]:initialize(): Trying to create engine from model files
Yolo config file or weights file is NOT specified.
0:00:00.832908965 5577 0x7f3c002240 ERROR nvinfer gstnvinfer.cpp:511:gst_nvinfer_logger:<primary_gie_classifier> NvDsInferContext[UID 1]:generateTRTModel(): Failed to create network using custom network creation function
0:00:00.832967299 5577 0x7f3c002240 ERROR nvinfer gstnvinfer.cpp:511:gst_nvinfer_logger:<primary_gie_classifier> NvDsInferContext[UID 1]:initialize(): Failed to create engine from model files
0:00:00.833300269 5577 0x7f3c002240 WARN nvinfer gstnvinfer.cpp:692:gst_nvinfer_start:<primary_gie_classifier> error: Failed to create NvDsInferContext instance
0:00:00.833333759 5577 0x7f3c002240 WARN nvinfer gstnvinfer.cpp:692:gst_nvinfer_start:<primary_gie_classifier> error: Config file path: /home/dk-nano-01/Downloads/deepstream_sdk_v4.0.1_jetson/sources/objectDetector_Yolo/config_infer_primary_new_yoloV3_tiny.txt, NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED
** ERROR: main:651: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie_classifier: Failed to create NvDsInferContext instance
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(692): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie_classifier:
Config file path: /home/dk-nano-01/Downloads/deepstream_sdk_v4.0.1_jetson/sources/objectDetector_Yolo/config_infer_primary_new_yoloV3_tiny.txt, NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED
App run failed

What could be the issue?

As the error message indicates,

NvDsInfer Error: NVDSINFER_CUSTOM_LIB_FAILED

You are missing the custom library required to parse the output buffers of yolo network. Please refer to the yolo sample README/config files for instructions to build this lib and set it in the config files.

From yolo sample readme

--------------------------------------------------------------------------------
Compile the custom library:
  # Export right CUDA version (e.g. 10.1, 10.0)
  $ export CUDA_VER=10.1
  $ make -C nvdsinfer_custom_impl_Yolo

--------------------------------------------------------------------------------