luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
799 stars 356 forks source link

gen2-pedestrian-reidentification freezes while person is detected #523

Closed outbacker closed 1 month ago

outbacker commented 1 month ago

When trying to run python gen2-pedestrian-reidentification/main.py on a Raspberry Pi 4B with 8GB RAM (hardware revision 1.4 and running the OAK_CM4_POE image. depthai-viewer is also installed according to the wiki instructions) with an OAK-1 or OAK-D camera and a person is detected, the videofeed freezes and I constantly get the following error until nobody is in the frame anymore. Then it unfreezes and runs smoothly until a person is detected again.

Traceback (most recent call last): File "/home/pi/.local/lib/python3.11/site-packages/depthai_sdk/oak_outputs/xout/xout_base.py", line 95, in check_queue self.visualize(packet) File "/home/pi/.local/lib/python3.11/site-packages/depthai_sdk/oak_outputs/xout/xout_frames.py", line 67, in visualize self.callback(packet) File "/home/pi/path/to/depthai-experiments/gen2-pedestrian-reidentification/main.py", line 46, in cb reid_result = rec.getFirstLayerFp16() ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'numpy.ndarray' object has no attribute 'getFirstLayerFp16'

I found a few issues containing getFirstLayerFp16, but they didn't seem applicable as it's mostly contained in code snippets unrelated to my issue. One issue possibly worth mentioning is #99.

Thanks in advance for any hints on what I'm doing wrong. :)

jakaskerl commented 1 month ago

Hi @outbacker Update to depthai_sdk==1.12.0. Should work there.

outbacker commented 1 month ago

Thanks a lot, updating depthai_sdk worked! Would be great if the requirements.txt could be updated so it runs ootb.

jakaskerl commented 1 month ago

It should be updated.