Inference on multiple images with deepstream-python-app

deepstream_test_3.py (13.4 KB)

I have written the script for running the inference on image in python but i am getting the error as shown below while reference script has been added. Please guide. Reference app is considered is : /opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-image-decode-test

diycam@diycam:/opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_python_apps/apps/deepstream-single_frame$ python3 deepstream_test_3.py /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.jpg
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating transform

Creating EGLSink

Adding elements to Pipeline

Linking elements in the Pipeline

Now playing…
1 : /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.jpg
Starting pipeline

Using winsys: x11
Opening in BLOCKING MODE
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_python_apps/apps/deepstream-single_frame/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:04.666064677 19585 0x2879f360 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1690> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_python_apps/apps/deepstream-single_frame/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:04.666177541 19585 0x2879f360 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1797> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_python_apps/apps/deepstream-single_frame/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:04.666228998 19585 0x2879f360 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1715> [UID = 1]: Trying to create engine from model files
WARNING: INT8 not supported by platform. Trying FP16 mode.
INFO: [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: [TRT]: Detected 1 inputs and 2 output network tensors.
ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine opened error
0:00:46.841647264 19585 0x2879f360 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1743> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:46.987915679 19585 0x2879f360 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:dstest3_pgie_config.txt sucessfully
NvMMLiteOpen : Block : BlockType = 277
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 277
Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstMultiFileSrc:source:
streaming stopped, reason not-linked (-1)
Exiting app

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

  1. Jetson Nano

  2. Deepstream Version: 5.0.1

  3. Jetpack Version: 4.4

  4. TensorRT: 7.1.3.0

  5. a. Requirement: Run inference on images in python
    b. Bug: Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstMultiFileSrc:source:
    streaming stopped, reason not-linked (-1)
    Exiting app

  6. I am using deepstream-image-decode-test app as a reference
    path /opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-image-decode-test

This is a known issue for Nano. On deepstream 5.0 image is not being saved - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums. It may be fixed in next version.

@niels.kjaergaard.madsen @priyanshthakore @rostislav.etc @Andrew_Smith

I had gone through few of your post and solution on the forum. If you people have did it, then please help.

Thank you