SlideShare a Scribd company logo
Machine learning on
one	one	square	centimeter
Jan	Jongboom,	Arm	
Tweakers	Dev	Summit	
14	February	2019
Jan	Jongboom	
Principal	Developer	Evangelist	
jan.jongboom@arm.com
3
8	years	ago...
Machine learning on 1 cm2 - Tweakers Dev Summit
http://www-03.ibm.com/ibm/history/ibm100/us/en/icons/ibm700series/impacts/
Machine learning on 1 cm2 - Tweakers Dev Summit
Machine learning on 1 cm2 - Tweakers Dev Summit
https://cdn2.i-scmp.com/sites/default/files/styles/980x551/public/images/methode/2017/05/23/6660b96e-3f9d-11e7-8c27-b06d81bc1bba_1280x720_183924.JPG?itok=ZmONr2a_
9
Machine	learning
10
Downsides
I'm	not	rich	enough	to	develop	5,000	custom	
processors	
Centralized	
Costs	lots	of	power	and	bandwidth	
Privacy
Not	me
11
Microcontrollers
Small (1cm²)
Cheap (~1$)
Efficient (years on ba=ery)
Slow (max. 100 MHz)
Limited memory (max. 256K RAM)
Downsides
8	cm
12
Reinforcement	learning
X
X
O
O
Content	of	lucifer	box
Every	box	
resembles	a	state	
of	the	board
X
13
Reinforcement	learning
X
X
O
O
Content	of	lucifer	box
Rules	
Lose:	Remove	bead	
Draw:	Place	1	bead	back	
Win:	Place	3	beads	back
Reward	function
X
14
Reinforcement	learning
X
X
O
O
Content	of	lucifer	box
O
X
15
Reinforcement	learning
X
X
O
O
Content	of	lucifer	box
16
Reinforcement	learning
X
X
O
O
Content	of	lucifer	box
17
Training	vs.	classification
Hundreds	of	different	states	
Need	to	encounter	states	many	times	
Training	takes	long!	
Classification	is	however	simple	
Play	the	game,	and	you	have	to	open	up	max.	4	drawers!
18
Machine	learning	on	the	edge
Typically	only	classification	
Typically	more	efficient	than	sending	data	over	the	network	
Size	of	the	network	still	matters
19
Enabling	new	use	cases
Sensor fusion
http://www.gierad.com/projects/supersensor/
Machine learning on 1 cm2 - Tweakers Dev Summit
21
Federated learning
https://research.googleblog.com/2017/04/federated-learning-collaborative.html
Enabling	new	use	cases
22
LPWANs
http://ufldl.stanford.edu/tutorial/unsupervised/Autoencoders/
Enabling	new	use	cases
23
Offline self-contained systems
https://os.mbed.com/blog/entry/streaming-data-cows-dsa2017/
Enabling	new	use	cases
24
Practical	example
https://www.youtube.com/watch?v=FhbCAd0sO1c
25
Training...
MNIST	data	set	
Training	set:	60,000	images	
Every	drawing	is	downsampled	to	28x28	pixels	
Supervised	learning	through	backpropagation	
https://blog.hackster.io/simple-neural-network-on-mcus-a7cbd3dc108c
26
Neural	networks	are	made	up	of	neurons
Input
Input
Input
Input
Output
Activation	function
fn
27
Neural	networks	are	made	up	of	neurons
3
2
5
7
1sum	>	10
Connections
28
Neural	networks	are	made	up	of	neurons
3
2
5
7
0sum	>	10
0.3
1.0
0.1
0.6
29
Neural	networks	are	made	up	of	layers	of	neurons
28x28 = 784
9
0
1
2
9
0
1
1
0
1
Before	training:	weights	are	random,	we	adjust	them	during	training
30
After	training
https://vas3k.com/blog/machine_learning/
31
Things	at	play
Number	of	connections	((784	x	128)	+	(128	x	64)	+	(64	x	10)	+	(10	x	1))	=	109,194	
Connections	have	weights,	typically	4	bytes	
Run	activation	function	for	every	neuron	(784	+	128	+	64	+	10)
32
Optimizations
Number	of	connections	((784	x	128)	+	(128	x	64)	+	(64	x	10)	+	(10	x	1))	=	109,194	
Store	connections	in	ROM	or	external	flash,	page	into	RAM	when	needed	
Connections	have	weights,	typically	4	bytes	
Quantization	to	1	byte	
Run	activation	function	for	every	neuron	(784	+	128	+	64	+	10)	
Optimized	DSP	instructions	(CMSIS-NN)
33
In	practice...
34
Keyword	spotting
Real-time	keyword	detection	
"Yes",	"No",	"Left",	"Right"	...	
10	inferences	per	second	(216	MHz)	
70	KB	RAM	used
https://github.com/ARM-software/ML-KWS-for-MCU
35
Object	detection
Object	detection	in	video	using	CIFAR10	
32x32	input	in	color,	10	classes	to	detect	
10	images	per	second	(216	MHz)	
133	KB	RAM	used
https://github.com/ARM-software/ML-examples/tree/master/cmsisnn-cifar10
Machine learning on 1 cm2 - Tweakers Dev Summit
37
Battery	life
1	coin	cell	
1	image	every	5	minutes	
100	ms.	per	inference	
>	1	year	of	battery	life
38
Getting	started...
39
Getting	started
1.	Buy	a	development	board	
2.	Run	some	tutorials:	
https://blog.hackster.io/simple-neural-network-on-mcus-
a7cbd3dc108c	
https://github.com/uTensor/ADL_Demo	
https://github.com/ARM-software/ML-examples/tree/master/
cmsisnn-cifar10		
https://github.com/ARM-software/ML-KWS-for-MCU
40
Recap
1. Machine	learning	is	cool	
2. Machine	learning	on	the	edge	is	even	cooler	
3. We're	just	getting	started,	so	get	hacking	
4. ???	
5. PROFIT!!!
41
https://labs.mbed.com
Slides: http://janjongboom.com
Thank you!

