I was loading an ML model using the tf.load method on to an OpenMV H7 Plus but the chip LED flash green several times then white and blue pairs 3 times.
For reference I am using a TFLite file of size 4.7 MB with load_to_fb=True
Oh, that’s because you are trying to load it to the heap.
You can put the model name in the classify call and then it will be dynamically loaded per call. This is slow but it should not have any issues. If this crashes then there’s something off about the model that crashes the system.
Yes, I have tried to run it on the classify function and I am still facing the same LED sequence and then a crash. Below is the code I used for your reference.
import sensor, image, time, os, tf
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.set_windowing((240, 240))
sensor.skip_frames(time=2000)
img = sensor.snapshot()
result = tf.classify('test_model.tflite', img)
print(result)
May I ask if the models generated other than Edge Impulse are supported or not. I am trying to load a tflite model trained and generated outside Edge Impulse and I run into either memory issue as shown in this thread already while using tf.load or as per your suggestion if I use tf.classify then I get the disk ejected message.Please help. Thanks in advance.