Issue while running DeepStream deepstream_nvdsanalytics example

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 6.0
• JetPack Version (valid for Jetson only) 4.6.2-b5
• TensorRT Version 8.2.1-1+cuda10.2
• Issue Type( questions, new requirements, bugs) Question

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
I tried to run the example provided in the Deepstream Python bindings and seems that it is not working properly.

Any idea why it is not working?

python3 deepstream_nvdsanalytics.py file:/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating nvtracker

Creating nvdsanalytics

Creating tiler

Creating nvvidconv

Creating nvosd

Creating transform

Creating EGLSink

Adding elements to Pipeline

Linking elements in the Pipeline

Now playing…
1 : file:/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Starting pipeline

Using winsys: x11
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvMultiObjectTracker] Initialized
0:00:01.201110182 21532 0x28129490 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: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:05.348398619 21532 0x28129490 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 :/opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:05.349541298 21532 0x28129490 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 :/opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:05.349592184 21532 0x28129490 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
WARNING: INT8 not supported by platform. Trying FP16 mode.
ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine opened error
0:01:23.474934722 21532 0x28129490 WARN nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1942> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.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:01:23.646461320 21532 0x28129490 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:dsnvanalytics_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

**PERF: {‘stream0’: 0.0}

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

Decodebin child added: nvv4l2decoder0

Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7f8cf0b0a8 (GstCapsFeatures at 0x7ed00033a0)>

**PERF: {‘stream0’: 0.0}

##################################################
Objs in ROI: {‘RF’: 0}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 0 stream id= 0 Number of Objects= 0 Vehicle_count= 0 Person_count= 0
##################################################
##################################################
Objs in ROI: {‘RF’: 0}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 1 stream id= 0 Number of Objects= 0 Vehicle_count= 0 Person_count= 0
##################################################
##################################################
Objs in ROI: {‘RF’: 0}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 2 stream id= 0 Number of Objects= 0 Vehicle_count= 0 Person_count= 0
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 3 stream id= 0 Number of Objects= 7 Vehicle_count= 4 Person_count= 3
##################################################

**PERF: {‘stream0’: 10.1}

##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 4 stream id= 0 Number of Objects= 6 Vehicle_count= 4 Person_count= 2
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 5 stream id= 0 Number of Objects= 6 Vehicle_count= 4 Person_count= 2
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 6 stream id= 0 Number of Objects= 6 Vehicle_count= 3 Person_count= 3
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 7 stream id= 0 Number of Objects= 6 Vehicle_count= 3 Person_count= 3
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 8 stream id= 0 Number of Objects= 6 Vehicle_count= 4 Person_count= 2
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 9 stream id= 0 Number of Objects= 8 Vehicle_count= 6 Person_count= 2
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 10 stream id= 0 Number of Objects= 6 Vehicle_count= 4 Person_count= 2
##################################################
##################################################
Object 2 roi status: [‘RF’]
Objs in ROI: {‘RF’: 1}
Linecrossing Cumulative: {‘Exit’: 0}
Linecrossing Current Frame: {‘Exit’: 0}
Frame Number= 11 stream id= 0 Number of Objects= 6 Vehicle_count= 4 Person_count= 2
##################################################

**PERF: {‘stream0’: 1.59}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

Did you follow the readme to setup the object crossing property?

I just wanted to test if the program is working properly, so I didn’t change anything and tried to use the examples provided. In only process ~10 frames and after that just printing:
PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

**PERF: {‘stream0’: 0.0}

Any idea why this is happening?

What’s your input source?

I tried with python3 deepstream_nvdsanalytics.py file:/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
also used and RTSP source. The only difference is that from the RTSP are processed only 3-4 frames and from sample_720p.h264 ~10.

Can you narrow down which component caused the issue? like you can try firstly remove nvdsanalytics element from the app.

Same errors after removing nvdsanalytics and tiler.

Removed the tracker and I got the following error:
0:01:16.476037169 24265 0x11bd4f20 WARN nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop: error: Internal data stream error.
0:01:16.476734475 24265 0x11bd4f20 WARN nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop: error: streaming stopped, reason error (-5)
Error: gst-stream-error-quark: Internal data stream error. (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(2288): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason error (-5)
Exiting app

What do you mean error? perf drop to 0?

Sorry for that. Yes, I mean the same issue persists.

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

Sorry for the late.
Did you meet the same issue with other python app?

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