Failed to open TLT encoded model file

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson Orin Nano
• DeepStream Version: deepstream-6.4
• JetPack Version (valid for Jetson only) : Version: 6.0-b52
• TensorRT Version : Version: 8.6.2
• NVIDIA GPU Driver Version (valid for GPU only) : NA

I simply tried to run
python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream-6.4/samples/streams/sample_720p.h264

I got the following error :

Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Creating nv3dsink

Playing file /opt/nvidia/deepstream/deepstream-6.4/samples/streams/sample_720p.h264
Adding elements to Pipeline

Linking elements in the Pipeline

/home/t-tech/DeepStreamPythonApp/deepstream_python_apps/apps/deepstream-test1/deepstream_test_1.py:220: DeprecationWarning: Gst.Element.get_request_pad is deprecated
sinkpad = streammux.get_request_pad(“sink_0”)
Starting pipeline

Opening in BLOCKING MODE
WARNING: Deserialize engine failed because file path: /home/t-tech/DeepStreamPythonApp/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b1_gpu0_int8.engine open error
0:00:25.415393661 5332 0xaaaafc2d0a40 WARN nvinfer gstnvinfer.cpp:679:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2080> [UID = 1]: deserialize engine from file :/home/t-tech/DeepStreamPythonApp/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b1_gpu0_int8.engine failed
0:00:25.830701547 5332 0xaaaafc2d0a40 WARN nvinfer gstnvinfer.cpp:679:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2185> [UID = 1]: deserialize backend context from engine from file :/home/t-tech/DeepStreamPythonApp/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b1_gpu0_int8.engine failed, try rebuild
0:00:25.830787852 5332 0xaaaafc2d0a40 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2106> [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
NvDsInferCudaEngineGetFromTltModel: Failed to open TLT encoded model file /home/t-tech/DeepStreamPythonApp/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt
ERROR: Failed to create network using custom network creation function
ERROR: Failed to get cuda engine from custom library API
0:00:32.265909785 5332 0xaaaafc2d0a40 ERROR nvinfer gstnvinfer.cpp:676:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:2126> [UID = 1]: build engine file failed
double free or corruption (fasttop)
Aborted (core dumped)

Can anyone help me, I am trying to learn deepstream SDK. Thanks in advance.

Please clone the deepstream_python_apps repo in /opt/nvidia/deepstream/deepstream-6.4/sources and run again. The reason is that the model file uses the relative directory in config file dstest1_pgie_config.txt. If you want to run it in your home directory, you can use absolte path in the default config. Please refer to the HOWTO here:
deepstream_python_apps/HOWTO.md at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

@yingliu Thanks for your respone. I will get back to this as currently, I am facing this issue: OSError: [Errno 74] Bad message: ‘/usr/lib/python3/dist-packages’ on the same device.

Okay I did as @yingliu mention

t-tech@ubuntu:/opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/apps/deepstream-test1$ python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream-6.4/samples/streams/sample_720p.h264

I got the following error

Traceback (most recent call last):
File "/opt/nvidia/deepstream/deepstream-6.4/sources/deepstream_python_apps/apps/deepstream-test1/deepstream_test_1.py", line 49, in osd_sink_pad_buffer_probe
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer)) AttributeError: module 'pyds' has no attribute 'gst_buffer_get_nvds_batch_meta'

Which I resolved by downloading and installing pyds from here

even though I have already installed pyds using pip3 install pyds.

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