Skip to content

Commit 6aabcaf

Browse files
committed
Update to 1.0.3 release
- Adding runtime_source_add_delete app - Minor fixes for typos
1 parent 46bfd6b commit 6aabcaf

14 files changed

Lines changed: 1123 additions & 18 deletions

File tree

HOWTO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ See [sample applications](apps/) main functions for pipeline construction exampl
5858
<a name="metadata_access"></a>
5959
## MetaData Access
6060

61-
DeepStream MetaData contains inference results and other information used in analytics. The MetaData is attached to the Gst Buffer received by each pipeline component. The metadata format is described in detail in the [SDK MetaData documentation](https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream_Plugin_Manual%2Fdeepstream_plugin_metadata.03.1.html) and [API Guide](https://docs.nvidia.com/metropolis/deepstream/python-api/index.html).
61+
DeepStream MetaData contains inference results and other information used in analytics. The MetaData is attached to the Gst Buffer received by each pipeline component. The metadata format is described in detail in the [SDK MetaData documentation](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_metadata.html) and [API Guide](https://docs.nvidia.com/metropolis/deepstream/python-api/index.html).
6262

6363
The SDK MetaData library is developed in C/C++. Python bindings provide access to the MetaData from Python applications. The bindings are provided in a compiled module, available for x86_64 and Jetson platforms. This module, pyds.so, is available as part of the DeepStream SDK installation under <DeepStream Root>/lib directory.
6464

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,15 @@ We currently provide the following sample applications:
4343
* [deepstream-test4](apps/deepstream-test4) -- msgbroker for sending analytics results to the cloud
4444
* [deepstream-imagedata-multistream](apps/deepstream-imagedata-multistream) -- multi-stream pipeline with access to image buffers
4545
* [deepstream-ssd-parser](apps/deepstream-ssd-parser) -- SSD model inference via Triton server with output parsing in Python
46-
* [deepstream-test1-usbcam](apps/deepstream-test1-usbcam) -- deepstream-test1 pipeline with USB camera input
46+
* [deepstream-test1-usbcam](apps/deepstream-test1-usbcam) -- deepstream-test1 pipelien with USB camera input
4747
* [deepstream-test1-rtsp-out](apps/deepstream-test1-rtsp-out) -- deepstream-test1 pipeline with RTSP output
4848
* [deepstream-opticalflow](apps/deepstream-opticalflow) -- optical flow and visualization pipeline with flow vectors returned in NumPy array
4949
* [deepstream-segmentation](apps/deepstream-segmentation) -- segmentation and visualization pipeline with segmentation mask returned in NumPy array
5050
* [deepstream-nvdsanalytics](apps/deepstream-nvdsanalytics) -- multistream pipeline with analytics plugin
51+
* [runtime_source_add_delete](apps/runtime_source_add_delete) -- add/delete source streams at runtime
5152

5253
Of these applications, the following have been updated or added in this release:
53-
* deepstream-test2: added option to enable output of past frame tracking data
54-
* deepstream-test4: callback functions are registered only once to avoid race condition
55-
* deepstream-imagedata-multistream: the probe function now modifies images in-place in addition to saving copies of them
56-
* deepstream-opticalflow: new sample application to demonstrate optical flow functionality
57-
* deepstream-segmentation: new sample application to demonstrate segmentation functionality
58-
* deepstream-nvdsnalaytics: new sample application to demonstrate analytics functionality
54+
* runtime_source_add_delete -- add/delete source streams at runtime
5955

6056
Detailed application information is provided in each application's subdirectory under [apps](apps).
6157

apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,6 @@ def decodebin_child_added(child_proxy, Object, name, user_data):
213213
print("Decodebin child added:", name, "\n")
214214
if name.find("decodebin") != -1:
215215
Object.connect("child-added", decodebin_child_added, user_data)
216-
if is_aarch64() and name.find("nvv4l2decoder") != -1:
217-
print("Seting bufapi_version\n")
218-
Object.set_property("bufapi-version", True)
219216

220217

221218
def create_source_bin(index, uri):

apps/deepstream-nvdsanalytics/deepstream_nvdsanalytics.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,7 @@ def cb_newpad(decodebin, decoder_src_pad,data):
183183
def decodebin_child_added(child_proxy,Object,name,user_data):
184184
print("Decodebin child added:", name, "\n")
185185
if(name.find("decodebin") != -1):
186-
Object.connect("child-added",decodebin_child_added,user_data)
187-
if(is_aarch64() and name.find("nvv4l2decoder") != -1):
188-
print("Seting bufapi_version\n")
189-
Object.set_property("bufapi-version",True)
186+
Object.connect("child-added",decodebin_child_added,user_data)
190187

191188
def create_source_bin(index,uri):
192189
print("Creating source bin")

apps/deepstream-opticalflow/deepstream-opticalflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def ofvisual_queue_src_pad_buffer_probe(pad, info, u_data):
8888
# The casting also keeps ownership of the underlying memory
8989
# in the C code, so the Python garbage collector will leave
9090
# it alone.
91-
frame_meta = pyds.glist_get_nvds_frame_meta(l_frame.data)
91+
frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
9292
except StopIteration:
9393
break
9494

@@ -200,7 +200,7 @@ def create_source_bin(index, uri):
200200
def main(args):
201201
# Check input arguments
202202
if len(args) < 2:
203-
sys.stderr.write("usage: %s <uri1> [uri2] ... [uriN]\n" % args[0])
203+
sys.stderr.write("usage: %s <uri1> [uri2] ... [uriN] <output_folder>\n" % args[0])
204204
sys.exit(1)
205205

206206
number_sources = len(args) - 2

apps/deepstream-ssd-parser/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For x86_64 and Jetson Docker:
3434
be sure to prepare the detector models.
3535
2. Run the docker with this Python Bindings directory mapped
3636
3. Install required Python packages inside the container:
37-
$ apt install
37+
$ apt update
3838
$ apt install python3-gi python3-dev python3-gst-1.0 python3-numpy -y
3939

4040
For Jetson without Docker:
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
################################################################################
2+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a
5+
# copy of this software and associated documentation files (the "Software"),
6+
# to deal in the Software without restriction, including without limitation
7+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
# and/or sell copies of the Software, and to permit persons to whom the
9+
# Software is furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
# DEALINGS IN THE SOFTWARE.
21+
################################################################################
22+
23+
Prequisites:
24+
- DeepStreamSDK 5.1
25+
- Python 3.6
26+
- Gst-python
27+
28+
To run the test app:
29+
$ python3 deepstream-test-rt-src-add-del.py <uri>
30+
e.g.
31+
$ python3 deepstream_rt_src_add_del.py \
32+
file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.mp4
33+
34+
This application demonstrates how to:
35+
* Add and delete sources at runtime.
36+
* Use a uridecodebin so that any type of input (e.g. RTSP/File), any GStreamer
37+
supported container format, and any codec can be used as input.
38+
* Configure the stream-muxer to generate a batch of frames and infer on the
39+
batch for better resource utilization.
40+
* Configure the tracker (referred to as nvtracker in this sample) using
41+
config file dstest_tracker_config.txt
42+
43+
Refer to the deepstream-nvdsanalytics sample documentation for a description
44+
of stream-muxer configuration, tracker configuration, and multi-stream tiling.
45+
46+
The sample generates the following pipeline for single source <uri>
47+
48+
uridecodebin -> nvstreammux -> nvinfer -> nvtracker -> nvtiler -> nvvideoconvert
49+
-> nvdsosd -> displaysink
50+
51+
For reference, here are the config files used for this sample:
52+
1. Primary inference engine: dstest_pgie_config.txt
53+
2. First secondary inference engine: dstest_sgie1_config.txt
54+
3. Second secondary inference engine: dstest_sgie2_config.txt
55+
4. Third secondary inference engine: dstest_sgie3_config.txt
56+
57+
At runtime, after a timeout, a source will be added periodically. All the components
58+
are reconfigured during addition/deletion. After reaching of `MAX_NUM_SOURCES`,
59+
a random source is deleted periodically until a single source is present in the
60+
pipeline. The app exits when End of Stream is reached for the final source or if
61+
the last source is deleted.
62+
63+
64+
65+
66+

0 commit comments

Comments
 (0)