You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+55-15Lines changed: 55 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,55 @@
1
1
# Frequently Asked Questions and Troubleshooting Guide
2
2
3
-
*[Git clone fails due to Gstreamer repo access error](#faq9)
4
-
*[Application fails to work with mp4 stream](#faq0)
5
-
*[Ctrl-C does not stop the app during engine file generation](#faq1)
6
-
*[Application fails to create gst elements](#faq2)
7
-
*[GStreamer debugging](#faq3)
8
-
*[Application stuck with no playback](#faq4)
9
-
*[Error on setting string field](#faq5)
10
-
*[Pipeline unable to perform at real time](#faq6)
11
-
*[Triton container problems with multi-GPU setup](#faq7)
12
-
*[ModuleNotFoundError: No module named 'pyds'](#faq8)
3
+
-[Frequently Asked Questions and Troubleshooting Guide](#frequently-asked-questions-and-troubleshooting-guide)
4
+
-[App causes Jetson Orin Nano to freeze and reboot](#app-causes-jetson-orin-nano-to-freeze-and-reboot)
5
+
-[Using new gst-nvstreammux](#using-new-gst-nvstreammux)
6
+
-[Git clone fails due to Gstreamer repo access error](#git-clone-fails-due-to-gstreamer-repo-access-error)
7
+
-[Application fails to work with mp4 stream](#application-fails-to-work-with-mp4-stream)
8
+
-[Ctrl-C does not stop the app during engine file generation](#ctrl-c-does-not-stop-the-app-during-engine-file-generation)
9
+
-[Application fails to create gst elements](#application-fails-to-create-gst-elements)
10
+
-[GStreamer debugging](#gstreamer-debugging)
11
+
-[Application stuck with no playback](#application-stuck-with-no-playback)
12
+
-[Error on setting string field](#error-on-setting-string-field)
13
+
-[Pipeline unable to perform at real time](#pipeline-unable-to-perform-at-real-time)
14
+
-[Triton container problems with multi-GPU setup](#triton-container-problems-with-multi-gpu-setup)
15
+
-[ModuleNotFoundError: No module named 'pyds'](#modulenotfounderror-no-module-named-pyds)
16
+
17
+
<aname="faq11"></a>
18
+
### App causes Jetson Orin Nano to freeze and reboot
19
+
Most of the DeepStream Python apps are written to use hardware encoders. The Jetson Orin Nano does not have any hardware encoders, so the app must be modified to use software encoders in the pipeline. Please see [deepstream-test1-rtsp-out](./apps/deepstream-test1-rtsp-out/deepstream_test_1_rtsp_out.py):
Most DeepStream Python apps are written to use the default nvstreammux and have lines of code written to set nvstreammux properties which are deprecated in the new gst-nvstreammux. See the [DeepStream documentation](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvstreammux2.html) for more information on the new gst-nvstreammux plugin. To use the new nvstreammux, set the `USE_NEW_NVSTREAMMUX` environment variable before running the app. For example:
The app itself must be modified not to set deprecated properties when using the new nvstreammux. See [deepstream-test1](./apps/deepstream-test1/deepstream_test_1.py):
37
+
```python
38
+
if os.environ.get('USE_NEW_NVSTREAMMUX') !='yes': # Only set these properties if not using new gst-nvstreammux
Go into each app directory and follow instructions in the README.
@@ -84,12 +84,12 @@ Memory for MetaData is shared by the Python and C/C++ code paths. For example, a
84
84
85
85
#### Allocations
86
86
87
-
When MetaData objects are allocated in Python, an allocation function is provided by the bindings to ensure proper memory ownership of the object. If the constructor is used, the the object will be claimed by the garbage collector when its Python references terminate. However, the object will still need to be accessed by C/C++ code downstream, and therefore must persist beyond those Python references.
87
+
When MetaData objects are allocated in Python, an allocation function is provided by the bindings to ensure proper memory ownership of the object. If the constructor is used, the object will be claimed by the garbage collector when its Python references terminate. However, the object will still need to be accessed by C/C++ code downstream, and therefore must persist beyond those Python references.
88
88
89
89
Example:
90
90
To allocate an NvDsEventMsgMeta instance, use this:
91
91
```python
92
-
msg_meta = pyds.alloc_nvds_event_msg_meta() # get reference to allocated instance without claiming memory ownership
92
+
msg_meta = pyds.alloc_nvds_event_msg_meta(user_event_meta) # get reference to allocated instance without claiming memory ownership
Custom MetaData added to NvDsUserMeta require custom copy and release functions. The MetaData library relies on these custom functions to perform deep-copy of the custom structure, and free allocated resources. These functions are registered as callback function pointers in the NvDsUserMeta structure.
175
175
176
-
Callback functions are registered using these functions:
176
+
##### Deprecation Warning
177
+
Previously, Callback functions were registered using these functions:
*NOTE*: Callbacks need to be unregistered with the bindings library before the application exits. The bindings library currently keeps global references to the registered functions, and these cannot last beyond bindings library unload which happens at application exit. Use the following function to unregister all callbacks:
183
+
These are now DEPRECATED and are replaced by similar implementation in the binding itself. These are event_msg_meta_copy_func() and event_msg_meta_release_func() respectively. These can be found inside [bindschema.cpp](bindings/src/bindschema.cpp)
184
+
185
+
##### Deprecation Warning
186
+
*NOTE*: Previously, callbacks needed to be unregistered with the bindings library before the application exits. The bindings library currently keeps global references to the registered functions, and these cannot last beyond bindings library unload which happens at application exit. Use the following function to unregister all callbacks:
183
187
```pyds.unset_callback_funcs()```
188
+
These callbacks are automatically set inside the alloc_nvds_event_msg_meta() function and should NOT be set from the python application (e.g. deepstream-test4)
184
189
185
-
See the deepstream-test4 sample application for an example of callback registration and unregistration.
190
+
The deepstream-test4 sample application has been updated to show an example of removal of these callback registration and unregistration.
186
191
187
192
Limitation: the bindings library currently only supports a single set of callback functions for each application. The last registered function will be used.
188
193
@@ -212,5 +217,5 @@ This function populates the input buffer with a timestamp generated according to
212
217
<aname="imagedata_access"></a>
213
218
## Image Data Access
214
219
215
-
Decoded images are accessible as NumPy arrays via the `get_nvds_buf_surface` function. This function is documented in the [API Guide](https://docs.nvidia.com/metropolis/deepstream/6.0.1/python-api/index.html).
220
+
Decoded images are accessible as NumPy arrays via the `get_nvds_buf_surface` function. This function is documented in the [API Guide](https://docs.nvidia.com/metropolis/deepstream/dev-guide/python-api/index.html).
216
221
Please see the [deepstream-imagedata-multistream](apps/deepstream-imagedata-multistream) sample application for an example of image data usage.
Copy file name to clipboardExpand all lines: README.md
+33-12Lines changed: 33 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,35 @@
2
2
3
3
This repository contains Python bindings and sample applications for the [DeepStream SDK](https://developer.nvidia.com/deepstream-sdk).
4
4
5
-
SDK version supported: 6.1.1
5
+
SDK version supported: 7.1
6
6
7
-
<b>The bindings sources along with build instructions are now available under [bindings](bindings)! </b>
7
+
<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>
8
8
9
-
<b>This release comes with Operating System upgrades (from Ubuntu 18.04 to Ubuntu 20.04) for DeepStreamSDK 6.1.1 support. This translates to upgrade in Python version to 3.8 and [gst-python](3rdparty/gst-python/) version has also been upgraded to 1.16.2 !</b>
10
-
11
-
Download the latest release package complete with bindings and sample applications from the [release section](../../releases).
9
+
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.
12
10
13
11
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.
14
12
13
+
<b>NOTE:<b> numpy 2.x is not supported. If you have numpy 2.x installed, please downgrade by running
14
+
```
15
+
pip3 install --force-reinstall numpy==1.26.0
16
+
```
17
+
18
+
<b>NOTE:<b> deepstream-segmask and deepstream-segmentation applications are not currently supported by DeepStream 7.1, due to removal of segmentation models.
19
+
20
+
<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>.
-[Python Bindings Breaking API Change](#python-bindings-breaking-api-change)
17
26
-[Sample Applications](#sample-applications)
18
27
28
+
## Setup
29
+
Once you have DeepStreamSDK pre-requisites and DeepStreamSDK installed on the system, navigate to <DS_ROOT>/sources/ dir which is /opt/nvidia/deepstream/deepstream/sources/ and git clone deepstream_python_apps repo here.
30
+
31
+
The latest bindings can be installed from [release section](../../releases).
32
+
You can also build the bindings from source using the instructions in the [bindings readme](bindings/README.md) if needed.
33
+
19
34
<aname="metadata_bindings"></a>
20
35
## Python Bindings
21
36
@@ -28,6 +43,9 @@ Python [bindings](bindings) are provided as part of this repository. This module
28
43
29
44
These bindings support a Python interface to the MetaData structures and functions. Usage of this interface is documented in the [HOW-TO Guide](HOWTO.md) and demonstrated in the sample applications.
30
45
46
+
### Python Bindings Breaking API Change
47
+
The binding for function alloc_nvds_event_msg_meta() now expects a NvDsUserMeta pointer which the NvDsEventMsgMeta is associated with. Please refer to [deepstream-test4](apps/deepstream-test4) and [bindschema.cpp](bindings/src/bindschema.cpp) for reference.
48
+
31
49
<aname="sample_applications"></a>
32
50
## Sample Applications
33
51
@@ -41,22 +59,25 @@ To run the sample applications or write your own, please consult the [HOW-TO Gui
41
59
</p>
42
60
43
61
We currently provide the following sample applications:
*[deepstream-test1](apps/deepstream-test1) -- 4-class object detection pipeline, also demonstrates support for new nvstreammux
45
63
*[deepstream-test2](apps/deepstream-test2) -- 4-class object detection, tracking and attribute classification pipeline
46
-
*[deepstream-test3](apps/deepstream-test3) -- multi-stream pipeline performing 4-class object detection - now also supports triton inference server, no-display mode, file-loop and silent mode
64
+
*[deepstream-test3](apps/deepstream-test3) -- multi-stream pipeline performing 4-class object detection, also supports triton inference server, no-display mode, file-loop and silent mode
47
65
*[deepstream-test4](apps/deepstream-test4) -- msgbroker for sending analytics results to the cloud
48
66
*[deepstream-imagedata-multistream](apps/deepstream-imagedata-multistream) -- multi-stream pipeline with access to image buffers
49
67
*[deepstream-ssd-parser](apps/deepstream-ssd-parser) -- SSD model inference via Triton server with output parsing in Python
50
-
*[deepstream-test1-usbcam](apps/deepstream-test1-usbcam) -- deepstream-test1 pipelien with USB camera input
51
-
*[deepstream-test1-rtsp-out](apps/deepstream-test1-rtsp-out) -- deepstream-test1 pipeline with RTSP output
68
+
*[deepstream-test1-usbcam](apps/deepstream-test1-usbcam) -- deepstream-test1 pipeline with USB camera input
69
+
*[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
52
70
*[deepstream-opticalflow](apps/deepstream-opticalflow) -- optical flow and visualization pipeline with flow vectors returned in NumPy array
53
-
*[deepstream-segmentation](apps/deepstream-segmentation) -- segmentation and visualization pipeline with segmentation mask returned in NumPy array
71
+
*[deepstream-segmentation](apps/deepstream-segmentation) -- **NOT CURRENTLY SUPPORTED IN DS 7.1**segmentation and visualization pipeline with segmentation mask returned in NumPy array
54
72
*[deepstream-nvdsanalytics](apps/deepstream-nvdsanalytics) -- multistream pipeline with analytics plugin
55
73
*[runtime_source_add_delete](apps/runtime_source_add_delete) -- add/delete source streams at runtime
56
74
*[deepstream-imagedata-multistream-redaction](apps/deepstream-imagedata-multistream-redaction) -- multi-stream pipeline with face detection and redaction
57
-
*[deepstream-rtsp-in-rtsp-out](apps/deepstream-rtsp-in-rtsp-out) -- multi-stream pipeline with RTSP input/output
75
+
*[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
58
76
*[deepstream-preprocess-test](apps/deepstream-preprocess-test) -- multi-stream pipeline using nvdspreprocess plugin with custom ROIs
59
-
* <b>NEW</b> [deepstream-demux-multi-in-multi-out](apps/deepstream-demux-multi-in-multi-out) -- multi-stream pipeline using nvstreamdemux plugin to generated separate buffer outputs
77
+
*[deepstream-demux-multi-in-multi-out](apps/deepstream-demux-multi-in-multi-out) -- multi-stream pipeline using nvstreamdemux plugin to generated separate buffer outputs
78
+
*[deepstream-imagedata-multistream-cupy](apps/deepstream-imagedata-multistream-cupy) -- access imagedata buffer from GPU in a multistream source as CuPy array - x86 only
79
+
*[deepstream-segmask](apps/deepstream-segmask) -- **NOT CURRENTLY SUPPORTED IN DS 7.1** access and interpret segmentation mask information from NvOSD_MaskParams
80
+
*[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)
60
81
61
82
62
83
Detailed application information is provided in each application's subdirectory under [apps](apps).
0 commit comments