Machine learning possible on microcontrollers

ARM’s Zach Shelby introduced the use of microcontrollers for machine learning and artificial intelligence at the ECF19 event in Helsinki on last Friday. The talk showed that that artificial intelligence and machine learning can be applied to small embedded devices in addition to the cloud-based model. In particular, artificial intelligence is well suited to the devices of the Internet of Things. The use of machine learning in IoT is also sensible from an energy efficiency point of view if unnecessary power-consuming communication can be avoided (for example local keyword detection before sending voice data to cloud more more detailed analysis).

According to Shelby , we are now moving to a third wave of IoT that comes with comprehensive equipment security and voice control. In this model, machine learning techniques are one new application that can be added to previous work done on IoT.

In order to successfully use machine learning in small embedded devices, the problem to be solved is that it has reasonably little incoming information and a very limited number of possible outcomes. ARM Cortex M4 processor equipped with a DSP unit is powerful enough for simple hand writing decoding or detecting few spoken words with machine learning model. In examples the used machine learning models needed less than 100 kilobytes of memory.

zackdscf6473

The presentation can be now viewed on YouTube:

Important tools and projects mentioned on the presentation:

TinyML

TensorFlow Lite

uTensor (ARM MicroTensor)

TensorFlow Lite Micro

Articles on presentation:

https://www.uusiteknologia.fi/2019/05/20/ecf19-koneoppiminen-mahtuu-mikro-ohjaimeen/

http://www.etn.fi/index.php/72-ecf/9495-koneoppiminen-mullistaa-sulautetun-tekniikan

 

21 Comments

  1. Tomi Engdahl says:

    Merging TensorFlow Lite and μTensor
    A new inference engine for micro-controllers?
    https://blog.hackster.io/merging-tensorflow-lite-and-%CE%BCtensor-c7abfa38208f

    In a joint announcement today by the TensorFlow Lite team at Google and the microTensor team at Arm, came the news that the two major inference engine platforms for micro-controllers will be joining forces.

    Reply
  2. Tomi Engdahl says:

    TensorFlow Lite Ported to Arduino
    Adafruit ports TensorFlow for Micro-controllers to Arduino IDE!
    https://blog.hackster.io/tensorflow-lite-ported-to-arduino-5e851c094ddc

    Reply
  3. Tomi Engdahl says:

    TensorFlow Lite Ported to Arduino @HacksterIO by @aallan @TensorFlow @arduino #MachineLearning #EdgeComputing #Arduino #IoT
    https://blog.adafruit.com/2019/07/03/tensorflow-lite-ported-to-arduino-hacksterio-by-aallan-tensorflow-arduino-machinelearning-edgecomputing-arduino-iot/

    Reply
  4. Tomi Engdahl says:

    Playing rock-paper-scissors slightly better than random, using a recurrent neural network running on an 8-bit MCU.

    Neural Network Device ‘Solves’ Rock-Paper-Scissors
    https://blog.hackster.io/neural-network-device-solves-rock-paper-scissors-e37cabafd69

    To accomplish this AI feat, Klinger uses a three-layer recurrent neural network (RNN) trained by looking at over 80,000 games played on roshambo.me. This runs on a Microchip ATtiny1614 microcontroller, with a 3D-printed case, CR2032 battery, and other electronics. A button starts the round, and inputs are available for rock, paper, and scissors, depending on the human selection. Three LEDs correspond to the computer’s move

    https://github.com/PaulKlinger/rps-rnn

    Reply
  5. Tomi Engdahl says:

    Want to get started with machine learning on MCUs? This example demonstrates a full end-to-end workflow of training a model, converting it for use with TensorFlow Lite, and deploying it to an Arduino.

    https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/experimental/micro/examples/hello_world#deploy-to-arduino

    Reply
  6. Tomi Engdahl says:

    MACHINE LEARNING MONDAY! TinyML comes to Circuit Playground Bluefruit
    https://blog.adafruit.com/2019/08/19/machine-learning-monday-tinyml-comes-to-circuit-playground-bluefruit-tensorflow-tensorflow-tensorflowlite-tinyml-nordictweets-nrf52840-nordicsemi-arduino/

    Circuit Playground Bluefruit features the nRF52840 Cortex M4 process, and has all those sensors you love from the previous Circuit Playgrounds: light, temperature, touch, and…sound!

    Reply
  7. Tomi Engdahl says:

    TensorFlow on the Nordic nRF52840
    Running TensorFlow Lite for Micro-controllers on the nRF52840
    https://blog.hackster.io/tensorflow-on-the-nordic-nrf52840-ed9f03326a23

    Reply
  8. Tomi Engdahl says:

    Building Brains on the Edge
    Running TensorFlow Lite models on micro-controllers
    https://blog.hackster.io/building-brains-on-the-edge-245ce1153eb1

    Reply
  9. Tomi Engdahl says:

    Embedded ML for All Developers
    https://blog.hackster.io/embedded-ml-for-all-developers-1f000ccdaddd

    Over the next decade, embedded is going to experiencing the kind of innovation we haven’t seen since the late 2000s when open wireless, protocols and cryptography (and as a result, 32-bit MCUs) were introduced. Today most people think about Machine Learning as highly complex, large, and extremely memory and compute hungry — with clusters of GPUs/TPUs heating whole towns…

    Reply
  10. Tomi Engdahl says:

    Speech recognition on Arduino is just one TensorFlow Lite Micro example in the Library Manager! Install a neural network on your Nano 33 BLE Sense to recognize simple voice commands: arduino.cc/ai

    Reply
  11. Tomi Engdahl says:

    Here’s a quick end-to-end demo of machine learning running on a Nano 33 BLE Sense! The same framework can be used to sample different sensors and train more complex models.

    https://blog.arduino.cc/2019/11/07/fruit-identification-using-arduino-and-tensorflow/

    Reply
  12. Tomi Engdahl says:

    The resources around TinyML are still emerging but there’s a great opportunity to get a head start and meet experts coming up December 2nd-3rd in Mountain View, California at the Arm AIoT Dev Summit. This includes workshops from Sandeep Mistry, Arduino technical lead for on-device ML, along with Google’s Pete Warden and Daniel Situnayake, who literally wrote the book on TinyML: http://bit.ly/2NNGGVO

    Fruit identification using Arduino and TensorFlow
    https://blog.arduino.cc/2019/11/07/fruit-identification-using-arduino-and-tensorflow/

    Reply
  13. Tomi Engdahl says:

    “However perhaps the most interesting thing about the software on the Bangle.js is that there is TensorFlow Lite for Micro-controllers built into the firmware, so you can run machine learning models on your wrist.”

    The Bangle.js, an Open Sourced JavaScript-Powered Smart Watch
    https://www.hackster.io/news/the-bangle-js-an-open-sourced-javascript-powered-smart-watch-6359962646c2

    It may be built using off-the shelf hardware, but the firmware of this JavaScript-powered smart watch is entirely open source and hackable.

    Reply
  14. Tomi Engdahl says:

    Antmicro has published demonstrations of TensorFlow Lite running on a RISC-V soft-core processor via the Zephyr Project RTOS — a port it is calling TF Lite micro — though warns that additional work needs to be done before its efforts will be reflected upstream.

    Antmicro Releases TensorFlow Lite on RISC-V Demos Using Zephyr, LiteX, VexRiscV: TF Lite Micro

    https://www.hackster.io/news/antmicro-releases-tensorflow-lite-on-risc-v-demos-using-zephyr-litex-vexriscv-tf-lite-micro-cde3123d5700

    Two demos developed ahead of the RISC-V Summit taking place this week.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*