sipeed / MaixPy-v1

MicroPython for K210 RISC-V, let's play with edge AI easier
https://wiki.sipeed.com/maixpy
Other
1.68k stars 438 forks source link

Custom nncase operators #418

Open shahbaz-momi opened 3 years ago

shahbaz-momi commented 3 years ago

Hello,

Currently I'm working on porting Yolov4-tiny to run on the K210. I've got a kmodel built which successfully runs on the K210 simulator of nncase, however it is exactly 6MB so it is too large to fit in the main memory. I wanted to utilize the load_from_flash functionality of the newer version of nncase, however, I had to add custom operators (Split and Upsample) to nncase in order to get the model to compile and run. I noticed however that the kendryte_standalone_sdk here no longer builds nncase from source (and instead uses libnncase.a). Is there a way to recompile the static library with the new code and custom ops (or get the source code for libnncase and lib_sipeed_kpu)? Thanks

KuoEuran commented 3 years ago

@shahbaz-momi Can you use the kpu.load_flash function to load your model on k210? I meet the same problem.