google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
426 stars 125 forks source link

image not found, edgetpu_runtime_20210119 #351

Closed alekovargas closed 3 years ago

alekovargas commented 3 years ago

Hello. i am having some problems running the python3 examples/classify_image.py \in MAC os Catalina 10.15.7, it seems edgetpu image is missing, as follow;

--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 Traceback (most recent call last): File "examples/classify_image.py", line 39, in from pycoral.utils.edgetpu import make_interpreter File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/utils/edgetpu.py", line 24, in from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/pybind/_pywrap_coral.cpython-38-darwin.so, 2): Library not loaded: @rpath/libedgetpu.1.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/pybind/_pywrap_coral.cpython-38-darwin.so Reason: image not found

this might be due to the fact that Edge TPU runtime fails to be installed using:

curl -O https://github.com/google-coral/libedgetpu/releases/download/release-frogfish/edgetpu_runtime_20210119.zip unzip edgetpu_runtime_20210119.zip

MacBook-Pro:pycoral user$ unzip edgetpu_runtime_20210119.zip Archive: edgetpu_runtime_20210119.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of edgetpu_runtime_20210119.zip or edgetpu_runtime_20210119.zip.zip, and cannot find edgetpu_runtime_20210119.zip.ZIP, period.


note: for me it seems file is corrupted,

mbrooksx commented 3 years ago

Hello @alekovargas ,

This is running from the pycoral classify_image.py? Have you run https://github.com/google-coral/pycoral/blob/master/examples/install_requirements.sh?

alekovargas commented 3 years ago

hi @mbrooksx

yes I am running it for the python3 examples/classify_image.py, I run properly the "install_requirements.sh"

however it stills fails as follow:

Traceback (most recent call last): File "/Users/davidvargas/Desktop/FH_demos/coral2/FH_detect.py", line 36, in from pycoral.utils.edgetpu import make_interpreter File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/utils/edgetpu.py", line 24, in from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/pybind/_pywrap_coral.cpython-38-darwin.so, 2): Library not loaded: @rpath/libedgetpu.1.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pycoral/pybind/_pywrap_coral.cpython-38-darwin.so Reason: image not found

The problem form me is with a MAC os + google coral, i was able to run properly in a configuration of raspberry pi + google coral.

thanks, for any help

wb666greene commented 3 years ago

Try downloading the appropriate wheels for tflite-runtime and pycoral from: https://github.com/google-coral/pycoral/releases and installing them with pip

I had to do this on Ubuntu 16.04 when the apt-get pycoral failed.

francysuri commented 3 years ago

I have the same Issue, the file is located in /usr/local/lib/ but rpath is not addressing

This is what I get from running otool -L /usr/local/lib/libedgetpu.1.dylib

francesco@MacBookPro pycoral % otool -L /usr/local/lib/libedgetpu.1.dylib
/usr/local/lib/libedgetpu.1.dylib: @rpath/libedgetpu.1.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0) /opt/local/lib/libusb-1.0.0.dylib (compatibility version 3.0.0, current version 3.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1677.104.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)

I already tried reinstalling the Edge TPU runtime library, the tflite-runtime and pycoral from the wheels

hjonnala commented 3 years ago

New edgetpu runtime( edgetpu_runtime_20210726.zip) has been released. Please try the new runtime from here and feel free to reopen if issue still exists.