SlideShare a Scribd company logo
Machine Learning Models

on Mobile Devices
Lars Gregori
Why Machine Learning
Models on Mobile Devices?
•Privacy

•Availability

•Speed
What Models?
•Image

•Text

•…
What Models (CoreML)?
https://developer.apple.com/documentation/coreml/converting_trained_models_to_core_ml
What Models (CoreML)?
convolutional
Caffe

Keras
random forests scikit-learn

XGBoost
multiclass classification
logic regression
https://developer.apple.com/documentation/coreml/converting_trained_models_to_core_ml
How?
•CoreML

•TensorFlow Lite

•Other e.g. Caffe2Go
CoreML
•Apple

•WWDC 2017

•iOS, macOS, watchOS, tvOS
Application
Vision NaturalLanguage GameplayKit
CoreML
Accelerate und BNNS MetalPerformanceShaders
HardwareCPU GPU
CoreML
BNNS - Basic neural network subroutines

https://developer.apple.com/documentation/accelerate/bnns
TensorFlow Lite
•Google

•Based on TensorFlow Mobile

•Android, iOS and Raspberry Pi
TensorFlow Lite
.tflite fileAndroid App
Java API
C++ API
Interpreter
Android Neural Network API
Operators
.tflite fileiOS App
C++ API
Interpreter
Operators
DEMO
Object Detection
95.1% African elephant, Loxodonta africana

4.2% tusker

0.4% Indian elephant, Elephas maximus

0.0% moped

0.0% warthog
Inception V3
•Object detection (96.5% top-5)

•Google Brain, arXiv:1512.00567 

