SlideShare a Scribd company logo
The State of ML for iOS
On the Advent of WWDC 2018
Meghan Kane, @meghafon
NSLondon
May 2018
!
Hey, I'm Meghan!
@meghafon
iOS Engineer @ Novoda Berlin
wwdc 2018
!
big picture
"
when is it practical to use ML for iOS?
#
what's available to us?
$
end-to-end examples
!
barriers to entry?
1. A large dataset
2. Access to high end compute power
3. PhD in machine learning
4. All the time in the world
...nope!
Is it practical for my app?
image classiļ¬cation
audio classiļ¬cation
speech recognition
text classiļ¬cation
gesture recognition
optical character recognition (OCR)
translation
voice synthesis
embrace idea generation
& experimentation
is it just hype?
machine learning is a powerful tool
but, it is still just another tool
how can we think about
ML as
!
developers?
Can this be solved without ML?
if so, choose that
ML vs not ML
basic unit of solving problem = function ("model")
ML: enabling a machine to learn function on its own
classify sign language alphabet images
not ML: explicitly deļ¬ning function
determining if a number is even/odd
If you decide to use ML
still go with the simplest solution
Why do ML (predictions) on mobile?
ā†’ low latency user experience
ā†’ user privacy
What's available from Apple?
image classiļ¬cation of 1000 common categories
ā†’ trees, animals, food, vehicles, people
ā†’ SqueezeNet (5 MB), MobileNet (17 MB), Inception
V3 (95 MB), ResNet50 (103 MB), VGG16 (554 MB)
scene classiļ¬cation of 205 categories
ā†’ airport terminal, bedroom, forest, coast
ā†’ Places205-GoogLeNet (25 MB)
If not, train custom ML model
step 1: use framework for training
TensorFlow, keras, Turi Create ļ£æ, Caffe, etc
āš 
warning, there are a lot of them
step 2: convert to .mlmodel format (OSS)
ā†’ ļ£æ coremltools github.com/apple/coremltools
ā†’ tf-coreml github.com/tf-coreml
It has been
quite a year
beyond the cat/dog classiļ¬er (TM)
End-to-end Process as a developer?
0. Deļ¬ne problem
1. Collect data
2. Train ML model
3. Convert to coreml .mlmodel
4. Import into Xcode project
5. Predict using Core ML (+Vision) framework
Mobile speciļ¬c concerns
size of model
time it takes to run predictions
supported layers
examples!
0.Deļ¬ne problem
American Sign Language (ASL) alphabet classiļ¬er
1.Collect data
!
2. Train model
Quick Review: Deep Learning
neural network model with many layers
deep = many layers
-> deep neural network
Mobile Machine Learning 101: Glossary Jameson
Toole on Heartbeat blog
sometime way back in B.C.
people used to train deep neural network from
scratch
still some (more recent) time in B.C.
people stand on the shoulders of giants' work
utilizing transfer learning
enter.. transfer learning
!
use knowledge learned from source task (MobileNet)
--> to train target task (ASL classiļ¬er)
don't reinvent the wheel
Why Transfer Learning works
neural networks are universal approximators
in theory, they can approximate any function
how much data do i need?
depends on problem
just 100s images per category
where can i get it?
kaggle
google for them...
record video + extract frames (using e.g. FFmpeg)
what if i don't have enough?
data augmentation!
Deeplearning.ai: C4W2L10 Data Augmentation (~10
min video)
Let's start
training...
ā†’ can we use Swift for Tensor
Flow?
ā†’ for now, stick with regular
Tensor Flow
confession: this is in
python
Performance
so how did our training go?
~20 min to run on my MacBook
95.3% accuracy on the test data
3. Convert
to .mlmodel
tf-coreml
It just works
!
4. Import into Xcode project
drag + drop
It actually just
works
5. Predict using Core ML (+Vision)
framework
vision + core ml
audio classiļ¬cation
0.Deļ¬ne problem
1. Gather data
2. Train ML model
0.Deļ¬ne problem
Audio classiļ¬er of urban sounds
air conditioner, car horn, children playing, drilling,
siren, etc
1.Gather data
UrbanSound 8K open dataset
Urban Sound Datasets, NYU CUSP
should we use raw audio (.wav)?
no, it's too computationally expensive
convert wav to spectrogram
represent audio as image (3 dimensions)
1st dimension: time (x-axis)
2nd dimension: frequency (y-axis)
3rd dimension: sound intensity (color)
2. Train Model
Performance
so how did our training go?
~1 hour to run on my MacBook
77.1% accuracy on the test data
what to
focus on
Where to ļ¬nd inspiration
look at open datasets
read research papers!
follow heartbeat blog, openAI
Reproduce results
research papers often include this
make sure to do the same if you publish
check licensing + attribute proper credit
Looking forward to the future
ML interpretability
swift for TensorFlow
Review
!
big picture
"
when is it practical to use ML for iOS?
#
what's available to us?
$
end-to-end examples
Attributions & Mentions (1/4)
Apple Machine Learning
WWDC 2017 Videos
TensorFlow for Poets Google codelabs tutorial
Apple coremltools GitHub repo
tf-coreml GitHub repo: TensorFlow->core ml
converter
Attributions & Mentions (2/4)
Heartbeat by fritz.ai blog: Machine Learning at the
edge
ASL Datasets
Kaggle Sign Language MNIST
Urban Sound Datasets, NYU CUSP
deeplearning.ai course: Data Augmentation
Attributions & Mentions (3/4)
Swift for TensorFlow GitHub repo
Dockerized Swift for TF GitHub repo, Alexis Gallager
themorningpaper by Adrian Colyer
OpenAI Research
"The Building Blocks of Interpretability" Google: C.
Olah et al
Attributions & Mentions (4/4)
"Strategically Ignorant" Devon Zuegel
"Transfer Learning of Temporal Information for Driver
Action Classiļ¬cation" J. Lemley et al
"Transfer Learning for Sound Classiļ¬cation"
TataLab
Further Learning (1/3)
fast.ai Deep Learning course
My Udacity Core ML course
machinethink,
!
ML for iOS blog by Matthijs
Hollemans
TensorFlow Dev Summit 2018 Videos
TensorFlow playground
Further Learning (2/3)
Building Mobile Apps w/ Tensor Flow Pete Warden
Neural Networks & Deep Learning Michael
Nielsen
Stanford's Computer Vision course (CS231n)
Further Learning (3/3)
"Distilling the Knowledge in a Neural Network"
Geoffrey Hinton et al.
"Transfer Learning - Machine Learning's Next
Frontier"
!
Sebastian Ruder
"Transfer learning for music classiļ¬cation and
regression tasks"
!
Keunwoo Choi et al.
Thank you
Keep in touch!
twitter: @meghafon

