I am trying to use a Coral dev board mini connected via USB to a PC running Ubuntu 20.04 for inference with pycoral. Unfortunately, list_edge_tpus() returns [] inside python scripts (note that the various module imports seem to work just fine) and consequently (I believe) my scripts return the error: "ValueError: failed to load delegate from libedgetpu.so.1" from load_delegate().
Full traceback: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 164, 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 "test.py", line 12, in <module> experimental_delegates=[load_delegate('libedgetpu.so.1')] File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 166, in load_delegate raise ValueError('Failed to load delegate from {}\n{}'.format( ValueError: Failed to load delegate from libedgetpu.so.1
I have flashed the board with the latest recommended os version (excelsior-eagle-20201210233645). I have checked that Ubuntu 20.04 is a supported platform (I am running Python 3.7, which is supported). I have installed and checked the correct versions of libedgetpu1-std (v16), python3-pycoral (2.0.0), mendel-development-tool (1.5.2), and tflite-runtime (v2.5.0.post1).
I checked that the TPU board can do inference through mdt shell on files that were pushed from the Ubuntu computer. Similarly, "mdt devices" finds the board as expected. "lsusb" displays the Google.Inc (Mendel) device, but lsusd -v -d on the latter shows "device status" as 0x0000. Not sure this is normal or not... I have also noticed that the cdc_ether has renamed the interface from usb0, but I can't tell whether that creates any issue.
I paid attention to udev rules, adding my user to plugdev group and making sure to reload and trigger with udevadm. I am not sure what more I can do there... dmesg shows nothing about tpu, I could only catch the renaming of the interface by cdc_ether as a possible issue...
Where do I go from here? Thanks in advance for any pointer. In particular, I believe there is a causal relation between the fact that the TPU is not found from inside Python scripts and the fact that I get the "failed to load delegate" error, but with my luck this might be different issues...
EDIT
I found this:
It seems to indicate that the dev board simply cannot be used with PyCoral. That is... surprising. Anyone can confirm / comment?