# Tflite classification memory error

**URL:** <https://forums.openmv.io/t/tflite-classification-memory-error/6318>\
**Category:** OpenMV Boards\
**Created:** [September 9, 2021, 9:48am UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318 "2021-09-09T09:48:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![herbert](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@herbert](https://forums.openmv.io/u/herbert)\
**Post date:** [September 9, 2021, 9:48am UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318/1 "2021-09-09T09:48:45Z")

</div>

Hi!  
im trying to do some letter detection on the openmv cam H7  
im trying to train my own model with edge impulse duo to the fact that i only need to detect 3 letters  
im using mobile net 2,when im trying to do some classification with my camera but when the program reaches the classification line the program stops and the flowing error occurs:  
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!  
the network works with 120 \* 120 pictures  
can you help me with this error?

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 9, 2021, 5:18pm UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318/2 "2021-09-09T17:18:47Z")

</div>

Shrink the model input size to 48x48 pixels.

---

<div class="post-metadata">

**Author:** ![herbert](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@herbert](https://forums.openmv.io/u/herbert)\
**Post date:** [September 10, 2021, 2:47pm UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318/3 "2021-09-10T14:47:20Z")

</div>

ive done that but the error still occurs!  
ive came to understand that the mobile net networks end up much bigger than normal CNNs  
the mobilenet network is about 700kb while the normal CNNs end up being around 40 50kb and changing the input image size does make a difference but apparently its not enough  
what is the maximum size of a neural net that can function on a openmv cam h7?  
i also need to do some contour detection besides running the model does that make any change to the limits of the models size?

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 10, 2021, 4:25pm UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318/4 "2021-09-10T16:25:18Z")

</div>

The H7 regular can hold a model that’s about 200kb. Edge impulses default image classifier with a 48x48 input network should work.

---

<div class="post-metadata">

**Author:** ![herbert](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@herbert](https://forums.openmv.io/u/herbert)\
**Post date:** [September 12, 2021, 3:49pm UTC](https://forums.openmv.io/t/tflite-classification-memory-error/6318/5 "2021-09-12T15:49:24Z")

</div>

OK, thanks for your quick and helpful response
