22. October 2024, using macOS 14.6.1, Google Coral Edge TPU
☞ Hint: Last supported Python version of the library PyCoral is version 3.9, setup your Python environment accordingly — already Python 3.10 did not worked out for me!
conda create -n coral python=3.9
python3 examples/classify_image.py \
--model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--labels test_data/inat_bird_labels.txt \
--input test_data/parrot.jpg
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
[...] AttributeError: _ARRAY_API not found
[...] SystemError: initialization of _pywrap_coral raised unreported exception
☞ to resolve this downgrade Numpy to last 1.X.X version
pip install "numpy<2.0"
ValueError: Failed to load delegate from libedgetpu.1.dylib
In the official Coral documentation I found two hints for this issue:lsusb -d 1a6e:089a
2. Check if the edgetpu library is reachable via Python:python -c "from ctypes.util import find_library; print(find_library(\"edgetpu\"))"
For me the second snipped returned None. This means the edgetpu library is not accessible for our Python program.sudo ln -s /usr/local/lib/libedgetpu.1.dylib /usr/local/lib/libedgetpu.dylib
☞ Hint: Only tensorflow lite models are supported by the runtime library edgetpu. No support for basic operations like matmul. Find out about the internal mechanics here!