Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TensorFlow for Mobile Developers
Search
Enrique López Mañas
November 13, 2017
Programming
240
0
Share
TensorFlow for Mobile Developers
Enrique López Mañas
November 13, 2017
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Composifying Your Not-Compose Code
kikoso
0
44
KMP_for_Swift.pdf
kikoso
0
71
Android Benchmarking and other stories
kikoso
0
480
KMP for Mobile Developers
kikoso
0
88
Diving into Coroutines
kikoso
1
89
K/N for mobile developers (including libraries' snippets)
kikoso
0
120
Kotlin/Native for Multiplatform development
kikoso
0
83
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
210
Other Decks in Programming
See All in Programming
今さら聞けないCancellationToken
htkym
0
210
Lessons from Spec-Driven Development
simas
PRO
0
110
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
310
誰も頼んでない機能を出荷した話
zekutax
0
150
Inside Stream API
skrb
1
440
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
Oxcを導入して開発体験が向上した話
yug1224
4
260
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
130
GitHub Copilot CLIのいいところ
htkym
2
1.2k
Swiftのレキシカルスコープ管理
kntkymt
0
200
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Become a Pro
speakerdeck
PRO
31
6k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
GraphQLとの向き合い方2022年版
quramy
50
15k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
320
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
TensorFlow for Mobile Developers Enrique López Mañas Google Developer Expert
Ego Slide • Freelance Dev • Google Developer Expert •
@eenriquelopez
Machine Learning / AI
Machine Learning / AI
Machine Learning / AI
Buzzwords classification Artificial intelligence Machine Learning The science of making
machines smarts Building machines that can learn Neural Networks One of the many different algorithms in Machine Learning
Buzzwords classification
Neural Network
Machine Learning
Machine Learning
Machine Learning 12% of all responses on mobile
Machine Learning
Machine Learning
Machine Learning
Cloud vs. Mobile Less Traffic & Faster Response Motion Sensors
TensorFlow OpenSource library for Machine Learning tensorflow.org Today most popular
ML framework
TensorFlow You can train: - Mac / Windows - GPU
Server - GPU/TPU on Cloud Prediction: - Android - iOS - Raspberry
TensorFlow CIFAR10
TensorFlow ecosystem
From Training to App (@yufengg)
Data Gathering?
From Training to App (@yufengg)
From Training to App (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
Convolutional Neural Networks (@yufengg)
From Training to App (@yufengg)
Optimizing model for Mobile (@yufengg)
From Training to App (@yufengg) Other inception versions (inception v1
quantised is 7 MB)
From Training to App (@yufengg) TensorFlow increases APK in 12
MB
From Training to App (@yufengg)
From Training to App (@yufengg)
TensorFlow community 1000+ contributors 22.000+ commits 18.000+ repositories with name
“TensorFlow”
TensorFlow community
Building with Android Studio Uses Bazel to build Set Bazel
binary location in /tensorflow/examples/ android/build.gradle Add project in tensorflor/examples/android folder to Android Studio
Building with Android Studio Installing Bazel first: Download from https://github.com/bazelbuild/bazel/releases
Install instructions in https://docs.bazel.build/versions/master/install.html
Building with Android Studio Download Android SDK (23) Download Android
NDK (12b) (recommend it with Android SDK Manager)
Building with Android Studio WORKSPACE FILE
Building with Android Studio Run Bazel bazel build -c opt
//tensorflow/examples/ android:tensorflow_demo
Building with Android Studio Install APK adb install -r bazel-bin/tensorflow/examples/android/
tensorflow_demo.apk
Building with Android Studio OR… TensorFlow AAR from JCenter YUV
-> RGB less efficient Object tracking not available
Android Samples TF Classify TF Detect TF Stylize
TF Classify Uses Google Inception (v3) to label images Model
easy to swap No “person label” Volume button up for statistics
TF Classify
TF Classify
TF Detect
TF Detect - Draw bounding boxes around people - Useful
to count objects - No training yet
TF Style
TF Style - Real time style transfer algorithm - Pick/mix
different styles - Can train Magenta models
TF Style
TensorFlow Written in C++ Android uses Kotlin/Java? HowTo? Android
inference Library https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/android
Building for iOS Install requirements: - Xcode 8 - Command
line tools (xcode-select install) - brew install automake - brew install lib tool - tensorflow/contrib/makefile_build_all_ios.sh (takes 20 minutes)
iOS Examples: simple
iOS Examples: camera
iOS Examples: camera - Run inception each frame - Models
can be replaced
iOS Examples: benchmark
Raspberry Pi
Resources TensorFlow: https://www.tensorflow.org/ Magenta: https://magenta.tensorflow.org/welcome-to-magenta TensorFlow for Poets: https://codelabs.developers.google.com/codelabs/ tensorflow-for-poets/index.html#0
Feedback http://bit.ly/Mobius2017
None