OpenMV H7 - micro sd card?

I have a H7 camera and try to copy a model from Edge Impulse to the camera, but when I do there isn’t enough memory on the module… I then installed a 4gb micro sd card in the camera and put the files from EI there!! Is this possible ? because I can’t get it to work, when I try to run the python script proviede with EI in openMV…

It’s possible but the H7 doesn’t have enough RAM to load big models, only very small models can fit the RAM. You’ll need to switch to the H7+ or make the model smaller.

I wish I was aware about the + model :confused: it seems the standard model is pretty useless for machine learning with Edge Impulse, now I have spend a lot of money on nothing :lying_face:

Thank you for your reply :+1:t2:

Yeah… it’s not mentioned on EdgeImpulse as the thing you want to use.

That said, it can fit smaller models. Set the Image Size (in Edge Impulse) to 48x48 and then your model should fit.

Ok…

Currently I have 30 images of a bunny, 30 of an elephant and 30 random images. When you say a smaller model, do I then have to remove, say 10 images of each in Edge Impulse and train the model again

Currently I have the following set in EI

Image - 48x48
Transfer Learning
Color depth - grayscale

Neutral network architecture

  • here I have tried different types, but most of them takes up a lot of memory

Currently I have a MobileNetV1 0.1 selected, but it performs very bad in accuracy

The number of images for the mode doesn’t matter. You need a large number of images. You should have a minimum of 100 per class.

All that matters is that the model is 48x48 so that the size of it is smaller.

Great :+1:t2: I will try it out and get back :blush: thank you so much for your reply :pray:t2:

Ok… So now I have 130 images of each and have trained my model in Edge Impulse with a Neural network architecture to MobileNetV2 0.35, this is the only one I get a decent result with… color depth is grayscale…

In OpenMV I am forced to use a micro SD card to fit my model, because it takes up 717kb and I only have 114kb without the SD card.

I have tried to change the python script to the following settings

sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.HQQQVGA)
sensor.set_windowing((60, 40))
sensor.skip_frames(time=2000)

But I still get the

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!

no matter what I do :frowning:

Hi, you only have like 400KB for the model, the mode buffers, and the image on the OpenMV Cam H7.

As I mentioned before, in Edge Impulse go to the Image input and set the size to 48x48 pixels. This will significantly shrink the network size. You don’t need to change anything else.

I already have it set to 48x48

Can you ask the question to Edge Impulse? This used to work. You could run a small model on the H7 regular.

I finally managed to make it work :slight_smile: Thank you for your help