Book Review: TinyML – Machine Learning with TensorFlow Lite

Authors: Pete Warden and Daniel Situnayake

Published: January 2020

Target Audience: Any embedded developer looking to get started with Machine Learning.

Jacob’s Rating: 5+ Stars

Book Link:

We live in a data centric world, whether that data is used to track and predict weather patterns, web traffic or analyze sensor results. The amount of data available is becoming large and complex, to the point that it is difficult for humans to recognize the patterns and write the software. Machine learning is a popular solution that has been very successful in the cloud and that is now finding its way to edge and the most resource constrained embedded systems.

TinyML, is a fantastic book that helps embedded software developers learn and understand how machine learning can be applied to problems and ease software development burdens. The book doesn’t require a developer to have any special knowledge in data science or machine learning, or in fact, even embedded systems. The authors convey to the reader, in an easy and exciting manner, what machine learning is all about using real world examples.

The examples leverage Google Colab, which allows the authors to share example code and solutions in the cloud on how to install tools, pull in data, train a model and deploy to an embedded system. In fact, there are several different development boards that can be used with the example code such as the:

The authors discuss practical theory and implementation, using Keras with Tensorflow Lite for microcontrollers. Readers have the opportunity to train and deploy machine learning models that cover topics such as:

  • Hello World
  • Wake-word detection
  • Person detection
  • Gesture recognition

This book is perfect for any developer who wants to get a hands-on working knowledge for how to train, deploy and optimize machine learning models to embedded systems. The authors are fantastically practical and provide insights to the reader that would be difficult to glean otherwise. I believe to get the most from this book, developers should get a development board and follow along with the examples so that they are not just reading but also doing the work. I’d even recommend that you play around with changing the models and observing how those changes result in changes to the trained models behavior and execution.

The only issue I had, which is not any fault to the authors, is that the tools chains are rapidly changing which results in some disconnects. The authors expected this and often point to where the latest procedures can be found. However, I’ve found that the Tensorflow Lite for microcontroller github has not been keeping up with those and often had to do extra research to resolve issues with installing and managing the toolchains. In fact, I have not been able to get my Sparkfun Edge to work, but was successful with the STM32, although I had headaches on my Mac with mbed.

I would highly recommend this book to any engineer who is interested in learning about machine learning on microcontrollers. The authors presented the material brilliantly and will undoubtedly help thousands of embedded software engineers learn how to successful get started in machine learning and adapt it to the nearly limitless applications that present themselves in the real world.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.