More Related Content

What's hot

machine_learning by ashvini jangid
machine_learning by ashvini jangidmachine_learning by ashvini jangid
machine_learning by ashvini jangid
Ashvini Jangid
Ā 
Deep Learning: More than a Fad
Deep Learning: More than a FadDeep Learning: More than a Fad
Deep Learning: More than a Fad
Rachel Thomas
Ā 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
Manish Mishra
Ā 
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning ResearchJeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
AI Frontiers
Ā 
Past, Present, and Future: Machine Translation & Natural Language Processing ...
Past, Present, and Future: Machine Translation & Natural Language Processing ...Past, Present, and Future: Machine Translation & Natural Language Processing ...
Past, Present, and Future: Machine Translation & Natural Language Processing ...
John Tinsley
Ā 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014
Paris Open Source Summit
Ā 
De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos
Emergya
Ā 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers
Arvind Devaraj
Ā 
Soft Computing
Soft ComputingSoft Computing
Soft Computing
Hosein Mohebbi
Ā 
Deep Learning
Deep LearningDeep Learning
Deep Learning
Riri Kusumarani
Ā 
Machine Translation: The Neural Frontier
Machine Translation: The Neural FrontierMachine Translation: The Neural Frontier
Machine Translation: The Neural Frontier
John Tinsley
Ā 
Crash course in chat bots
Crash course in chat botsCrash course in chat bots
Crash course in chat bots
Dylan Thorne
Ā 
Deep learning Introduction and Basics
Deep learning  Introduction and BasicsDeep learning  Introduction and Basics
Deep learning Introduction and Basics
Nitin Mishra
Ā 
Machine Learning Techniques in Python Dissertation - Phdassistance
Machine Learning Techniques in Python Dissertation - PhdassistanceMachine Learning Techniques in Python Dissertation - Phdassistance
Machine Learning Techniques in Python Dissertation - Phdassistance
PhD Assistance
Ā 
Start a deep learning startup - tutorial
Start a deep learning startup - tutorialStart a deep learning startup - tutorial
Start a deep learning startup - tutorial
Mostapha Benhenda
Ā 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
Jordi Cabot
Ā 
Why should I learn Matlab?
Why should I learn Matlab?Why should I learn Matlab?
Why should I learn Matlab?
Accenture Services Private Ltd.
Ā 
Deep Learning as a Cat/Dog Detector
Deep Learning as a Cat/Dog DetectorDeep Learning as a Cat/Dog Detector
Deep Learning as a Cat/Dog Detector
Roelof Pieters
Ā 
Introduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga Petrova
Alexey Grigorev
Ā 
Neural Machine Translation: a report from the front line
Neural Machine Translation: a report from the front lineNeural Machine Translation: a report from the front line
Neural Machine Translation: a report from the front line
Iconic Translation Machines
Ā 

