This year, just like everyone else, I decided I wanted to read more books. Like with paper. So, to help encourage these efforts, I am reviewing a book on ML every month. Starting a month late.
This month it is TinyML by Pete Warden and Daniel Situnayake.
Any type of developer interested in running ML(Machine Learning) inference workloads on microcontrollers. The book does a good job introducing both programming for microcontrollers and the requisite ML knowledge to train models. Knowledge of C/C++ helps, but you do not need to know TensorFlow or Python. TensorFlow Lite for Microcontrollers is new and TinyML is just going to grow in terms of supported frameworks and hardware platforms. Get on it now.
This book does a good job introducing both topics (embedded programming and ML) enough that you do not need to know anything about either. It slowly builds in that fun, hands-on way, and gets into the deep dive of TinyML near the end.
The book and a hardware platform. I used the Arduino Nano 33 BLE Sense because it's new for me, but you could also get the SparkFun Edge or the STM32F746G Discovery Kit. If you have a specific project in mind (speech detection, motion detection, person recognition) you might want to think about that as the boards' form factors are different. They are all great, though.
One of the examples (person detection) requires a camera and does not have the code for the ST board. The camera recommended in the book is the Arducam Mini 2MP Plus. Keep this in mind if you are building yourself a weekend speed-through kit.
A long weekend should do it and I would recommend working through it as if it were a textbook. If you train all the models, it takes longer, but you can move on in the book while your models are training. If you are more experienced on one end of the Embedded <-> Data Science spectrum, you can skip those bits.
People detection on an M-Class processor. The concept still blows my mind. Three years ago, I was classifying dogs on Xeon and now the same model can be used on a board that can run on a watch battery.
Effectively the last quarter of the book. This is where the limitations and challenges around embedded ML currently exists. Optimizations, extensions for popular frameworks, working on drivers for specific hardware, and building models in the most extreme constraints is the crux of the challenge. Thankfully, a lot of the industry is working on fixing this, including Arm. This section is at the end, as it should be. It goes into the finer details, which are important for anyone wanting to get more into this field.
Great book and a great read. It is as enjoyable as it is informative. The projects are great and the way they are described means that you can go back later and extend them.
It would be great if there were some other architectures besides CNNs, but that is the way embedded ML is right now. Think of embedded ML a few years behind and this is why it is a great challenge to see them running on small boards. Within the next year, we will see more architectures getting supported. Look forward to it.
This book is the future, it is great and you must buy it!
Also, all the exercises are on GitHub.
See the following for an interview of author Pete Warden by Wei Xiao:
I would recommend you check out Daniel Situnyake's latest endeavors at Arm AI Partner Edge Impulse if you are looking for a product around TinyML development.
Enjoy and check back next month.
Buy TinyML here