How to apply a mask to primary detections before feeding into secondary detector

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
**• DeepStream Version 7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 10.3.26
**• NVIDIA GPU Driver Version (valid for GPU only) 560.35
• Issue Type( questions, new requirements, bugs)

Hi, I am trying to build up a deepstream pipeline. I am having input frames through camera input and then I am feeding it to my primary detector to detect the objects that I want to perform segmantation task. And then I am feeding those objects into my secondary model for segmentation. The only problem is I want to set pixels that does not contain my object to ‘0’ so second model gets the desired object with black background to perform the segmentation. But I couldnt find a way to apply this mask on primary detections. Can you guide me?

Thanks in advance.

We cannot support this scenario at present. You can only use segmetation without the primary detector to implement your needs.