TinyML Cookbook, published by Packt

Overview

TinyML Cookbook

TinyML Cookbook

This is the code repository for TinyML Cookbook, published by Packt.

Author: Gian Marco Iodice
Publisher: Packt

About the book

This book is about TinyML, a fast-growing field at the unique intersection of machine learning and embedded systems to make AI ubiquitous with extremely low-powered devices such as microcontrollers.

TinyML is an exciting field full of opportunities. With a small budget, we can give life to objects that interact with the world around us smartly and transform the way we live for the better. However, this field can be hard to approach if we come from an ML background with a little familiarity with embedded systems such as microcontrollers. Therefore, this book wants to dispel these barriers and make TinyML also accessible to developers with no embedded programming experience through practical examples. Each chapter will be a self-contained project to learn how to use some of the technologies at the heart of TinyML, interface with electronic components like sensors, and deploy ML models on memory-constrained devices.

Who is this book for

This book is for ML developers/engineers interested in developing machine learning applications on microcontrollers through practical examples quickly. The book will help you expand your knowledge towards the revolution of tiny machine learning (TinyML) by building end-to-end smart projects with real-world data sensors on Arduino Nano 33 BLE Sense and Raspberry Pi Pico.

Basic familiarity with C/C++, Python programming, and a command-line interface (CLI) is required. However, no prior knowledge of microcontrollers is necessary.

Technical requirements

You will need a computer (either a laptop or desktop) with an x86-64 architecture and at least one USB port for programming Arduino Nano 33 BLE Sense and Raspberry Pi Pico microcontroller boards. For the first six chapters, you can use Ubuntu 18.04 (or later) or Windows (for example, Windows 10) as an operating system (OS). However, you will need Ubuntu 18.04 (or later) for chapter 7 and chapter 8.

The only software prerequisites for your computer are:

  • Python (Python 3.7 recommended)
  • Text editor (for example, gedit on Ubuntu)
  • Media player (for example, VLC)
  • Image viewer (for example, the default app in Ubuntu or Windows 10)
  • Web browser (for example, Google Chrome)

Arduino Nano 33 BLE Sense and Raspberry Pi Pico programs will be developed directly in the web browser with the Arduino Web Editor. However, you may also consider using the local Arduino IDE following the instructions provided at this link.

The following table summarizes the hardware devices and software tools covered in each chapter:

Chapter Devices SW tools Electronic components
1 - Arduino Nano 33 BLE Sense
- Raspberry Pi Pico
- Arduino Web Editor None
2 - Arduino Nano 33 BLE Sense
- Raspberry Pi Pico
- Arduino Web Editor - A micro-USB cable
- 1x half-size breadboard
- 1x red LED
- 1x 220 Ohm resistor
- 1x 3 AA battery holder
- 1x 4 AA battery holder
- 4x AA batteries
- 5x jumper wires
3 - Arduino Nano 33 BLE Sense
- Raspberry Pi Pico
- Arduino Web Editor
- Google Colaboratory
- A micro-USB cable
- 1x half-size breadboard
- 1x AM2302 module with the DHT22 sensor
- 5x jumper wires
4 - Arduino Nano 33 BLE Sense
- Raspberry Pi Pico
- Arduino Web Editor
- Edge Impulse
- Python
- A micro-USB cable
- 1x half-size breadboard
- 1x electrect microphone amplifier - MAX9814
- 2x 220 Ohm resistor
- 1x 100 Ohm resistor
- 1x red LED
- 1x green LED
- 1x blue LED
- 1x push-button
- 11x jumper wires
5 - Arduino Nano 33 BLE Sense - Arduino Web Editor
- Google Colaboratory
- Python
- A micro-USB cable
- 1x half-size breadboard
- 1x OV7670 camera module
- 1x push-button
- 18 jumper wires
6 - Raspberry Pi Pico - Arduino Web Editor
- Edge Impulse
- Python
- A micro-USB cable
- 1x half-size breadboard
- 1x MPU-6050 IMU
- 4x jumper wires
7 - Arm Cortex-M3 Virtual Platform (QEMU) - Google Colaboratory
- Python
- Zephyr project
None
8 - Virtual Arm Ethos-U55 microNPU - Arm Corstone-300 FVP
- Python
- TVM
None

Citation

To cite TinyML Cookbook in publications use:

@book{iodice2022tinymlcookbook,
  title={TinyML Cookbook: Combine artificial intelligence and ultra-low-power embedded devices to make the world smarter},
  author={Gian Marco Iodice},
  year={2022},
  publisher={Packt},
  isbn = {9781801814973},
  url = {https://www.packtpub.com/product/tinyml-cookbook/9781801814973}
}

About the author

Gian Marco Iodice is team and tech lead in the Machine Learning Group at Arm, who co-created the Arm Compute Library in 2017. Arm Compute Library is currently the most performant library for ML on Arm, and it’s deployed on billions of devices worldwide – from servers to smartphones.

Gian Marco holds an MSc degree, with honors, in electronic engineering from the University of Pisa (Italy) and has several years of experience developing ML and computer vision algorithms on edge devices. Now, he's leading the ML performance optimization on Arm Mali GPUs.

In 2020, Gian Marco co-founded the TinyML UK meetup group to encourage knowledge sharing, educate, and inspire the next generation of ML developers on tiny and power-efficient devices.

Owner
Packt
Providing books, eBooks, video tutorials, and articles for IT developers, administrators, and users.
Packt
Changing the Mind of Transformers for Topically-Controllable Language Generation

We will first introduce the how to run the IPython notebook demo by downloading our pretrained models. Then, we will introduce how to run our training and evaluation code.

IESL 20 Dec 06, 2022
A resource for learning about ML, DL, PyTorch and TensorFlow. Feedback always appreciated :)

