Memory Error, out of fast Frame Buffer Stack - H7

Discussion related to "under the hood" OpenMV topics.
uraibeef
Posts: 18
Joined: Sun Apr 28, 2019 5:56 am

Memory Error, out of fast Frame Buffer Stack - H7

Postby uraibeef » Mon Mar 16, 2020 5:39 pm

i'm going to run machine learning example ' TensorFlow Lite Mobilenet V1 Example ' on OpenMV H7
and then it show up an error 'MemoryError: Out of fast Frame Buffer Stack Memory! Please reduce the resolution of the image you are running this algorithm on to bypass this issue!'
but i'm not edit anything on this code?

what should i do?
thank you
User avatar
iabdalkader
Posts: 1168
Joined: Sun May 24, 2015 3:53 pm

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby iabdalkader » Mon Mar 16, 2020 8:47 pm

Hi, the mobilenet example loads the network to memory and only works on the H7-Plus (with external SDRAM).
User avatar
kwagyeman
Posts: 4006
Joined: Sun May 24, 2015 2:10 pm

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby kwagyeman » Mon Mar 16, 2020 10:04 pm

It doesn't even work on the H7 Plus anymore. Google broke Mobilenet support with their recent updates to TensorFlow. We are waiting for a fix.
Nyamekye,
uraibeef
Posts: 18
Joined: Sun Apr 28, 2019 5:56 am

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby uraibeef » Tue Mar 17, 2020 2:44 am

iabdalkader wrote:
Mon Mar 16, 2020 8:47 pm
Hi, the mobilenet example loads the network to memory and only works on the H7-Plus (with external SDRAM).
thank you, i'm missing to read the comment on top of the example code
uraibeef
Posts: 18
Joined: Sun Apr 28, 2019 5:56 am

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby uraibeef » Tue Mar 17, 2020 2:49 am

kwagyeman wrote:
Mon Mar 16, 2020 10:04 pm
It doesn't even work on the H7 Plus anymore. Google broke Mobilenet support with their recent updates to TensorFlow. We are waiting for a fix.
omg.. really?
what should i do if i want to train a model, convert to .tflite and deploy on OpenMV.
now i used this model https://tfhub.dev/google/imagenet/mobil ... e_vector/4
and it error like this ' OSError: Didn't find op for builtin opcode 'MUL' version '2' '

if i can use the model from tfhub can you suggest me for a model that i can re-train for my dataset?

thank you very much
User avatar
kwagyeman
Posts: 4006
Joined: Sun May 24, 2015 2:10 pm

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby kwagyeman » Tue Mar 17, 2020 12:28 pm

Hi, you need to install the latest firmware to run that model. Which... might not have been released yet. If you can compile the firmware for the H7 and install it you should be good to go.

https://github.com/tensorflow/tensorflo ... ver.cc#L21

We added support for MUL versions 1 to 3.
Nyamekye,
uraibeef
Posts: 18
Joined: Sun Apr 28, 2019 5:56 am

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby uraibeef » Wed Mar 25, 2020 1:07 pm

kwagyeman wrote:
Tue Mar 17, 2020 12:28 pm
Hi, you need to install the latest firmware to run that model. Which... might not have been released yet. If you can compile the firmware for the H7 and install it you should be good to go.

https://github.com/tensorflow/tensorflo ... ver.cc#L21

We added support for MUL versions 1 to 3.
i got an errro when i try to run make.py for build tensorflow-lib
''' tensorflow/lite/micro/kernels/all_ops_resolver.cc: In constructor ''tflite::ops::micro::AllOpsResolver::AllOpsResolver()':tensorflow/lite/micro/kernels/all_ops_resolver.cc::68::35: error: 'Register_SUB' was not declaerd in this scope
AddBuiltIn(BuiltinOperator_SUB, Register_SUB(), 1, 2);
tensorflow/lite/micro/kernels/all_ops_resolver.cc::68::35: note: suggested alternative: 'Register_SIN'
AddBuiltin(BuiltinOperator_SUB, Register_SUB(), 1, 2);

what wrong? i don't know how to solve it?
and.. if i can't to do that, when the next release will come?

thank you
User avatar
kwagyeman
Posts: 4006
Joined: Sun May 24, 2015 2:10 pm

Re: Memory Error, out of fast Frame Buffer Stack - H7

Postby kwagyeman » Wed Mar 25, 2020 11:21 pm

Did you clone the repo correctly? If you pulled the latest tensorflow then I have no idea. Things break constantly upstream. You should just clone the repo and init submodules and then it should build okay.

Also, try compiling more than once. TensorFlow fails to build the first time sometimes.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 10 guests