How to integrate 2 pipelines into one pipeline?

• Hardware Platform (Jetson / GPU) : Jetson
• DeepStream Version : 5.1
• JetPack Version (valid for Jetson only) : 4.5
• TensorRT Version : 7.1.3

I have two pipelines like this :

source >>> streammux >> pgie-nvinfer(detector) >> sgie1-invfer(detector) >> sgie2-invfer(classifier) >> sink

source >>> streammux >> pgie-invfer(detector) >> sgie-invfer(classifier) >> sink

These two pipeline are same in this parts:
sgie1(pipeline1) = pgie(pipeline2)
sgie2(pipeline1) = sgie(pipeline2)

The only difference of them is the pgie-detector of pipeline1 and this part is’t in pipeline2.

Suppose I want to use 10-streams and first 5-streams for pipeline 1 and second 5-streams for pipeline2, but I want to occurred in the one pipeline (integrated pipeline) like this:

The biggest challenge of this pipeline is that detector-1 and detector-2 are pgie and sgie for first 5 streams and also detector-2 is pgie for second 5 streams.

The second solution maybe to work is that 10 batch of streams feed to detector-1, but detector-1 have to set with batch 5. I guess in first time the detector captures first 5-streams and in the second time it captures second 5-streams, but my purpose is that the detector-1 skip the second 5-stream and without inference of second 5-streams passed to next elements.

No. DeepStream can not support such design.