• Hardware Platform: GPU
• DeepStream Version: 7.1
• TensorRT Version: 10.9.0.34
• NVIDIA GPU Driver Version (valid for GPU only): 550.144.03
Hi everyone, I hope you’re doing well!
I’m currently working on a DeepStream pipeline using the Python bindings, and I’d like to know whether it’s possible to perform object cropping at the original resolution when using the Gst-nvmultiurisrcbin element.
The general idea is to use a queue and a tee before the GstNvStreamMux, so we can preserve the original decoded frame. After inference and tracking are completed, we would then crop the detected object at the original resolution, possibly to perform further analysis or inference.
At the moment, our cropping happens at the resolution scaled down by nvstreammux (e.g., 720p), using a probe function at the end of the pipeline. This leads to suboptimal crops, especially for high-res streams like 4K.
We’re considering a few approaches:
- Manually building an equivalent to
nvmultiurisrcbinin our pipeline, keeping its reconnection logic and support for both H.264 and H.265, but also exposing a second output pad with the original-resolution frames. - Injecting custom elements into
nvmultiurisrcbin, though this seems unlikely since it’s a compiled, closed-source bin. - Somehow pushing
nvinferandnvtrackermetadata upstream, to access it before thenvstreammuxscaling — possibly even trickier. - Running two independent pipelines, one for inference and tracking (720p), and another to receive original frames and perform cropping based on shared metadata.
We’re also unsure how to synchronize the metadata from the inference branch with the original frames from the crop branch, if we do manage to duplicate the frame before scaling. That might be a topic on its own — a whole can of worms.
Has anyone attempted something similar, or is there an official or recommended approach for this use case?
Thanks in advance for any insights — and keep up the great work!
pipeline.pdf (41.1 KB)