With the new Core ML framework released by Apple, easy-to-use machine learning is now available to iOS developers. Goes over the basics of machine learning, and CoreML Models. Includes tons of links to resources for further studying!
Presented at SDiOS meetup, 6/26/17.
https://www.meetup.com/sdiosdevelopers/events/240871940/
5. What is machine learning?
🤖
Great overview video
https://www.youtube.com/watch?v=NOjUaY0Qn3g
6. 🤖
“Machine Learning is about making decision based
on trial and error …a more application oriented
version of statistics.
The basic idea is to make decisions based on
certain amount of information you have.“
-Anonymous via Quora
7. 🤖
Let us break down some ML terms:
“ML got levels to it”
Kendrick LaML
Model
Neural Networks
Supervised & Unsupervised Learning
Common Tools & Libraries
9. 🤖
Neural Networks
If you want to learn more about the math behind NNs:
read ACC Coolen’s paper (link in the resources)
Modeled loosely on the human brain,a neural
net consists of thousands or even millions of
simple processing nodes that are densely
interconnected.
- MIT
For a more detailed and basic overview:
“A Quick Introduction to Neural Networks” (link in the resources)
10. 🤖
Supervised & Unsupervised Learning
Supervised algorithms can apply what has been
learned in the past to new data.
Unsupervised algorithms can draw inferences
from datasets.
12. 🤖
Let us walkthrough building a basic
image classification ML model with Tensorflow
HT: Google Codelabs “Tensorflow for Poets”
and
Siraj Raval on YouTube
16. What is Core ML?
🍎
A Framework that allows us to use
ML Models in iOS 11 (an inference engine)
Built on low-level tech (e.g.Metal & Accelerate)
Utilizes ML Models with a new .MLModel file
Ability to convert models from popular ML libraries
22. Core ML
The Good
🍎🍎
Very little iOS code
Easy to implement
Potential for powerful mobile experiences
ML Tools and .MLModel Filetype are open source
23. 🍎🍎
Requires lot of ML training
Only supports supervised learning
Not a lot of easy / beginner resources to
help in creating Core ML models
Almost all ML libraries are in Python
making it harder to just start experimenting
Core ML
The Bad
24. 🍎🍎
No on device training of the model
.MLModel file is unencrypted
Potential for huge file sizes
No direct Tensorflow support (yet)
Core ML
The Ugly
For more detailed criticism see:
“Why Core ML will not work for your app (most likely)” (link in the resources)
25. 🍎🍎
Core ML Models aren’t the only way
to do ML on iOS
You can roll your own ML with
Metal Performance Shaders and Accelerate.
There are open sources libraries that implement
ML on iOS.
Check out Alex Sosnovshchenko’s
frequently updated list:
“Machine Learning for iOS”
(link in resources)
28. IOS ML
Machine Learning for iOS
(Curated ML list of resources for iOS developers)
http://alexsosn.github.io/ml/2015/11/05/iOS-ML.html
CORE ML
Core ML Product Page
https://developer.apple.com/machine-learning/
Core ML Python Tools
https://pypi.python.org/pypi/coremltools
Why Core ML will not work for your app (most likely)
http://alexsosn.github.io//ml/2017/06/09/Core-ML-will-not-Work-for-Your-
App.html
29. NEURAL NETWORKS
A Quick Introduction to Neural Networks
https://ujjwalkarn.me/2016/08/09/quick-intro-neural-networks/
A Beginner's Guide to the Mathematics of Neural Networks by ACC Coolen
http://citeseerx.ist.psu.edu/viewdoc/download?
doi=10.1.1.161.3556&rep=rep1&type=pdf
Explained: Neural networks [MIT]
http://news.mit.edu/2017/explained-neural-networks-deep-learning-0414
ML TUTORIALS
Tensorflow for Poets
https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/
Building powerful image classification models using very little data
https://blog.keras.io/building-powerful-image-classification-models-using-
very-little-data.html
Learning AI if You Suck at Math
https://hackernoon.com/learning-ai-if-you-suck-at-math-8bdfb4b79037