Many pgie models for different inputs streams in the same app

Hi Nvidia,

I m using DeepStream 4 for traffic detection and counting on real-time, I m using yolov3-tiny (small and fast) to handle 6 different streams in different conditions (night/day, congested/free, angles, weather). The accuracy is not good, because a small model can not handle all that variability.

Is there any way, I can use different yolov3-tiny models for different streams in the same deepstream app ?

creating many nvinfer elements, each one is processing a bunch of input streams with a custom yolov3-tiny model.

Thanks in advance

Hi,

You can create multiple Deepstream pipeline for each customized model.
Thanks.

Hi Nvidia

Thanks for the reply,

Yep, you are right, I tried that with my nano, and I can run 2 pipelines maximum because of limited memory (only 4GB) while still having 50% of CPU and GPU not used.
The thing is that even if I get Xavier, the memory will be always a bottleneck.

BR

Hi,

That’s because you will need to create an independent TensorRT engine for each model.
The memory usage will increase proportional to the different detector you used.

Have you tried to retrain the YOLOv3 tiny with both daytime and night database together?
Suppose if the model’s ability(complexity) is good enough, it should be able to adapt to the different condition.

Thanks.

Thanks for the reply,

Now I got it, so the best way to use many pgie models is to create as many nvinfer primary elements as I need. Is it possible to do that while still using only 1 instance for other elements (nvtracker, nvstreammux, etc)? If yes, can you give me an example, I m not familiar with GStreamer pipelines.

Yes, I have retrained Yolov3-tiny with day and night (2 classes: car/truck), it is working well, the challenge I have is with different angles, when you include a lot of variation on angles and zoom in/out, it doesn’t perform well. But if you use YOLOv3, it works well, but very slow.

Thanks

“Two pipelines” means we have to create two element links like “streammux -> … -> pgie -> … -> osd”? Or just one element link like:

streammux -> ...... -> pgie1 -> ...... -> osd
                     |->pgie2 -> ...... -> osd
                     |->pgie2 -> ...... -> osd

I was refering to the first one