kendryte / canmv

Other
66 stars 22 forks source link

Support for kModelV5 #10

Closed cscribano closed 1 year ago

cscribano commented 2 years ago

Great work!

I was able to build and run canmv on Sipeed Maix-Dock, as well as running the provided kpu examples. I'm experiment with converting a simple cnn (mnist classification):

I'm not sure if canmv has support for kmodel v5, can anyone clarify?

Additional Informations

liuyunrui123 commented 2 years ago

koad_kmodel may be need more memory,you can print the free memory before load by this code:

from maix import utils
print("sys mem free:",utils.heap_free())

The memory should be at least larger than the model size or more.
In order to have more memory available for load kmodel, you can use the lite firmware or reduce micropython gc heap, refer to demo_set_gc_heap_size.py
We will try kModel v5 in the near future.

cscribano commented 2 years ago

I just ported support for nncasev1/kModelv5 by myself: https://github.com/cscribano/canmv It is able to run both float and integer models, I will eventually open a PR

liuyunrui123 commented 2 years ago

Good work. I'm glad to see the PR you submitted. We will review it later after finishing the current work

kendryte747 commented 1 year ago

Here (#31) we have add support for kmodel v5, but it not enabled in normal firmware, you should compile it yourself, i will close this issue as it is completed. if you have any question, feel free to reopen the issue.