Error "tensors not allocated" when running YOLO model on OpenMV camera

Hi everyone,

I’m trying to train a YOLO model and run it on my OpenMV camera, but I keep hitting an issue. When loading the model I get an error saying “Tensors not allocated”.

OpenMV camera model: RT1062

Steps I followed: trained with X dataset, converted to TensorFlow Lite using ultralytics cli tool, then tried to run on camera (used yolov3-tiny as the base model to train the dataset) used other yolo models too, The size of the .tflite file was ranging between 1-3Mb.

Questions:

What exactly does the “tensors not allocated” error mean in the context of OpenMV?

Is it related to memory limitations on the camera?
Are there specific model size restrictions I should be aware of for YOLO on OpenMV?

Any suggestions for troubleshooting or reducing the model so it can run?
How are the models quantized for the openMV cam?

Thanks in advance for your help!

Hi, I’ve enabled logs for tflite on this firmware of the RT1062. Please load it with the IDE using Tool→Load Custom firmware:

firmware.zip (1.5 MB)

When you script your script check the serial terminal and you’ll see the exact error from the library.

Regarding YOLO model support. You can run YOLOV5, YOLOV8, and YOLOV2 on the RT1062. However, they are quite slow. If you search the forums I provided another customer with a model called YOLO LC which runs at 2 FPS or so on the RT1062. However, our focus right now is getting the AE3 and N6 ready which run these models 100x faster. Once we release new examples for these boards we’ll have more examples for the older cameras.

Thanks, I’ll try this