我正在遵循Google Coral USB Accelerator入门指南,即使我能够欺骗install.sh文件以为RPI4安装
https://twitter.com/hansamann/status/1154021771554766849
我无法使用图像分类来运行示例。当我运行示例时,我得到了:
python3 classify_image.py --model ~/Downloads/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --label ~/Downloads/inat_bird_labels.txt --image ~/Downloads/parrot.jpg
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_edgetpu_cpp_wrapper', [dirname(__file__)])
File "/usr/lib/python3.7/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_edgetpu_cpp_wrapper'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "classify_image.py", line 19, in <module>
from edgetpu.classification.engine import ClassificationEngine
File "/usr/local/lib/python3.7/dist-packages/edgetpu/classification/engine.py", line 17, in <module>
from edgetpu.basic.basic_engine import BasicEngine
File "/usr/local/lib/python3.7/dist-packages/edgetpu/basic/basic_engine.py", line 15, in <module>
from edgetpu.swig.edgetpu_cpp_wrapper import BasicEngine
File "/usr/local/lib/python3.7/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 28, in <module>
_edgetpu_cpp_wrapper = swig_import_helper()
File "/usr/local/lib/python3.7/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 20, in swig_import_helper
import _edgetpu_cpp_wrapper
ModuleNotFoundError: No module named '_edgetpu_cpp_wrapper'
有什么想法可以尝试吗?
答案 0 :(得分:1)
我遇到了同样的问题,但使用的Rpi 3较旧。这是我使用的解决方案。我认为完成该项目不是成败的事情:
$ sudo cp _edgetpu_cpp_wrapper.cpython-35m-arm-linux-gnueabihf.so _edgetpu_cpp_wrapper.cpython-37m-arm-linux-gnueabihf.so
答案 1 :(得分:0)
您可以通过:https://github.com/google-coral/edgetpu-platforms吗?
此存储库包含与Google Coral Edge TPU相关的辅助平台相关材料。在这里,您可以找到预编译的映像,共享库和修补程序,以便在主要支持的其他平台上使用USB Edge TPU加速器。
为方便起见,Google已为Raspberry Pi Zero,Pi 3和Pi 4上传了预构建的图像。只需将图像写入sd卡并启动您的Pi。这些图像包含了几个可以立即使用的示例。