How can i use Tee element to run two different SGIEs simultaneously?

Hardware Platform (Tesla T4 16 GB)**
DeepStream Version 7.1
TensorRT Version 10.7.0.23-1+cuda12.6
NVIDIA GPU Driver Version 550.127.05

I’m using PGIE , SGIE1 , SGIE2 , SGIE3(detection ) .
i want to create a pipeline just like i shown in the image

Can anyone please tell me how can i use tee element for this? Here is my current link
source.link(qtdemux)
qtdemux.connect(“pad-added”, lambda demux, src_pad: src_pad.link(h264parser.get_static_pad(“sink”)))

h264parser.link(decoder)
sinkpad = streammux.get_request_pad("sink_0")
srcpad = decoder.get_static_pad("src")
srcpad.link(sinkpad)

streammux.link(pgie)
pgie.link(tracker)
tracker.link(sgie1)
sgie1.link(sgie2)
sgie2.link(sgie3)
sgie3.link(sgie3_tracker)
sgie3_tracker.link(nvvidconv1)
nvvidconv1.link(filter1)
filter1.link(nvosd)
nvosd.link(nvvidconv2)
nvvidconv2.link(filter2)
filter2.link(enc)
enc.link(h264parser_out)
h264parser_out.link(qtmux)
qtmux.link(sink)

Even run without tee, the GIEs work simultaneously. What happens inside the “tracker” block? What is the function of the two trackers in your graph? What is your real purpose?

i want to save both Outputs Individually that’s why i want to use tee

What is the relationship between PGIE, SGIE1, SGIE2 and SGIE3? Are SGIE1 and SGIE2 all classifiers? What will PGIE and SGIE3 detect? What do you mean by “save both Outputs Individually”? What kind of outputs do you want?