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
Acute ischemic stroke dataset

AISD Acute ischemic stroke dataset contains 397 Non-Contrast-enhanced CT (NCCT) scans of acute ischemic stroke with the interval from symptom onset to

Kongming Liang 21 Sep 06, 2022
A simple AI that will give you si ple task and this is made with python

Crystal-AI A simple AI that will give you si ple task and this is made with python Prerequsites: Python3.6.2 pyttsx3 pip install pyttsx3 pyaudio pip i

CrystalAnd 1 Dec 25, 2021
PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper.

deep-linear-shapes PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper. If you find this code useful i

Romain Loiseau 27 Sep 24, 2022
Final project code: Implementing MAE with downscaled encoders and datasets, for ESE546 FA21 at University of Pennsylvania

546 Final Project: Masked Autoencoder Haoran Tang, Qirui Wu 1. Training To train the network, please run mae_pretraining.py. Please modify folder path

Haoran Tang 0 Apr 22, 2022
3 Apr 20, 2022
Optimizing synthesizer parameters using gradient approximation

Optimizing synthesizer parameters using gradient approximation NASH 2021 Hackathon! These are some experiments I conducted during NASH 2021, the Neura

Jordie Shier 10 Feb 10, 2022
MediaPipeのPythonパッケージのサンプルです。2020/12/11時点でPython実装のある4機能(Hands、Pose、Face Mesh、Holistic)について用意しています。

mediapipe-python-sample MediaPipeのPythonパッケージのサンプルです。 2020/12/11時点でPython実装のある以下4機能について用意しています。 Hands Pose Face Mesh Holistic Requirement mediapipe 0.

KazuhitoTakahashi 217 Dec 12, 2022
Out-of-Distribution Generalization of Chest X-ray Using Risk Extrapolation

OoD_Gen-Chest_Xray Out-of-Distribution Generalization of Chest X-ray Using Risk Extrapolation Requirements (Installations) Install the following libra

Enoch Tetteh 2 Oct 01, 2022
Official Code For TDEER: An Efficient Translating Decoding Schema for Joint Extraction of Entities and Relations (EMNLP2021)

TDEER 🦌 🦒 Official Code For TDEER: An Efficient Translating Decoding Schema for Joint Extraction of Entities and Relations (EMNLP2021) Overview TDEE

33 Dec 23, 2022
Apache Flink

Apache Flink Apache Flink is an open source stream processing framework with powerful stream- and batch-processing capabilities. Learn more about Flin

The Apache Software Foundation 20.4k Dec 30, 2022
This repository contains code accompanying the paper "An End-to-End Chinese Text Normalization Model based on Rule-Guided Flat-Lattice Transformer"

FlatTN This repository contains code accompanying the paper "An End-to-End Chinese Text Normalization Model based on Rule-Guided Flat-Lattice Transfor

THUHCSI 74 Nov 28, 2022
Codebase for "Revisiting spatio-temporal layouts for compositional action recognition" (Oral at BMVC 2021).

Revisiting spatio-temporal layouts for compositional action recognition Codebase for "Revisiting spatio-temporal layouts for compositional action reco

Gorjan 20 Dec 15, 2022
Aiming at the common training datsets split, spectrum preprocessing, wavelength select and calibration models algorithm involved in the spectral analysis process

Aiming at the common training datsets split, spectrum preprocessing, wavelength select and calibration models algorithm involved in the spectral analysis process, a complete algorithm library is esta

Fu Pengyou 50 Jan 07, 2023
Cookiecutter PyTorch Lightning

Cookiecutter PyTorch Lightning Instructions # install cookiecutter pip install cookiecutter

Mazen 8 Nov 06, 2022
The implementation of 'Image synthesis via semantic composition'.

Image synthesis via semantic synthesis [Project Page] by Yi Wang, Lu Qi, Ying-Cong Chen, Xiangyu Zhang, Jiaya Jia. Introduction This repository gives

DV Lab 71 Jan 06, 2023
Lab Materials for MIT 6.S191: Introduction to Deep Learning

This repository contains all of the code and software labs for MIT 6.S191: Introduction to Deep Learning! All lecture slides and videos are available

Alexander Amini 5.6k Dec 26, 2022
Go from graph data to a secure and interactive visual graph app in 15 minutes. Batteries-included self-hosting of graph data apps with Streamlit, Graphistry, RAPIDS, and more!

✔️ Linux ✔️ OS X ❌ Windows (#39) Welcome to graph-app-kit Turn your graph data into a secure and interactive visual graph app in 15 minutes! Why This

Graphistry 107 Jan 02, 2023
LBK 26 Dec 28, 2022
Ranger deep learning optimizer rewrite to use newest components

Ranger21 - integrating the latest deep learning components into a single optimizer Ranger deep learning optimizer rewrite to use newest components Ran

Less Wright 266 Dec 28, 2022
Vector AI — A platform for building vector based applications. Encode, query and analyse data using vectors.

Vector AI is a framework designed to make the process of building production grade vector based applications as quickly and easily as possible. Create

Vector AI 267 Dec 23, 2022