Hi,
I'm using an oak-1 for periodic qr code decoding. On the oak I have a DetectionModel
for detecting the qr codes. The result and the frame in full resolution get sent upstream to an dai.node.HostNode
that crops the image to the detection bounding box and then decodes it with pyzbar.
But it's not supposed to run all the time since the application does other stuff to. Runs about every 20th second. So I run pipeline.start()
at start and then every time I want to scan I poll queue.tryGet()
. Since the whole pipeline is blocking, this means the pipeline is "frozen" when I don't poll. I do not want to shut down the pipeline every time since it's so slow to start it up again.
First time after the pipeline is started this works. But when the app has been doing something else for a while and comes back for a second scan it seems the pipeline is asleep. I get nothing when I poll. But then magically after about 4 minutes of polling it wakes up again and starts working correctly.
I've looked with top
and my HostNode(5)
thread shows very little activity (compared to the first run when it always works). Furthermore the XLinkInHost
threads are completely dead second time around.
With DEPTHAI_LEVEL=trace
on the first scan I see the data shuffling around and get the usual:
[18443010513845F500] [3.1] [2439.221] [DetectionParser(4)] [trace] DetectionParser took '12.115082' ms
Second time, I get no information about data shuffling around. I only get the following three lines repeating:
[18443010513845F500] [3.1] [1810.589] [system] [info] Temperatures - Average: 54.80C, CSS: 55.29C, MSS 54.64C, UPA: 54.21C, DSS: 55.07C
[1844301041F542F500] [1.1] [303.865] [system] [info] Cpu Usage - LeonOS 2.35%, LeonRT: 0.18%
[18443010513845F500] [3.1] [1753976327.793] [host] [trace] Log vector decoded, size: 3
Until it starts working again after the mentioned minutes of polling.
Unfortunately I don't know if it's a node in the camera or a host thread going to sleep and blocking the rest of the pipeline.
Setup:
- depthai==3.0.0rc3
- oak 1
- raspberry pi 5 8gb