← Back to selected work

gst-nvdsvpistereo

View on GitHub

Open-source GStreamer DeepStream plugin for VPI stereo depth on NVIDIA Jetson Orin. Sustained 26 fps, up from 21, through the OFA, PVA, and VIC hardware pipeline, validated against tape-measure ground truth from 2 to 12 meters.

C++DeepStreamVPIJetson
The problem

An internal robot platform used a stereo depth pipeline hardcoded to one camera model and tightly coupled to the rest of the project, and no reusable, standalone DeepStream VPI stereo element existed publicly. The goal was a camera-agnostic GStreamer DeepStream element that runs VPI-accelerated stereo depth on NVIDIA Jetson Orin and attaches disparity and confidence data as standard metadata, so any team could add VPI stereo depth without writing the VPI integration code from scratch.

The approach

The element is a GstBaseTransform subclass that takes a side-by-side stereo frame and outputs the rectified left-eye frame, with depth data attached to frame metadata through a probe on the downstream muxer, since the element itself runs before that metadata exists. All VPI state sits behind a private implementation class, so the GStreamer element never exposes VPI headers directly, and rectification maps are pre-computed rather than calibrated in-element, keeping the core dependency-free and startup deterministic. Benchmarking surfaced a real bug, the code mapped a confidence setting to the wrong VPI enum value, and correcting it let confidence computation run on a separate accelerator in parallel with the main disparity calculation, directly improving throughput. Several other parameter constraints were checked against the actual VPI header and corrected, since they didn't match the real hardware limits documented in the code.

Results
26 fps
production configuration on Jetson Orin
0 frames
drift across a 360-frame, 30-second stability run
2.85 m
measured depth accuracy against a scene calculation
27 fps
restored throughput after fixing a numPasses regression
Stack
C++17PythonNVIDIA DeepStreamNVIDIA VPIGStreamerCUDAJetson OrinZED X
👋 Hi, I'm a digital version of Lasantha. Ask me about my work.