Invalid syntax error when running codes from missing examples files

I plan to try out " Smile Detection with OpenMV IDE and Edge Impulse" and “Person Detection” on youtube but I can’t get the codes to run. I feel that it has something to do with the examples being missing in the OpenMV IDE. I just want to test out these features, especially the smile detection one. What do I do?

Hi, the youtube videos are historical accounts. But, not current.

Please use EdgeImpulse to train custom models. We don’t have CNN examples on the camera anymore because they use too much flash.

Thank you, I managed to train a model in Edge Impulse. Now, I ended up with this error instead when I tried to run the Image Classification Example in OpenMV.

The error is pretty self explanatory?

I did try to follow the steps from OpenMV - Edge Impulse Documentation

but I still face the same error.

Are the files on the internal flash drive of the OpenMV Cam? Did you make sure to safety remove the camera from the PC? Can you verify that they are not corrupted?

Is this the internal flash drive of the OpenMV Cam?

You have two drives there. G and E. One of them is the cameras flash.

I have tried to copy the files into both of the drives but it still shows the same error.

Can you confirm you tried both drives and safety removed them?


Okay, I think I know what the issue is. Can you give me the line of code that throws that error? This would have helped. That error is a custom error from the system error.

I think the issue is that you are using the H7 R2 which doesn’t have SDRAM. You have to use the option in edge impulse to download a binary and flash that onto the camera. The H7 R2 doesn’t have enough RAM to store the TFLite Model and run it from RAM at the same time. By loading the model directly into the firmware we can then fit the model in the address space without using any RAM.

net = tf.load(“trained.tflite”, load_to_fb=uos.stat(‘trained.tflite’)[6] > (gc.mem_free() - (64*1024)))

Yes, I am using the H7 R2.

In this case, which path should I use?

The h7 one (non-plus)

Thank you! To check, does the blue LED take a long time to start blinking? I tried to do this method a few days ago but it took so long that I thought that I did something wrong.

The LED won’t blink if you put a new script on the board. See the text comment.

I am so sorry but I don’t understand what you mean.

Edit: The blue LED is now blinking blue somehow but now I had received this error instead.

Can you post the script and the firmware.bin file and which camera model you are using? I have to check this myself. (7.0 MB)

OpenMV Cam H7 R2