Object Detection on M4 core

@MMarcial

Why is that so?

@MMarcial @ElectricDragon

Not sure either way, but I do have a 64x64 model working from the M4 core with RPC here, but as I try to print more info with Serial.print I get the dreaded TFlite Arena error issue, which I donā€™t want to use the local.boards.txt trick to solve.

Predictions 
x:32, y:24
Starting inferencing in 0 microseconds...
Taking photo...

Predictions 
x:32, y:24
Starting inferencing in 0 microseconds...
Taking photo...

Easiest way to do the example is to load my ā€œPortenta Pro Community Solutionsā€ library in your Arduino IDE (search for community) and load one of the FOMO models to get the include file setup (dot514 folder) and then replace the main code with the above code.

the 64x64 model I am using is in the same folder but is really badly trained on a simple red cup so it is not the best model to use. I will use a better 3 object model when I test more.

1 Like

I was mistaken. I retested RPC.println() in setup() and it works, The M4 loop() continues to execute.

1 Like

So I am getting 80x80 FOMO working on M4 with RPC and LEDā€™s but I solved an issue. Printing confidence values as a float is a pain. Easier to x100 print the integer with ā€œ0.ā€ in front of it.

Code is here again

Is the intent of "String( int(bb.value*100) )" to print a float to 2 decimal places versus "String(bb.value)" that would print to 6 decimal places?

I think what I was trying to do there is that printing floats can be a pain, so I just changed the float into a integer percent value.

example 0.234534 becomes 23 and prints much easier than printing a float.

By the way Arduino MBED boards version 3.2.0 was released quietly about 6 days ago, and I checked and my changes to make the M4 core do vision is in the camera.cpp code. Hopefully it works by default now.

#if defined (ARDUINO_PORTENTA_H7_M7) || defined (ARDUINO_PORTENTA_H7_M4)

I havenā€™t re-tested it, but hopefully small M4 vision models now work.