How to create a gstreamer pipeline with three engine and run each ones on separate engines in jetson nx?

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

Hi,
I create a gstreamer pipline that have 3 part of infernce, one part is pgie and two other parts are sgie.

My pipeline is like this :

Sources >> nvinfer-PGIE(detection) >>> nvinfer-SGIE(detection) >>> nvinfer-SGIE(classifier) >> sinks

I converted each of models on GPU and also I used queue element after and before of each element for none-blocking of each parts and works independent from each other. This solution is only used GPU engine for three engines, but the jetson nx also has 2-DLAs engines.

1- I want to know how I can use these three models for each engine to work Independent from each other?

I don’t want to work these part like sequential.

2- If I convert the pgie engine on GPU and two others sgie engine on 2-DLAs, So the pipeline runs three models Independent from each other like parallel? or again runs as sequential mode? If runs sequential, So what’s advantage of DLAs used in jetson when GPU run faster than DLAs?

  1. Are these three models all detectors? Is there any relationship between these three models?
  2. The batched data always go through upstream plugin to downstream plugin, so from this point of view, the models handle a batch in sequence. From the whole streams point of view, when the downstream plugin handle the nth batch, the upstream plugin may handle the (n-3)th batch in parallel, so in this point, the models work in parallel. DLAs are to offload GPU for second case here.

@Fiona.Chen,
1- Two models are detectors and one is classifier, and all of models have relationship between.

when the downstream plugin handle the nth batch, the upstream plugin may handle the (n-3)th batch in parallel

In my opinion, this is incorrect, because when the upstream plugins handle nth batch, the downstream plugins may handle the (n-3)th batch, because the batched first feed to upstream plugin then feed to downstream plugin, right?

Yes. You are right. When the downstream plugin handle the nth batch, the upstream plugin may handle the (n+3)th batch in parallel.

Two detectors and one clsaaifier, please refer to the sample: GitHub - NVIDIA-AI-IOT/deepstream_lpr_app: Sample app code for LPR deployment on DeepStream