A resource for learning about ML, DL, PyTorch and TensorFlow. Feedback always appreciated :)

Aladdin Persson 4.7k Jan 08, 2023
A Tensorflow implementation of BicycleGAN.

BicycleGAN implementation in Tensorflow As part of the implementation series of Joseph Lim's group at USC, our motivation is to accelerate (or sometim

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 97 Dec 02, 2022
Graduation Project

Gesture-Detection-and-Depth-Estimation This is my graduation project. (1) In this project, I use the YOLOv3 object detection model to detect gesture i

ChaosAT 1 Nov 23, 2021
My implementation of Fully Convolutional Neural Networks in Keras

Keras-FCN This repository contains my implementation of Fully Convolutional Networks in Keras (Tensorflow backend). Currently, semantic segmentation c

The Duy Nguyen 15 Jan 13, 2020
Trying to understand alias-free-gan.

alias-free-gan-explanation Trying to understand alias-free-gan in my own way. [Chinese Version 中文版本] CC-BY-4.0 License. Tzu-Heng Lin motivation of thi

Tzu-Heng Lin 12 Mar 17, 2022
Code for EMNLP 2021 main conference paper "Text AutoAugment: Learning Compositional Augmentation Policy for Text Classification"

Text-AutoAugment (TAA) This repository contains the code for our paper Text AutoAugment: Learning Compositional Augmentation Policy for Text Classific

LancoPKU 105 Jan 03, 2023
The codebase for our paper "Generative Occupancy Fields for 3D Surface-Aware Image Synthesis" (NeurIPS 2021)

Generative Occupancy Fields for 3D Surface-Aware Image Synthesis (NeurIPS 2021) Project Page | Paper Xudong Xu, Xingang Pan, Dahua Lin and Bo Dai GOF

xuxudong 97 Nov 10, 2022
Pytorch implement of 'Unmixing based PAN guided fusion network for hyperspectral imagery'

Pgnet There's a improved version compared with the publication in Tgrs with the modification in the deduction of the PDIN block: https://arxiv.org/abs

5 Jul 01, 2022
Funnels: Exact maximum likelihood with dimensionality reduction.

Funnels This repository contains the code needed to reproduce the experiments from the paper: Funnels: Exact maximum likelihood with dimensionality re

2 Apr 21, 2022
FEMDA: Robust classification with Flexible Discriminant Analysis in heterogeneous data

FEMDA: Robust classification with Flexible Discriminant Analysis in heterogeneous data. Flexible EM-Inspired Discriminant Analysis is a robust supervised classification algorithm that performs well i

0 Sep 06, 2022
Rlmm blender toolkit - A set of tools to streamline level generation in UDK straight from Blender

rlmm_blender_toolkit A set of tools to streamline level generation in UDK straig

Rocket League Mapmaking 0 Jan 15, 2022
Dilated Convolution for Semantic Image Segmentation

Multi-Scale Context Aggregation by Dilated Convolutions Introduction Properties of dilated convolution are discussed in our ICLR 2016 conference paper

Fisher Yu 764 Dec 26, 2022
Graph Attention Networks

GAT Graph Attention Networks (Veličković et al., ICLR 2018): https://arxiv.org/abs/1710.10903 GAT layer t-SNE + Attention coefficients on Cora Overvie

Petar Veličković 2.6k Jan 05, 2023
mbrl-lib is a toolbox for facilitating development of Model-Based Reinforcement Learning algorithms.

mbrl-lib is a toolbox for facilitating development of Model-Based Reinforcement Learning algorithms. It provides easily interchangeable modeling and planning components, and a set of utility function

Facebook Research 724 Jan 04, 2023
A toolset for creating Qualtrics-based IAT experiments

Qualtrics IAT Tool A web app for generating the Implicit Association Test (IAT) running on Qualtrics Online Web App The app is hosted by Streamlit, a

0 Feb 12, 2022
PyTorch implementation of the implicit Q-learning algorithm (IQL)

Implicit-Q-Learning (IQL) PyTorch implementation of the implicit Q-learning algorithm IQL (Paper) Currently only implemented for online learning. Offl

Sebastian Dittert 27 Dec 30, 2022
LSTM built using Keras Python package to predict time series steps and sequences. Includes sin wave and stock market data

LSTM Neural Network for Time Series Prediction LSTM built using the Keras Python package to predict time series steps and sequences. Includes sine wav

Jakob Aungiers 4.1k Jan 02, 2023
This repo is about to create the Streamlit application for given ML model.

HR-Attritiion-using-Streamlit This repo is about to create the Streamlit application for given ML model. Problem Statement: Managing peoples at workpl

Pavan Giri 0 Dec 10, 2021