Error trying running pretrained models from tlt_pretrained_models using deepstream

HI,

I’m using Jetson Xavier NX Developer Kit and trying to test TrafficCamNet.
I’ve installed the latest DeepStream 5.1 on Jetpack 4.5.1.
I navigated to:-
/opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models

From there While running the deepstream-app, I’m getting the following error output:

I ran the code using command:-
deepstream-app -c deepstream_app_source1_trafficcamnet.txt

Warning: ‘input-dims’ parameter has been deprecated. Use ‘infer-dims’ instead.

Using winsys: x11
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so
gstnvtracker: Optional NvMOT_RemoveStreams not implemented
gstnvtracker: Batch processing is OFF
gstnvtracker: Past frame output is OFF
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models/…/…/models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine open error
0:00:01.308713876 10488 0x8088d50 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models/…/…/models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine failed
0:00:01.308823413 10488 0x8088d50 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models/…/…/models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine failed, try rebuild
0:00:01.308858294 10488 0x8088d50 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 1]: Trying to create engine from model files
WARNING: INT8 calibration file not specified/accessible. INT8 calibration can be done through setDynamicRange API in ‘NvDsInferCreateNetwork’ implementation
parseModel: Failed to open TLT encoded model file /opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models/…/…/models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt
ERROR: failed to build network since parsing model errors.
ERROR: Failed to create network using custom network creation function
ERROR: Failed to get cuda engine from custom library API
0:00:01.309345678 10488 0x8088d50 ERROR nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1736> [UID = 1]: build engine file failed
Segmentation fault (core dumped)

And other models such as PeopleNet are also not running.
models from configs/deepstream-app run properly.

i have also boosted the clocks using
sudo nvpmodel -m 0
sudo jetson_clocks

ALSO NOTE THAT I HAVE NOT YET CONNECTED ANY CAMERA OR GIVEN ANY VIDEO SOURCE.

Thanks.

Hi,

Deepstream doesn’t contain the model by default to save space.
Please download the model manually before running the pipeline.

You can find the corresponding command in the below file:

/opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models/README

For example:

mkdir -p ../../models/tlt_pretrained_models/trafficcamnet && \
    wget https://api.ngc.nvidia.com/v2/models/nvidia/tlt_trafficcamnet/versions/pruned_v1.0/files/resnet18_trafficcamnet_pruned.etlt \
    -O ../../models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt && \
    wget https://api.ngc.nvidia.com/v2/models/nvidia/tlt_trafficcamnet/versions/pruned_v1.0/files/trafficnet_int8.txt \
    -O ../../models/tlt_pretrained_models/trafficcamnet/trafficnet_int8.txt

Thanks.

Thanks the issue got resolved i had not downloaded the model just like you said.