google-coral / edgetpu

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

Unable to run model on Edge TPU #795

Open DNA99 opened 9 months ago

DNA99 commented 9 months ago

Description

Hi, I am using the mini PCIe version of the coral TPU and I installed the files according to https://coral.ai/docs/m2/get-started/#4-run-a-model-on-the-edge-tpu

When I try to run the model on the Edge TPU in step 4. I get the following message:

root@frigate2:~/coral/pycoral# 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 "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate delegate = Delegate(library, options) File "/usr/lib/python3/dist-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 "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 87, in make_interpreter delegates = [load_edgetpu_delegate({'device': device} if device else {})] File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 52, in load_edgetpu_delegate return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {}) File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate raise ValueError('Failed to load delegate from {}\n{}'.format( ValueError: Failed to load delegate from libedgetpu.so.1

Click to expand! ### Issue Type Build/Install ### Operating System Linux ### Coral Device Mini PCIe ### Other Devices _No response_ ### Programming Language _No response_ ### Relevant Log Output ```shell root@frigate2:~/coral/pycoral# 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 "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate delegate = Delegate(library, options) File "/usr/lib/python3/dist-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 "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 87, in make_interpreter delegates = [load_edgetpu_delegate({'device': device} if device else {})] File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py", line 52, in load_edgetpu_delegate return tflite.load_delegate(_EDGETPU_SHARED_LIB, options or {}) File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate raise ValueError('Failed to load delegate from {}\n{}'.format( ValueError: Failed to load delegate from libedgetpu.so.1 root@frigate2:~/coral/pycoral# ^C root@frigate2:~/coral/pycoral# lspci -nn | grep 089a 03:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a] root@frigate2:~/coral/pycoral# ls /dev/apex_0 /dev/apex_0 root@frigate2:~/coral/pycoral# ```