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
Tooling for GANs in TensorFlow

TensorFlow-GAN (TF-GAN) TF-GAN is a lightweight library for training and evaluating Generative Adversarial Networks (GANs). Can be installed with pip

803 Dec 24, 2022
As a part of the HAKE project, includes the reproduced SOTA models and the corresponding HAKE-enhanced versions (CVPR2020).

HAKE-Action HAKE-Action (TensorFlow) is a project to open the SOTA action understanding studies based on our Human Activity Knowledge Engine. It inclu

Yong-Lu Li 94 Nov 18, 2022
Segcache: a memory-efficient and scalable in-memory key-value cache for small objects

Segcache: a memory-efficient and scalable in-memory key-value cache for small objects This repo contains the code of Segcache described in the followi

TheSys Group @ CMU CS 78 Jan 07, 2023
Simple (but Strong) Baselines for POMDPs

Recurrent Model-Free RL is a Strong Baseline for Many POMDPs Welcome to the POMDP world! This repo provides some simple baselines for POMDPs, specific

Tianwei V. Ni 172 Dec 29, 2022
The ARCA23K baseline system

ARCA23K Baseline System This is the source code for the baseline system associated with the ARCA23K dataset. Details about ARCA23K and the baseline sy

4 Jul 02, 2022
Multi-layer convolutional LSTM with Pytorch

Convolution_LSTM_pytorch Thanks for your attention. I haven't got time to maintain this repo for a long time. I recommend this repo which provides an

Zijie Zhuang 733 Dec 30, 2022
MM1 and MMC Queue Simulation using python - Results and parameters in excel and csv files

implementation of MM1 and MMC Queue on randomly generated data and evaluate simulation results then compare with analytical results and draw a plot curve for them, simulate some integrals and compare

Mohamadreza Rezaei 1 Jan 19, 2022
FinRL­-Meta: A Universe for Data­-Driven Financial Reinforcement Learning. 🔥

FinRL-Meta: A Universe of Market Environments. FinRL-Meta is a universe of market environments for data-driven financial reinforcement learning. Users

AI4Finance Foundation 543 Jan 08, 2023
Computer Vision and Pattern Recognition, NUS CS4243, 2022

CS4243_2022 Computer Vision and Pattern Recognition, NUS CS4243, 2022 Cloud Machine #1 : Google Colab (Free GPU) Follow this Notebook installation : h

Xavier Bresson 142 Dec 15, 2022
Python Assignments for the Deep Learning lectures by Andrew NG on coursera with complete submission for grading capability.

Python Assignments for the Deep Learning lectures by Andrew NG on coursera with complete submission for grading capability.

Utkarsh Agiwal 1 Feb 03, 2022
CRLT: A Unified Contrastive Learning Toolkit for Unsupervised Text Representation Learning

CRLT: A Unified Contrastive Learning Toolkit for Unsupervised Text Representation Learning This repository contains the code and relevant instructions

XiaoMing 5 Aug 19, 2022
Face uncertainty quantification or estimation using PyTorch.

Face-uncertainty-pytorch This is a demo code of face uncertainty quantification or estimation using PyTorch. The uncertainty of face recognition is af

Kaen 3 Sep 16, 2022
The project covers common metrics for super-resolution performance evaluation.

Super-Resolution Performance Evaluation Code The project covers common metrics for super-resolution performance evaluation. Metrics support The script

xmy 10 Aug 03, 2022
Parameter Efficient Deep Probabilistic Forecasting

PEDPF Parameter Efficient Deep Probabilistic Forecasting (PEDPF) is a repository containing code to run experiments for several deep learning based pr

Olivier Sprangers 10 Jun 13, 2022
Boostcamp AI Tech 3rd / Basic Paper reading w.r.t Embedding

Boostcamp AI Tech 3rd : Basic Paper Reading w.r.t Embedding TL;DR 1992년부터 2018년도까지 이루어진 word/sentence embedding의 중요한 줄기를 이루는 기초 논문 스터디를 진행하고자 합니다. 논

Soyeon Kim 14 Nov 14, 2022
A hue shift helper for OBS

obs-hue-shift A hue shift helper for OBS This is a repo based on the really nice script Hegemege made. The original script can be found https://gist.g

Alexis Tyler 1 Jan 10, 2022
Code for the USENIX 2017 paper: kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels

kAFL: Hardware-Assisted Feedback Fuzzing for OS Kernels Blazing fast x86-64 VM kernel fuzzing framework with performant VM reloads for Linux, MacOS an

Chair for Sys­tems Se­cu­ri­ty 541 Nov 27, 2022
Read Like Humans: Autonomous, Bidirectional and Iterative Language Modeling for Scene Text Recognition

Read Like Humans: Autonomous, Bidirectional and Iterative Language Modeling for Scene Text Recognition The official code of ABINet (CVPR 2021, Oral).

334 Dec 31, 2022
Using Language Model to Bootstrap Human Activity Recognition Ambient Sensors Based in Smart Homes

Using Language Model to Bootstrap Human Activity Recognition Ambient Sensors Based in Smart Homes This repository is the official implementation of Us

Damien Bouchabou 0 Oct 18, 2021
Detectron2-FC a fast construction platform of neural network algorithm based on detectron2

What is Detectron2-FC Detectron2-FC a fast construction platform of neural network algorithm based on detectron2. We have been working hard in two dir

董晋宗 9 Jun 06, 2022