depthai-experiments icon indicating copy to clipboard operation
depthai-experiments copied to clipboard

[gen2-pedestrian-reidentification] Very high delay with multiple people

Open kuu22 opened this issue 1 year ago • 1 comments

I'm running the gen2-pedestrian-reidentification on an OAK-D and after a few seconds of running, I get a delay of upwards of 3 seconds. However, the FPS reported in the output is still high, around 8 FPS.

My guess is that the output queue fills up and I display old frames, while other, newer frames, are sitting in the queue. I've tried to set the camera FPS to 5 and that mitigates the delay, but I'm trying to get all of the nodes running somewhat synchronously without artificially limiting my camera FPS:

My goal is to setup a pipeline that captures an image from the camera, performs detection and reidentification and sends everything to the host before capturing the next image, so everything waits until the whole pipeline is complete. I'm guessing this would lower the FPS but latency is more important in my application.

Is there any way I could do this? I've tried setting smaller queues in the output but it ends up freezing after a couple of seconds.

kuu22 avatar Sep 14 '22 14:09 kuu22

Hi @kuu22 , I apologize for the delay here. The main reason for the delay is the inference time of the reid model, and when having multiple people, each person will be cropped from the high-resolution frame and sent to the reid model. Unfortunately, I don't see any good solution for this problem. You could set node input queues to 1 (docs here) but I'm not sure whether this will help any more than to just lowering FPS. Thoughts? Thanks, Erik

Erol444 avatar Sep 24 '22 13:09 Erol444