Secondary detector operates only on detected frames.

I have a pipeline consisting of two detectors(Yolo) where the ouput of the first detector is the input of the second. I have initialized them as pgie and sgie. While running the first detector alone the fps reaches around 22 fps. However while running the whole pipeline with the secondary detector the fps comes down to 10 fps. This happens even when there are no detections on the pgie. This means that sgie is run even when there is no detections in the primary detector. Is it possible to run inference on the second detector only when there are detections in pgie?

I think Tracker is used to solve the problem, can you refer section 2.1.

This means that sgie is run even when there is no detections in the primary detector.
I think this will not happen.

What’s the batch size of pgie and sgie ?
Can you share the GPU workload, by command “nvidia-smi dmon” on Tesla platorm ?
You can try #2 tracker solution to reduce pgie workload, for example “interval=1” for detection(pgie/sgie) means doing inference for 1 frame and then skip next frame.

The tracker(Kanade lucas tomasi - KLT) didnt seem to work for my usecase and so I decided to not use it. I am trying to detect relatively smaller objects and so IOU doesnt seem to aid tracking.The interval option seems to work and we are looking up on it as it leads to compromise in the accuracy.

I am working on Jetson Nano and not on a Tesla platform. The corresponding GPU stats (tegrastats) are- “RAM 2989/3956MB (lfb 97x4MB) SWAP 1079/1978MB (cached 18MB) CPU [29%@307,23%@307,24%@307,20%@307] EMC_FREQ 0% GR3D_FREQ 90% PLL@31C CPU@34.5C PMIC@100C GPU@33.5C AO@43C thermal@33.25C POM_5V_IN 7557/3907 POM_5V_GPU 3904/703 POM_5V_CPU 378/822”.

We have 2 detectors with batch sizes 1(default) and both are tiny yolo. Can you provide me with some examples of how to use 2 detectors in the pipeline sequentially? Do I need 2 nvosds and nvvidconvs? My total pipeline needs 2 detectors and 1 classifier sequentially.

I think you can change the tracker low level lib to select other Tracker algorithm to see if the accuracy is better,
you can refer Tracker section to learn how to modify the low level lib