I'm not sure this problem has been reported before. At first, for my convenience, I had tried to install the depthai on my Win10 machine but the depthai_demo.py did not run. Then I tried to install using the command-line instruction, it went well but the depthai_demo ran with no camera shown, i.e. the video screen was blank. There was an error message "X_LINK_DEVICE_NOT_FOUND".
So, I decided to install the depthai on my RPi 4B 8GB using a pre-configured RPi image.
I chose the KS_RPiOS_Full_V2.zip (Jan 2022) and put it on a Kingston A1 32GB sdcard. It took 30 mins for my RPi 4B to show the depthai splash screen. I thought it was performing the sdcard initialization (and whatever Docker required) and noticed the disk-write led was blinking almost all the time.
My RPi 4B ran very very slow. The cpu ran almost 100% (from the SSH monitoring status) while the memory usage was only 0.7 from 8GB. Around 70 mins later, my RPi seemed to be responsive, but the CPU was still very high, never lower than 90%. Consequently, I could not start the depthai_demo.py. I repeated this installation process twice and it had the same result.
So, I decided to use the command-line installation, starting with a fresh raspios-bullseye arm64 image (775MB) This time, my RPi 4B had no issue with high cpu utilization, the cpu ran only at 25%. Finally, I managed to get all dependencies requirement done. Thanks for this thread.
git clone https://github.com/luxonis/depthai.git
These following lines made a magic happen !! (This also worked on Win10)
# in depthai repository
$ sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash
$ python3 install_requirements.py
And the depthai_demo.py ran without any glitch. The RPi 4B's cpu was around 20-25%.
I'm very curious why the pre-configured RPi image behaved so weird on my RPi. What caused the problem ? The sdcard ? 32-bit of the KS_RPiOS_Full_V2 ??