问题描述
我正在尝试在 VirtualBox 上的 Ubuntu 客户机上的 Coral USB 加速器上运行示例模型。我按照说明运行示例模型。一切都很顺利,直到我运行实际模型,它以下列方式失败。
VirtualBox:~/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 152,in load_delegate
delegate = Delegate(library,options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py",line 111,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 84,in <module>
main()
File "examples/classify_image.py",line 61,in main
interpreter = make_interpreter(*args.model.split('@'))
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py",line 66,in make_interpreter
delegates = [load_edgetpu_delegate({'device': device} if device else {})]
File "/usr/lib/python3/dist-packages/pycoral/utils/edgetpu.py",line 42,in load_edgetpu_delegate
return tflite.load_delegate(_EDGETPU_SHARED_LIB,options or {})
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py",line 154,in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1
VirtualBox:~/coral/pycoral$ dpkg -l |grep libedge
ii libedgetpu1-std:amd64 15.0 amd64 Support library for Edge TPU
任何帮助将不胜感激。谢谢!
解决方法
拔下并重新插入 Coral USB 适配器。它为我解决了同样的问题。