BirdNET-Lite icon indicating copy to clipboard operation
BirdNET-Lite copied to clipboard

I got some wrong

Open tengbing88 opened this issue 4 years ago • 14 comments

Hi Stefan,

When I run this code with tflite==2.3.0 or tensorflow-cpu==2.3.0 I got some wrong:

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.

My question is: What environment will make this code running right ?

Thanks 👍 (By the way, great work!)

tengbing88 avatar Oct 28 '20 13:10 tengbing88

https://github.com/tensorflow/tensorflow/issues/40157

tengbing88 avatar Oct 28 '20 14:10 tengbing88

I find this url and resolved this problem Thanks again

tengbing88 avatar Oct 28 '20 14:10 tengbing88

Thanks @tengbing88 for pointing that out.

BirdNET-Lite uses a non-standard TFLite function (RFFT) to compute spectrograms. This function is only available for certain platforms (Android, iOS, x86) and custom TFLite builds (which you can use e.g. on the Raspberry Pi) that also include the so-called "Special Ops".

kahst avatar Oct 28 '20 19:10 kahst

Thanks~~

tengbing88 avatar Oct 29 '20 01:10 tengbing88

Hi @tengbing88, could you be a bit more specific on how you solved this issue? I am also interested.

jsga avatar Nov 01 '20 15:11 jsga

Hi @tengbing88, could you be a bit more specific on how you solved this issue? I am also interested.

I just installed tf-nightly,and this issue was solved.good luck for you.

tengbing88 avatar Nov 16 '20 05:11 tengbing88

@jsga

tengbing88 avatar Nov 16 '20 05:11 tengbing88

Hello, I got the same problem with my raspberry pi 4. Obviously I could not find the correct nightly build. So, can I get some more specific hints for a beginner.

Best regards, Hans Guenter

HGFestl avatar Feb 08 '21 12:02 HGFestl

@HGFestl I've got it run on raspberry 4, python3.7 and the solution was installing tensorflow 2.4.0 which was more complicated than installing 1.4.7

and use this part of code from tensorflow import lite as tflite

ekmalkova avatar Feb 08 '21 13:02 ekmalkova

Many thanks for your quick answer, akmalkova. My python version is 3.7.3 The Tensorflow is 2.4.0rc2 And the part of code in the file "analyze.py" is the same as well. Unfortunately, I still have the problem "Tensorflow ops are not supported by this interpreter" Do you have another idea?

Best regards, Hans Guenter

HGFestl avatar Feb 08 '21 13:02 HGFestl

@HGFestl same here. python 3.7, tensorflow 2.4.0rc2. Another TF libraries: tensorflow-datasets 4.2.0, tensorflow-estimator 2.4.0, tensorflow-metadata 0.26.0, tflite 2.4.0, tflite-runtime 2.5.0

when i do it like in analyze.py with try: import tflite_runtime.interpreter as tflite it loads tflite and then i get this error. And i also was quite stuck with this (it did not even work on PC), but then i guess i reinstalled tensorflow and it worked.

ekmalkova avatar Feb 08 '21 14:02 ekmalkova

Thank you again. I re-installed TF, but I still have the same problem. May be my fault, I am not a Linux specialist...

HGFestl avatar Feb 08 '21 15:02 HGFestl

I was able to get it running under Ubuntu 18.04.5 using pip install tf-nightly. Had to restart my environment from scratch due to some dependency issues.

krummrey avatar Apr 19 '21 14:04 krummrey

Anyone got a solution for Raspberry Pi 4?

christoph-lauer avatar Sep 04 '21 17:09 christoph-lauer