What's hot (20)

machine_learning by ashvini jangid
machine_learning by ashvini jangidmachine_learning by ashvini jangid
machine_learning by ashvini jangid
Ā 
Deep Learning: More than a Fad
Deep Learning: More than a FadDeep Learning: More than a Fad
Deep Learning: More than a Fad
Ā 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
Ā 
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning ResearchJeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
Jeff Dean at AI Frontiers: Trends and Developments in Deep Learning Research
Ā 
Past, Present, and Future: Machine Translation & Natural Language Processing ...
Past, Present, and Future: Machine Translation & Natural Language Processing ...Past, Present, and Future: Machine Translation & Natural Language Processing ...
Past, Present, and Future: Machine Translation & Natural Language Processing ...
Ā 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014
Ā 
De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos
Ā 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers
Ā 
Soft Computing
Soft ComputingSoft Computing
Soft Computing
Ā 
Deep Learning
Deep LearningDeep Learning
Deep Learning
Ā 
Machine Translation: The Neural Frontier
Machine Translation: The Neural FrontierMachine Translation: The Neural Frontier
Machine Translation: The Neural Frontier
Ā 
Crash course in chat bots
Crash course in chat botsCrash course in chat bots
Crash course in chat bots
Ā 
Deep learning Introduction and Basics
Deep learning  Introduction and BasicsDeep learning  Introduction and Basics
Deep learning Introduction and Basics
Ā 
Machine Learning Techniques in Python Dissertation - Phdassistance
Machine Learning Techniques in Python Dissertation - PhdassistanceMachine Learning Techniques in Python Dissertation - Phdassistance
Machine Learning Techniques in Python Dissertation - Phdassistance
Ā 
Start a deep learning startup - tutorial
Start a deep learning startup - tutorialStart a deep learning startup - tutorial
Start a deep learning startup - tutorial
Ā 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
Ā 
Why should I learn Matlab?
Why should I learn Matlab?Why should I learn Matlab?
Why should I learn Matlab?
Ā 
Deep Learning as a Cat/Dog Detector
Deep Learning as a Cat/Dog DetectorDeep Learning as a Cat/Dog Detector
Deep Learning as a Cat/Dog Detector
Ā 
Introduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga Petrova
Ā 
Neural Machine Translation: a report from the front line
Neural Machine Translation: a report from the front lineNeural Machine Translation: a report from the front line
Neural Machine Translation: a report from the front line
Ā 

