google / aiyprojects-raspbian

API libraries, samples, and system images for AIY Projects (Voice Kit and Vision Kit)
https://aiyprojects.withgoogle.com/
Apache License 2.0
1.61k stars 692 forks source link

Can aiyprojects-raspbian APIs be run without Vision Bonnet? #733

Open npaibrooklyn opened 3 years ago

npaibrooklyn commented 3 years ago

Hello I have a Raspberr Pi 4 with a regular Raspberry Camera v2.1. I am not planning on getting a Vision Bonnet. I was merely interested in the AI models that come with the API.

However when I try to run a demo it breaks with the error message shown below.

Is this because it needs a Vision Bonnet to be connected to the SPI?

I followed instructions at https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/HACKING.md however I skipped the Bonnet-specific instructions except for these:

Install the bonnet drivers:
sudo apt-get install -y aiy-vision-dkms

Install the example vision models:
sudo apt-get install -y aiy-models

Install the optimized protobuf library for better performance:
sudo apt-get install -y aiy-python-wheels

So, I do have aiy-vision-dkms and aiy-models installed.

~/AIY-projects-python/src/examples/vision/inaturalist_classification.py \
  --input bird.jpg --model birds
_init__
    self._dev = os.open(SPICOMM_DEV, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/vision_spicomm'
manoj7410 commented 3 years ago

@npaibrooklyn The models that come with AIY release require vision bonnet. The code looks for the vision bonnet so that the model can be executed on that. If the code doesn't find bonnet then it throws error : No such file or directory: '/dev/vision_spicomm'.