SlideShare a Scribd company logo
AI for Mobile and IoT Devices:
TensorFlow Lite
Bringing the world to life with TensorFlow Lite
PyLadies Tensorflow All Around - Mia Chang
What is TensorFlow?
End-to-end open source ML platform
TensorFlow is a machine learning platform that
enables you to develop, train and deploy machine
learning and deep learning models anywhere
TENSORFLOW TENSORFLOW
TENSORFLOW.JS TENSORFLOW.JS
TFX TFX
TENSORBOARD
TFX
TENSORFLOW LITE
TENSORFLOW
SWIFT FOR TF SWIFT FOR TFSWIFT FOR TF
What is
TensorFlow Lite?
TensorFlow Lite is a
framework for deploying ML
on mobile devices and
embedded systems
Edge ML
Explosion
Edge ML
Explosion
● Lower latency
● Network connectivity
Edge ML
explosion
● Lower latency
● Network connectivity
● Privacy preserving
On device ML allows
for a new generation of
products
New opportunities
● Uses little compute power
New opportunities
● Uses little compute power
● Works on limited memory
platforms
New opportunities
● Uses little compute power
● Works on limited memory
platforms
● Consumes less battery
Convert once, deploy anywhere
We’re simplifying
ML on-device
Many different things
A huge array of machine learning use cases
What can I do with it?
TensorFlow Lite for mobile & IoT
Dance Like
Built on TensorFlow Lite using the latest in
segmentation, pose and GPU techniques
all on-device.
5 on-device tasks
○ Running 2 body-part segmentation models
○ Matching the segmentation models
○ Playing a video
○ Encoding a video
○ And running dynamic time warping
TensorFlow Lite for mobile & IoT
What are other people building with it?
Major use cases
Classification
Prediction
Audio
Translation
Voice synthesis
Image
Object detection
Object location
OCR
Gesture recognition
Facial modelling
Segmentation
Clustering
Compression
Super resolution
Speech
Recognition
Text to Speech
Speech to
Text
Text Content
Video generation
Text generation
Audio generation
Have now deployed TensorFlow Lite in production.
More than 2B devices globally.
Source: https://medium.com/tensorflow/recap-of-the-2019-tensorflow-dev-summit-1b5ede42da8d
Photos GBoard YouTube
NetEase iQiyi
Assistant
ML KitUber Airbnb
Cloud
TensorFlow Lite powers
ML Kit
● ML Kit is out-of-the-box proprietary models
that you can run on device
How do I get started?
A basic walkthrough
Easy to get started
1
Jump start
Use our pretrained
models or retrain
2
Custom model
Develop & deploy
your custom model
3
Performance
Benchmark, validate &
accelerate your models.
4
Optimize
Try our Model
Optimization Toolkit
Easy to get started
1
Jump start
Use our pretrained
models or retrain
2
Custom model
Develop & deploy
your custom model
3
Performance
Benchmark, validate &
accelerate your models.
4
Optimize
Try our Model
Optimization Toolkit
Download some pretrained models
● Grab a model from tensorflow.org/lite/models
● Bring your own TensorFlow Lite converted model
Jump start
Retrain a model
● Transfer learning reuses a model developed for a different, related task
● Speeds up and simplifies the training process.
● Try the “TensorFlow for poets” codelab
Jump start
Get up and running Jump Start
Load your
model
Transforming
data
Use the
resulting
output
Run
inference
Easy to get started
1
Jump start
Use our pretrained
models or retrain
2
Custom model
Deploy your custom
model
3
Performance
Benchmark, validate &
accelerate your models.
4
Optimize
Try our Model
Optimization Toolkit
Converting your model Custom Model
TensorFlow
(estimator or keras)
Saved Model
TF
Lite
Model
TF Lite
Converter
Easy to get started
1
Jump start
Use our pretrained
models or retrain
2
Custom model
Develop & deploy
your custom model
3
Performance
Benchmark, validate &
accelerate your models.
4
Optimize
Try our Model
Optimization Toolkit
Benchmark, validate & accelerate your models.
● Utilize the TensorFlow Lite benchmark tooling
● Validate that the model gets the right accuracy, size & performance
● Utilize GPU acceleration via the Delegation API
Performance
Goal: As fast as possible on all hardware (CPU, GPU, DSP, NPU)
Get your models running
as fast as possible
Performance
Performance
MEMORY / LTE MODEM
CPU GPU DSP
Phone
CPU, GPU & DSP
- what are they?
● CPU - Central Processing Unit
● GPU - Graphics Processing Unit
● DSP - Digital Signal Processor
CPU
83 ms
CPU 1.8x
47 ms
GPU 5.5x
15 ms
EdgeTPU 42x
2 ms
Incredible inference performance
CPU w/
Quantization
GPU
OpenGL
Float16
Quantized
Fixed-point
CPU on
MobileNet V1
Pixel 3 - Single Threaded
CPU
MobileNet V1
Easy to Get
Started
1
Jump start
Use our pretrained or
retrained Models
2
Custom model
Develop & deploy
your custom model
3
Performance
Benchmark, validate &
accelerate your models.
4
Optimize
Try our Model
Optimization Toolkit
Try our Model Optimization Toolkit
● Smaller, faster graphs utilizing the latest in quantization.
● Post-training quantization
● During-training quantization
Optimize
Is TensorFlow Lite
only for mobile?
TensorFlow Lite for
microcontrollers
MCU
More than 150B microcontrollers exist globally today
What are they?
● No operating system
● Tens of KB of RAM & Flash
● Only CPU, memory & I/O
peripherals
Small computer on a single circuit
IO
RAM CPU ROM
MCU
Try it out
Q&A
Contact
twitter @bymiachang
https://colab.research.google.com/drive/1ILXQNdf_CX6--_hgQa8S1uIP3MjXarTz

More Related Content

PDF
Introduction to TensorFlow Lite
PDF
Building NLP applications with Transformers
PDF
Flutter + tensor flow lite = awesome sauce
PDF
Kubeflow
PDF
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
PDF
Introduction to Open Source RAG and RAG Evaluation
PDF
MLflow: Infrastructure for a Complete Machine Learning Life Cycle
PDF
AWS_Meetup_BLR_July_22_Social.pdf
Introduction to TensorFlow Lite
Building NLP applications with Transformers
Flutter + tensor flow lite = awesome sauce
Kubeflow
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
Introduction to Open Source RAG and RAG Evaluation
MLflow: Infrastructure for a Complete Machine Learning Life Cycle
AWS_Meetup_BLR_July_22_Social.pdf

What's hot (20)

PDF
MLOps by Sasha Rosenbaum
PDF
Using MLOps to Bring ML to Production/The Promise of MLOps
PPTX
Google Vertex AI
PPTX
Thomas Wolf "Transfer learning in NLP"
PDF
Introduction to TensorFlow 2.0
PPTX
MLOps in action
PDF
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
PPTX
Onnx and onnx runtime
PDF
mlflow: Accelerating the End-to-End ML lifecycle
PDF
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
PDF
TensorFlow and Keras: An Overview
PDF
“TensorFlow Lite for Microcontrollers (TFLM): Recent Developments,” a Present...
PPTX
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
PDF
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
PDF
Tensorflow presentation
PPTX
Prometheus 101
PDF
Introduction to Deep Learning, Keras, and TensorFlow
PPTX
Tensorflow - Intro (2017)
PPTX
Transformer Zoo
PDF
Machine Learning Data Lineage with MLflow and Delta Lake
MLOps by Sasha Rosenbaum
Using MLOps to Bring ML to Production/The Promise of MLOps
Google Vertex AI
Thomas Wolf "Transfer learning in NLP"
Introduction to TensorFlow 2.0
MLOps in action
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Onnx and onnx runtime
mlflow: Accelerating the End-to-End ML lifecycle
Intro to Vertex AI, unified MLOps platform for Data Scientists & ML Engineers
TensorFlow and Keras: An Overview
“TensorFlow Lite for Microcontrollers (TFLM): Recent Developments,” a Present...
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Tensorflow presentation
Prometheus 101
Introduction to Deep Learning, Keras, and TensorFlow
Tensorflow - Intro (2017)
Transformer Zoo
Machine Learning Data Lineage with MLflow and Delta Lake
Ad

Similar to TensorFlow Lite for mobile & IoT (20)

