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.

Copy “.nb” file into the model storge folder.

For Windows users,
C:\Users\\AppData\Local\Arduino15\packages\realtek\hardware\AmebaPro2\\variants\common_nn_models

For Linux users,
\home\\.arduino15\packages\realtek\hardware\AmebaPro2\\variants\common_nn_models

Replace model file.

Remove the default models,
• Objects Detection, “yolov3_tiny.nb”, “yolov4-tiny.nb”, or “yolov7-tiny.nb”.
• Face Detection, “scrfd_500m_bnkps_640x640_u8.nb”.
• Face Recognition, “mobilefacenet_int16.nb”.

Rename the customized “.nb” as,
• Objects Detection, “yolov3_tiny.nb”, “yolov4-tiny.nb”, or “yolov7-tiny.nb”.
• Face Detection, “scrfd_500m_bnkps_640x640_u8.nb”.
• Face Recognition, “mobilefacenet_int16.nb”.

1

Update model json file.

Open “amebapro2_fwfs_nn_models.json”, sync all name same as following methods.

Objects Detection (yolov3_tiny, yolov4_tiny or yolov7_tiny)
Default example is using “yolov4_tiny”, refer the following step to switching models.
Change “yolov4_tiny” to “yolov3_tiny” or ”yolov7_tiny”, then remove the unused models.

1

1

1

Face Detection (SCRFD)
Default example is using “scrfd320p”, refer the following step to switching models.
Change “scrfd320p” to “scrfd640”, then remove the unused models.

1

1

Face Recognition (MobileFaceNet)
Default example is using “mobilefacenet_i8”, refer the following step to switching models.
Change “mobilefacenet_i8” to “mobilefacenet_i16”, then remove the unused models. Face Recognition has pre-request of Face Detection, therefore SCRFD model should not be removed.

1

1

If already changed the SCRFD model,

1

Compile and run examples.

Open Arduino IDE and run AmebaNN example that related to the model transferred. Select the correct model that applied above.

Please confirm that QQ communication software is installed