AIoT – When IoT meets the AI �Bringing intelligence to sensors
1
1
Marcelo Rovai was born in São Paulo and held a Master’s degree in Data Science from the Universidad del Desarrollo (UDD) in Chile and an MBA from IBMEC (INSPER) in Brazil. He graduated in 1982 as an Engineer from UNIFEI, Federal University of Itajuba, with a specialization from Escola Politécnica de Engenharia of São Paulo University (USP); both institutions are located in Brazil.
Mr. Rovai has experience as a teacher, engineer, and executive in several technology companies such as CDT/ETEP, AVIBRAS Aeroespacial, SID Informática, ATT-GIS, NCR, DELL, COMPAQ (HP), and more recently at IGT as a VP. He now works at IGT as a Senior Advisor for Latin America.
Besides his work at IGT, Marcelo Rovai publishes articles about electronics on websites such as MJRoBot.org, Hackster.io, Instructables.com, and Medium.com. Furthermore, he is a volunteer Professor at the UNIFEI Engineering Institute in Brazil and a lecturer at several Congresses and Universities on the topics of IoT and TinyML. He is an active member and a Co-Chair of the TinyML4D group, an initiative to bring TinyML education to developing countries.
2
Internet of Things (IoT)�
3
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical IoT Project
Comm Device
Actuators *
(Output)
Sensors *
(Input)
* “Things”
4
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical IoT Project
Comm Device
Actuators
(Output)
Sensors
(Input)
5 Quintillion
bytes of data produced every day by IoT
<1%
of unstructured data is analyzed or used at all
Source: Harvard Business Review, What’s Your Data Strategy?, April 18, 2017
Cisco, Internet of Things (IoT) Data Continues to Explode Exponentially. Who Is Using That Data and How?, Feb 5, 2018
5
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project
Comm Device
Actuators
(Output)
Sensors
(Input)
AI
6
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project … … Issues
Comm Device
Actuators
(Output)
Sensors
(Input)
Bandwidth
AI
7
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project … … Issues
Comm Device
Actuators
(Output)
Sensors
(Input)
Bandwidth
Latency
AI
8
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project … … Issues
Comm Device
Actuators
(Output)
Sensors
(Input)
Bandwidth
Latency
Energy
AI
9
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project … … Issues
Comm Device
Actuators
(Output)
Sensors
(Input)
Bandwidth
Latency
Energy
Reliability
AI
10
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
Typical AIoT Project … … Issues
Comm Device
Actuators
(Output)
Sensors
(Input)
Bandwidth
Latency
Energy
Reliability
Privacy
AI
Google Assistant
11
Microcontroller
COMM Error Alarm
WAN
Cloud
%
Pump Relay & LED
Lamp Relay & LED
IoT 2.0 * – Edge AI/ML (ML goes close to data)
LoRa
Actuators
(Output)
Sensors
(Input)
AI
Few and eventual data to be sent to the cloud
* Intelligence of Things
12
Source: ABI Research: TinyML
13
Market Forecast
Source: ABI Research: TinyML
14
Embedded ML (TinyML)�Introduction�
15
AI: Any technique that enables computers to mimic human behavior
ML: Ability to learn without explicitly being programed
DL: Extract patterns from data using neural networks
16
Edge AI (or Edge ML) is the processing of Artificial Intelligence algorithms on edge, that is, on users’ devices. The concept derives from Edge Computing, which starts from the same premise: data is stored, processed, and managed directly at the Internet of Things (IoT) endpoints.
TinyML is a subset of EdgeML, where sensors are generating data with ultra-low power consumption (batteries), so that we can ultimately deploy machine learning continuously ("always on devices")
EdgeAI/ML
TinyML
17
What is Tiny Machine Learning (TinyML)?
18
TinyML
Fastest-growing field of ML
18
What is Tiny Machine Learning (TinyML)?
19
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
19
What is Tiny Machine Learning (TinyML)?
20
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
On-device sensor analytics
20
What is Tiny Machine Learning (TinyML)?
21
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
On-device sensor analytics
Low power consumption
21
What is Tiny Machine Learning (TinyML)?
22
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
On-device sensor analytics
Low power consumption
Battery-operated
22
What is Tiny Machine Learning (TinyML)?
23
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
On-device sensor analytics
Low power consumption
Battery-operated
Always-on ML
23
Hardware
Software
TinyML ?
TinyML
24
Hardware
Software
TinyML
TinyML ?
25
TinyML Challenges�
26
TF Micro
Software
Hardware
Challenges
CPU
GPU
DSP
NPU
Memory
Heterogeneity
Resource Constraints
malloc
...
Missing Library Features
Limited Operating System Support
Compute
27
TF Micro
Software
Hardware
Challenges
CPU
GPU
DSP
MCU
Memory
Compute
Heterogeneity
Resource Constraints
malloc
...
Missing Library Features
Limited Operating System Support
28
250 Billion
MCUs today
29
29
Hardware
30
| Raspberry Pico (W) | Arduino Nano Sense | ESP 32 | Seeed XIAO BLE Sense | Arduino Pro |
32Bits CPU | Dual-core Arm Cortex-M0+ | Arm Cortex-M4F | Xtensa LX6 Dual Core | Arm Cortex-M4F | Dual Core Arm Cortex M7/M4 |
CLOCK | 133MHz | 64MHz | 240MHz | 64MHz | 480/240MHz |
RAM | 264KB | 256KB | 520KB | 256KB | 1MB |
ROM | 2MB | 1MB | 2MB | 2MB | 2MB |
Radio | (Yes for W) | BLE | BLE/WiFi | BLE | BLE/WiFi |
Sensors | No | Yes | No | Yes | No (Portenta) Yes (Nicla) |
Price | $ | $$$ | $$ | $$ | $$$$ |
Hardware
31
32
TF Micro
Software
Hardware
Challenges
CPU
GPU
DSP
MCU
Memory
Compute
Heterogeneity
Resource Constraints
malloc
...
Missing Library Features
Limited Operating System Support
32
| Raspberry Pico (W) | Arduino Nano Sense | ESP 32 | Seeed XIAO BLE Sense | Arduino Pro |
32Bits CPU | Dual-core Arm Cortex-M0+ | Arm Cortex-M4F | Xtensa LX6 Dual Core | Arm Cortex-M4F | Dual Core Arm Cortex M7/M4 |
CLOCK | 133MHz | 64MHz | 240MHz | 64MHz | 480/240MHz |
RAM | 264KB | 256KB | 520KB | 256KB | 1MB |
ROM | 2MB | 1MB | 2MB | 2MB | 2MB |
Radio | (Yes for W) | BLE | BLE/WiFi | BLE | BLE/WiFi |
Sensors | No | Yes | No | Yes | No (Portenta) Yes (Nicla) |
Price | $ | $$$ | $$ | $$ | $$$$ |
Hardware
33
34
https://arxiv.org/pdf/1910.01108.pdf
https://towardsdatascience.com/neural-network-architectures-156e5bad51ba
34
35
https://arxiv.org/pdf/1910.01108.pdf
https://towardsdatascience.com/neural-network-architectures-156e5bad51ba
35
36
TF Micro
Software
Challenges
malloc
...
Missing Library Features
Limited Operating System Support
Hardware
CPU
GPU
DSP
NPU
Memory
Heterogeneity
Resource Constraints
Compute
36
Software
37
38
TF Micro
Software
Hardware
Challenges
CPU
GPU
DSP
MCU
Memory
Compute
Heterogeneity
Resource Constraints
malloc
...
Missing Library Features
Limited Operating System Support
Software
malloc
...
Missing Library Features
Limited Operating System Support
38
Power
ESP32
XIAO
CPU Power / Memory
Application Complexity
Application Complexity vs. HW
39
How to Train a ML Model?
40
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
Make
Inferences
Machine Learning Workflow (“What”)
41
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
Make
Inferences
Machine Learning Workflow (“Where”)
42
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
Make
Inferences
Machine Learning Workflow (“How”)
43
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
Make
Inferences
Machine Learning Workflow (“How”)
44
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
Make
Inferences
Machine Learning Workflow (“How”)
45
From rule-based engineering to…
Rule-based Code
Trial
&
Error
Write More Code
46
Data-driven engineering
47
Collect
Data
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Make
Inferences
Preprocess
Data
Design a
Model
Train a
Model
Evaluate
Optimize
Convert
Model
Deploy
Model
48
Data-driven engineering
Training samples
Inference update
Camera
Audio
Vibration
49
EI Studio - Embedded ML platform (“AutoML”)
50
TinyML Application�Examples
51
52
53
54
Digital Mic
“UNIFEI”
MFCC Feature
Converter
Obtains an input
Pre-Process
Runs model
postprocesses
Make things happen
16KHz / 16 bits
Sample: [1s]
Output: Image
[13, 50, 1]
Output Dim [1, 3]
Check the highest probability
Take actions
KeyWord Spotting (KWS) - Inference
UNIFEI
IESTI
55
57
Mechanical Stresses in Transport
Roll
Yaw
Pitch
Terrestrial
Maritime
Rail
Fork-Lift
Idle
58
Industrial – Anomaly Detection
59
Predict and classify common Elephant behavior
Aggressive
60
61
Computer Vision Main Types
Image Classification
(Multi-Class Classification)
Object Detection
Multi-Label Classification + Object Localization
Cat: 70%
Dog: 80%
62
Computer Vision Main Types
Image Classification
(Multi-Class Classification)
Object Detection
Multi-Label Classification + Object Localization
Cat: 70%
Dog: 80%
63
Forest Fire Detection
64
Coffee Disease Classification
João Vitor Yukio Bordin Yamashita
Graduando em Engenharia Eletrônica pela UNIFEI
65
Computer Vision Main Types
Image Classification
(Multi-Class Classification)
Object Detection
Multi-Label Classification + Object Localization
Cat: 70%
Dog: 80%
66
Detecting Objects using TinyML (FOMO)
67
Detecting Objects using TinyML (FOMO)
68
Livestock / Wildlife Counting from Drone with FOMO
69
Other Sensors / MCUs / Models�Examples
70
AD8232 - Single Lead Heart Rate Monitor
Guilherme Silva
Engenheiro - UNIFEI
71
Other TinyML / MCUs Project Examples
72
Regression on TinyML
Sensor fusion
73
Reinforcement on TinyML
74
Exploring AI at the edge (Computer Vision)
75
Classifying Images using Smartphones
76
The Future of the TinyML (Embedded ML)�
77
78
Vijay Janapa Reddi, Ph. D. | Associate Professor |�John A. Paulson School of Engineering and Applied Sciences | Harvard University |
79
To learn more about Edge AI
80
Thanks
81