09 Training a TinyML model - gloveboxes/AiPoweredPredictiveMaintenance GitHub Wiki

Training a TinyML model with Edge Impulse

Creating TinyML models with Edge Impulse

To train a machine learning model, you need training data. You will likely want to acquire training data from your Azure Sphere device. Refer to the Edge Impulse continuous motion recognition tutorial for more information.

The easiest way to capture data from the Azure Sphere real-time core is to log data via a UART and capture the data on your computer using a serial to USB adapter. Refer to set up hardware to display output for more information.

Data then needs to be forwarded to Edge Impulse to be used for model training. Refer to the Edge Impulse data forwarder article for more information.

Updating the TinyML model on Azure Sphere

Once you have trained your TinyML model, you need to complete the following steps to update the Azure Sphere movement classification real-time app.

  1. Remove the model-parameters and tflite-model folders (in the source directory).
  2. In the Edge Impulse Studio go to Deployment, and export as C++ Library.
  3. Drag the model-parameters and tflite-model from the ZIP into the source directory.
  4. Recompile your application, and you're good to go 🚀

Note: Don't update the edge-impulse-sdk folder. It contains modifications to work with the Azure Sphere.