Closed wb666greene closed 3 years ago
@wb666greene If you are using the libedgetpu legacy package, then you need to downgrade your tflite_runtime to 2.1post1 (the previous wheel) or use the edgetpu API as opposed to the pycoral API. My suggestion is still to upgrade libedgetpu to the none legacy version though
Another way to ensure that the versions all matches is to just uninstall the libedgetpu packages all together and loads the so
directly from here: https://github.com/google-coral/edgetpu/tree/master/libedgetpu/throttled
This has got me more even confused. I can't seem to find any previous tflite_runtime wheels, obviously I'm looking in the wrong place, but all I see are "frogfish" versions.
The libedgetpu github does have what looks to be a /etc/udev/rules.d file but my working AtomicPi 16.04 (edgetpu 2.14.1) and 20.04 (edgetpu 2.15.0) systems don't have it. My laptop that had the 3.7 version installed in python 3.7 pyenv, and then had libedgetpu1-legacy installed in system python3.8 does have a 99-edgetpu-accelerator.rules that looks to be what is on the github edgetpu site.
I guess I can try copying it over.
I don't have a clue as to how to proceed with the "another way" that you suggested.
Copying over the 99-edgetpu-accelerator.rules file, adding my user to the plugdev group and doing the usual to make it all active (reboot is easiest to explain, but I did the the hard way) Got my code running.
Interesting that these warnings that I have pretty much always seen since my earliest use of the TPU seem to have gone away on this virgin system.
W :81] Minimum runtime version required by package (5) is lower than expected (10). W :81] Minimum runtime version required by package (5) is lower than expected (10).
Any idea exactly what causes these?
Go ahead and close this if you don't have an answer about these warnings, can't offhand remember when I haven't seen them, I'd like to be able to make them go away everywhere I use a TPU.
Perhaps the libedgetpu-legacy package should be modified to install this udev/rules.d file, or am I the only one to encounter this issue on a virgin Ubuntu 20.04 system?
This one is an LXQT variation, I usually use Ubuntu-Mate or straight Ubuntu, but this was supplied by the Atomic Pi board vendor and has the special drivers to support the on-board "Mayfield" audio. Which up to now I always ignored, but need it for this project.
Feel free to reopen if this issue still persists.
sudo apt-get install libedgetpu1-legacy-std sudo apt-get install python3-edgetpu sudo apt-get install libedgetpu1-legacy-max sudo -H pip3 install https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl
But it looks like the TPU is not working:
`atomicpi@AtomicPi:~/AIdev$ python Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. from edgetpu.detection.engine import DetectionEngine model = DetectionEngine("mobilenet_ssd_v2/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite") Traceback (most recent call last): File "", line 1, in
File "/usr/lib/python3/dist-packages/edgetpu/detection/engine.py", line 80, in init
super().init(model_path)
File "/usr/lib/python3/dist-packages/edgetpu/basic/basic_engine.py", line 92, in init
self._engine = BasicEnginePythonWrapper.CreateFromFile(model_path)
RuntimeError: Error in device opening (/sys/bus/usb/devices/2-1.2)!
from edgetpu import version as edgetpu_version edgetpu_version '2.15.0' ` System is an "AtomicPi" based on Atom Z8350 chip.
I setup a similar system but running Ubuntu 16.04 a few months before the PyCoral replaced python3-edgetpu its edgetpu version is 2.14.1
lsusb shows this device appear when the TPU is plugged in: Bus 002 Device 010: ID 1a6e:089a Global Unichip Corp on both systems.
What piece is missing that prevents the USB3 TPU device from working with libedgetpu1-legacy??
Moving my code to PyCoral is all pain for no gain at the moment.
I need 20.04 for this system as there are audio issues with 16.04 and 18.04 on this particular system with the "standard" Ubuntu installations.
Before doing this virgin AtomicPi system I'd installed the libedgetpu1-legacy and python3-edgetpu on my i7 laptop that had been running the 2.14.1 edgetpu version in a pyenv python3.7 virtual environment, and had no issues running my code on python 3.8 with libedgetpu1-legacy so I wasn't expecting problems on the virgin system.
Is it possible the libedgetpu1-legacy forgot to do a system level something that happened in the libedgetpu1 python 3.7 installation?