sipeed / MaixPy3

Python sdk for Sipeed Maix-II-Dock(v831). Other board please use https://github.com/sipeed/MaixPy
https://wiki.sipeed.com/maixpy3
MIT License
173 stars 42 forks source link

How to use MaixPy3 nn to test Yolov2 script #30

Closed Q2Learn closed 2 years ago

Q2Learn commented 2 years ago

I have a problem with understanding how to use example models yolov2 with MaixPy3 nn on Sipeed MAIX-II Dock V831.

In the MaixPy3_scripts example applications presented here there is a yolov2 model with the .bin and .param files and an example script to test completed. Which is very cool.

So I want to load that example into sipeed v831 board for object detection. So I transfer over the files to my board via the microSD card and moved it to /home/res and I change the directories and permissions in the file and try and run it but I am getting an error when running it:

ImportError: cannot import name 'decoder' from 'maix.nn' (/usr/lib/python3.8/site-packages/maix/nn.pyc)

In the readme for ../MaixPy3_scripts/ it says (google translated):

"When using the scripts in scripts, please install some resource files in basic first. The resource files that scripts depend on are concentrated in basic/res, and they should be copied to v831 before running!"

But I can't find basic/res to install the resource files and cant find a tutorial or help anywhere on how to get that going. Any help will be appreciated in finding a location or a tutorial or just some help in setting it up. My goal is to get an example yolov2 running object detection so that I can see how it performs and eventually try and build my own yolov2 model and maybe even train new algorithms like YoloR or yoloRET for Edge AI.

I will be glad for your feedback!

junhuanchen commented 2 years ago

More information is still being compiled. You can continue to follow us. In 2022, many internal development results will be released.

junhuanchen commented 2 years ago

Some content has been built into the latest M2 Docker image

Q2Learn commented 2 years ago

Thanks @junhuanchen that worked. I updated to the latest firmware and transferred over the example application script at https://github.com/sipeed/MaixPy3_scripts for nn_face and I was able to test it.

Thank you for your help.