-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to load delegate - aarch64, Debian #72
Comments
Can you please try below commands and after replacing the libedgetpu path in the following commands and try the demo.
|
Ok tried and re-ran the example. Same error from what I can tell tgall@viper:~/coral/pycoral-examples$ 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 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
can you please share how did you install libedgetpu runtime and output of following snippet. Thanks!
|
Here is my output: tgall@viper:/usr/include$ python3 -c 'from pycoral.utils.edgetpu import get_runtime_version; print(get_runtime_version())' and for libedgetpu I used apt-get tgall@viper:~$ dpkg -s libedgetpu1-std |
Okay, can you please share the output of following snippet. Thanks |
@tom-gall are you still facing the issue? |
I am running the code in raspberry PI 4 and facing the same issue. Any suggestion?
|
If you are using the usb accelerator, and it its plugged to your computer, setting the following udev rules should work: foo@bar:~$ lsusb -d 1a6e:089a
Bus 002 Device 004: ID 1a6e:089a Global Unichip Corp.
foo@bar:~$ echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a6e", ATTRS{idProduct}=="089a", MODE="0664", TAG+="uaccess"' | sudo tee -a /etc/udev/rules.d/71-edgetpu.rules > /dev/null
foo@bar:~$ echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9302", MODE="0664", TAG+="uaccess"' | sudo tee -a /etc/udev/rules.d/71-edgetpu.rules > /dev/null
foo@bar:~$ sudo udevadm control --reload-rules && sudo udevadm trigger |
Description
Trying to run the initial example:
tgall@viper:~/coral/pycoral-examples$ 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
Traceback (most recent call last):
File "/home/tgall/.local/lib/python3.7/site-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/home/tgall/.local/lib/python3.7/site-packages/tflite_runtime/interpreter.py", line 119, in init
raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "examples/classify_image.py", line 121, in
main()
File "examples/classify_image.py", line 71, in main
interpreter = make_interpreter(*args.model.split('@'))
File "/home/tgall/.local/lib/python3.7/site-packages/pycoral/utils/edgetpu.py", line 87, in make_interpreter
delegates = [load_edgetpu_delegate({'device': device} if device else {})]
File "/home/tgall/.local/lib/python3.7/site-packages/pycoral/utils/edgetpu.py", line 52, in load_edgetpu_delegate
return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {})
File "/home/tgall/.local/lib/python3.7/site-packages/tflite_runtime/interpreter.py", line 163, in load_delegate
library, str(e)))
ValueError: Failed to load delegate from libedgetpu.so.1
applying some of the common things to looking at:
tgall@viper:~/coral/pycoral-examples$ python3 -c "from ctypes.util import find_library; print(find_library("edgetpu"))"
libedgetpu.so.1
tgall@viper:~/coral/pycoral-examples$ lsusb -d 1a6e:089a
Bus 001 Device 004: ID 1a6e:089a Global Unichip Corp.
I had made sure to add my userid into plugdev with sudo usermod -aG plugdev
likewise looking at udev rules /etc/udev/rules.d/ I have
tgall@viper:~/coral/pycoral-examples$ cat /etc/udev/rules.d/99-edgetpu-accelerator.rules
SUBSYSTEM=="usb",ATTRS{idVendor}=="1a6e",GROUP="plugdev"
SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",GROUP="plugdev"
and from dmesg :
[210360.152395] usb 1-1: new high-speed USB device number 3 using ehci-pci
[210360.307907] usb 1-1: New USB device found, idVendor=1a6e, idProduct=089a, bcdDevice= 1.00
[210360.307908] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[214202.364639] usb 1-1: USB disconnect, device number 3
[214221.585606] usb 1-2: new high-speed USB device number 4 using ehci-pci
[214221.744194] usb 1-2: New USB device found, idVendor=1a6e, idProduct=089a, bcdDevice= 1.00
[214221.744196] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
No other error messages.
Suggestions?
Click to expand!
Issue Type
Build/Install
Operating System
Linux
Coral Device
USB Accelerator
Other Devices
No response
Programming Language
Python 3.7
Relevant Log Output
No response
The text was updated successfully, but these errors were encountered: