Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to tinyML

uday kiran
November 21, 2020

Introduction to tinyML

I was given a presentation on the Introduction to tinyML (Machine learning on edge) and a bit about TensorFlow lite for microcontrollers at Mozilla firefox club VIT webinar.

uday kiran

November 21, 2020
Tweet

More Decks by uday kiran

Other Decks in Education

Transcript

  1. What is tinyML? • Machine learning + embedded systems =

    Intelligent IOT devices • It helps to explore what type of models you can run on small, low-power devices like microcontrollers. • Summarizing and analyzing data at the edge on low power devices
  2. Why tinyML? • Instant response • It enables • low-latency

    • low power(1000x) • low bandwidth model inference at edge devices. • Privacy • Can collect more data which helps to build better products.
  3. Applications • Personal assistants like Google assistant, Alexa and Siri.

    • Intelligent industrial sensors • Wildlife tracking • Detecting crop diseases • Predicting wildfires • Smart game controllers • Ocean Life Conservation • Etc...
  4. TensorFlow Lite • You can use this tool to wrap

    your models to run on embedded systems • It supports Android, IOS, Arduino etc.. • Not only Python you can use C, C++ and JAVA • Pretrained models • Other tools like • CoreML • PyTorch Mobile
  5. TensorFlow Lite for Microcontrollers • Especially designed to run machine

    learning models on microcontrollers and other devices with only few kilobytes of memory. • TensorFlow Lite for Microcontrollers is written in C++ 11 and requires a 32-bit platform. • The framework is available as an Arduino library
  6. Supported devices • Arduino Nano 33 BLE Sense • SparkFun

    Edge • STM32F746 Discovery kit • Adafruit EdgeBadge • Adafruit TensorFlow Lite for Microcontrollers Kit • Adafruit Circuit Playground Bluefruit • Espressif ESP32-DevKitC • Espressif ESP-EYE • Wio Terminal: ATSAMD51 • Himax WE-I Plus EVB Endpoint AI Development Board • Synopsys DesignWare ARC EM Software Development Platform
  7. Workflow • Train your Machine learning models • Convert them

    to a TensorFlow Lite model using the TensorFlow Lite converter. • Convert to a C byte array using standard tools to store it in a read-only program memory on device. • Run inference on device using the C++ library and process the results.
  8. Limitations of TF Lite for Microcontrollers • Support for a

    limited subset of TensorFlow operations • Support for a limited set of devices • Low-level C++ API requiring manual memory management • On device training is not supported
  9. Complete project flow • Define the problem • Set up

    your hardware • Set up your software • Build and prepare the binary • Get ready to flash the binary • Flash the binary • Generate the output