Tensorflow for IoT
GEETA CHAUHAN JUNE, 2017
Agenda
 Era of AI First: What does it mean for IoT?
 What is Deep Learning?
 Use Cases for IoT
 Tensorflow for IoT
 Optimizations for IoT
 Common Problem Solutions
 Look into the Future
 References
Era of AI First
 Billions of connected devices
 Intelligence at the Edge
 Increasing Computation power
 Edison: 500 MHz, 1 GB RAM
 RPi3: 1.2 GHz Quad-core
 Deep neural networks running
on the IoT device
 Local inferencing →
compressed insights to cloud
What is
Deep
Learning?
 AI Neural Networks
composed of many
layers
 Learn like humans
 Automated Feature
Learning
 Layers are like Image
Filters
Use Cases
for IoT
 Cucumber sorter
 Real time arrival prediction for Caltrains
 Wearable assistant for Blind (Horus)
 Smart cameras, smart door lock
 Human line counter
 Real time exercise score on smart watch
 Creative Arts, Music Generators
 Self driving cars, Intelligent Robots
Cucumber
Sorter
Caltrain Rider
 Realtime Caltrain arrival
prediction
 Audio Visual pipeline on
Raspberry pi
 Image classification for
Caltrains
Tensorflow
for IoT
 Compile from source
 Android Things Tensorflow Inference Library (in
preview now)
 Tensorflow Lite (Announced @Google IO for
later this year)
Tensorflow IoT Pipeline
Inference on DeviceTrain Model in Cloud
Tensorflow
Android Things
 Add Tensorflow Inferencing
library
 Create Inference object,
load model
 feed() image, run() to predict
 fetch() to get classification
result
Demo
Intel Edison + Seed Studio Kit Raspberry Pi + Pi Camera
Transfer
Learning
Transfer Learning – New Classifier
Inception V3
Optimizations
 Graph Transform Tool
 Freeze graph (variables to constants)
 Quantize weights (20 M weights for IV3)
 Quantization (32 bit float → 8 bit float)
 Memory Mapping
 Inception v3 93 MB → 1.5 MB
Common Problem Solutions
 Tensorboard is your friend – X-Ray vision
 Image size mismatch for the input tensor
 Output classifier specify correct number of classes from your model
 Model too large – Load in memory
 Missing ops -- Graph transform tool
 Device heating up under heavy processing load
 Split the model, do part detection on device, rest in cloud
 Reduce the frequency eg only do on movement detection
Look into the Future
 Hardware: Neural Network Chips
 Software: Tensorflow Lite (Android NN)
Intel Fathom Neural Stick Nvidia Jetson
References
 Tensorflow for Android Things Sample
 Tensorboard hands-on
 Graph Transform Tool
 Tensorflow for Poets (Transfer learning)
 Tensorflow for Poets2 (Optimizations for Mobile/IoT)
 Cucumber Farmer Deep Learning Story
 Caltrain Rider story
 Intel Fathom Neural Stick
 Nvidia Jetson
Questions?
Contact
https://www.linkedin.com/
in/geetachauhan/
geeta@svsg.co

Tensorflow for IoT

  • 1.
    Tensorflow for IoT GEETACHAUHAN JUNE, 2017
  • 2.
    Agenda  Era ofAI First: What does it mean for IoT?  What is Deep Learning?  Use Cases for IoT  Tensorflow for IoT  Optimizations for IoT  Common Problem Solutions  Look into the Future  References
  • 3.
    Era of AIFirst  Billions of connected devices  Intelligence at the Edge  Increasing Computation power  Edison: 500 MHz, 1 GB RAM  RPi3: 1.2 GHz Quad-core  Deep neural networks running on the IoT device  Local inferencing → compressed insights to cloud
  • 4.
    What is Deep Learning?  AINeural Networks composed of many layers  Learn like humans  Automated Feature Learning  Layers are like Image Filters
  • 5.
    Use Cases for IoT Cucumber sorter  Real time arrival prediction for Caltrains  Wearable assistant for Blind (Horus)  Smart cameras, smart door lock  Human line counter  Real time exercise score on smart watch  Creative Arts, Music Generators  Self driving cars, Intelligent Robots
  • 6.
  • 7.
    Caltrain Rider  RealtimeCaltrain arrival prediction  Audio Visual pipeline on Raspberry pi  Image classification for Caltrains
  • 8.
    Tensorflow for IoT  Compilefrom source  Android Things Tensorflow Inference Library (in preview now)  Tensorflow Lite (Announced @Google IO for later this year)
  • 9.
    Tensorflow IoT Pipeline Inferenceon DeviceTrain Model in Cloud
  • 10.
    Tensorflow Android Things  AddTensorflow Inferencing library  Create Inference object, load model  feed() image, run() to predict  fetch() to get classification result
  • 11.
    Demo Intel Edison +Seed Studio Kit Raspberry Pi + Pi Camera
  • 12.
    Transfer Learning Transfer Learning –New Classifier Inception V3
  • 13.
    Optimizations  Graph TransformTool  Freeze graph (variables to constants)  Quantize weights (20 M weights for IV3)  Quantization (32 bit float → 8 bit float)  Memory Mapping  Inception v3 93 MB → 1.5 MB
  • 14.
    Common Problem Solutions Tensorboard is your friend – X-Ray vision  Image size mismatch for the input tensor  Output classifier specify correct number of classes from your model  Model too large – Load in memory  Missing ops -- Graph transform tool  Device heating up under heavy processing load  Split the model, do part detection on device, rest in cloud  Reduce the frequency eg only do on movement detection
  • 15.
    Look into theFuture  Hardware: Neural Network Chips  Software: Tensorflow Lite (Android NN) Intel Fathom Neural Stick Nvidia Jetson
  • 16.
    References  Tensorflow forAndroid Things Sample  Tensorboard hands-on  Graph Transform Tool  Tensorflow for Poets (Transfer learning)  Tensorflow for Poets2 (Optimizations for Mobile/IoT)  Cucumber Farmer Deep Learning Story  Caltrain Rider story  Intel Fathom Neural Stick  Nvidia Jetson
  • 17.