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

ValueError: [MAIXPY]kpu: region_layer_init err! #465

Closed
Norion opened this issue Apr 27, 2022 · 6 comments
Closed

ValueError: [MAIXPY]kpu: region_layer_init err! #465

Norion opened this issue Apr 27, 2022 · 6 comments

Comments

@Norion
Copy link

Norion commented Apr 27, 2022

Describe the bug
I am trying to use a selfbuilt kmodel on my Maixduino using MaixPy. I solved most compatibility errors. The kmodel has version 3.
While starting the model the program stops and yields this error message:
ValueError: [MAIXPY]kpu: region_layer_init err!

Expected behavior
I expected the model to load properly.

Actual behaviour
The program terminates without loading the kmodel

Screenshots
image

Please complete the following information

  • IDE version: 0.2.5
  • Firmware version: maixpy_v0.6.2_77_g11806960d_minimum_with_ide_support.bin
  • Board: Maixduino
  • OS: Windows
    kmodel v3 converted using sipeed ncc
    class.zip
    tflite model made with axelerate
    class (2).zip

@AIWintermuteAI

@AIWintermuteAI
Copy link

Hi!
It might be the same issue as
TinkerGen/Mark-micropython#1
since aXeleRate uses YOLOv3 by default and MaixPy does not support it yet (there is a PR here https://github.com/sipeed/MaixPy/pull/451 , but it is not merged)

@Norion
Copy link
Author

Norion commented Apr 27, 2022

Oh! That might explain it, How do I get aXeleRate to use YOLOv2 instead?

Edit: I see now, I need to branch out from the repo. Will try that.

@Norion
Copy link
Author

Norion commented Apr 27, 2022

The best course for you is to train a model with legacy aXeleRate - you can do that by switching to legacy-yolov2 branch in Colab notebook right after cloning the repository.

If I understand correctly, just normally install aXeleRate and then switch branches to run the software?

@AIWintermuteAI
Copy link

If you're running locally, then git clone, switch the branch and then install with pip install -e .

@Norion
Copy link
Author

Norion commented Apr 27, 2022

Ah I see, yes I forked the repo and cloned it locally. Thanks for the advice, I'll let you know how it goes.

Installation of aXeleRate 0.7.6 was succesfull, I'll get the model built tonight so I can get back to you tomorrow

@Norion
Copy link
Author

Norion commented May 10, 2022

After changing the KPU code lines to the current ones visible in https://github.com/AIWintermuteAI/aXeleRate/blob/master/example_scripts/k210/classifier/santa_uno.py
The model made with aXeleRate worked perfectly!

@Norion Norion closed this as completed May 10, 2022
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

2 participants