Customized AI Model Installation Guide

After the AI model conversion and successful gets the .nb file, please refer to the following steps to apply into Arduino SDK.

Rename the customized .nb files

Objects Detection

  • yolov3_tiny.nb

  • yolov4_tiny.nb

  • yolov7_tiny.nb

Face Detection

  • scrfd_500m_bnkps_640x640_u8.nb

Face Recognition

  • mobilefacenet_int16.nb

Audio related

  • yamnet_fp16.nb

  • yamnet_s_hybrid.nb

Copy/Replace “.nb” file into the project folder

  • C:\Users\<USERNAME>\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\<VERSION>\libraries\NeuralNetwork\examples

  • Or user customized project folder with .ino file.

Compile and run examples

Open Arduino IDE and run AmebaNN example that related to the model transferred.

For specific model selection please refer to the example guide and API documents below.

Load Neural Network models via SD card

Open one of the Ameba Neural Network examples by navigating to File -> Examples -> AmebaNN Let’s take ObjectDetectionCallback as an example.

After opening the example on Arduino IDE, navigate to Tools -> NN Model Load from: select SD card as the option.

../_images/image01122.png

Next, in the code under modelSelect function, simply change from DEFAULT to CUSTOMIZED for the model used.

../_images/image02119.png

In the SD card, create a folder name NN_MDL and save your models in the folder by naming your models as stated below,

../_images/image03101.png

Objects Detection

  • yolov3_tiny.nb

  • yolov4_tiny.nb

  • yolov7_tiny.nb

Face Detection

  • scrfd.nb

Face Recognition

  • mobilefacenet.nb

Audio Classification

  • yamnet.nb

Image Classification

  • imgclassification.nb

../_images/image0464.png

You can change to your preferred .nb file names in SD_Model.cpp by navigating to \Arduino15\packages\realtek\hardware\AmebaPro2\<SDK Version>\libraries\NeuralNetwork\src to match the name on your SD card if you would like to use a different name for the .nb file that is saved there.

../_images/image0548.png