Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[submodule "3rdparty/pybind11"]
path = 3rdparty/pybind11
[submodule "bindings/3rdparty/pybind11"]
path = bindings/3rdparty/pybind11
url = https://github.com/pybind/pybind11.git
[submodule "gstreamer"]
path = 3rdparty/gstreamer
[submodule "bindings/3rdparty/git-partial-submodule"]
path = bindings/3rdparty/git-partial-submodule
url = https://github.com/Reedbeta/git-partial-submodule.git
[submodule "bindings/3rdparty/gstreamer"]
path = bindings/3rdparty/gstreamer
url = https://github.com/GStreamer/gstreamer.git
sparse-checkout = subprojects/gst-python/
1 change: 0 additions & 1 deletion 3rdparty/pybind11
Submodule pybind11 deleted from 3b1dbe
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,5 @@ The pyds wheel installs the pyds.so library where all the pip packages are store

Command to install the pyds wheel is:
```bash
$ pip3 install ./pyds-1.1.11-py3-none*.whl
$ pip3 install ./pyds-1.2.0*.whl
```
2 changes: 1 addition & 1 deletion HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This guide provides resources for DeepStream application development in Python.
## Prerequisites

* Ubuntu 22.04
* [DeepStream SDK 7.0](https://developer.nvidia.com/deepstream-download) or later
* [DeepStream SDK 7.1](https://developer.nvidia.com/deepstream-download) or later
* Python 3.10
* [Gst Python](https://gstreamer.freedesktop.org/modules/gst-python.html) v1.20.3

Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@

This repository contains Python bindings and sample applications for the [DeepStream SDK](https://developer.nvidia.com/deepstream-sdk).

SDK version supported: 7.0
SDK version supported: 7.1

<b>This release only supports Ubuntu 22.04 for DeepStreamSDK 7.0 with Python 3.10 and [gst-python](3rdparty/gst-python/) 1.20.3! Ubuntu 20.04 for DeepStreamSDK 6.3 with Python 3.8 support is NOW DEPRECATED</b>
<b>This release only supports Ubuntu 22.04 for DeepStreamSDK 7.1 with Python 3.10 and [gst-python](3rdparty/gst-python/) 1.20.3! Ubuntu 20.04 for DeepStreamSDK 6.3 with Python 3.8 support is NOW DEPRECATED</b>

The bindings sources along with build instructions are available under [bindings](bindings)! We include one [guide](bindings/BINDINGSGUIDE.md) for contributing to bindings and another [guide](bindings/CUSTOMUSERMETAGUIDE.md) for advanced use-cases such as writing bindings for custom data structures.
The bindings sources along with build instructions are available under [bindings](bindings)! PyDS 1.2.0 for DeepStream 7.1 uses an updated build system for PyPA to support pip 24.2, which deprecated setup.py command line. We include one [guide](bindings/BINDINGSGUIDE.md) for contributing to bindings and another [guide](bindings/CUSTOMUSERMETAGUIDE.md) for advanced use-cases such as writing bindings for custom data structures.

Please report any issues or bugs on the [DeepStream SDK Forums](https://devtalk.nvidia.com/default/board/209). This enables the DeepStream community to find help at a central location.

<b>NOTE:<b> numpy 2.x is not supported. If you have numpy 2.x installed, please downgrade by running
```
pip3 install --force-reinstall numpy==1.26.0
```

<b>NOTE:<b> deepstream-segmask and deepstream-segmentation applications are not currently supported by DeepStream 7.1, due to removal of segmentation models.

<b>NOTE for DeepStream dockers:<b> If you installed PyDS by running the user_deepstream_python_apps_install.sh script, be sure you also run the <b>user_additional_install.sh script<b>.

- [DeepStream Python Apps](#deepstream-python-apps)
- [Setup](#setup)
- [Python Bindings](#python-bindings)
Expand Down Expand Up @@ -59,15 +68,15 @@ We currently provide the following sample applications:
* [deepstream-test1-usbcam](apps/deepstream-test1-usbcam) -- deepstream-test1 pipeline with USB camera input
* [deepstream-test1-rtsp-out](apps/deepstream-test1-rtsp-out) -- deepstream-test1 pipeline with RTSP output, demonstrates adding software encoder option to support Jetson Orin Nano
* [deepstream-opticalflow](apps/deepstream-opticalflow) -- optical flow and visualization pipeline with flow vectors returned in NumPy array
* [deepstream-segmentation](apps/deepstream-segmentation) -- segmentation and visualization pipeline with segmentation mask returned in NumPy array
* [deepstream-segmentation](apps/deepstream-segmentation) -- **NOT CURRENTLY SUPPORTED IN DS 7.1** segmentation and visualization pipeline with segmentation mask returned in NumPy array
* [deepstream-nvdsanalytics](apps/deepstream-nvdsanalytics) -- multistream pipeline with analytics plugin
* [runtime_source_add_delete](apps/runtime_source_add_delete) -- add/delete source streams at runtime
* [deepstream-imagedata-multistream-redaction](apps/deepstream-imagedata-multistream-redaction) -- multi-stream pipeline with face detection and redaction
* [deepstream-rtsp-in-rtsp-out](apps/deepstream-rtsp-in-rtsp-out) -- multi-stream pipeline with RTSP input/output - has command line option "--rtsp-ts" for configuring the RTSP source to attach the timestamp rather than the streammux
* [deepstream-preprocess-test](apps/deepstream-preprocess-test) -- multi-stream pipeline using nvdspreprocess plugin with custom ROIs
* [deepstream-demux-multi-in-multi-out](apps/deepstream-demux-multi-in-multi-out) -- multi-stream pipeline using nvstreamdemux plugin to generated separate buffer outputs
* [deepstream-imagedata-multistream-cupy](apps/deepstream-imagedata-multistream-cupy) -- access imagedata buffer from GPU in a multistream source as CuPy array - x86 only
* [deepstream-segmask](apps/deepstream-segmask) -- access and interpret segmentation mask information from NvOSD_MaskParams
* [deepstream-segmask](apps/deepstream-segmask) -- **NOT CURRENTLY SUPPORTED IN DS 7.1** access and interpret segmentation mask information from NvOSD_MaskParams
* [deepstream-custom-binding-test](apps/deepstream-custom-binding-test) -- demonstrate usage of NvDsUserMeta for attaching custom data structure - see also the [Custom User Meta Guide](bindings/CUSTOMUSERMETAGUIDE.md)


Expand Down
8 changes: 4 additions & 4 deletions apps/README
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DeepStream SDK Python Bindings
================================================================================
Setup pre-requisites:
- Ubuntu 22.04
- NVIDIA DeepStream SDK 7.0
- NVIDIA DeepStream SDK 7.1
- Python 3.10
- Gst-python

Expand All @@ -36,7 +36,7 @@ Package Contents
Installing Pre-requisites:
--------------------------------------------------------------------------------

DeepStream SDK 7.0
DeepStream SDK 7.1
--------------------
Download and install from https://developer.nvidia.com/deepstream-download

Expand All @@ -51,14 +51,14 @@ If missing, install with the following steps:
$ sudo apt update
$ sudo apt install python3-gi python3-dev python3-gst-1.0 -y

cuda-python
**NEW** cuda-python
-----------
$ pip3 install cuda-python

--------------------------------------------------------------------------------
Running the samples
--------------------------------------------------------------------------------
The apps are configured to work from inside the DeepStream SDK 7.0 installation.
The apps are configured to work from inside the DeepStream SDK 7.1 installation.

Clone the deepstream_python_apps repo under <DeepStream ROOT>/sources:
$ git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps
Expand Down
4 changes: 2 additions & 2 deletions apps/deepstream-custom-binding-test/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,7 +16,7 @@
################################################################################

Prequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python

Expand Down
2 changes: 1 addition & 1 deletion apps/deepstream-demux-multi-in-multi-out/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python

Expand Down
19 changes: 7 additions & 12 deletions apps/deepstream-demux-multi-in-multi-out/ds_demux_pgie_config.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -55,29 +55,24 @@
[property]
gpu-id=0
net-scale-factor=0.00392156862745098
tlt-model-key=tlt_encode
tlt-encoded-model=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
onnx-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
labelfile-path=../../../../samples/models/Primary_Detector/labels.txt
int8-calib-file=../../../../samples/models/Primary_Detector/cal_trt.bin
force-implicit-batch-dim=1
batch-size=30

batch-size=1
process-mode=1
model-color-format=0
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=1
num-detected-classes=4
interval=0
gie-unique-id=1
uff-input-order=0
uff-input-blob-name=input_1
output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd
#scaling-filter=0
#scaling-compute-hw=0
cluster-mode=2
infer-dims=3;544;960

[class-attrs-all]
pre-cluster-threshold=0.2
eps=0.2
group-threshold=1
topk=20
nms-iou-threshold=0.5
4 changes: 2 additions & 2 deletions apps/deepstream-imagedata-multistream-cupy/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python
- NumPy package
- NumPy package <2.0, >=1.22 (2.0 and above not supported)
- OpenCV package
- CuPy for Cuda 12.1 or later

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -55,29 +55,24 @@
[property]
gpu-id=0
net-scale-factor=0.00392156862745098
tlt-model-key=tlt_encode
tlt-encoded-model=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
onnx-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
labelfile-path=../../../../samples/models/Primary_Detector/labels.txt
int8-calib-file=../../../../samples/models/Primary_Detector/cal_trt.bin
force-implicit-batch-dim=1
batch-size=30

batch-size=1
process-mode=1
model-color-format=0
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=1
num-detected-classes=4
interval=0
gie-unique-id=1
uff-input-order=0
uff-input-blob-name=input_1
output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd
#scaling-filter=0
#scaling-compute-hw=0
cluster-mode=2
infer-dims=3;544;960

[class-attrs-all]
pre-cluster-threshold=0.2
eps=0.2
group-threshold=1
topk=20
nms-iou-threshold=0.5
4 changes: 2 additions & 2 deletions apps/deepstream-imagedata-multistream-redaction/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python
- NumPy package
- NumPy package <2.0, >=1.22 (2.0 and above not supported)
- OpenCV package
- GstRtspServer

Expand Down
4 changes: 2 additions & 2 deletions apps/deepstream-imagedata-multistream/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python
- NumPy package
- NumPy package <2.0, >=1.22 (2.0 and above not supported)
- OpenCV package

To install required packages:
Expand Down
19 changes: 7 additions & 12 deletions apps/deepstream-imagedata-multistream/dstest_imagedata_config.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -55,29 +55,24 @@
[property]
gpu-id=0
net-scale-factor=0.00392156862745098
tlt-model-key=tlt_encode
tlt-encoded-model=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
onnx-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
labelfile-path=../../../../samples/models/Primary_Detector/labels.txt
int8-calib-file=../../../../samples/models/Primary_Detector/cal_trt.bin
force-implicit-batch-dim=1
batch-size=30

batch-size=1
process-mode=1
model-color-format=0
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=1
num-detected-classes=4
interval=0
gie-unique-id=1
uff-input-order=0
uff-input-blob-name=input_1
output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd
#scaling-filter=0
#scaling-compute-hw=0
cluster-mode=2
infer-dims=3;544;960

[class-attrs-all]
pre-cluster-threshold=0.2
eps=0.2
group-threshold=1
topk=20
nms-iou-threshold=0.5
2 changes: 1 addition & 1 deletion apps/deepstream-nvdsanalytics/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python

Expand Down
18 changes: 6 additions & 12 deletions apps/deepstream-nvdsanalytics/dsnvanalytics_pgie_config.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -55,29 +55,23 @@
[property]
gpu-id=0
net-scale-factor=0.00392156862745098
tlt-model-key=tlt_encode
tlt-encoded-model=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
onnx-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx
model-engine-file=../../../../samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_int8.engine
labelfile-path=../../../../samples/models/Primary_Detector/labels.txt
int8-calib-file=../../../../samples/models/Primary_Detector/cal_trt.bin
force-implicit-batch-dim=1
batch-size=30
batch-size=1
process-mode=1
model-color-format=0
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=1
num-detected-classes=4
interval=0
gie-unique-id=1
uff-input-order=0
uff-input-blob-name=input_1
output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd
#scaling-filter=0
#scaling-compute-hw=0
cluster-mode=2
infer-dims=3;544;960

[class-attrs-all]
pre-cluster-threshold=0.2
eps=0.2
group-threshold=1
topk=20
nms-iou-threshold=0.5
4 changes: 2 additions & 2 deletions apps/deepstream-opticalflow/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2020-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,7 +16,7 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python
- NumPy package
Expand Down
2 changes: 1 addition & 1 deletion apps/deepstream-preprocess-test/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
################################################################################

Prerequisites:
- DeepStreamSDK 7.0
- DeepStreamSDK 7.1
- Python 3.10
- Gst-python
- GstRtspServer
Expand Down
2 changes: 1 addition & 1 deletion apps/deepstream-preprocess-test/config_preprocess.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ network-input-shape=8;3;544;960
network-color-format=0
# 0=FP32, 1=UINT8, 2=INT8, 3=UINT32, 4=INT32, 5=FP16
tensor-data-type=0
tensor-name=input_1
tensor-name=input_1:0
# 0=NVBUF_MEM_DEFAULT 1=NVBUF_MEM_CUDA_PINNED 2=NVBUF_MEM_CUDA_DEVICE 3=NVBUF_MEM_CUDA_UNIFIED
scaling-pool-memory-type=0
# 0=NvBufSurfTransformCompute_Default 1=NvBufSurfTransformCompute_GPU 2=NvBufSurfTransformCompute_VIC
Expand Down
Loading