SlideShare a Scribd company logo
Machine Learning Meets Internet of Things:
From Theory to Practice
Part I: ML for IoT Devices
Bharath Sudharsan
ECML PKDD 2021 Tutorial
IoT Edge Computing
Valuable extractable knowledge at the edge
▪ Cisco annual Internet report
✓ By 2023, there will be more than three
times more networked devices on Earth
than humans
✓ About half of the global connections will
be machine-to-machine (M2M)
connections
▪ Push applications, data and computing power
to the edge of the Internet
▪ Deploying, managing apps outside the data
centers, on the customer-owned devices
IoT Edge Computing - Hardware View
ARM Cortex-M0 MCU
based BLE beacon
Edge gateway with
GPUs and SSDs
Powerful CPU + basic GPU based
SBCs (single board computers)
Edge computing hardware: highly resource constrained -> high resource (left to right)
▪ MCUs and small CPUs: BLE beacons, smart
bulbs, smart plugs, TV remotes, fitness bands
▪ SBCs: Raspberry Pis, BeagleBones, NVIDIA
Jetsons, Latte Pandas, Intel NUCs, Google Coral
▪ GPU accelerated: AWS snowball, Digi gateways,
Dell Edge Gateways for IoT, HPE Edgeline
▪ Why MCU? Roughly 50 billion MCU chips were shipped
in 2020 (market estimates), which far exceeds other
chips like GPUs & CPUs (only 100 million units sold)
IoT Edge Computing - Hardware Spec
▪ No file system, Lack Python support (only C, C++), only few hundred MHz clock speed, low SRAM and Flash memory
▪ No parallel execution units), lack inbuilt hardware accelerators such as APU (Accelerated Processing Unit), KPU
(convolution operation accelerator), FPU (Floating-point accelerator), and FFT (Fourier transform accelerator)
Popular open-source MCU boards with specification
TensorFlow Lite for Microcontrollers
TensorFlow Hub
▪ Models ready to use from off the shelf
▪ Optimizers applicable: Quantization, Pruning, etc.
▪ Can add additional tunable layers at the network end
Netron NN Model Visualizer
▪ Demo: Download popular models and visualize and brief analysis using https://netron.app/
✓ yolo-v5-tflite from https://tfhub.dev/neso613/lite-model/yolo-v5-tflite/tflite_model/1
✓ 3 types of fully connected Neural Networks (NNs) from
https://github.com/bharathsudharsan/TinyML-Benchmark-NNs-on-MCUs
FC 1 x 10: 1 layer with 10 neurons
FC 10 + 50: 2 layers, where 1st layer contains 10 neurons, and 2nd layer contains 50
neurons
FC 10 x 10: 10 layers, where each layer contains 10 neurons
Arduino IDE + TF Lite Library
▪ Install the Arduino TensorFlow Lite library
▪ Run the Arduino TF Lite hello world example
✓ Files -> Examples -> Arduino_TensorFlowLite -> hello_world. The example sketch should appear
✓ Upload on MCU, open the Serial Plotter, observe LED
✓ Model trained to replicate sine function. Generates data pattern to either blink LEDs or control an animation
Dev Boards - Hardware View
▪ Pinout summary
✓ Power
✓ Logic
✓ I2C & SPI
✓ GPIO
✓ Analog
Dev Boards - Hardware View
▪ ST-LINK V2 programmer provides
a more reliable way to flash the
Blue Pill boards
▪ Full range of STM32 SWD interface
debugging
▪ The tiniest Arduino ATtiny85 is
flashed (programmed burned)
using UART IC
Dev Boards - ML Applications
https://cartesiam.ai/product/
Dev Boards - ML Applications
Dev Boards - ML Applications
https://www.edgeimpulse.com/blog
Conclusion
▪ A small device with an enormous impact on our lives. For examples
✓ TinyLSTMs: Efficient Neural Speech Enhancement for Hearing Aids
✓ A Tiny CNN Architecture for Medical Face Mask Detection for Resource-Constrained Endpoints
Contact: Bharath Sudharsan
Email: bharath.sudharsan@insight-centre.org
www.confirm.ie

More Related Content

PDF
Globe2Train: A Framework for Distributed ML Model Training using IoT Devices ...
PDF
Ensemble Methods for Collective Intelligence: Combining Ubiquitous ML Models ...
PDF
Toward Distributed, Global, Deep Learning Using IoT Devices
PDF
Train++: An Incremental ML Model Training Algorithm to Create Self Learning I...
PDF
ECML PKDD 2021 ML meets IoT Tutorial Part II: Creating ML based Self learning...
PDF
ECML PKDD 2021 ML meets IoT Tutorial Part III: Deep Optimizations of CNNs and...
PDF
Enabling Machine Learning on the Edge using SRAM Conserving Efficient Neural ...
PDF
Introduction to Parallel Distributed Computer Systems
Globe2Train: A Framework for Distributed ML Model Training using IoT Devices ...
Ensemble Methods for Collective Intelligence: Combining Ubiquitous ML Models ...
Toward Distributed, Global, Deep Learning Using IoT Devices
Train++: An Incremental ML Model Training Algorithm to Create Self Learning I...
ECML PKDD 2021 ML meets IoT Tutorial Part II: Creating ML based Self learning...
ECML PKDD 2021 ML meets IoT Tutorial Part III: Deep Optimizations of CNNs and...
Enabling Machine Learning on the Edge using SRAM Conserving Efficient Neural ...
Introduction to Parallel Distributed Computer Systems

