Error Using Custom ONNX TRT Model with Deepstream

I created a custom SSD-Mobilenet-v1 model as outlined in Hello AI World (jetson-inference/pytorch-ssd.md at master · dusty-nv/jetson-inference · GitHub). After it successfully ran in using the script in the tutorial, I copied the model file into samples file aand attempted to run with the deepstream app. I modified the the config files to reflect the path of the TRT engine, labels, and onnx file paths. When I run the deepstream app, I get the error below. I am new at this, so any assistance is appreciated.

Ian
gmnano1@gmnano1:/opt/nvidia/deepstream/deepstream-5.0/samples$ deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5-source2_1080p_ssd-gmais16-v1_tracker_tiled_display_fp16_nano.txt -t

(deepstream-app:11900): GLib-GObject-WARNING **: 14:51:10.911: g_object_set_is_valid_property: object class ‘GstNvArgusCameraSrc’ has no property named ‘maxperf’

(deepstream-app:11900): GLib-GObject-WARNING **: 14:51:10.922: g_object_set_is_valid_property: object class ‘GstNvArgusCameraSrc’ has no property named ‘maxperf’
0:00:04.275830319 11900 0x4715890 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1577> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/ssd-gmias16-v1/ssd-mobilenet.onnx.1.1.7103.GPU.FP16.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_0 3x300x300
1 OUTPUT kFLOAT scores 3000x17
2 OUTPUT kFLOAT boxes 3000x4

0:00:04.276057568 11900 0x4715890 WARN nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() <nvdsinfer_context_impl.cpp:1518> [UID = 1]: Backend has maxBatchSize 1 whereas 2 has been requested
0:00:04.276090746 11900 0x4715890 WARN nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1689> [UID = 1]: deserialized backend context :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/ssd-gmias16-v1/ssd-mobilenet.onnx.1.1.7103.GPU.FP16.engine failed to match config params, trying rebuild
0:00:04.282214642 11900 0x4715890 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1591> [UID = 1]: Trying to create engine from model files
ERROR: failed to build network since there is no model file matched.
ERROR: failed to build network.
0:00:04.282623044 11900 0x4715890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
0:00:04.282669244 11900 0x4715890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1697> [UID = 1]: build backend context failed
0:00:04.282700339 11900 0x4715890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1024> [UID = 1]: generate backend failed, check config file settings
0:00:04.282765237 11900 0x4715890 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:04.282792061 11900 0x4715890 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5_config_infer_primary_nano.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
** ERROR: main:651: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to create NvDsInferContext instance
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(781): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5_config_infer_primary_nano.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
App run failed
gmnano1@gmnano1:/opt/nvidia/deepstream/deepstream-5.0/samples$ deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5-source2_1080p_ssd-gmais16-v1_tracker_tiled_display_fp16_nano.txt -t

(deepstream-app:12186): GLib-GObject-WARNING **: 15:01:57.907: g_object_set_is_valid_property: object class ‘GstNvArgusCameraSrc’ has no property named ‘maxperf’

(deepstream-app:12186): GLib-GObject-WARNING **: 15:01:57.909: g_object_set_is_valid_property: object class ‘GstNvArgusCameraSrc’ has no property named ‘maxperf’
0:00:03.609782770 12186 0x3c0bf890 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1577> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/ssd-gmias16-v1/ssd-mobilenet.onnx.1.1.7103.GPU.FP16.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_0 3x300x300
1 OUTPUT kFLOAT scores 3000x17
2 OUTPUT kFLOAT boxes 3000x4

0:00:03.610009912 12186 0x3c0bf890 WARN nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() <nvdsinfer_context_impl.cpp:1518> [UID = 1]: Backend has maxBatchSize 1 whereas 2 has been requested
0:00:03.610041267 12186 0x3c0bf890 WARN nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1689> [UID = 1]: deserialized backend context :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/ssd-gmias16-v1/ssd-mobilenet.onnx.1.1.7103.GPU.FP16.engine failed to match config params, trying rebuild
0:00:03.616261909 12186 0x3c0bf890 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1591> [UID = 1]: Trying to create engine from model files
ERROR: failed to build network since there is no model file matched.
ERROR: failed to build network.
0:00:03.616664056 12186 0x3c0bf890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
0:00:03.616709526 12186 0x3c0bf890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1697> [UID = 1]: build backend context failed
0:00:03.616742079 12186 0x3c0bf890 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1024> [UID = 1]: generate backend failed, check config file settings
0:00:03.616806664 12186 0x3c0bf890 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:03.616834061 12186 0x3c0bf890 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5_config_infer_primary_nano.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
** ERROR: main:651: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to create NvDsInferContext instance
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(781): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/MOD5_config_infer_primary_nano.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
App run failed

1 Like