DeepStream Python Apps Overview
The "DeepStream Python Apps" project is a repository dedicated to Python bindings and sample applications for NVIDIA's DeepStream SDK. This SDK is an essential tool for creating applications that can perform real-time analytics on video streams using the power of GPU acceleration. It is specifically crafted to cater to users working on Ubuntu 22.04 with DeepStream SDK 7.1 and Python 3.10, providing a platform for developing and integrating intelligent video analytics into various solutions.
Setup
To get started with the DeepStream Python Apps, users should first ensure that their systems meet the necessary prerequisites, including the installation of the DeepStream SDK. The repository should be cloned into the sources
directory of the DeepStream installation, specifically path /opt/nvidia/deepstream/deepstream/sources/
. The latest version of the Python bindings can be downloaded from the releases section, or they can be built from source following the instructions in the bindings README file.
Python Bindings
The Python bindings in this repository allow for the construction of DeepStream pipelines using Gst Python. These bindings provide a Python interface to access MetaData structures and functionality within the DeepStream framework. The Python bindings utilize Pybind11 to offer this integration, simplifying the process for Python developers to leverage DeepStream's capabilities.
An important note regarding the API: a recent change requires that the function alloc_nvds_event_msg_meta()
now expects a pointer to NvDsUserMeta
.
Sample Applications
The repository includes several sample applications demonstrating various use cases and pipeline configurations using DeepStream:
- deepstream-test1: Implements a 4-class object detection pipeline and demonstrates support for the new nvstreammux.
- deepstream-test2: Extends on detection by incorporating tracking and attribute classification.
- deepstream-test3: Shows a multi-stream object detection pipeline with additional support for Triton inference server, no-display, and silent modes.
- deepstream-test4: Connects analytics outputs to cloud services using a message broker.
- deepstream-imagedata-multistream: Allows interaction with image buffers in a multi-stream pipeline setup.
- deepstream-ssd-parser: Enables SSD model inference with Triton server and performs output parsing in Python.
- deepstream-test1-usbcam: A variant of deepstream-test1 that supports USB camera input.
- deepstream-test1-rtsp-out: Outputs the stream via RTSP and includes software encoder support for specific Jetson models.
- deepstream-opticalflow: Provides optical flow and visualization with outputs in NumPy arrays.
- deepstream-segmentation and deepstream-segmask: Currently not supported in DS 7.1 due to changes in segmentation model support.
- deepstream-nvdsanalytics: Uses multistream pipelines with an analytics plugin to gather insights.
- runtime_source_add_delete: Demonstrates dynamic addition or deletion of source streams during runtime.
- deepstream-imagedata-multistream-redaction: Adds facial detection and image redaction capabilities.
- deepstream-rtsp-in-rtsp-out: Facilitates multi-stream processing with RTSP input and output options.
- deepstream-preprocess-test: Utilizes custom ROIs in a multi-stream pipeline setup.
- deepstream-demux-multi-in-multi-out: Manages multiple stream outputs using nvstreamdemux.
- deepstream-imagedata-multistream-cupy: Offers direct access to image buffers as CuPy arrays on x86 systems.
- deepstream-custom-binding-test: Explores custom data structure attachments using NvDsUserMeta, documented in the Custom User Meta Guide.
Each sample application is stored in its own directory under the "apps" directory, where more detailed information and instructions can be found. This collection allows developers to get a practical understanding of how to build video processing applications using the DeepStream SDK in Python.