deepstream | deepstream6.0配置python接口

先决条件:

  • ubuntu18.04
  • deepstream SDK 6.0 或 更高版本
  • python3.6
  • Gst python v1.14.5,如果Jetson 上缺少Gst python 安装,请使用以下命令安装:
sudo apt-get install python-gi-dev

export GST_LIBS="-lgstreamer-1.0 -lgobject-2.0 -lglib-2.0"
export GST_CFLAGS="-pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include"

git clone https://github.com/GStreamer/gst-python.git

cd gst-python

git checkout 1a8f48a

./autogen.sh PYTHON=python3
./configure PYTHON=python3

make

sudo make install

运行示例应用程序

1、将deepstream_python_appsrepo克隆到:/sources

git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps 

2、以上的 clone 将会创建以下目录:

/sources/deepstream_python_apps

3、python 运行例程

cd /opt/nvidia/deepstream/deepstream/sources

git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps
 
# 运行例子1
cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/apps/deepstream-test1

python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 

【报错解决】

ModuleNotFoundError: No module named 'gi'

conda install -c conda-forge pygobject 

你可能感兴趣的:(经验分享,python,开发语言,人工智能)