More Related Content

PDF
Open Hours: Mbed Simulator
Jan Jongboom
 
PDF
17,000 contributions in 32K RAM - FOSS North 2019
Jan Jongboom
 
PDF
Machine Learning on 1 cm2 - Daho.am 2018
Jan Jongboom
 
PDF
Machine learning on microcontrollers - Tech Power Summit 2018
Jan Jongboom
 
PDF
Machine learning on 1 square centimeter - Emerce Next 2019
Jan Jongboom
 
PDF
Intelligent IoT Devices - IoT Bootcamp - Smart City Gothenburg 2018
Jan Jongboom
 
PDF
Deep learning on microcontrollers - IETF 101 - T2TRG
Jan Jongboom
 
PPTX
IoTFuse - Machine Learning at the Edge
Austin Blackstone
 
Open Hours: Mbed Simulator
Jan Jongboom
 
17,000 contributions in 32K RAM - FOSS North 2019
Jan Jongboom
 
Machine Learning on 1 cm2 - Daho.am 2018
Jan Jongboom
 
Machine learning on microcontrollers - Tech Power Summit 2018
Jan Jongboom
 
Machine learning on 1 square centimeter - Emerce Next 2019
Jan Jongboom
 
Intelligent IoT Devices - IoT Bootcamp - Smart City Gothenburg 2018
Jan Jongboom
 
Deep learning on microcontrollers - IETF 101 - T2TRG
Jan Jongboom
 
IoTFuse - Machine Learning at the Edge
Austin Blackstone
 

Similar to Machine learning on 1 cm2 - Tweakers Dev Summit (20)

PPTX
Deep Learning - Hype, Reality and Applications in Manufacturing
Adam Cook
 
PDF
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
Chester Chen
 
PDF
Applications of Machine Learning in AI.pdf
jashwanthmuthumula
 
PPTX
machine Learning subject of third year information technology unit 1.pptx
cptjacksparrow770
 
PPTX
An Introduction to Machine Learning
Angelo Simone Scotto
 
PDF
Machine Learning Challenges and Opportunities in Education, Industry, and Res...
Facultad de Informática UCM
 
PDF
Overview of machine learning
SolivarLabs
 
PPTX
Machine-Learning-on-board-Robots-Implementing-AI-Directly-on-Hardware.pptx
jayeshsoni49
 
PPTX
Machine Learning Basics To Understand What It Actually Is.
singapuriyudhish27
 
PPT
Presentation
butest
 
PDF
Webinar: Machine Learning para Microcontroladores
Embarcados
 
PDF
Unlocking the Potential of Artificial Intelligence_ Machine Learning in Pract...
eswaralaldevadoss
 
PDF
Dec.20.2019, Arduino based on Mbed os
Daniel Lee
 
PDF
Presentation v3
Muhammad AL-Qurishi
 
PDF
Implementing AI: Running AI at the Edge: Adapting AI to available resource in...
KTN
 
PPT
This is a heavily data-oriented
butest
 
PPT
This is a heavily data-oriented
butest
 
PDF
Applications of Machine Learning in AI (1).pdf
jashwanthmuthumula
 
PDF
Machine Learning Basics and Supervised, unsupervised
PremaSahane2
 
PPTX
ML PPT-1.pptx
Tech Vision
 
Deep Learning - Hype, Reality and Applications in Manufacturing
Adam Cook
 
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
Chester Chen
 
Applications of Machine Learning in AI.pdf
jashwanthmuthumula
 
machine Learning subject of third year information technology unit 1.pptx
cptjacksparrow770
 
An Introduction to Machine Learning
Angelo Simone Scotto
 
Machine Learning Challenges and Opportunities in Education, Industry, and Res...
Facultad de Informática UCM
 
