Run secondary models only on certain streams

I am processing multiple cameras using a DeepStream 6.0.1 pipeline. I have a primary engine and two secondary engines operating on the same class (car).
All the cameras needs to be processed by the same primary engine. Some of the cameras needs to run one of the two secondary engines, and the remaining cameras needs to run the other secondary engine.

                              /---> sgie1 
cameras -> nvstreammux -> pgie 
                              \---> sgie2 

Both sgie1 and sgie2 classify cars.
How can I do this?
Thank you!

Can you use tee?

Hi @kesong , thank you for your reply.

Sure, I can use tee. However, how do I use it to split the streams across the two secondary models? E.g. the streams number 1, 2, 3 should be processed by sgie1 while the streams number 4, 5, 6 should be processed by sgie2.

I am using the Python API.

Thank you

Can you demux and mux it again based on your requirement?

Hi @kesong ,
It sounds like a good idea. What property of tee should I use to demux the streams? What component can I use to mux?
Thank you!

You can use nvstreamdemux to split all sources and then you can use nvstreammux to mux the needed sources for the following SGIE.

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Hi @yingliu . Thank you for your reply. I solved by using a probe to change the unique-component-id (the pgie) of each object based on the model I want to run on it because in my case it was easier this way. It would be interesting to test your solution too but I was concerned by the possibility of having two pipelines working at two different speeds (I don’t know if that could happen).

Thank you!

Thanks for your update, feel free to submit a new topic if you meet other issues.

1 Like