google-coral / tflite

Examples using TensorFlow Lite API to run inference on Coral devices
https://coral.withgoogle.com
Apache License 2.0
181 stars 67 forks source link

ValueError: Failed to load delegate from libedgetpu.so.1 #23

Closed Everthings closed 4 years ago

Everthings commented 4 years ago

Hey, I'm trying to run classify_image.py on a Coral USB Accelerator, but it throws the following error.

Traceback (most recent call last):
  File "classify_image.py", line 122, in <module>
    main()
  File "classify_image.py", line 99, in main
    interpreter = make_interpreter(args.model)
  File "classify_image.py", line 73, in make_interpreter
    {'device': device[0]} if device else {})
  File "/home/andyxu/.local/lib/python3.6/site-packages/tflite_runtime/interpreter.py", line 164, in load_delegate
    library, str(e)))
ValueError: Failed to load delegate from libedgetpu.so.1

Following all the steps verbatim here, I'm able to run in on the Windows 10 cmd. However, when set up everything on the same PC with Ubuntu WSL 2, I get the above error. I've tried everything mentioned in #4, and it appears that the libraries have been successfully installed. Any idea what the issue could be?

Namburger commented 4 years ago

@Everthings Humn, I'm actually not sure if libedgetpu would works under WSL :/ Although it's possible that your linux user just doesn't have plugdev access, could you try this?

sudo usermod -aG plugdev $USER

Then reboot your device and try again.

Everthings commented 4 years ago

@Namburger I've tried that before, but the problem remains.

Everthings commented 4 years ago

@Namburger I'm also running into a few problems with running the edge-tpu on Windows 10. I opened a different issue in the examples-camera repo which can be found here.

Namburger commented 4 years ago

@Everthings I see, I'll have to check if we have tested WSL with our library first, I'll keep you updated

Namburger commented 4 years ago

@Everthings Ahh, we haven't supported WSL yet (just because no testings were done), but we definitely got it to work under WSL1 on older release. For window, I'd stick with dll for now

Everthings commented 4 years ago

Ok, good to know. Thanks!