What's hot (20)

PDF
A SURVEY OF NEURAL NETWORK HARDWARE ACCELERATORS IN MACHINE LEARNING
PPTX
Introduction to computer vision
PPTX
Introduction to computer vision with Convoluted Neural Networks
PDF
Deep learning: Hardware Landscape
PPTX
Introduction to Parallel and Distributed Computing
PDF
Once-for-All: Train One Network and Specialize it for Efficient Deployment
PPTX
Introduction to Parallel Computing
PPTX
An AI accelerator ASIC architecture
PDF
Big data 2.0, deep learning and financial Usecases
PPTX
Creating a Machine Learning Model on the Cloud
PDF
FPGA Hardware Accelerator for Machine Learning
PDF
Lecture02 types
PDF
"Semantic Segmentation for Scene Understanding: Algorithms and Implementation...
PDF
In datacenter performance analysis of a tensor processing unit
PDF
Spine net learning scale permuted backbone for recognition and localization
PDF
Lecture 1 introduction to parallel and distributed computing
PPTX
Applications of paralleL processing
PDF
Deep learning-practical
PPTX
Parallel computing and its applications
PDF
"Trade-offs in Implementing Deep Neural Networks on FPGAs," a Presentation fr...
A SURVEY OF NEURAL NETWORK HARDWARE ACCELERATORS IN MACHINE LEARNING
Introduction to computer vision
Introduction to computer vision with Convoluted Neural Networks
Deep learning: Hardware Landscape
Introduction to Parallel and Distributed Computing
Once-for-All: Train One Network and Specialize it for Efficient Deployment
Introduction to Parallel Computing
An AI accelerator ASIC architecture
Big data 2.0, deep learning and financial Usecases
Creating a Machine Learning Model on the Cloud
FPGA Hardware Accelerator for Machine Learning
Lecture02 types
"Semantic Segmentation for Scene Understanding: Algorithms and Implementation...
In datacenter performance analysis of a tensor processing unit
Spine net learning scale permuted backbone for recognition and localization
Lecture 1 introduction to parallel and distributed computing
Applications of paralleL processing
Deep learning-practical
Parallel computing and its applications
"Trade-offs in Implementing Deep Neural Networks on FPGAs," a Presentation fr...
Ad

Similar to ECML PKDD 2021 ML meets IoT Tutorial Part I: ML for IoT Devices (20)

PDF
IoT meets Big Data
PPTX
Grid computing
PPTX
Gab 2015 aymeric weinbach azure iot
PPT
Parallel_and_Cluster_Computing.ppt
PDF
AIoT: Intelligence on Microcontroller
PPTX
microprocessor and microcontroller material
PDF
PDF
UNIT I -Cloud Computing (1).pdf
PPTX
cc_mod1.ppt useful for engineering students
PPT
Adhoc wireless sensor network unit 5 notes
PPT
Cluster Computing
PPTX
Cluster computer
PDF
ML in the Browser: Interactive Experiences with Tensorflow.js
PPTX
Exascale Capabl
PPT
Dl 0n mobile jeff shomaker_jan-2018_final
PDF
Deep Learning at the Edge
PDF
Introduction to System on chip Design - Labs and Project
PDF
Iot vupico-damien-contreras-2018-05-17-light-v3
PDF
Distributech_Presentation DTECH_2013
PDF
CC LECTURE NOTES (1).pdf
IoT meets Big Data
Grid computing
Gab 2015 aymeric weinbach azure iot
Parallel_and_Cluster_Computing.ppt
AIoT: Intelligence on Microcontroller
microprocessor and microcontroller material
UNIT I -Cloud Computing (1).pdf
cc_mod1.ppt useful for engineering students
Adhoc wireless sensor network unit 5 notes
Cluster Computing
Cluster computer
ML in the Browser: Interactive Experiences with Tensorflow.js
Exascale Capabl
Dl 0n mobile jeff shomaker_jan-2018_final
Deep Learning at the Edge
Introduction to System on chip Design - Labs and Project
Iot vupico-damien-contreras-2018-05-17-light-v3
Distributech_Presentation DTECH_2013
CC LECTURE NOTES (1).pdf
Ad

Recently uploaded (20)