PPTX
Machine learning and Deep learning on edge devices using TensorFlow
PDF
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
PDF
Tensorflow 2.0 and Coral Edge TPU
PPTX
Tensorflow Ecosystem
PDF
Machine Learning pada Perangkat Portabel - Nurendrantoro
PPTX
Introduction to Tensor Flow-v1.pptx
PPTX
Serverless Functions and Machine Learning: Putting the AI in APIs
PDF
Martin Musiol - Style-transfer with TensorFlow - Codemotion Milan 2018
PDF
Faster deep learning solutions from training to inference - Michele Tameni - ...
PDF
How to Choose a Deep Learning Framework
PDF
SDL BeGlobal The SDL Platform for Automated Translation
PPTX
Edge and ai
PDF
Embrace the challenge of AI work, creative workflows, and daily to-do lists w...
PDF
Introduction To TensorFlow
PDF
Faster deep learning solutions from training to inference - Amitai Armon & Ni...
PDF
TDC2019 Intel Software Day - Tecnicas de Programacao Paralela em Machine Lear...
PDF
Persian MNIST in 5 Minutes
PPTX
Getting Started with TensorFlow on Google Cloud
PDF
Supercharge Your AI Development with Local LLMs
Machine learning and Deep learning on edge devices using TensorFlow
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Tensorflow 2.0 and Coral Edge TPU
Tensorflow Ecosystem
Machine Learning pada Perangkat Portabel - Nurendrantoro
Introduction to Tensor Flow-v1.pptx
Serverless Functions and Machine Learning: Putting the AI in APIs
Martin Musiol - Style-transfer with TensorFlow - Codemotion Milan 2018
Faster deep learning solutions from training to inference - Michele Tameni - ...
How to Choose a Deep Learning Framework
SDL BeGlobal The SDL Platform for Automated Translation
Edge and ai
Embrace the challenge of AI work, creative workflows, and daily to-do lists w...
Introduction To TensorFlow
Faster deep learning solutions from training to inference - Amitai Armon & Ni...
TDC2019 Intel Software Day - Tecnicas de Programacao Paralela em Machine Lear...
Persian MNIST in 5 Minutes
Getting Started with TensorFlow on Google Cloud
Supercharge Your AI Development with Local LLMs
Ad

More from Mia Chang (11)

PDF
Evaluating Large Language Models for Your Applications and Why It Matters
PDF
Running the first automatic speech recognition (ASR) model with HuggingFace -...
PDF
7 steps to AI production - global azure bootcamp 2020 Koln
PDF
DPS2019 data scientist in the real estate industry
PDF
Leverage the power of machine learning on windows
PDF
Develop computer vision applications with azure computer vision api
PDF
The Art of Unit Testing Ch5-6
PDF
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
PDF
What's AI, Machine Learning and Deep Learning - Talk @NCCU python 讀書會
PDF
Play Kaggle with R, Facebook V: Predicting Check Ins
PDF
twMVC#29 -Learning Machine Learning with Movie Recommendation
Evaluating Large Language Models for Your Applications and Why It Matters
Running the first automatic speech recognition (ASR) model with HuggingFace -...
7 steps to AI production - global azure bootcamp 2020 Koln
DPS2019 data scientist in the real estate industry
Leverage the power of machine learning on windows
Develop computer vision applications with azure computer vision api
The Art of Unit Testing Ch5-6
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
What's AI, Machine Learning and Deep Learning - Talk @NCCU python 讀書會
Play Kaggle with R, Facebook V: Predicting Check Ins
twMVC#29 -Learning Machine Learning with Movie Recommendation

Recently uploaded (20)

PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PPTX
Database Infoormation System (DBIS).pptx
PPTX
A Complete Guide to Streamlining Business Processes
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PDF
Mega Projects Data Mega Projects Data
PDF
Introduction to Data Science and Data Analysis
PPT
DATA COLLECTION METHODS-ppt for nursing research
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
Introduction to the R Programming Language
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
PDF
Lecture1 pattern recognition............
PPTX
Pilar Kemerdekaan dan Identi Bangsa.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
modul_python (1).pptx for professional and student
PPTX
climate analysis of Dhaka ,Banglades.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Database Infoormation System (DBIS).pptx
A Complete Guide to Streamlining Business Processes
Introduction-to-Cloud-ComputingFinal.pptx
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
Mega Projects Data Mega Projects Data
Introduction to Data Science and Data Analysis
DATA COLLECTION METHODS-ppt for nursing research
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Data_Analytics_and_PowerBI_Presentation.pptx
Introduction to the R Programming Language
Qualitative Qantitative and Mixed Methods.pptx
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
Lecture1 pattern recognition............
Pilar Kemerdekaan dan Identi Bangsa.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
modul_python (1).pptx for professional and student
climate analysis of Dhaka ,Banglades.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush

TensorFlow Lite for mobile & IoT

  • 1. AI for Mobile and IoT Devices: TensorFlow Lite Bringing the world to life with TensorFlow Lite PyLadies Tensorflow All Around - Mia Chang
  • 2. What is TensorFlow? End-to-end open source ML platform TensorFlow is a machine learning platform that enables you to develop, train and deploy machine learning and deep learning models anywhere
  • 3. TENSORFLOW TENSORFLOW TENSORFLOW.JS TENSORFLOW.JS TFX TFX TENSORBOARD TFX TENSORFLOW LITE TENSORFLOW SWIFT FOR TF SWIFT FOR TFSWIFT FOR TF
  • 5. TensorFlow Lite is a framework for deploying ML on mobile devices and embedded systems
  • 7. Edge ML Explosion ● Lower latency ● Network connectivity
  • 8. Edge ML explosion ● Lower latency ● Network connectivity ● Privacy preserving
  • 9. On device ML allows for a new generation of products
  • 10. New opportunities ● Uses little compute power
  • 11. New opportunities ● Uses little compute power ● Works on limited memory platforms
  • 12. New opportunities ● Uses little compute power ● Works on limited memory platforms ● Consumes less battery
  • 13. Convert once, deploy anywhere We’re simplifying ML on-device
  • 14. Many different things A huge array of machine learning use cases What can I do with it?
  • 16. Dance Like Built on TensorFlow Lite using the latest in segmentation, pose and GPU techniques all on-device.
  • 17. 5 on-device tasks ○ Running 2 body-part segmentation models ○ Matching the segmentation models ○ Playing a video ○ Encoding a video ○ And running dynamic time warping
  • 19. What are other people building with it? Major use cases
  • 20. Classification Prediction Audio Translation Voice synthesis Image Object detection Object location OCR Gesture recognition Facial modelling Segmentation Clustering Compression Super resolution Speech Recognition Text to Speech Speech to Text Text Content Video generation Text generation Audio generation
  • 21. Have now deployed TensorFlow Lite in production. More than 2B devices globally. Source: https://medium.com/tensorflow/recap-of-the-2019-tensorflow-dev-summit-1b5ede42da8d
  • 22. Photos GBoard YouTube NetEase iQiyi Assistant ML KitUber Airbnb Cloud
  • 23. TensorFlow Lite powers ML Kit ● ML Kit is out-of-the-box proprietary models that you can run on device
  • 24. How do I get started? A basic walkthrough
  • 25. Easy to get started 1 Jump start Use our pretrained models or retrain 2 Custom model Develop & deploy your custom model 3 Performance Benchmark, validate & accelerate your models. 4 Optimize Try our Model Optimization Toolkit
  • 26. Easy to get started 1 Jump start Use our pretrained models or retrain 2 Custom model Develop & deploy your custom model 3 Performance Benchmark, validate & accelerate your models. 4 Optimize Try our Model Optimization Toolkit
  • 27. Download some pretrained models ● Grab a model from tensorflow.org/lite/models ● Bring your own TensorFlow Lite converted model Jump start
  • 28. Retrain a model ● Transfer learning reuses a model developed for a different, related task ● Speeds up and simplifies the training process. ● Try the “TensorFlow for poets” codelab Jump start
  • 29. Get up and running Jump Start Load your model Transforming data Use the resulting output Run inference
  • 30. Easy to get started 1 Jump start Use our pretrained models or retrain 2 Custom model Deploy your custom model 3 Performance Benchmark, validate & accelerate your models. 4 Optimize Try our Model Optimization Toolkit
  • 31. Converting your model Custom Model TensorFlow (estimator or keras) Saved Model TF Lite Model TF Lite Converter
  • 32. Easy to get started 1 Jump start Use our pretrained models or retrain 2 Custom model Develop & deploy your custom model 3 Performance Benchmark, validate & accelerate your models. 4 Optimize Try our Model Optimization Toolkit
  • 33. Benchmark, validate & accelerate your models. ● Utilize the TensorFlow Lite benchmark tooling ● Validate that the model gets the right accuracy, size & performance ● Utilize GPU acceleration via the Delegation API Performance
  • 34. Goal: As fast as possible on all hardware (CPU, GPU, DSP, NPU) Get your models running as fast as possible Performance
  • 35. Performance MEMORY / LTE MODEM CPU GPU DSP Phone CPU, GPU & DSP - what are they? ● CPU - Central Processing Unit ● GPU - Graphics Processing Unit ● DSP - Digital Signal Processor
  • 36. CPU 83 ms CPU 1.8x 47 ms GPU 5.5x 15 ms EdgeTPU 42x 2 ms Incredible inference performance CPU w/ Quantization GPU OpenGL Float16 Quantized Fixed-point CPU on MobileNet V1 Pixel 3 - Single Threaded CPU MobileNet V1
  • 37. Easy to Get Started 1 Jump start Use our pretrained or retrained Models 2 Custom model Develop & deploy your custom model 3 Performance Benchmark, validate & accelerate your models. 4 Optimize Try our Model Optimization Toolkit
  • 38. Try our Model Optimization Toolkit ● Smaller, faster graphs utilizing the latest in quantization. ● Post-training quantization ● During-training quantization Optimize
  • 39. Is TensorFlow Lite only for mobile?
  • 40. TensorFlow Lite for microcontrollers MCU More than 150B microcontrollers exist globally today
  • 41. What are they? ● No operating system ● Tens of KB of RAM & Flash ● Only CPU, memory & I/O peripherals Small computer on a single circuit IO RAM CPU ROM MCU
  • 42. Try it out Q&A Contact twitter @bymiachang https://colab.research.google.com/drive/1ILXQNdf_CX6--_hgQa8S1uIP3MjXarTz