Skip to content
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 from libedgetpu.so.1 #5

Open
Demonytro opened this issue May 14, 2024 · 4 comments
Open

Failed to load delegate from libedgetpu.so.1 #5

Demonytro opened this issue May 14, 2024 · 4 comments

Comments

@Demonytro
Copy link

(.venv) rpi5@raspberrypi:~/silva $ silvatpu -p det -m 240_yolov8n_full_integer_quant_edgetpu.tflite -i Working_Man_7.mp4 -z 192 -t 0.5
Loading 240_yolov8n_full_integer_quant_edgetpu.tflite for TensorFlow Lite Edge TPU inference...
Traceback (most recent call last):
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/home/rpi5/silva/.venv/lib/python3.9/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 "/home/rpi5/silva/.venv/bin/silvatpu", line 8, in
sys.exit(silvatpu())
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/edge_tpu_silva/main.py", line 97, in silvatpu
for _, _ in outs:
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/edge_tpu_silva/silva/silva_detect.py", line 38, in process_detection
outs = model.predict(
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/ultralytics/engine/model.py", line 446, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/ultralytics/engine/predictor.py", line 297, in setup_model
self.model = AutoBackend(
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/rpi5/silva/.venv/lib/python3.9/site-packages/ultralytics/nn/autobackend.py", line 337, in init
interpreter = Interpreter(model_path=w, experimental_delegates=[load_delegate(delegate)])
File "/home/rpi5/silva/.venv/lib/python3.9/site-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

(.venv) rpi5@raspberrypi:~/silva $

@stefcarpi
Copy link

Hi!
After some problems in configuring the coral on a raspberrypi4 I tried your package @DAVIDNYARKO123 , to install all dependencies and run a model. I'm running python 3.9, and I'm using the process_detection function, but I get the same error as @Demonytro

Loading ../240_yolov8n_full_integer_quant_edgetpu.tflite for TensorFlow Lite Edge TPU inferen
ce...
Traceback (most recent call last):
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 160, in load_delegate
delegate = Delegate(library, options)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 119, in init
raise ValueError(capture.message)
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 17, in __PYTHON_EL_eval
File "/home/pi/traxer-testing/silvaprocess.py", line 9, in
for _, _ in outs:
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/edge_tpu_silva/silva/silva_detect.
py", line 38, in process_detection
outs = model.predict(
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/engine/model.py", line
446, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/engine/predictor.py",
line 297, in setup_model
self.model = AutoBackend(
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/torch/utils/_contextlib.py", line
115, in decorate_context
return func(*args, **kwargs)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/nn/autobackend.py", li
ne 337, in init
interpreter = Interpreter(model_path=w, experimental_delegates=[load_delegate(delegate)])
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1

@holmesha
Copy link

holmesha commented Jun 8, 2024

getting the same error...cannot make this work using a live feed instead of an uploaded file...it was the freaking cord...

@NUB-DISTRAIT
Copy link

Hi!
After some problems in configuring the coral on a raspberrypi4 I tried your package @DAVIDNYARKO123 , to install all dependencies and run a model. I'm running python 3.9, and I'm using the process_detection function, but I get the same error as @Demonytro

Loading ../240_yolov8n_full_integer_quant_edgetpu.tflite for TensorFlow Lite Edge TPU inferen
ce...
Traceback (most recent call last):
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 160, in load_delegate
delegate = Delegate(library, options)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 119, in init
raise ValueError(capture.message)
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 17, in __PYTHON_EL_eval
File "/home/pi/traxer-testing/silvaprocess.py", line 9, in
for _, _ in outs:
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/edge_tpu_silva/silva/silva_detect.
py", line 38, in process_detection
outs = model.predict(
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/engine/model.py", line
446, in predict
self.predictor.setup_model(model=self.model, verbose=is_cli)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/engine/predictor.py",
line 297, in setup_model
self.model = AutoBackend(
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/torch/utils/_contextlib.py", line
115, in decorate_context
return func(*args, **kwargs)
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/ultralytics/nn/autobackend.py", li
ne 337, in init
interpreter = Interpreter(model_path=w, experimental_delegates=[load_delegate(delegate)])
File "/home/pi/.pyenvs/silva/lib/python3.9/site-packages/tflite_runtime/interpreter.py", li
ne 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1

Same issue "ValueError: Failed to load delegate from libedgetpu.so.1" encountered.
@DAVIDNYARKO123 Kindly guide us through.

@NUB-DISTRAIT
Copy link

NUB-DISTRAIT commented Jun 10, 2024

Found it: #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants