sipeed/MaixPy-v1

ValueError: [MAIXPY]kpu: region_layer_init err!

Norion opened this issue · 6 comments

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

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)

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.

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?

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

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

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!