pyds_ext
python bindings for nvidia deepstream
pybind11 bindings to access Nvidia DeepStream metadata from Python - uses patched deepstream_python_apps. This package offers the same functionality as the default nvidia bindings, as well as some additional funcitonality:
- Allow to install with pip: wheels for x86-64 (GPU) and aarch64 (jetson) are available
- Patch pybind bindings to allow maskrcnn masks extraction
Previous version:
The following patches were included in the previous version (<2), and are no longer required because they are included in the vanilla bindings:
- Tracker meta info (
NvDsPastFrame...classes) - Detector and tracker bbox info (
NvDsObjectMeta.[tracker/detector]_bbox_info...attrs) from Python. - Analytics Metadata (
NvDsAnalyticsFrameMetaandNvDsAnalyticsObjInfo) from Python.
Installation
Prerequisites
-
python3.8
-
Jetson (Xavier only tested) or Nvidia GPU
-
Deepstream>=6 (6.1 only tested)
-
[Option A] pep-517 compatible pip:
pip install "pip>=10" -
[Option B] Only necessary for old
pip<10:- pybind11:
- [Option B.1] You might try simply
pip install pybind11. - [Option B.2] The recommended way is to build it from source
- [Option B.1] You might try simply
- pybind11:
Install package
pip install --upgrade pip>=10
pip install pyds_ext
Usage
This meta-package provides a single package:
Standard pyds
pyds: Patched pyds from/opt/nvidia/deepstream/deepstream/libSee oficial documentation here
Maskrcnn extraction
Use the following as a reference to extract the np.ndarray of the mask:
import pyds
def osd_sink_pad_buffer_probe(pad, info, u_data):
# ... code to acquire frame_meta
l_obj = frame_meta.obj_meta_list
while l_obj is not None:
try:
obj_meta = pyds_bbox_meta.NvDsObjectMeta.cast(l_obj.data)
except StopIteration:
break
mask_array = obj_meta.mask_params.data
print(f"mask_array: {mask_array}")
try:
l_obj = l_obj.next
except StopIteration:
break
...
To convert the mask to an uint8 bidimensional matrix, see this code.
For this and other utilities, consider using the pythia package, which builds on this and adds pythonic iteration and common deepstream boilerplate.
References
Metadata
Release files for pyds-ext 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyds_ext-2.0.0-cp38-cp38-manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details for pyds_ext-2.0.0-cp38-cp38-manylinux2014_x86_64.whl |
| pyds_ext-2.0.0-cp38-cp38-manylinux2014_aarch64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ ARM64 | Details for pyds_ext-2.0.0-cp38-cp38-manylinux2014_aarch64.whl |
Total release size: 1.0 MB
Release files / pyds_ext-2.0.0-cp38-cp38-manylinux2014_x86_64.whl
| Download URL | pyds_ext-2.0.0-cp38-cp38-manylinux2014_x86_64.whl |
|---|---|
| Size | 523.2 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
71f01538a1f4cdc1d4b035e2552ee45fe6e01bba167700df237830596a5d2c86
|
|
BLAKE2b-256 checksum How to use checksums |
bd4ffc09975a44e6da326822bb52180c9c925a60d26b9b0ac5e210480f3c41ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyds_ext-2.0.0-cp38-cp38-manylinux2014_aarch64.whl
| Download URL | pyds_ext-2.0.0-cp38-cp38-manylinux2014_aarch64.whl |
|---|---|
| Size | 493.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
c61ae86f92cf22b87b40a29ab8fc125392e2ae90117e8ce399850986479f9a26
|
|
BLAKE2b-256 checksum How to use checksums |
bb3de869626dbf9d1ad40c877278bb13ee6fed5aae239f242f6f36e902c010c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for pyds-ext 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.