kahst / BirdNET-Lite

TFLite version of BirdNET. Bird sound recognition for more than 6,000 species worldwide.
Other
147 stars 194 forks source link

tflite_runtime error #3

Closed Mattk70 closed 3 years ago

Mattk70 commented 3 years ago

Hi Stefan, I'm really pleased with the model, it works great on Ubuntu 20.04.

Now I am trying to install BirdNET-Lite on a RPi. This is using this part of the import "try" block:

import tflite_runtime.interpreter as tflite

Since a Tensorflow package isn't easily available for the platform, I have python3-tflite-runtime installed (2.5.0). Python 3.7 also.

When I execute the script, it fails with the following error:

LOADING TF LITE MODEL... Traceback (most recent call last): File "analyze.py", line 238, in main() File "analyze.py", line 215, in main interpreter = loadModel() File "analyze.py", line 46, in loadModel interpreter.invoke() File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 540, in invoke self._interpreter.Invoke() RuntimeError: Regular TensorFlow ops are not supported by this interpreter. Make sure you apply/link the Flex delegate before inference.Node number 29 (FlexRFFT) failed to prepare.

For some reason it doesn't apply/link the Flex delegate as it does when using: from tensorflow import lite as tflite

Any ideas why?

Thanks!

jsga commented 3 years ago

Hi @Mattk70, did you solve this issue? If so, would you mind sharing how?