简体   繁体   中英

Google Coral USB Accelerator on Raspbian Lite Buster and Raspberry PI 4

I am following the getting started guide for the Google Coral USB Accelerator and even though I was able to trick the install.sh file to install for RPI4

https://twitter.com/hansamann/status/1154021771554766849

I cannot run the example with the image classification. When I run the sample, I get this:

    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'

Any idea whay I could try?

I had the same problem but with an older Rpi 3. This is the solution I used. I don't think it's a make or break to complete the project:

$ sudo cp _edgetpu_cpp_wrapper.cpython-35m-arm-linux-gnueabihf.so _edgetpu_cpp_wrapper.cpython-37m-arm-linux-gnueabihf.so

Can you go through : https://github.com/google-coral/edgetpu-platforms ?

This repository holds auxiliary platform-related material related to Google Coral Edge TPU. Here you can find precompiled images, shared libraries and patches for using the USB Edge TPU accelerator on additional platforms to the main supported ones.

For convenience Google has uploaded prebuilt images for Raspberry Pi Zero, Pi 3 and Pi 4. Simply write the image to an sd card and boot up your Pi. The images contain several examples that should work out of the box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM