Hi guys,
I installed Deepstream via SDK Manager, and than followed instructions from Python Sample Apps and Bindings Source Details — DeepStream 6.0.1 Release documentation . There was no error during the prerequisites setup described at such document.
It also asks me to clone this repo: GitHub - NVIDIA-AI-IOT/deepstream_python_apps: DeepStream SDK Python bindings and sample applications
Then I tried to run the first “hello world” example from the same document (Python Sample Apps and Bindings Source Details — DeepStream 6.0.1 Release documentation ) and it complains about pyds
ubuntu@jetsonnano:/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-test1$ python3 deepstream_test_1.py
Traceback (most recent call last):
File "deepstream_test_1.py", line 29, in <module>
import pyds
ModuleNotFoundError: No module named 'pyds'
What is missing?
My environment:
• Hardware Platform: Jetson Nano Dev kit
• DeepStream Version: DeepStreamSDK 6.0.1
• JetPack Version: 4.6.1
• TensorRT Version: 8.2.1.8
• L4T: 32.7.1
• CUDA: 10.2.300
• cuDNN: 8.2.1.32
So, before installing the pre-build wheel, I had to run: sudo apt install libgirepository1.0-dev
Then successfully ran pip3 install pyds-1.1.1-py3-none-linux_aarch64.whl
Now, there is an error with GstH264Parse:h264-parser
.
ubuntu@jetsonnano:/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-test1$ python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_1080p_h264.mp4
Creating Pipeline
Creating Source
Creating H264Parser
Creating Decoder
Creating nv3dsink
Playing file /opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_1080p_h264.mp4
Adding elements to Pipeline
Linking elements in the Pipeline
Starting pipeline
Opening in BLOCKING MODE
0:00:02.152673403 15696 0x29ef2120 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/sources/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:06.117889697 15696 0x29ef2120 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/sources/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:06.118998105 15696 0x29ef2120 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/sources/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:06.119047794 15696 0x29ef2120 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:27.452987881 15696 0x29ef2120 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:27.883920561 15696 0x29ef2120 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Error: gst-stream-error-quark: Internal data stream error. (1): gstbaseparse.c(3611): gst_base_parse_loop (): /GstPipeline:pipeline0/GstH264Parse:h264-parser:
streaming stopped, reason not-negotiated (-4)
deepstream_test1 only accepts h264 file input, you can check the content in README and the pipeline definition in the script (filesrc->h264parse->h264parse).
This is a sample file from Deepstream, and is available as H264. I double checked using VLC and it is a H263 - MPEG-4 - AVC (part 10) (avc1). Thus, I don’t understand why it doesn’t work.
fanzh
March 8, 2023, 1:35pm
10
please use h264 file, don’t use mp4 file, here is the command:
To run the test app:
$ python3 deepstream_test_1.py <h264_elementary_stream>
Got it, h264 file, not codec. Thanks!
system
Closed
March 22, 2023, 1:40pm
12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.