Efinix TinyML Hello World design is targeted for running AI inference on static input data. Inference on static input data is important to verify the overall inference process of a specific trained and quantized model is correct. The obtained inference outputs can be used to cross-check against the golden reference model in equivalent Python or PC-based C++ implementations. In addition, profiling can be performed to identify compute-intensive operation/layer for acceleration. Furthermore, user may make use of Efinix TinyML Generator for customizing Efinix TinyML Accelerator with different accelerator modes and levels of parallelism based on targeted applications.
TinyML Hello World design is composed of Efinix Sapphire RISC-V SoC, DMA controller, Efinix TinyML Accelerator, pre-defined accelerator socket, and reserved interface for optional user-defined accelerator.
List of static inference examples:
- MobilenetV1 Person Detection (tinyml_pdti8) - Trained with Tensorflow using MobilenetV1 architecture to perform human presence detection.
- Yolo Person Detection (tinyml_ypd) - Trained with Tensorflow using Yolo architecture to perform person detection.
- ResNet Image Classification (tinyml_imgc) - Trained with Tensorflow using ResNet architecture to perform classification (CIFAR10 - 10 classes).
- DS-CNN Keyword Spotting (tinyml_kws) - Trained with Tensorflow framework using DS-CNN architecture to perform keyword spotting on speech command.
- MediaPipe Face Landmark Detection (tinyml_fl) - A pre-trained Tensorflow model obtained using MediaPipe architecture to perform face landmark detection.
- Deep AutoEncoder Anomaly Detection (tinyml_ad) - Trained with Tensorflow framework using Deep AutoEncoder architecture in detecting anomalies in machine operating sounds
Refer to the model_zoo directory for more details on the related model training and quantization.
The example designs are implemented on:
Note: Efinity projects of the hello world designs are in tinyml_hello_world directory.
Efinity® IDE is required for project compilation and bitstream generation, whereas Efinity RISC-V Embedded Software IDE is used to manage RISC-V software projects and for debugging purposes.
Bring up TinyML Hello World design on Efinix development kit by following listed steps below:
- Set up hardware
- Refer to Set Up the Hardware section in EVSoC User Guide for targeted development kit.
- For TinyML Hello World design, the connections to camera and mini-DSI panel are not required.
- Using Efinity® IDE
- Pre-compiled bitstream .hex (for Programmer SPI active mode) and .bit (for Programmer JTAG mode) files are provided in Efinity project(s) in tinyml_hello_world directory. User may skip Efinity project compilation by using the provided bitstream.
- To compile TinyML Hello World design,
- Open Efinity project (tinyml_hello_world/<proj_directory>/tinyml_soc.xml).
- Generate all included IPs in the IP list.
- Compile
- Program FPGA bitstream to targeted development kit using Efinity Programmer.
- Note that, user is required to generate SapphireSoc in IP list (if not done), prior to proceed with using Efinity RISC-V Embedded Software IDE for building software applications.
- Using Efinity RISC-V Embedded Software IDE
- Setup Eclipse workspace at tinyml_hello_world/<proj_directory>/embedded_sw/SapphireSoc directory.
- TinyML Hello World software apps are in tinyml_hello_world/<proj_directory>/embedded_sw/SapphireSoc/software/standalone directory.
- Refer to Using Eclipse and OpenOCD section in EVSoC User Guide for other general setting and steps for running the static inference example software applications.
Refer to Frequently Asked Questions for general questions and guidelines for creating your own TinyML solution using Efinix TinyML platform.
Software Tools Version:
- Efinity® IDE v2024.1.163.4.11
- Efinity® RISC-V Embedded Software IDE v2024.1.0.1