DSExample mutiple inferencing after PGIE

• Hardware Platform: NA
• DeepStream Version: 5.0
• JetPack Version: NA
• TensorRT Version: 7
• NVIDIA GPU Driver Version: NA

I have some custom processing that I do between a PGIE and SGIE. Originally I was modifying the input loop of a customized version of gst-nvinfer for the SGIE, but it’s not ideal.

What I’m looking for is a bit of guidance on how dsexample is set up and what I need to do (in general). The provided code for dsexample is an in-place transform plugin and doesn’t add any new buffers. It only adds or modifies existing metadata (or in the case of the opencv version, it modifies the frame data).

I’m looking to do essentially what the back-to-back detector example does, but using a custom process in-between the PGIE and SGIE. In the back-to-back detector when running on object mode (as opposed to full-frame mode) the output of PGIE will send as many frames (one per object) to the secondary detector. This is what I need to do, but I would like to avoid doing a full re-implementation of gst-nvinfer. I want to keep everything inside of gst-nvinfer untouched to make future Deepstream upgrades as seamless as possible.

So ultimately the question is do I need to replicate the output loop of gst-nvinfer to create buffers to pass to the SGIE? Is there a simpler way to get the output of a single full-frame inference from the PGIE, then generate as many inputs as needed and send them to the SGIE?

I don’t think nvinfer will generate new output buffers, the sgie just crate a temp buffer based on the bbox generated from pgie, so I think you can follow that logic. currently we don’t have open source plugin which generate new output buffer.