PPTX
Introduction to machine learning and Linear Models
PDF
Introduction to Data Science and Data Analysis
PPT
ISS -ESG Data flows What is ESG and HowHow
PDF
Introduction to the R Programming Language
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
SAP 2 completion done . PRESENTATION.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
Business Analytics and business intelligence.pdf
PPT
Quality review (1)_presentation of this 21
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
[EN] Industrial Machine Downtime Prediction
PPTX
1_Introduction to advance data techniques.pptx
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
Introduction to machine learning and Linear Models
Introduction to Data Science and Data Analysis
ISS -ESG Data flows What is ESG and HowHow
Introduction to the R Programming Language
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
climate analysis of Dhaka ,Banglades.pptx
SAP 2 completion done . PRESENTATION.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Galatica Smart Energy Infrastructure Startup Pitch Deck
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Fluorescence-microscope_Botany_detailed content
IB Computer Science - Internal Assessment.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Business Analytics and business intelligence.pdf
Quality review (1)_presentation of this 21
Qualitative Qantitative and Mixed Methods.pptx
[EN] Industrial Machine Downtime Prediction
1_Introduction to advance data techniques.pptx
STUDY DESIGN details- Lt Col Maksud (21).pptx

ECML PKDD 2021 ML meets IoT Tutorial Part I: ML for IoT Devices

  • 1. Machine Learning Meets Internet of Things: From Theory to Practice Part I: ML for IoT Devices Bharath Sudharsan ECML PKDD 2021 Tutorial
  • 2. IoT Edge Computing Valuable extractable knowledge at the edge ▪ Cisco annual Internet report ✓ By 2023, there will be more than three times more networked devices on Earth than humans ✓ About half of the global connections will be machine-to-machine (M2M) connections ▪ Push applications, data and computing power to the edge of the Internet ▪ Deploying, managing apps outside the data centers, on the customer-owned devices
  • 3. IoT Edge Computing - Hardware View ARM Cortex-M0 MCU based BLE beacon Edge gateway with GPUs and SSDs Powerful CPU + basic GPU based SBCs (single board computers) Edge computing hardware: highly resource constrained -> high resource (left to right) ▪ MCUs and small CPUs: BLE beacons, smart bulbs, smart plugs, TV remotes, fitness bands ▪ SBCs: Raspberry Pis, BeagleBones, NVIDIA Jetsons, Latte Pandas, Intel NUCs, Google Coral ▪ GPU accelerated: AWS snowball, Digi gateways, Dell Edge Gateways for IoT, HPE Edgeline ▪ Why MCU? Roughly 50 billion MCU chips were shipped in 2020 (market estimates), which far exceeds other chips like GPUs & CPUs (only 100 million units sold)
  • 4. IoT Edge Computing - Hardware Spec ▪ No file system, Lack Python support (only C, C++), only few hundred MHz clock speed, low SRAM and Flash memory ▪ No parallel execution units), lack inbuilt hardware accelerators such as APU (Accelerated Processing Unit), KPU (convolution operation accelerator), FPU (Floating-point accelerator), and FFT (Fourier transform accelerator) Popular open-source MCU boards with specification
  • 5. TensorFlow Lite for Microcontrollers
  • 6. TensorFlow Hub ▪ Models ready to use from off the shelf ▪ Optimizers applicable: Quantization, Pruning, etc. ▪ Can add additional tunable layers at the network end
  • 7. Netron NN Model Visualizer ▪ Demo: Download popular models and visualize and brief analysis using https://netron.app/ ✓ yolo-v5-tflite from https://tfhub.dev/neso613/lite-model/yolo-v5-tflite/tflite_model/1 ✓ 3 types of fully connected Neural Networks (NNs) from https://github.com/bharathsudharsan/TinyML-Benchmark-NNs-on-MCUs FC 1 x 10: 1 layer with 10 neurons FC 10 + 50: 2 layers, where 1st layer contains 10 neurons, and 2nd layer contains 50 neurons FC 10 x 10: 10 layers, where each layer contains 10 neurons
  • 8. Arduino IDE + TF Lite Library ▪ Install the Arduino TensorFlow Lite library ▪ Run the Arduino TF Lite hello world example ✓ Files -> Examples -> Arduino_TensorFlowLite -> hello_world. The example sketch should appear ✓ Upload on MCU, open the Serial Plotter, observe LED ✓ Model trained to replicate sine function. Generates data pattern to either blink LEDs or control an animation
  • 9. Dev Boards - Hardware View ▪ Pinout summary ✓ Power ✓ Logic ✓ I2C & SPI ✓ GPIO ✓ Analog
  • 10. Dev Boards - Hardware View ▪ ST-LINK V2 programmer provides a more reliable way to flash the Blue Pill boards ▪ Full range of STM32 SWD interface debugging ▪ The tiniest Arduino ATtiny85 is flashed (programmed burned) using UART IC
  • 11. Dev Boards - ML Applications https://cartesiam.ai/product/
  • 12. Dev Boards - ML Applications
  • 13. Dev Boards - ML Applications https://www.edgeimpulse.com/blog
  • 14. Conclusion ▪ A small device with an enormous impact on our lives. For examples ✓ TinyLSTMs: Efficient Neural Speech Enhancement for Hearing Aids ✓ A Tiny CNN Architecture for Medical Face Mask Detection for Resource-Constrained Endpoints
  • 15. Contact: Bharath Sudharsan Email: bharath.sudharsan@insight-centre.org www.confirm.ie