Similar to The State of ML for iOS: On the Advent of WWDC 2018 šŸ•Æ

Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016
Grigory Sapunov
Ā 
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
Chetan Khatri
Ā 
Dato Keynote
Dato KeynoteDato Keynote
Dato Keynote
Turi, Inc.
Ā 
Top 5 recent research courses on machine learning- simpliv
Top 5 recent research courses on machine learning- simplivTop 5 recent research courses on machine learning- simpliv
Top 5 recent research courses on machine learning- simpliv
Simpliv LLC
Ā 
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivosKeepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Keepler Data Tech
Ā 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6
Paul Houle
Ā 
Journey of Generative AI
Journey of Generative AIJourney of Generative AI
Journey of Generative AI
thomasjvarghese49
Ā 
ms_3.pdf
ms_3.pdfms_3.pdf
ms_3.pdf
SatishBhalshankar
Ā 
Real Time Sign Language Detection
Real Time Sign Language DetectionReal Time Sign Language Detection
Real Time Sign Language Detection
IRJET Journal
Ā 
Pharo: A Reflective System
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective System
Marcus Denker
Ā 
Generative AI and the Rise of Large Language Models
Generative AI and the Rise of Large Language ModelsGenerative AI and the Rise of Large Language Models
Generative AI and the Rise of Large Language Models
dsclaubyblos
Ā 
Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflow
Charmi Chokshi
Ā 
Machine learning, WTF!?
Machine learning, WTF!? Machine learning, WTF!?
Machine learning, WTF!?
AlĆŖ Borba
Ā 
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and PandasDistributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Databricks
Ā 
Demystifying Ml, DL and AI
Demystifying Ml, DL and AIDemystifying Ml, DL and AI
Demystifying Ml, DL and AI
Greg Werner
Ā 
Deep Learning Demystified
Deep Learning DemystifiedDeep Learning Demystified
Deep Learning Demystified
Affine Analytics
Ā 
Persian MNIST in 5 Minutes
Persian MNIST in 5 MinutesPersian MNIST in 5 Minutes
Persian MNIST in 5 Minutes
Shahriar Yazdipour
Ā 
Object Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significanceObject Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significance
Gajesh Bhat
Ā 
Human Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine LearningHuman Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine Learning
ijtsrd
Ā 
Dynamic C# and a New World of Possibilities
Dynamic C# and a New World of PossibilitiesDynamic C# and a New World of Possibilities
Dynamic C# and a New World of Possibilities
Chicago ALT.NET
Ā 

Similar to The State of ML for iOS: On the Advent of WWDC 2018 šŸ•Æ (20)

Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016
Ā 
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
HKOSCon18 - Chetan Khatri - Open Source AI / ML Technologies and Application ...
Ā 
Dato Keynote
Dato KeynoteDato Keynote
Dato Keynote
Ā 
Top 5 recent research courses on machine learning- simpliv
Top 5 recent research courses on machine learning- simplivTop 5 recent research courses on machine learning- simpliv
Top 5 recent research courses on machine learning- simpliv
Ā 
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivosKeepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Keepler Data Tech |Ā Entendiendo tus propios modelos predictivos
Ā 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6
Ā 
Journey of Generative AI
Journey of Generative AIJourney of Generative AI
Journey of Generative AI
Ā 
ms_3.pdf
ms_3.pdfms_3.pdf
ms_3.pdf
Ā 
Real Time Sign Language Detection
Real Time Sign Language DetectionReal Time Sign Language Detection
Real Time Sign Language Detection
Ā 
Pharo: A Reflective System
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective System
Ā 
Generative AI and the Rise of Large Language Models
Generative AI and the Rise of Large Language ModelsGenerative AI and the Rise of Large Language Models
Generative AI and the Rise of Large Language Models
Ā 
Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflow
Ā 
Machine learning, WTF!?
Machine learning, WTF!? Machine learning, WTF!?
Machine learning, WTF!?
Ā 
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and PandasDistributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Distributed Models Over Distributed Data with MLflow, Pyspark, and Pandas
Ā 
Demystifying Ml, DL and AI
Demystifying Ml, DL and AIDemystifying Ml, DL and AI
Demystifying Ml, DL and AI
Ā 
Deep Learning Demystified
Deep Learning DemystifiedDeep Learning Demystified
Deep Learning Demystified
Ā 
Persian MNIST in 5 Minutes
Persian MNIST in 5 MinutesPersian MNIST in 5 Minutes
Persian MNIST in 5 Minutes
Ā 
Object Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significanceObject Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significance
Ā 
Human Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine LearningHuman Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine Learning
Ā 
Dynamic C# and a New World of Possibilities
Dynamic C# and a New World of PossibilitiesDynamic C# and a New World of Possibilities
Dynamic C# and a New World of Possibilities
Ā 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
Ā 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
Ā 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
Ā 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
Ā 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
Ā 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
Ā 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
Ā 
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
Edge AI and Vision Alliance
Ā 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
Ā 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
Ā 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
Ā 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
Ā 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
Ā 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
Ā 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
Ā 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
Ā 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
Ā 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
Ā 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
Ā 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
Ā 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
Ā 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
Ā 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Ā 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Ā 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
Ā 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Ā 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Ā 
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
ā€œBuilding and Scaling AI Applications with the Nx AI Manager,ā€ a Presentation...
Ā 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Ā 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Ā 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Ā 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Ā 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Ā 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Ā 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Ā 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
Ā 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
Ā 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Ā 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Ā 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Ā 

