Custom input for SGIE

Deepstream automatically crops the input frame using bbox from pgie and run sgie on this cropped frame. I don’t want it to behave like that. After pgie, I have landmarks output and I will use them to do warpaffine on full frame, this will output a cropped frame without touching the bbox, And I want sgie to run on this cropped frame instead the one cropped using bbox.

Please tell me if this is possible or not. If possible, can I have some suggestions on how to do it properly? Thank you.

Could you check deepstream_tlt_apps/apps/tlt_others/deepstream-faciallandmark-app at release/tlt3.0 · NVIDIA-AI-IOT/deeps to see if any help?

Sorry, I don’t see my case there. I want to discuss a little about SGIE.

In official document :
Secondary mode: Operates on objects added in the meta by upstream components

Normally deepstream automatically uses the bbox from PGIE’s output to crop the full frame into a region and SGIE will run on this region. Do I understand it correctly?

1 Like

i think in this post can solve your problem

Correct, so the sgie will perform on the modified bbox if you change the bbox on a probe which installed on the sink pad of sgie, that’s the reason why I give you above sample for your reference

My problem can be illustrated like below:


My current approach is trying to do affine transform on full frame so that the sgie can crop it correctly. But I also want to keep the original frame for display purpose.

Hope you can understand it and give me some help. Thank you.

Thank you but it seems like ppl still get stuck there. I’ll keep an eye on it.

Ok, I got, then you can refer the topic @PhongNT mentioned, currently you can do it like this.

BTW, we will release a new gst plugin for customized preprocess in later release, then you can do this via that plugin.

1 Like