Possible two primary gies in deepstream?

I like to run two primary gies as gie-unique-id=1 and gie-unique-id=2.

I found a discussion here.

But tested and didn’t work.

I have two primary gies in the config file as

[primary-gie]
enable=1
gpu-id=0
model-engine-file=resnet18_dashcamnet_pruned.etlt_b1_gpu0_int8.engine
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
gie-unique-id=1
config-file=config_infer_primary_dashcamnet.txt

[primary-gie]
enable=1
gpu-id=0
model-engine-file=resnet34_peoplenet_pruned.etlt_b1_gpu0_int8.engine
batch-size=1
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
gie-unique-id=2
config-file=peoplenet_pgie_config.txt

When I add in second primary gie, the first one doesn’t work.

All config files are attached.
peoplenet_pgie_config.txt (3.3 KB) deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt (5.2 KB) config_infer_primary_dashcamnet.txt (2.0 KB)

What I like to have is video stream 1 and 2 are for pgie1 and video stream 3 and 4 are for pgie2. Is it possible to assign like that?

Then what about the downstream pipeline, streams 1 ~ 4 will use the same pipeline?

Yes same pipeline and same osd. Possible? The reason why is for example, some stream the application is crowd estimation, the model trained for the crowd is solely dedicated for that application. The stream for illegal car parking is with model trained with cars solely. So in that case, I have two pgies in detection and will go the same pipeline for same display on video wall. Is that right idea? Or is there any other better idea?
I know we can use same model and trained for different categories. But at this moment, I have two different models for pedestrian detection and car detection. Pedestrian detection in vehicle detection model is not well trained for pedestrian detection.

May I know what is your opinion for this scenario?

Yeah, I think you need to set your 2nd pgie to sgie and set the process mode as process-mode=1 under sgie group, can this pipeline work for you?

thanks let me try

Can please check my config files for what is wrong? I set one pgie and one sgie, only pgie works.

peoplenet_pgie_config.txt (3.3 KB) deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt (5.1 KB) config_infer_primary_dashcamnet.txt (2.0 KB)

I think you need to disable tracker and check if it can work?

Ok, can you share a whole repro with us, so we can check locally.

I sent by private message.

Thanks, will try locally.

I had repro your issue locally.
2 options to solve the issue:

  1. you can refer https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/back-to-back-detectors to implement your own app to support 2 primary detector.
  2. If you must use deepstream-app, then you need to customize deepstream_secondary_gie_bin.c ->create_secondary_gie_bin to support the feature.

Thanks let me try with those options.

I have a similar scenario, could I please know if modifying create_secondary_gie_bin in deepstream_secondary_gie_bin.c, would load in two primary gie’s in deepstream-app? Thank you