Output Display Wait Time - Multi-streaming Dtection and Tracking in DeepStream Python

• Hardware Platform (Jetson / GPU) = Jetson Xavier Nx
• DeepStream Version = 6.1.1
• JetPack Version (valid for Jetson only) = 35.1.0
• TensorRT Version = 8.4.1.5
• CUDA Version (valid for GPU only) = 11.4
• Issue Type( questions, new requirements, bugs) = Question

Hi, I am using the python binding of Deepstream to perform detection and tracking on a video.
For detection, I am using the custom YOLOv5 model and for tracking, I am using the Deepstream plugin.
(I am using this repo NVIDIA DeepStream SDK 6.1 / 6.0.1 / 6.0 configuration for YOLO-v5 & YOLO-v7 models · GitHub to perform detection and tracking using the Deepstream pipeline).

My target:
Process multiple streams at once.

Solution
I am using this python binding - deepstream_python_apps/apps/deepstream-imagedata-multistream at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub to process and display two streams at once.
I can observe the seamless detection of vehicles with corresponding tracking ID on the display window as shown below.

My Question
When I run the program, every time it takes 6 to 7 minutes to open the display, and then it runs smoothly.
So, eventually, I have to wait 6-7 minutes before the visualization takes place.

Please let me know if this is the normal wait time for multistreaming via DeepStream python.
Also, please put forth your suggestions as to how I can reduce this wait time.

Thank you.

Did you set model-engine-file in your config? It looks like the engine file is created on your every running.

Thank you for your response @yingliu .
Model-engine-file is set in my config.
As you can see from the screenshot below. On the Left side, is my directory with the model-engine-file model_b1_gpu0_fp32.engine and, on the Right side, is my config file where I have mentioned the name of the model (highlighted).

Also, I want to convey that, this much wait time is not there when I run this program for a single stream.
But when more than one stream is given via the command line, only then do I witness this wait time or delay in the visualization of the output display.

  1. what is the start command? could you share more logs? please do “export GST_DEBUG=5”, then run again, you can redirect the logs to a file.
  2. can you try one mp4 file?

Hi @fanzh , thank you for your response

Answering your first question
Since, I am using this python binding - deepstream_python_apps/apps/deepstream-imagedata-multistream at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub to process and display two streams at once,
the start command is - python deepstream_imagedata_multistream.py <path_of_mp41> <path_of_mp42>

I exported the logs for two cases as per your suggestion:

  • When there is only one MP4 file path in the command line.
  • When there are two MP4 file paths in the command line.

I am attaching the output log files for both the cases.
logs_one_mp4.txt (1.5 KB)
logs_two_mp4.txt (11.3 KB)

Answering your second question
With only one MP4 file path in the command line, there is almost no delay, and the output window opens right away.
However, with two MP4 file paths, it takes a delay of 6-7 minutes before the output window is displayed.

Thank you.

if testing two mp4 files, please modify the configuration file, set batch-size=2, and set model-engine-file=model_b2_gpu0_fp32_engine, it will cost some time to generate engine at the first time, after the first run, the application will not generate new engine, the output windows should open right away.

1 Like

Hey, @fanzh thank you for your inputs. Your suggestion solved my challenge. Now, opening multiple streams do not cause delay

1 Like

Glad to know you fixed it, thanks for the update! If need further support, please open a new one. Thanks

1 Like

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