The State of ML for iOS: On the Advent of WWDC 2018 šŸ•Æ

  • 1. The State of ML for iOS On the Advent of WWDC 2018 Meghan Kane, @meghafon NSLondon May 2018
  • 2. ! Hey, I'm Meghan! @meghafon iOS Engineer @ Novoda Berlin
  • 4.
  • 5.
  • 6.
  • 7. ! big picture " when is it practical to use ML for iOS? # what's available to us? $ end-to-end examples !
  • 8.
  • 9. barriers to entry? 1. A large dataset 2. Access to high end compute power 3. PhD in machine learning 4. All the time in the world ...nope!
  • 10. Is it practical for my app? image classiļ¬cation audio classiļ¬cation speech recognition text classiļ¬cation gesture recognition optical character recognition (OCR) translation voice synthesis
  • 11. embrace idea generation & experimentation
  • 12.
  • 13.
  • 14. is it just hype?
  • 15. machine learning is a powerful tool but, it is still just another tool
  • 16. how can we think about ML as ! developers?
  • 17. Can this be solved without ML? if so, choose that
  • 18. ML vs not ML basic unit of solving problem = function ("model") ML: enabling a machine to learn function on its own classify sign language alphabet images not ML: explicitly deļ¬ning function determining if a number is even/odd
  • 19. If you decide to use ML still go with the simplest solution
  • 20. Why do ML (predictions) on mobile? ā†’ low latency user experience ā†’ user privacy
  • 21. What's available from Apple? image classiļ¬cation of 1000 common categories ā†’ trees, animals, food, vehicles, people ā†’ SqueezeNet (5 MB), MobileNet (17 MB), Inception V3 (95 MB), ResNet50 (103 MB), VGG16 (554 MB) scene classiļ¬cation of 205 categories ā†’ airport terminal, bedroom, forest, coast ā†’ Places205-GoogLeNet (25 MB)
  • 22. If not, train custom ML model step 1: use framework for training TensorFlow, keras, Turi Create ļ£æ, Caffe, etc āš  warning, there are a lot of them step 2: convert to .mlmodel format (OSS) ā†’ ļ£æ coremltools github.com/apple/coremltools ā†’ tf-coreml github.com/tf-coreml
  • 23.
  • 25.
  • 26.
  • 27. beyond the cat/dog classiļ¬er (TM)
  • 28.
  • 29.
  • 30. End-to-end Process as a developer? 0. Deļ¬ne problem 1. Collect data 2. Train ML model 3. Convert to coreml .mlmodel 4. Import into Xcode project 5. Predict using Core ML (+Vision) framework
  • 31. Mobile speciļ¬c concerns size of model time it takes to run predictions supported layers
  • 33. 0.Deļ¬ne problem American Sign Language (ASL) alphabet classiļ¬er
  • 36. Quick Review: Deep Learning neural network model with many layers deep = many layers -> deep neural network Mobile Machine Learning 101: Glossary Jameson Toole on Heartbeat blog
  • 37.
  • 38. sometime way back in B.C. people used to train deep neural network from scratch
  • 39. still some (more recent) time in B.C. people stand on the shoulders of giants' work utilizing transfer learning
  • 40. enter.. transfer learning ! use knowledge learned from source task (MobileNet) --> to train target task (ASL classiļ¬er)
  • 42. Why Transfer Learning works neural networks are universal approximators in theory, they can approximate any function
  • 43. how much data do i need? depends on problem just 100s images per category
  • 44. where can i get it? kaggle google for them... record video + extract frames (using e.g. FFmpeg)
  • 45.
  • 46. what if i don't have enough? data augmentation! Deeplearning.ai: C4W2L10 Data Augmentation (~10 min video)
  • 47.
  • 48. Let's start training... ā†’ can we use Swift for Tensor Flow? ā†’ for now, stick with regular Tensor Flow
  • 49.
  • 50. confession: this is in python
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Performance so how did our training go? ~20 min to run on my MacBook 95.3% accuracy on the test data
  • 57.
  • 58.
  • 60.
  • 62. 4. Import into Xcode project drag + drop
  • 64. 5. Predict using Core ML (+Vision) framework vision + core ml
  • 65.
  • 66. audio classiļ¬cation 0.Deļ¬ne problem 1. Gather data 2. Train ML model
  • 67. 0.Deļ¬ne problem Audio classiļ¬er of urban sounds air conditioner, car horn, children playing, drilling, siren, etc
  • 68. 1.Gather data UrbanSound 8K open dataset Urban Sound Datasets, NYU CUSP
  • 69. should we use raw audio (.wav)? no, it's too computationally expensive
  • 70. convert wav to spectrogram represent audio as image (3 dimensions) 1st dimension: time (x-axis) 2nd dimension: frequency (y-axis) 3rd dimension: sound intensity (color)
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 77. Performance so how did our training go? ~1 hour to run on my MacBook 77.1% accuracy on the test data
  • 78.
  • 79.
  • 80.
  • 82. Where to ļ¬nd inspiration look at open datasets read research papers! follow heartbeat blog, openAI
  • 83. Reproduce results research papers often include this make sure to do the same if you publish check licensing + attribute proper credit
  • 84. Looking forward to the future ML interpretability swift for TensorFlow
  • 85. Review ! big picture " when is it practical to use ML for iOS? # what's available to us? $ end-to-end examples
  • 86. Attributions & Mentions (1/4) Apple Machine Learning WWDC 2017 Videos TensorFlow for Poets Google codelabs tutorial Apple coremltools GitHub repo tf-coreml GitHub repo: TensorFlow->core ml converter
  • 87. Attributions & Mentions (2/4) Heartbeat by fritz.ai blog: Machine Learning at the edge ASL Datasets Kaggle Sign Language MNIST Urban Sound Datasets, NYU CUSP deeplearning.ai course: Data Augmentation
  • 88. Attributions & Mentions (3/4) Swift for TensorFlow GitHub repo Dockerized Swift for TF GitHub repo, Alexis Gallager themorningpaper by Adrian Colyer OpenAI Research "The Building Blocks of Interpretability" Google: C. Olah et al
  • 89. Attributions & Mentions (4/4) "Strategically Ignorant" Devon Zuegel "Transfer Learning of Temporal Information for Driver Action Classiļ¬cation" J. Lemley et al "Transfer Learning for Sound Classiļ¬cation" TataLab
  • 90. Further Learning (1/3) fast.ai Deep Learning course My Udacity Core ML course machinethink, ! ML for iOS blog by Matthijs Hollemans TensorFlow Dev Summit 2018 Videos TensorFlow playground
  • 91. Further Learning (2/3) Building Mobile Apps w/ Tensor Flow Pete Warden Neural Networks & Deep Learning Michael Nielsen Stanford's Computer Vision course (CS231n)
  • 92. Further Learning (3/3) "Distilling the Knowledge in a Neural Network" Geoffrey Hinton et al. "Transfer Learning - Machine Learning's Next Frontier" ! Sebastian Ruder "Transfer learning for music classiļ¬cation and regression tasks" ! Keunwoo Choi et al.
  • 93. Thank you Keep in touch! twitter: @meghafon