NVIDIA deepstream 6.0 python apps 样例模型运行教程

开发硬件:NVIDIA Xavier NX developer kit ;开发软件:Jetson 4.6 ,deepstream 6.0.1

将Jetson镜像和deepstream部署到板子后,可通过deepstream官方提供的app对deepstream的运行与机制有初步了解。deepstream_python_apps下载地址于此,对这些文件的相关说明可参考第一层文件夹的README文件,或参考deepstream官网guide。

NVIDIA deepstream 6.0 python apps 样例模型运行教程_第1张图片

deepstream提供的python apps共有15个,每个模型的运行命令都不尽相同,需参考各自的README。

目录

运行前,请在模型所在文件夹视图,右键打开terminal(也可桌面打开然后cd到指定路径)。

1.deepstream-imagedata-multistream

2.deepstream-imagedata-multistream-redaction

3.deepstream-nvdsanalytics

4.deepstream-opticalflow

5.deepstream-preprocess-test

6.deepstream-rtsp-in-rtsp-out

7.deepstream-segmentation

8.deepstream-ssd-parser

9.deepstream-test1

10.deepstream-test1-rtsp-out

11.deepstream-test1-usbcam

12.deepstream-test2

13.deepstream-test3

14.deepstream-test4

15.runtime_source_add_delete


视频样例地址(将被调用):

/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264

/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264

若提示没有权限或需要root,输入

sudo su

1.deepstream-imagedata-multistream

#运行(注释为方便观察命令)
#python3 deepstream_imagedata-multistream.py
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264
#frames

python3 deepstream_imagedata-multistream.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264 frames

 运行效果

2.deepstream-imagedata-multistream-redaction

#运行(注释为方便观察命令)
#python3 deepstream_imagedata-multistream_redaction.py -i
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264
#-c H264

python3 deepstream_imagedata-multistream_redaction.py -i file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264 -c H264

运行效果

NVIDIA deepstream 6.0 python apps 样例模型运行教程_第2张图片

3.deepstream-nvdsanalytics

#运行(注释为方便观察命令)
#python3 deepstream_nvdsanalytics.py
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264

python3 deepstream_nvdsanalytics.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264

运行效果


4.deepstream-opticalflow

#运行(注释为方便观察命令)
#python3 deepstream-opticalflow.py
#file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264
#output

python3 deepstream-opticalflow.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 output

运行效果

卡在这了,提示encoder无法建立

...

Creating Encoder 

 Unable to create encoder 
Traceback (most recent call last):
  File "deepstream-opticalflow.py", line 377, in
    sys.exit(main(sys.argv))
  File "deepstream-opticalflow.py", line 288, in main
    encoder.set_property("bitrate", 2000000)
AttributeError: 'NoneType' object has no attribute 'set_property'

5.deepstream-preprocess-test

python3 deepstream_preprocess_test.py -i file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264

运行效果 

NVIDIA deepstream 6.0 python apps 样例模型运行教程_第3张图片

6.deepstream-rtsp-in-rtsp-out

# 这里的服务器地址
python3 deepstream_test1_rtsp_in_rtsp_out.py -i rtsp://:8554/ds-test  -g nvinfer

7.deepstream-segmentation

python3 deepstream_segmentation.py dstest_segmentation_config_semantic.txt ../../../../samples/streams/sample_720p.mjpeg output

运行效果

 NVIDIA deepstream 6.0 python apps 样例模型运行教程_第4张图片NVIDIA deepstream 6.0 python apps 样例模型运行教程_第5张图片

8.deepstream-ssd-parser

9.deepstream-test1

python3 deepstream_test_1.py ../../../../samples/streams/sample_qHD.h264

运行效果


10.deepstream-test1-rtsp-out

python3 deepstream_test1_rtsp_out.py -i ../../../../samples/streams/sample_qHD.h264

运行结果 

NVIDIA deepstream 6.0 python apps 样例模型运行教程_第6张图片

11.deepstream-test1-usbcam

python3 deepstream_test_1_usb.py /dev/video0

限于没有摄像头,不展示了

12.deepstream-test2

python3 deepstream_test_2.py ../../../../samples/streams/sample_qHD.h264

运行效果 


13.deepstream-test3

python3 deepstream_test_3.py -i file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_qHD.mp4

运行结果 

14.deepstream-test4


15.runtime_source_add_delete

python3 deepstream_rt_src_add_del.py \
  file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4

运行结果

 

你可能感兴趣的:(NVIDIA,python,开发语言)