Has anyone ever know how to use AMB82-MINI on Edge Impulse?
Hi, thanks for trying ameba for your projects.
Edge Impulse doe support 3rd party embedded boards that compatible with Arduino.
Let us follow the steps to make use of the edge impulse.
1, we can make use of edge impulse to train the model we wanted. Then export the model.
- note that the models need to convert before used by ameba, lets try study how to process the using-customized-nn-model first
- At edge impulse, refer the following to export the model that have trained. In my case, I have trained mobilenetv2 for image classification. I prefer to use tensorflow lite file that supported by AMB82-mini lately. We just need to find the
.tflite file. - Remember to check the model classes order, in my case is
Cups, Keys, unknown - Also remember to download at least 1 image file from “image“ for future quantization, my case is “001.jpg“.
2, refer to the guide to convert NN model, it can be done both online/offline
-
Amebapro2 AI Convert Model – Realtek IoT/Wi-Fi MCU Solutions
-
Realtek AmebaPro2 Model Conversion Tool — AmebaPro2's Documentation v0.1 documentation
-
I am using the offline tool by docker setup at ubuntu env. Acuity_installation_docker
- Follow the guide, remember to
extract the 2 .tgz files downloaded - go to
acuity_examples_c901149/Scriptand updatepegasus_export_ovx.sh - create a folder with any name, mine is “tflite_m“, put the
.tflite fileinside and rename it same as folder “tflite_m.tflite“, create adataset.txt fileInput the image name inside the dataset.txt file. - Back to
Docker/Linuxat terminal rundocker login ghcr.io -usource install.shsource run.sh
- go to
acuity_examples_c901149/Scriptrun./pegasus_import.sh tflite_m- go to
tflite_m/updatetflite_m_inputmeta.ymladd_preproc_node: truepreproc_type: IMAGE_RGB888_PLANAR
- remember the
preproc_image_size, my case, 96 and 96
- run
./pegasus_quantize.sh tflite_m uint8./pegasus_export_ovx.sh tflite_m uint8
- go to
wksp/tflite_m_uint8_nbg_unify/network_binary.nbis our converted model file
- Follow the guide, remember to
3, use Arduino IDE to upload the model into board (recommended to use SD card)
-
some useful example guides
-
I tried this example Image Classification, refer to following for my setups
USE_MODEL_META_DATA_EN set to 0select CUSTOMIZED_IMGCLASS_MOBILENETV2- change
NNWIDTHandNNHEIGHTas 96 - Update the class at
ClassificationClass_list.h, in my case isCups, Keys, unknown, use the same order get from the edge impulse export files. - select the SD card NN model mode at Arduino IDE
- For SD card, create a folder
NN_MDL, put thenetwork_binary.nbfile inside, and rename it asmobilenetv2_int16.nb 

- compile and upload firmware to AMB82-mini, refer to the guide for running and testing the NN application.










