Error on running sample Deepstream python apps

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) dGPU, ubuntu 18.04
• DeepStream Version 6.0.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.1
• NVIDIA GPU Driver Version (valid for GPU only) 470
• Issue Type( questions, new requirements, bugs)
I installed Nvidia-Driver, CUDA, TensorRT, DeepStream sdk by following the normal steps of guide.
After installation, when running the deepstream application as following command, it was working well.
deepstream-app -c <path_to_config_file>
Then I intended to run the default python sample apps. so I installed python-bindings, and after that, I tried to run deepstream-nvdsanalytics samle, but I got the following issue.

Now playing…
1 : /media/main/Data/Task/PyTorchYoloTrainer/sample_1080p_h264.mp4
Starting pipeline

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
~~ CLOG[include/modules/NvMultiObjectTracker/NvTrackerParams.hpp, getConfigRoot() @line 54]: [NvTrackerParams::getConfigRoot()] !!![WARNING] Invalid low-level config file caused an exception, but will go ahead with the default config values
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
~~ CLOG[include/modules/NvMultiObjectTracker/NvTrackerParams.hpp, getConfigRoot() @line 54]: [NvTrackerParams::getConfigRoot()] !!![WARNING] Invalid low-level config file caused an exception, but will go ahead with the default config values
[NvMultiObjectTracker] Initialized
0:00:00.168387914 24478 0x3503c40 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1161> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1484 Deserialize engine failed because file path: /media/main/Data/Task/PyTorchYoloTrainer/deepstream_src/configs/models/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:00.327292587 24478 0x3503c40 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1889> [UID = 1]: deserialize engine from file :/media/main/Data/Task/PyTorchYoloTrainer/deepstream_src/configs/models/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:00.327324359 24478 0x3503c40 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1996> [UID = 1]: deserialize backend context from engine from file :/media/main/Data/Task/PyTorchYoloTrainer/deepstream_src/configs/models/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:00.327332955 24478 0x3503c40 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1914> [UID = 1]: Trying to create engine from model files
ERROR: [TRT]: 4: [standardEngineBuilder.cpp::initCalibrationParams::2050] Error Code 4: Internal Error (Calibration failure occurred with no scaling factors detected. This could be due to no int8 calibrator or insufficient custom scales for network layers. Please see int8 sample to setup calibration correctly.)
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1119 Build engine failed from config file
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:811 failed to build trt engine.
0:00:01.150574455 24478 0x3503c40 ERROR nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1934> [UID = 1]: build engine file failed
0:00:01.150740926 24478 0x3503c40 ERROR nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2020> [UID = 1]: build backend context failed
0:00:01.150754702 24478 0x3503c40 ERROR nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1257> [UID = 1]: generate backend failed, check config file settings
0:00:01.150778039 24478 0x3503c40 WARN nvinfer gstnvinfer.cpp:841:gst_nvinfer_start: error: Failed to create NvDsInferContext instance
0:00:01.150784342 24478 0x3503c40 WARN nvinfer gstnvinfer.cpp:841:gst_nvinfer_start: error: Config file path: configs/dsnvanalytics_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
[NvMultiObjectTracker] De-initialized
Exiting app

Error: gst-resource-error-quark: Failed to create NvDsInferContext instance (1): gstnvinfer.cpp(841): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
Config file path: configs/dsnvanalytics_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED

I guess this is concerned with int8 callibration, but I am not sure.
Or these python apps don’t work on deepstream 6.0?

I am looking forward to your help.

Regards

Did you provide int8 calibration file in config file?
int8-calib-file=***

Hi, amycao

yes, of course, I am using default cal_trt.bin file.

This is the content of int8 calibration file.

input_1: 3c010a14
conv1: 3cb266e4
bn_conv1: 3dc5ac49
activation_1/Relu: 3dbef3c8
block_1a_conv_1: 3dc2f42b
block_1a_conv_shortcut: 3c6fabeb
block_1a_bn_1: 3e019311
block_1a_bn_shortcut: 3cabcf39
activation_2/Relu: 3d01bd2c
block_1a_conv_2: 3d8e7dad
block_1a_bn_2: 3e09c700
add_1: 3dfb7fc3
activation_3/Relu: 3d8277b2
block_2a_conv_1: 3cd85dbd
block_2a_conv_shortcut: 3c01f960
block_2a_bn_1: 3d69e8d5
block_2a_bn_shortcut: 3d2330d2
activation_4/Relu: 3d5b347b
block_2a_conv_2: 3cc9e53f
block_2a_bn_2: 3d80b3d8
add_2: 3e3d90af
activation_5/Relu: 3d9ffbbc
block_3a_conv_1: 3c5bfd56
block_3a_conv_shortcut: 3bc44d5e
block_3a_bn_1: 3d6abecc
block_3a_bn_shortcut: 3cec9bfc
activation_6/Relu: 3d65e3f5
block_3a_conv_2: 3ccdeae2
block_3a_bn_2: 3dba7793
add_3: 3db79795
activation_7/Relu: 3d790705
block_4a_conv_1: 3c7fafca
block_4a_conv_shortcut: 3b348fb3
block_4a_bn_1: 3e3cfa37
block_4a_bn_shortcut: 3c029696
activation_8/Relu: 3dac6d31
block_4a_conv_2: 3d91c79b
block_4a_bn_2: 3e0a301b
add_4: 3e14e2cc
activation_9/Relu: 3dc20285
conv2d_bbox: 3e240c15
conv2d_cov: 3ecc348b
conv2d_cov/Sigmoid: 3bfee6c3

Did you use builtin model within deepstream SDK?

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.