Custom project on AMB82 MINI with YOLOv3/4/7 and Arduino IDE

To whom it may concern,

I am currently working on creating a custom recognition program using YOLOv3,v4 and v7. At the time being I am using YOLOv7 to train the AI module. I managed to get some results, however any of the files that are being generated after training (the “best.pt” file, which I have to upload on “AMB82 AI Model Conversion”: Amebapro2 AI Convert Model – Realtek IoT/Wi-Fi MCU Solutions) have size of about 74 MB or more. Therefore, no matter what the files will not be converted by the online converter and I don’t have the knowledge of using the files in another way so that I would be able to apply the AI module on the AMB82 MINI via Arduino IDE. Some ideas I had was to split the “best.pt” file, convert it and then merge it again, but by doing so maybe some vital information will be lost in the process. Furthermore, I thought if I use “.cfg” and “.weights” files it might work, then I tried using YOLOv3 and v4, but without any luck so far because of errors with the codes in Google Colab.

I was hoping someone with more experience in building and implementing custom AI modules to boards like the AMB82 MINI would be able to give me some advice on how I can do it myself as well.

Thank you in advance!

Hi @dtar,

https://www.amebaiot.com/en/amebapro2-arduino-neuralnework-object-detection/

Please refer to the notes here.

Give it a try, and if you still face any issues. Let me know.

Thanks!

Dear Kelvin,

Thank you for your fast replay!

I tried looking at many different locations on my computer, but I couldn’t find any of the scripts that were mentioned in the explanation. Is there something extra that I need to download, because I have included the following URL into the “Additional Boards Manager URLs” field in Arduino IDE: https://github.com/ambiot/ambpro2_arduino/raw/main/Arduino_package/package_realtek_amebapro2_index.json, however I can’t find the ~/NeuralNetwork/~ folder.

Hi @dtar,

You will have to use the early release version. Include this in your preferences: https://github.com/ambiot/ambpro2_arduino/raw/dev/Arduino_package/package_realtek_amebapro2_early_index.json. Install 4.0.7 early release version of SDK.

Thank you.

Dear Kelvin,

Thank you very much for the advice! I followed your instructions and I was able to change the version of the SDK. However that didn’t fix the problem, but I managed to resolve the issue by using different “weights” to train the modules and everything worked flawlessly.

Unfortunately I have encountered a different problem now, which affects the performance of the board while the program is running. I am talking more specifically about the following lines that appear while executing the program:
"
YOLOv4t_SD tick[32]

YOLOv4t_SD tick[31]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD tick[32]

YOLOv4t_SD FPS = 23.02

YOLOv4t_SD tick[32]

"

I know this information is appearing because I am using a custom YOLOv4 file, but I was hoping you could tell me how to remove it, since now it is pushing all the important information that I need, away.

Hi @dtar,

Unfortunately this log cannot be removed now. However there is a workaround which is to print your information to a separate serial in other board… You can send the log to another board via other UART interface.

We will be looking into ways to allow user to remove the seeing of such log.

Thank you.