kahst / BirdNET-Lite

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

I got some wrong #2

Open tengbing88 opened 4 years ago

tengbing88 commented 4 years ago

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 commented 4 years ago

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

tengbing88 commented 4 years ago

I find this url and resolved this problem Thanks again

kahst commented 4 years ago

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".

tengbing88 commented 4 years ago

Thanks~~

jsga commented 4 years ago

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

tengbing88 commented 4 years ago

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 commented 4 years ago

@jsga

HGFestl commented 3 years ago

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

ekmalkova commented 3 years ago

@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

HGFestl commented 3 years ago

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

ekmalkova commented 3 years ago

@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.

HGFestl commented 3 years ago

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

krummrey commented 3 years ago

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.

ghost commented 3 years ago

Anyone got a solution for Raspberry Pi 4?