Skip to main content

Osprey

Dynamic, multi-stream video-analytics library built on NVIDIA DeepStream 8.0 — installable with pip, run bare-metal on the host.

import osprey.server as osprey

# Configure the model + tracker, then start the server (its own process).
osprey.configure(gie_config="/models/gie.txt", tracker="NvSORT")
osprey.serve()                                   # returns once the server is healthy
osprey.add_stream("rtsp://camera/stream", stream_id="cam1")

# Write your analytics with the client — no GStreamer/pyds knowledge needed.
from osprey.client import DeepStreamClient, FrameData

class VehicleCounter(DeepStreamClient):
    def _process_frame(self, frame: FrameData):
        for obj in frame.objects:
            self._draw_object(frame.surface, obj)  # box + tracking label

VehicleCounter().start()                          # serves RTSP for every discovered stream

One file: configure → serve runs the DeepStream inference pipeline + REST control plane in a separate process, while your DeepStreamClient runs the analytics and serves annotated RTSP. Prefer the CLI (osprey-server / osprey-client) for a production two-service deployment — see below.


What Osprey installs for you

Osprey is a Python layer on top of the DeepStream SDK. The GStreamer plugins (nvstreammux, nvinfer, nvtracker, nvunixfdsink/src, nvdsosd, …) and the pyds bindings are not on PyPI. Rather than make you set that up by hand, Osprey ships an end-to-end bootstrap that installs the full DeepStream 8.0 stack bare-metal — so a fresh Ubuntu 24.04 box becomes a working Osprey host.

Target platform (DeepStream 8.0, x86/dGPU):

Component Version
OS Ubuntu 24.04
NVIDIA driver R570.133.20
CUDA 12.8
TensorRT 10.9.0.34
cuDNN 9.7.1
GStreamer 1.24.2

Quick start (end-to-end)

# 1. Install the Python package (pure-Python + precompiled parser .so)
pip install ospreyai

# 2. Bootstrap the DeepStream stack bare-metal (needs root; ~one-time)
sudo osprey-bootstrap

# 3a. Run as two services (production)
osprey-server     # FastAPI control plane on :8000  (POST /api/v1/add …)
osprey-client     # discovers sockets, serves RTSP per stream

# 3b. …or a single Python file (see the example at the top)
python3 my_app.py   # configure() → serve() → your DeepStreamClient

Configuration is either programmatic (osprey.configure(...), shown above) or via environment variables (GIE_0_CONFIG, DS_TRACKER, DS_MODEL_WIDTH …) for the osprey-server CLI. See examples/ for a runnable single-file app.

osprey-bootstrap runs five stages (each also runnable on its own; see below). If the NVIDIA driver is (re)installed in stage 10, reboot before running the pipeline.

Bootstrap stages

Stage Does Mirrors
00_system_deps apt build toolchain + GStreamer runtime image apt layer
10_cuda_trt_cudnn driver R570 + CUDA 12.8 + cuDNN 9.7 + TensorRT 10.9 base image
20_deepstream_sdk DeepStream 8.0 SDK .deb from NGC → GStreamer plugins base image
30_pyds build + install pyds for your Python image bindings build
40_native_libs verify shipped parsers/serializer; TRT-plugin patch is manual image compile step

Useful toggles (read by the scripts, pass straight through):

sudo OSPREY_ASSUME_CUDA=1 osprey-bootstrap    # already have driver/CUDA/TRT/cuDNN
sudo OSPREY_ONLY=30 osprey-bootstrap          # run a single stage (e.g. just pyds)
sudo OSPREY_DS_VERSION=8.0 osprey-bootstrap   # override DeepStream version

Security note. Osprey does not auto-download or overwrite your system TensorRT library. Some ONNX models embed end-to-end NMS (EfficientNMS_TRT) and need a patched libnvinfer_plugin; because that means replacing a system library with an external binary, Osprey leaves it as a deliberate manual step (see the reference patch_libnvinfer.sh). Standard YOLO/RT-DETR detection and segmentation need no patch.


Already have DeepStream 8.0?

Skip the bootstrap and just use the library:

pip install ospreyai
python3 -c "from osprey.client import DeepStreamClient; print('ok')"

The bundled native libraries (osprey/**/lib/*.so) are compiled for DeepStream 8.0 / CUDA 12.8 and match the platform table above.


CLIs

Command Purpose
osprey-bootstrap Bare-metal end-to-end DeepStream install (root)
osprey-server FastAPI control plane — add/remove streams at runtime
osprey-client Discover sockets, run app logic, serve RTSP
osprey-build-engines Pre-build TensorRT engines from GIE_N_CONFIG

Testing

To exercise the library in a GPU DeepStream container (install → REST add → GPU inference → RTSP output), see docs/TESTING.md. It's the exact runbook used to validate Osprey end-to-end.

Metadata

Release files for ospreyai 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ospreyai 0.1.2
File Interpreter ABI Platform
ospreyai-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details

Release files / ospreyai-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL ospreyai-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl
Size 107.3 kB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
317c310375a3f2efa5d9f60b41703c82ae575e1fb910adefe0d19b2637d540e9
BLAKE2b-256 checksum
How to use checksums
08dc81647864e9e3469456431596fe24c0cfc0e679907da2d8f91760128b9f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for ospreyai 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page