Preface
This book is about tinyML, the technology that allows smartness in a minimally intrusive way using machine learning (ML) on low-powered devices like microcontrollers.
This technology has been around us for many years, for example, in smartwatches, intelligent assistants, and drones, just to name a few. However, today, it is witnessing an incredible growth in all market segments because of the continued success in reducing the complexity of ML model deployment, the proliferation of low-cost devices with extraordinary computing capabilities, and the invaluable contributions from the open-source community. Therefore, tinyML is not a niche technology designed by a few people to solve a few technological problems. Instead, it is a technology in the hands of many developers to solve big real-world problems.
tinyML is an exciting field full of opportunities. With a few tens of dollars, you can give life to objects that interact with the environment smartly and transform how we live for the better. However, this field can be challenging for those unfamiliar with microcontroller programming. Therefore, this book aims to dispel these barriers and demonstrate that tinyML is for everyone through practical examples.
Whether new to this field or looking to expand your ML knowledge, this improved second edition of TinyML Cookbook has something for all. Each chapter is structured to be a self-contained project to learn how to use some of the key tinyML technologies, such as Arduino, CMSIS-DSP, Edge Impulse, emlearn, Raspberry Pi Pico SDK, TensorFlow, TensorFlow Lite for Microcontrollers, and Zephyr.
Your practical journey into tinyML will start with an introduction to this multidisciplinary field and get you up to speed with some of the fundamentals for deploying applications on microcontrollers. For example, you will tackle problems you may encounter while prototyping microcontrollers, such as controlling the LED light or reading the push-button state using the GPIO peripheral.
After preparing for microcontroller programming, you will focus on tinyML projects using real-world sensors. Here, you will employ the temperature, humidity, and three “V” sensors (Voice, Vision, and Vibration) to implement end-to-end smart applications in different scenarios and learn best practices for building models for memory-constrained microcontrollers.
This second edition includes new recipes featuring an LSTM neural network to recognize music genres and the Edge Impulse Faster-Objects-More-Objects (FOMO) algorithm for detecting objects in a scene. These will help you stay updated with the latest developments in the tinyML community.
Finally, you will take your tinyML solutions to the next level with TVM, Arm Ethos-U55 microNPU, on-device learning, and the scikit-learn model deployment on microcontrollers.
TinyML Cookbook is a practical book with a focus on the principles. Although most of the presented projects are based on the Arduino Nano 33 BLE Sense and Raspberry Pi Pico, this second edition also features the SparkFun RedBoard Artemis Nano to help you practice the learned principles on an alternative microcontroller.
Therefore, by the end of this book, you will be well versed in best practices and ML frameworks to develop ML applications easily on microcontrollers.