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
October 25, 2017
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TensorFlow for Mobile Developers
Enrique López Mañas
October 25, 2017
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Composifying Your Not-Compose Code
kikoso
0
54
KMP_for_Swift.pdf
kikoso
0
75
Android Benchmarking and other stories
kikoso
0
550
KMP for Mobile Developers
kikoso
0
100
Diving into Coroutines
kikoso
1
98
K/N for mobile developers (including libraries' snippets)
kikoso
0
130
Kotlin/Native for Multiplatform development
kikoso
0
92
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
220
Other Decks in Technology
See All in Technology
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
3
920
When Token Pruning is Worse than Random: Understanding Visual Token Information in VLLMs
sansantech
PRO
0
250
Claude Codeの体系的な理解と知識のフック
oikon48
10
6.6k
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
180
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
100
Azure App Service / Container Apps の組み込み認証
kuniteru
0
190
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
150
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
740
When Does a Local Qwen Start to Break
morshoto
0
160
Genie Code ワークショップ 基礎編 / Genie-Code-Workshop-fundamental
databricksjapan
PRO
0
330
DGX Sparkを2台使って いろいろ動かす話
sonoda_mj
1
120
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
3
2k
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
490
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
The Curious Case for Waylosing
cassininazir
1
490
30 Presentation Tips
portentint
PRO
1
390
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
310
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Transcript
TensorFlow for Mobile Developers
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