Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeRTOS not possible to load models kmodel #71

Open
1 of 2 tasks
c4esp opened this issue Dec 20, 2021 · 0 comments
Open
1 of 2 tasks

FreeRTOS not possible to load models kmodel #71

c4esp opened this issue Dec 20, 2021 · 0 comments

Comments

@c4esp
Copy link

c4esp commented Dec 20, 2021

  • BUG REPORT
  • FEATURE REQUEST

BUG REPORT

Hi friend, @sunnycase

Expected behavior

Load yolo.kmodel in FreeRTOS with function kpu_model_load_from_buffer
It seems to be that in standalone it is possible with function:
INCBIN(model, "yolo.kmodel");
kpu_model_context_t task;
kpu_load_kmodel(&task, model_data)

But this functions are not supported in FreeRTOS, so do you know what is the problem?

Thanks in advance.

Actual behavior

It is possible to load detect.kmodel with:
INCBIN(model, "../src/kfpkg_face_detect/detect.kmodel");
uint8_t *model_data_align = model_data;
model_context = kpu_model_load_from_buffer(model_data_align);

But when I try to load yolo model or other models from:
INCBIN(model, "../src/kfpkg_20class/yolo.kmodel");
INCBIN(model, "../src/kfpkg_fast_facedetect/slim-320.kmodel");
INCBIN(model, "../src/kfpkg_iris/iris.kmodel");
INCBIN(model, "../src/kfpkg_ulffd_landmark/ulffd_landmark.kmodel");
INCBIN(model, "../src/kfpkg_yolox/yolox_nano_224.kmodel");

I received in runtime the following error when try to load model with kpu_model_load_from_buffer function:
terminate called after throwing an instance of 'std::runtime_error'
what(): Cannot load kmodel.
W (685254006) SYSCALL: sys_exit called with 0x1

So, if it is not possible to run kmodel, why do you implement s FreeRTOS SDK?
How do you implement detect.kmodel? Are there any documents?

Document version

SDK:
https://github.com/kendryte/kendryte-freertos-sdk

Toolchain:
https://github.com/kendryte/kendryte-gnu-toolchain

Hardware

Sipeed maix bit with microphone

System

Windows 10
PlatformIO

@c4esp c4esp changed the title FreeRTOS not possible to load yolo models FreeRTOS not possible to load models kmodel Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant