Deep Learning on Microcontrollers: Learn how to develop embedded AI applications using TinyML

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

A step-by-step guide that will teach you how to deploy TinyML on microcontrollers. Key Features: - Deploy machine learning models on edge devices with ease. - Leverage pre-built AI models and deploy them without writing any code. - Create smart and efficient IoT solutions with TinyML. Description: TinyML, or Tiny Machine Learning, is used to enable machine learning on resource-constrained devices, such as microcontrollers and embedded systems. If you want to leverage these low-cost, low-power but strangely powerful devices, then this book is for you. This book aims to increase accessibility to TinyML applications, particularly for professionals who lack the resources or expertise to develop and deploy them on microcontroller-based boards. The book starts by giving a brief introduction to Artificial Intelligence, including classical methods for solving complex problems. It also familiarizes you with the different ML model development and deployment tools, libraries, and frameworks suitable for embedded devices and microcontrollers. The book will then help you build an Air gesture digit recognition system using the Arduino Nano RP2040 board and an AI project for recognizing keywords using the Syntiant TinyML board. Lastly, the book summarizes the concepts covered and provides a brief introduction to topics such as zero-shot learning, one-shot learning, federated learning, and MLOps. By the end of the book, you will be able to develop and deploy end-to-end Tiny ML solutions with ease. What you will learn: - Learn how to build a Keyword recognition system using the Syntiant TinyML board. - Learn how to build an air gesture digit recognition system using the Arduino Nano RP2040. - Learn how to test and deploy models on Edge Impulse and Arduino IDE. - Get tips to enhance system-level performance. - Explore different real-world use cases of TinyML across various industries. Who this book is for: The book is for IoT developers, System engineers, Software engineers, Hardware engineers, and professionals who are interested in integrating AI into their work. This book is a valuable resource for Engineering undergraduates who are interested in learning about microcontrollers and IoT devices but may not know where to begin.

Author(s): Atul Krishna Gupta; Dr. Siva Prasad Nandyala
Publisher: BPB Publications
Year: 2023

Language: English
Pages: 301

Introduction to AI
Introduction
Structure
Objectives
Artificial Intelligence
Continuum of code writing and artificial intelligence
Exercise
Changing the paradigm
Neural Network
Machine Learning
Intelligent IoT System vs. Cloud based IoT system
Arduino Nano 33 BLE Sense board
Limited compute resources
Battery power limits
TinyML and Nicla Voice board
>10x parameters
>200x Power advantage
>20x Throughput
TinyML Ecosystem
Key applications for Intelligent IoT systems
Smart agriculture
Smart appliances
Smart cities
Smart health
Smart homes
Smart industry
Conclusion
Key facts
Questions
References
2. Traditional ML Lifecycle
Introduction
Structure
Objectives
Traditional methods
Machine learning landscape
Supervised learning
Unsupervised learning
Reinforcement Learning (RL)
ML Performance Metrics
Confusion matrix
Basics of DL and different DL algorithms
Transfer Learning
Tools and Different ML, DL frameworks
Python
Jupyter Notebooks
Google Colaboratory
TensorFlow (TF), TFLite and TensorFlow Lite Micro
TensorFlow Lite
TensorFlow Lite Micro
AI Model Efficiency Toolkit (AIMET)
Convolutional Architecture for Fast Feature Embedding (Caffe)
CoreML
Open Neural Network Exchange (ONNX)
Open Visual Inference and Neural network Optimization (OpenVINO)
Pytorch and PyTorch Mobile
Embedded Machine Learning (EML)
Difference between Learning and Inference
ML model deployment and inferencing on different platforms
Conclusion
Key facts
Questions
References
3. TinyML Hardware and Software Platforms
Introduction
Structure
Objectives
Servers at Data Centers: CPUs, GPUs and TPUs
Mobile CPU, Raspberry Pi board and its types
Microcontrollers and Microcontroller with AI accelerator
TinyML Hardware Boards
Arduino and Arduino Nano 33 BLE
Arduino Nicla Sense ME
Adafruit Feather
SparkFun Edge
NVIDIA Jetson Nano
Google Coral Edge TPU
Qualcomm QCS605
NXP i.MX 8M
STMicroelectronics STM32L4
Intel Curie
Syntiant TinyML
TinyML Software Suites
TensorFlow Lite Micro (Google)
uTensor (ARM)
Arduino Create
EloquentML
EdgeML (Microsoft)
EON Compiler (Edge Impulse)
STM32Cube.AI and NanoEdge AI Studio (STMicroelectronics)
PYNQ
OpenMV
SensiML
Neuton TinyML
Metavision Intelligence Suite 3.0 (Vision applications)
Data Engineering Frameworks
Edge Impulse
SensiML
Qeexo AutoML
TinyML Model Compression Frameworks
Quantization
Pruning
Low ranked approximation
Knowledge distillation
TensorFlow Lite
STM32 X-CUBE-AI
QKeras
Qualcomm AIMET
Microsoft NNI
CMix-NN
OmniML
Conclusion
Key facts
Questions
References
4. End-to-End TinyML Deployment Phases
Introduction
Structure
Objectives
Understanding Embedded ML
Introduction to Edge-impulse and Arduino IDE
Edge-impulse
Arduino Integrated Development Environment (IDE)
Arduino Driver Installation
Data collection from multiple sensors
Data collection from an Arduino board
Data collection from Syntiant board
Data engineering steps for TinyML
Cleaning
Organizing
Transformation
Model Training in TinyML software platforms
EON Compiler (Edge Impulse)
Model Compression
Pruning
Knowledge distillation
Model conversion
Quantization
Inferencing/Prediction of results with test data
Model Deployment in TinyML Hardware board
Conclusion
Key facts
Questions
References
5. Real World Use Cases
Introduction
Structure
Objectives
Smart agriculture
Agriculture video analytics
Crop intruder detection
Crop yield prediction and improvement
Agribots
Insect detection and pesticide reduction
Weedicides elimination
Acoustic insect detection
Animal husbandry
Smart appliances
Vision AI for appliances
Audio AI for appliances
Sensors based AI for appliances
Smart cities
Safe and secure city
City maintenance
Parking enforcement systems
Traffic management
Maintaining bridges
Non-Smoking enforcement
Smart health
Cataract detection
Fall detection
Cough detection
Boxing Moves Detector
Mosquito detection
Snoring and sleep apnea detection
Smart home
Person detection at the door
Glassbreak detection
Smart baby monitoring
Voice recognition for home automation
Smart industry
Railway track defect detection
Telecom towers defect detection
Defect detection in components
Smart automotive
Drowsy driver alert
Advance collision detection
Conclusion
Key facts
Questions
References
6. Practical Experiments with TinyML
Introduction
Structure
Objectives
Introduction to Nano RP2040 TinyML board
Setting up Arduino IDE and testing the Nano RP2040 Board
High level steps involved in the air gesture digit recognition in Edge Impulse platform
Data collection for the air gesture digit recognition
Loading the dataset in Edge Impulse Platform
Setting up the development framework and design of neural network classifier
Model training in Edge Impulse platform
Model testing with the collected data
Model deployment in Nano RP2040 board
Inferencing/Prediction of results with RP2040
Conclusion
Key facts
Questions
References
7. Advance Implementation with TinyML Board
Introduction
Structure
Objectives
NDP101 Architecture
NDP120 Architecture
Practical implementation and deployment
Creating a project
Uploading Data
Impulse Design
Epochs Setting
Learning rate setting
Validation data set setting
Auto balance setting
Data augmentation
Neural network architecture
Neural network training
Model testing
Deployment
Conclusion
Key facts
Questions
References
8. Continuous Improvement
Introduction
Structure
Objectives
Expectation gap
Unique issues about audio application
Raw neural network output and softmax transformation
Handling anomalous behavior during target classifier testing
Method 1: Running window averaging
Method 2: Enriching target classifier
Method 3: Enriching open set classifier
False Acceptance Rate testing
Optimization of window size in running window averaging
Phrase recognition constraints to improve system level performance
FRR testing under noisy conditions
Improving FRR performance under noisy conditions
Data collection for continuous improvement
Conclusion
Key facts
Questions
References
9. Conclusion
Introduction
Structure
Objectives
Review of material covered in this book
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Advanced topics
Different types of neural networks
Neural network optimization
Zero-shot, One-shot or Few-shot learning
Federated learning
Transfer learning
Tuning pretrained networks
MLOps
Key facts
Questions
References