SlideShare ist ein Scribd-Unternehmen logo
1 von 93
Downloaden Sie, um offline zu lesen
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 classification
audio classification
speech recognition
text classification
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 defining 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 classification 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 classification 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 classifier (TM)
End-to-end Process as a developer?
0. Define 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 specific concerns
size of model
time it takes to run predictions
supported layers
examples!
0.Define problem
American Sign Language (ASL) alphabet classifier
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 classifier)
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 classification
0.Define problem
1. Gather data
2. Train ML model
0.Define problem
Audio classifier 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 find 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 Classification" J. Lemley et al
"Transfer Learning for Sound Classification"
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 classification and
regression tasks"
!
Keunwoo Choi et al.
Thank you
Keep in touch!
twitter: @meghafon

Weitere ähnliche Inhalte

Was ist angesagt?

machine_learning by ashvini jangid
machine_learning by ashvini jangidmachine_learning by ashvini jangid
machine_learning by ashvini jangidAshvini Jangid
 
Deep Learning: More than a Fad
Deep Learning: More than a FadDeep Learning: More than a Fad
Deep Learning: More than a FadRachel Thomas
 
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 ResearchAI 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 2014Paris 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
 
Machine Translation: The Neural Frontier
Machine Translation: The Neural FrontierMachine Translation: The Neural Frontier
Machine Translation: The Neural FrontierJohn Tinsley
 
Crash course in chat bots
Crash course in chat botsCrash course in chat bots
Crash course in chat botsDylan Thorne
 
Deep learning Introduction and Basics
Deep learning  Introduction and BasicsDeep learning  Introduction and Basics
Deep learning Introduction and BasicsNitin 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 - PhdassistancePhD Assistance
 
Start a deep learning startup - tutorial
Start a deep learning startup - tutorialStart a deep learning startup - tutorial
Start a deep learning startup - tutorialMostapha 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 TransformationsJordi Cabot
 
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 DetectorRoelof 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 PetrovaAlexey 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 lineIconic Translation Machines
 

Was ist angesagt? (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
 

Ähnlich wie 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 / 2016Grigory 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
 
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- simplivSimpliv 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 predictivosKeepler 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 6Paul Houle
 
Real Time Sign Language Detection
Real Time Sign Language DetectionReal Time Sign Language Detection
Real Time Sign Language DetectionIRJET Journal
 
Pharo: A Reflective System
Pharo: A Reflective SystemPharo: A Reflective System
Pharo: A Reflective SystemMarcus Denker
 
Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflowCharmi 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 PandasDatabricks
 
Demystifying Ml, DL and AI
Demystifying Ml, DL and AIDemystifying Ml, DL and AI
Demystifying Ml, DL and AIGreg Werner
 
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 significanceGajesh Bhat
 
Human Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine LearningHuman Emotion Recognition using Machine Learning
Human Emotion Recognition using Machine Learningijtsrd
 
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 PossibilitiesChicago ALT.NET
 
Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Dhruv Gohil
 

Ähnlich wie 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
 
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
 
Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical
 

Kürzlich hochgeladen

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

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 classification audio classification speech recognition text classification 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 defining 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 classification 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 classification 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 classifier (TM)
  • 28.
  • 29.
  • 30. End-to-end Process as a developer? 0. Define 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 specific concerns size of model time it takes to run predictions supported layers
  • 33. 0.Define problem American Sign Language (ASL) alphabet classifier
  • 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 classifier)
  • 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 classification 0.Define problem 1. Gather data 2. Train ML model
  • 67. 0.Define problem Audio classifier 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 find 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 Classification" J. Lemley et al "Transfer Learning for Sound Classification" 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 classification and regression tasks" ! Keunwoo Choi et al.
  • 93. Thank you Keep in touch! twitter: @meghafon