•1000 classes; ILSVRC2012*
ILSVRC2012 - ImageNet Large Scale Visual Recognition Challenge 2012
Inception V3 and CoreML
https://developer.apple.com/machine-learning/build-run-models/
Inception V3 and CoreML
Inception V3 and CoreML
override func viewDidLoad() {
super.viewDidLoad()
let model = try! VNCoreMLModel(for: Inceptionv3().model)
let request = VNCoreMLRequest(model: model,
completionHandler: resHandler)
self.requests.append(request)
}
Inceptionv3().model
resHandler
self.requests
Inception V3 and CoreML
func resHandler(request: VNRequest, _: Error?) {
let results = request.results
as! [VNClassificationObservation]
let percent = Int(results[0].confidence * 100)
let identifier = results[0].identifier
resultLabel.text = "(percent)% (identifier)"
}
resHandler
results
results
results
Inception V3 and CoreML
Inception V3 and CoreML
@IBAction func predict(_ sender: UIButton) {
selectedImage.image = sender.currentImage
let image = sender.currentImage!.cgImage!
let handler = VNImageRequestHandler(cgImage: image,
options: [:])
try? handler.perform(self.requests)
}
@IBAction
sender.currentImage!.cgImage!
handler.preform
handler
image =
image
self.requests
Inception V3 and TF Lite
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/g3doc/models.md
Inception V3 and TF Lite
String tffile = “inception_v3.tflite”;
protected void onCreate(Bundle savedInstanceState) {
tflite = new Interpreter(loadModelFile(tffile));
button1.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
predict(context, R.drawable.image1);
Interpreter
setOnClickListener
predict
Inception V3 and TF Lite
private void predict(Context context, int imgId) {
Bitmap bitmap = BitmapFactory.decodeResource(...,
imgId, ...);
image.setImageBitmap(bitmap);
ByteBuffer imgBuf = convertBitmapToByteBuffer(bitmap);
float[][] labelProb = new float[1][labels.size()];
tflite.run(imgBuf, labelProb);

>>>
predict
imgBuf
imgBuf
labelProb
labelProbtflite.run
Inception V3 and TF Lite
String label = "";
Float percent = -1.0f;
for(int index = 0; index < labels.size(); index++) {
if (labelProb[0][index] > percent) {
percent = labelProb[0][index];
label = labels.get(index);
}
labelProb
labelProb
index
index
index
index
labels
labels
Image Retraining
37.7% strawberry

11.9% ice cream, icecream

7.9% pineapple, ananas

2.8% ear, spike, capitulum

2.6% trifle
Image Retraining
•Transfer learning

•Already trained model

•New classification layer on top
https://www.tensorflow.org/hub/tutorials/image_retraining
Example
XOR
XOR
•0 xor 0 = 0

•0 xor 1 = 1

•1 xor 0 = 1

•1 xor 1 = 0
XOR Keras Model
training_data = np.array([[0,0], [0,1], [1,0], [1,1]])
target_data = np.array([ [0], [1], [1], [0]])
model = Sequential()
model.add(Dense(8, input_dim=2, activation=sigmoid))
model.add(Dense(1, activation=sigmoid))
model.compile(loss=mean_squared_error, optimizer=SGD(lr=1.0))
model.fit(training_data, target_data, epochs=2000)
>> Jupyter Notebook
Jupyter Notebook: https://github.com/choas/Machine_Learning_Models_In_Apps/blob/master/XOR/models/XOR.ipynb

SGD - stochastic gradient descent - https://en.wikipedia.org/wiki/Stochastic_gradient_descent

Sigmoid - https://en.wikipedia.org/wiki/Sigmoid_function
XOR Keras Model
print model.predict(training_data)
[[0.03998361]
[0.9534271 ]
[0.9549079 ]
[0.05220655]]
Save Model
•CoreML Tools (Keras, …)

•tfcoreml (Tensorflow)

•TensorFlow Lite Optimizing Converter
(TOCO)
DEMO
XOR
XOR Example
XOR and CoreML
override func viewDidLoad() {
super.viewDidLoad()
out00.text = "(predict(0, 0))"
out01.text = "(predict(0, 1))"
out10.text = "(predict(1, 0))"
out11.text = "(predict(1, 1))"
}
predict(0, 0)
predict(0, 1)
predict(1, 0)
predict(1, 1)
XOR and CoreML
func predict(_ a: NSNumber, _ b: NSNumber) -> NSNumber {
let input_data = try! MLMultiArray(shape:[2], …)
input_data[0] = a
input_data[1] = b
let xor_input = xorInput(input: input_data)
let prediction = try! xor().prediction(input: xor_input)
return prediction.result[0]
}
predict
input_data
input_data
input_data
input_data
xor().predictionprediction
prediction.result[0]
xorInput
XOR and TF Lite
protected void onCreate(Bundle savedInstanceState) {
// …
tflite = new Interpreter(loadModelFile("xor.tflite"));
result00.setText(prediction(0, 0));
result01.setText(prediction(0, 1));
result10.setText(prediction(1, 0));
result11.setText(prediction(1, 1));
}
tflite
prediction(0, 0)
prediction(0, 1)
prediction(1, 0)
prediction(1, 1)
XOR and TF Lite
private String prediction(int a, int b) {
float[][] in = new float[][]{{a, b}};
float[][] out = new float[][]{{0}};
tflite.run(in, out);
return String.valueOf(out[0][0]);
}
prediction
in
in
out
out
out[0][0]
tflite.run(in, out)
Quantization
Quantization
•A discrete set of values.

•TensorFlow Lite: 8-bits

•CoreML 2: Weight Quantization
Quantization - Inception V3
https://ai.googleblog.com/2016/08/improving-inception-and-image.html
Quantization - Inception V3
Convolution
https://ai.googleblog.com/2016/08/improving-inception-and-image.html
DEMO
Quantization
97% original Inception V3

97% 16-bit linear

98% 8-bit linear

2% 4-bit linear (pillow is wrong)
Summary
Summary
•Why

•How

•What will you build?
Thank you
@choas

More Related Content

Similar to Machine Learning Models on Mobile Devices (20)

PPTX
Amazon SageMaker (December 2018)
Julien SIMON
 
PDF
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Codiax
 
PDF
Introduction to ML.NET
Gianni Rosa Gallina
 
PDF
Migrating from matlab to python
ActiveState
 
PDF
DeepLearning and Advanced Machine Learning on IoT
Romeo Kienzler
 
PPTX
Build, train, and deploy Machine Learning models at scale (May 2018)
Julien SIMON
 
PPTX
AWS re:Invent 2018 - AIM401 - Deep Learning using Tensorflow
Julien SIMON
 
PPTX
Designing Artificial Intelligence
David Chou
 
PDF
SigOpt at GTC - Reducing operational barriers to optimization
SigOpt
 
PPTX
Optimizing training on Apache MXNet (January 2018)
Julien SIMON
 
PPTX
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
Julien SIMON
 
PDF
Building an ML Platform with Ray and MLflow
Databricks
 
PPTX
Build, train, and deploy Machine Learning models at scale (May 2018)
Julien SIMON
 
PDF
Deep Domain
Zachary S. Brown
 
PDF
Cutting Edge Computer Vision for Everyone
Ivo Andreev
 
PPTX
Deep learning on mobile
Anirudh Koul
 
PPTX
CRUD Operation of images through XML
Anshudha Maheshwari
 
PDF
알리바바 클라우드 PAI (machine learning Platform for AI)
Alibaba Cloud Korea
 
PDF
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
Databricks
 
PPTX
Build a Neural Network for ITSM with TensorFlow
Entrepreneur / Startup
 
Amazon SageMaker (December 2018)
Julien SIMON
 
Julien Simon, Principal Technical Evangelist at Amazon - Machine Learning: Fr...
Codiax
 
Introduction to ML.NET
Gianni Rosa Gallina
 
Migrating from matlab to python
ActiveState
 
DeepLearning and Advanced Machine Learning on IoT
Romeo Kienzler
 
Build, train, and deploy Machine Learning models at scale (May 2018)
Julien SIMON
 
AWS re:Invent 2018 - AIM401 - Deep Learning using Tensorflow
Julien SIMON
 
Designing Artificial Intelligence
David Chou
 
SigOpt at GTC - Reducing operational barriers to optimization
SigOpt
 
Optimizing training on Apache MXNet (January 2018)
Julien SIMON
 
AWS re:Invent 2018 - ENT321 - SageMaker Workshop
Julien SIMON
 
Building an ML Platform with Ray and MLflow
Databricks
 
Build, train, and deploy Machine Learning models at scale (May 2018)
Julien SIMON
 
Deep Domain
Zachary S. Brown
 
Cutting Edge Computer Vision for Everyone
Ivo Andreev
 
Deep learning on mobile
Anirudh Koul
 
CRUD Operation of images through XML
Anshudha Maheshwari
 
알리바바 클라우드 PAI (machine learning Platform for AI)
Alibaba Cloud Korea
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
Databricks
 
Build a Neural Network for ITSM with TensorFlow
Entrepreneur / Startup
 

More from Lars Gregori (20)

PDF
BYOM - Bring Your Own Model
Lars Gregori
 
PDF
uTensor - embedded devices and machine learning models
Lars Gregori
 
PDF
SAP Leonardo Machine Learning
Lars Gregori
 
PDF
Minecraft and reinforcement learning
Lars Gregori
 
PDF
Minecraft and Reinforcement Learning
Lars Gregori
 
PDF
IoT protocolls - smart washing machine
Lars Gregori
 
PDF
[DE] AI und Minecraft
Lars Gregori
 
PDF
Minecraft and Reinforcement Learning
Lars Gregori
 
PDF
[DE] IoT Protokolle
Lars Gregori
 
PDF
Using a trained model on your mobile device
Lars Gregori
 
PDF
Using a trained model on your mobile device
Lars Gregori
 
PDF
AI and Minecraft
Lars Gregori
 
PDF
[German] Boards für das IoT-Prototyping
Lars Gregori
 
PDF
IoT, APIs und Microservices - alles unter Node-RED
Lars Gregori
 
PDF
Web Bluetooth - Next Generation Bluetooth?
Lars Gregori
 
PDF
Embedded Rust – Rust on IoT devices
Lars Gregori
 
PDF
Embedded Rust on IoT devices
Lars Gregori
 
PDF
IoT mit Rust programmieren
Lars Gregori
 
PDF
Boards for the IoT-Prototyping
Lars Gregori
 
PDF
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Lars Gregori
 
BYOM - Bring Your Own Model
Lars Gregori
 
uTensor - embedded devices and machine learning models
Lars Gregori
 
SAP Leonardo Machine Learning
Lars Gregori
 
Minecraft and reinforcement learning
Lars Gregori
 
Minecraft and Reinforcement Learning
Lars Gregori
 
IoT protocolls - smart washing machine
Lars Gregori
 
[DE] AI und Minecraft
Lars Gregori
 
Minecraft and Reinforcement Learning
Lars Gregori
 
[DE] IoT Protokolle
Lars Gregori
 
Using a trained model on your mobile device
Lars Gregori
 
Using a trained model on your mobile device
Lars Gregori
 
AI and Minecraft
Lars Gregori
 
[German] Boards für das IoT-Prototyping
Lars Gregori
 
IoT, APIs und Microservices - alles unter Node-RED
Lars Gregori
 
Web Bluetooth - Next Generation Bluetooth?
Lars Gregori
 
Embedded Rust – Rust on IoT devices
Lars Gregori
 
Embedded Rust on IoT devices
Lars Gregori
 
IoT mit Rust programmieren
Lars Gregori
 
Boards for the IoT-Prototyping
Lars Gregori
 
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Lars Gregori
 
Ad

Recently uploaded (20)

PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 Leading a Tableau User Group - Onboarding
lward7
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Learn Computer Forensics, Second Edition
AnuraShantha7
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 Leading a Tableau User Group - Onboarding
lward7
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Learn Computer Forensics, Second Edition
AnuraShantha7
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Ad

Machine Learning Models on Mobile Devices

  • 1. Machine Learning Models
 on Mobile Devices Lars Gregori
  • 2. Why Machine Learning Models on Mobile Devices? •Privacy •Availability •Speed
  • 5. What Models (CoreML)? convolutional Caffe
 Keras random forests scikit-learn
 XGBoost multiclass classification logic regression https://developer.apple.com/documentation/coreml/converting_trained_models_to_core_ml
  • 8. Application Vision NaturalLanguage GameplayKit CoreML Accelerate und BNNS MetalPerformanceShaders HardwareCPU GPU CoreML BNNS - Basic neural network subroutines https://developer.apple.com/documentation/accelerate/bnns
  • 9. TensorFlow Lite •Google •Based on TensorFlow Mobile •Android, iOS and Raspberry Pi
  • 10. TensorFlow Lite .tflite fileAndroid App Java API C++ API Interpreter Android Neural Network API Operators .tflite fileiOS App C++ API Interpreter Operators
  • 12. 95.1% African elephant, Loxodonta africana 4.2% tusker 0.4% Indian elephant, Elephas maximus 0.0% moped 0.0% warthog
  • 13. Inception V3 •Object detection (96.5% top-5) •Google Brain, arXiv:1512.00567 •1000 classes; ILSVRC2012* ILSVRC2012 - ImageNet Large Scale Visual Recognition Challenge 2012
  • 14. Inception V3 and CoreML https://developer.apple.com/machine-learning/build-run-models/
  • 16. Inception V3 and CoreML override func viewDidLoad() { super.viewDidLoad() let model = try! VNCoreMLModel(for: Inceptionv3().model) let request = VNCoreMLRequest(model: model, completionHandler: resHandler) self.requests.append(request) } Inceptionv3().model resHandler self.requests
  • 17. Inception V3 and CoreML func resHandler(request: VNRequest, _: Error?) { let results = request.results as! [VNClassificationObservation] let percent = Int(results[0].confidence * 100) let identifier = results[0].identifier resultLabel.text = "(percent)% (identifier)" } resHandler results results results
  • 19. Inception V3 and CoreML @IBAction func predict(_ sender: UIButton) { selectedImage.image = sender.currentImage let image = sender.currentImage!.cgImage! let handler = VNImageRequestHandler(cgImage: image, options: [:]) try? handler.perform(self.requests) } @IBAction sender.currentImage!.cgImage! handler.preform handler image = image self.requests
  • 20. Inception V3 and TF Lite https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/g3doc/models.md
  • 21. Inception V3 and TF Lite String tffile = “inception_v3.tflite”; protected void onCreate(Bundle savedInstanceState) { tflite = new Interpreter(loadModelFile(tffile)); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { predict(context, R.drawable.image1); Interpreter setOnClickListener predict
  • 22. Inception V3 and TF Lite private void predict(Context context, int imgId) { Bitmap bitmap = BitmapFactory.decodeResource(..., imgId, ...); image.setImageBitmap(bitmap); ByteBuffer imgBuf = convertBitmapToByteBuffer(bitmap); float[][] labelProb = new float[1][labels.size()]; tflite.run(imgBuf, labelProb);
 >>> predict imgBuf imgBuf labelProb labelProbtflite.run
  • 23. Inception V3 and TF Lite String label = ""; Float percent = -1.0f; for(int index = 0; index < labels.size(); index++) { if (labelProb[0][index] > percent) { percent = labelProb[0][index]; label = labels.get(index); } labelProb labelProb index index index index labels labels
  • 24. Image Retraining 37.7% strawberry 11.9% ice cream, icecream 7.9% pineapple, ananas 2.8% ear, spike, capitulum 2.6% trifle
  • 25. Image Retraining •Transfer learning •Already trained model •New classification layer on top https://www.tensorflow.org/hub/tutorials/image_retraining
  • 27. XOR •0 xor 0 = 0 •0 xor 1 = 1 •1 xor 0 = 1 •1 xor 1 = 0
  • 28. XOR Keras Model training_data = np.array([[0,0], [0,1], [1,0], [1,1]]) target_data = np.array([ [0], [1], [1], [0]]) model = Sequential() model.add(Dense(8, input_dim=2, activation=sigmoid)) model.add(Dense(1, activation=sigmoid)) model.compile(loss=mean_squared_error, optimizer=SGD(lr=1.0)) model.fit(training_data, target_data, epochs=2000) >> Jupyter Notebook Jupyter Notebook: https://github.com/choas/Machine_Learning_Models_In_Apps/blob/master/XOR/models/XOR.ipynb SGD - stochastic gradient descent - https://en.wikipedia.org/wiki/Stochastic_gradient_descent Sigmoid - https://en.wikipedia.org/wiki/Sigmoid_function
  • 29. XOR Keras Model print model.predict(training_data) [[0.03998361] [0.9534271 ] [0.9549079 ] [0.05220655]]
  • 30. Save Model •CoreML Tools (Keras, …) •tfcoreml (Tensorflow) •TensorFlow Lite Optimizing Converter (TOCO)
  • 33. XOR and CoreML override func viewDidLoad() { super.viewDidLoad() out00.text = "(predict(0, 0))" out01.text = "(predict(0, 1))" out10.text = "(predict(1, 0))" out11.text = "(predict(1, 1))" } predict(0, 0) predict(0, 1) predict(1, 0) predict(1, 1)
  • 34. XOR and CoreML func predict(_ a: NSNumber, _ b: NSNumber) -> NSNumber { let input_data = try! MLMultiArray(shape:[2], …) input_data[0] = a input_data[1] = b let xor_input = xorInput(input: input_data) let prediction = try! xor().prediction(input: xor_input) return prediction.result[0] } predict input_data input_data input_data input_data xor().predictionprediction prediction.result[0] xorInput
  • 35. XOR and TF Lite protected void onCreate(Bundle savedInstanceState) { // … tflite = new Interpreter(loadModelFile("xor.tflite")); result00.setText(prediction(0, 0)); result01.setText(prediction(0, 1)); result10.setText(prediction(1, 0)); result11.setText(prediction(1, 1)); } tflite prediction(0, 0) prediction(0, 1) prediction(1, 0) prediction(1, 1)
  • 36. XOR and TF Lite private String prediction(int a, int b) { float[][] in = new float[][]{{a, b}}; float[][] out = new float[][]{{0}}; tflite.run(in, out); return String.valueOf(out[0][0]); } prediction in in out out out[0][0] tflite.run(in, out)
  • 38. Quantization •A discrete set of values. •TensorFlow Lite: 8-bits •CoreML 2: Weight Quantization
  • 39. Quantization - Inception V3 https://ai.googleblog.com/2016/08/improving-inception-and-image.html
  • 40. Quantization - Inception V3 Convolution https://ai.googleblog.com/2016/08/improving-inception-and-image.html
  • 42. 97% original Inception V3 97% 16-bit linear 98% 8-bit linear 2% 4-bit linear (pillow is wrong)