Overview of machine learning
SolivarLabs
 
Machine-Learning-on-board-Robots-Implementing-AI-Directly-on-Hardware.pptx
jayeshsoni49
 
Machine Learning Basics To Understand What It Actually Is.
singapuriyudhish27
 
Presentation
butest
 
Webinar: Machine Learning para Microcontroladores
Embarcados
 
Unlocking the Potential of Artificial Intelligence_ Machine Learning in Pract...
eswaralaldevadoss
 
Dec.20.2019, Arduino based on Mbed os
Daniel Lee
 
Presentation v3
Muhammad AL-Qurishi
 
Implementing AI: Running AI at the Edge: Adapting AI to available resource in...
KTN
 
This is a heavily data-oriented
butest
 
This is a heavily data-oriented
butest
 
Applications of Machine Learning in AI (1).pdf
jashwanthmuthumula
 
Machine Learning Basics and Supervised, unsupervised
PremaSahane2
 
ML PPT-1.pptx
Tech Vision
 
Ad

More from Jan Jongboom (20)

PDF
TinyML on Arduino - workshop
Jan Jongboom
 
PDF
Intelligent Edge - Getting started with TinyML for industrial applications
Jan Jongboom
 
PDF
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
Jan Jongboom
 
PDF
Get started with TinyML - Embedded online conference
Jan Jongboom
 
PDF
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
Jan Jongboom
 
PDF
Get started with TinyML - Hackster webinar 9 April 2020
Jan Jongboom
 
PDF
Tiny intelligent computers and sensors - Open Hardware Event 2020
Jan Jongboom
 
PDF
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
Jan Jongboom
 
PDF
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
Jan Jongboom
 
PDF
Fundamentals of IoT - Data Science Africa 2019
Jan Jongboom
 
PDF
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
Jan Jongboom
 
PDF
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
Jan Jongboom
 
PDF
Develop with Mbed OS - The Things Conference 2019
Jan Jongboom
 
PDF
Firmware Updates over LoRaWAN - The Things Conference 2019
Jan Jongboom
 
PDF
Faster Device Development - GSMA @ CES 2019
Jan Jongboom
 
PDF
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
Jan Jongboom
 
PDF
Simulating microcontrollers - Arm Research Summit 2018
Jan Jongboom
 
PDF
Introduction to Mbed - Etteplan seminar - August 2018
Jan Jongboom
 
PDF
Fundamentals of IoT - Data Science Africa 2018
Jan Jongboom
 
PDF
Embedded Development: meet the web browser - TEQNation 2018
Jan Jongboom
 
TinyML on Arduino - workshop
Jan Jongboom
 
Intelligent Edge - Getting started with TinyML for industrial applications
Jan Jongboom
 
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
Jan Jongboom
 
Get started with TinyML - Embedded online conference
Jan Jongboom
 
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
Jan Jongboom
 
Get started with TinyML - Hackster webinar 9 April 2020
Jan Jongboom
 
Tiny intelligent computers and sensors - Open Hardware Event 2020
Jan Jongboom
 
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
Jan Jongboom
 
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
Jan Jongboom
 
Fundamentals of IoT - Data Science Africa 2019
Jan Jongboom
 
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
Jan Jongboom
 
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
Jan Jongboom
 
Develop with Mbed OS - The Things Conference 2019
Jan Jongboom
 
Firmware Updates over LoRaWAN - The Things Conference 2019
Jan Jongboom
 
Faster Device Development - GSMA @ CES 2019
Jan Jongboom
 
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
Jan Jongboom
 
Simulating microcontrollers - Arm Research Summit 2018
Jan Jongboom
 
Introduction to Mbed - Etteplan seminar - August 2018
Jan Jongboom
 
Fundamentals of IoT - Data Science Africa 2018
Jan Jongboom
 
Embedded Development: meet the web browser - TEQNation 2018
Jan Jongboom
 
Ad

Recently uploaded (20)

PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PDF
Generative AI Foundations: AI Skills for the Future of Work
hemal sharma
 
PPTX
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
PPTX
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PDF
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
PPTX
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
PPTX
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPTX
Parallel & Concurrent ...
yashpavasiya892
 
PPT
Transformaciones de las funciones elementales.ppt
rirosel211
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
Different Generation Of Computers .pptx
divcoder9507
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
Generative AI Foundations: AI Skills for the Future of Work
hemal sharma
 
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
Pengenalan perangkat Jaringan komputer pada teknik jaringan komputer dan tele...
Prayudha3
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Crypto Recovery California Services.pptx
lionsgate network
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
Perkembangan Perangkat jaringan komputer dan telekomunikasi 3.pptx
Prayudha3
 
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Parallel & Concurrent ...
yashpavasiya892
 
Transformaciones de las funciones elementales.ppt
rirosel211
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Different Generation Of Computers .pptx
divcoder9507
 

Machine learning on 1 cm2 - Tweakers Dev Summit