You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I had been running a script on a machine which would identify an image. Without changing anything, the script starting reporting
MemoryError: Out of normal MicroPython Heap Memory! Please reduce the resolution of the image you are running this algorithm on to bypass this issue!
when trying to execute the line img = image.Image(sd_image_path).resize(224,224)
at the start of the script I have the line utils.gc_heap_size(1500000) to ensure there is space in the GC ram to resize the image. Previously I had no issue with this, and the images that I have been testing with have not increased in file size or resolution.
When running the lines after my call to utils.gc_heap_size(1500000)
I'm wondering if there is any solution to this bug? I've tried running the lines
gc.enable() gc.collect() machine.reset
and also deiniting the .kmodel I have been using a = kpu.deinit(task), all to no avail on the bugged board. The healthy board does not have any issues.
Describe the bug
I had been running a script on a machine which would identify an image. Without changing anything, the script starting reporting
when trying to execute the line
img = image.Image(sd_image_path).resize(224,224)
at the start of the script I have the line
utils.gc_heap_size(1500000)
to ensure there is space in the GC ram to resize the image. Previously I had no issue with this, and the images that I have been testing with have not increased in file size or resolution.When running the lines after my call to
utils.gc_heap_size(1500000)
print("kpu.memtest(): " + str(kpu.memtest()))
print("utils.heap_free(): " + str(utils.heap_free()))
print("utils.gc_heap_size(): " + str(utils.gc_heap_size()))
print("gc.mem_alloc(): " + str(gc.mem_alloc()))
print("gc.mem_free(): " + str(gc.mem_free()))
The board now prints out
which shows that my call to
utils.gc_heap_size(1500000)
is not working.If I run the exact same script on a healthy board, the same script returns what I'd expect which is
I'm wondering if there is any solution to this bug? I've tried running the lines
gc.enable()
gc.collect()
machine.reset
and also deiniting the .kmodel I have been using
a = kpu.deinit(task)
, all to no avail on the bugged board. The healthy board does not have any issues.Please complete the following information
The text was updated successfully, but these errors were encountered: