Multiple pipelines with different models

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) nano/nx
• DeepStream Version 6.1
• JetPack Version (valid for Jetson only) 4.5
• TensorRT Version 7.1
• NVIDIA GPU Driver Version (valid for GPU only)
**• Issue Type( questions, new requirements, bugs)**questions
**• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)**python sample

I want to implemented multiple pipelines to run multiple models in python. I have 2 cameras to run 2 different models. So I need to setup the 2 pipelines as below:
pipeline 1: camera1 → nvstreammux → nvinfer(pgie1) → appsink_0
pipeline 2: camera2 → nvstreammux → nvinfer(pgie2) → appsink_1

The questions are:
1.Is that possible for deepstream running 2 pipelines or event more in same process? And the pipelines won`t interference each other?
2.How can I start 2 pipeline at the same time, does the code as below can work property?
GObject.threads_init()
mainloop1 = GObject.MainLoop()
mainloop2 = GObject.MainLoop()
def func_mainloop1():
mainloop1.run()
def func_mainloop2():
mainloop2.run()
myThread1 = threading.Thread(target=func_mainloop1, daemon=True)
myThread1.start()
myThread2 = threading.Thread(target=func_mainloop2, daemon=True)
myThread2.start()

  1. Yes. No interference.
  2. Only one mainloop is enough. What you need are just two pipelines. You can refer too deepstream-app source code. More gstreamer coding skills, please refer to gstreamer sources. https://gstreamer.freedesktop.org/
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.