sparkfun / Tensorflow_AIOT2019

Examples for the 2019 AIOT Conference
MIT License
15 stars 12 forks source link

SparkFun Low-Power Machine Learning Examples

This repository contains examples that demonstrate the use of TensorFlow Lite based machine learning executing on the SparkFun Edge Development board. The examples are designed for use within the Arduino development environment, enabling rapid setup and deployment of the examples.

The examples contained in this repository make use of the variety of sensors available on the SparkFun Edge Development board to show the modern capabilities of machine learning executing on a low-power microcontroller-based system.

The following examples are included in the repository:

Contents

Required Hardware

To run the examples, the following hardware is required:

Software Setup

The examples in this repository are for use and execution within the Arduino development environment. This section details the steps required to setup Arduino for the examples.

Install Arduino

Arduino is avilable for a variety of platforms. To ensure compatiblity with the demos in this repository, the latest version should be installed.

The Arduino application is available for a variety of platforms and is available online from Arduino. Download the application from the Arduino website using this link.

Install the TensorFlowLite Library

The examples utilize the TensorFlowLight Arduino libary, which is installed using the Arduino Library Manager.

To install this library, use the following steps:

Install the Himax HM01B0 Camera Library

With the Library Manager dialog still displayed, install the Himax camera driver.

Once the install is completed, close the Arduino Library Manager dialog.

Install the SparkFun Boards Package

Load the SparkFun Boards package into the Arduino Board Manger.

To install package, use the following steps:

Install the SparkFun Artemis Boards Package

Once the location of the SparkFun boards package is set in the preferences, the board definition package for the SparkFun Apollo3 boards must be installed.

To install package, use the following steps:

Running an Example

Configure the Hardware

Configure the Software

Upload

Serial Monitor

Training a Speech Model

The micro speech example has a model that is trained to recognize "Yes" and "No". An example of how to train a new model based on Google collected sample phrases is included in the tensorflow micro_speech example repository. The method listed utilizes Google Colaboratory to run the training session - an Jypter notebooks based system that presents a Python based notebook and abstracts the management of compute resources.

The notebook to run the training for this example is contained in the tensorflow github repository at this location.