depthai-experiments
depthai-experiments copied to clipboard
[Feature request] Fix multi-stage pipeline freeze due to multiple (obj) detections
Hi! I'm trying the gen2-face-recognition demo on my pc.
Sometimes after few seconds, in "recognition" mode, it freezes. This error seems to occur more time as the number of faces increases. This an example of image I'm using to make it crash:

Looks like to me there's a problem with queue get full or something similar. No error nor exception is thrown.
I'm on Windows 10, depthai 2.15.2.0, python 3.9 and I'm using an OAK-1.
Here attached is the log. log.txt
Hello @f-alemauro , As you suspect, it's the case as there are too many faces. I believe the default queue is for 4 messages, and the recognition model is not fast enough to process all frames, so it blocks, and this blocking behavior freezes the whole pipeline. For now, we suggest not to use the demo with that many faces or limit the number of faces to be recognized (to eg. 2/3). Thanks, Erik
I will be addressing this issue after this PR (I believe this is a separate issue).
Age-gender demo works even with multiple frames - so it's likely a problem with heavier models
Fixed for lighter recognition models as well in SDK; see cntr
implementation here: https://github.com/luxonis/depthai/pull/740/files#diff-dd32217966df02b79a468e6d922d2c27b457b4fd3c33ce4d96a12a8f61f761ec cc @f-alemauro