Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Machine Learning with CreateML

Eeb061c8b2816b771920da1b3e7904a3?s=47 Swift India
September 14, 2019

Machine Learning with CreateML

Presented by Krishna Jagadish at Swift Bangalore meet up Chapter #17

Eeb061c8b2816b771920da1b3e7904a3?s=128

Swift India

September 14, 2019
Tweet

Transcript

  1. Create ML app Krishnaprasad Jagadish Co Founder, Head of Mobile

    Engineering Parjanya Creative Solutions
  2. Agenda • What is Machine Learning ? • Brief introduction

    to CoreML • Sample Applications that use CoreML • What is CreateML • Demo • Using MLModel in an iOS App
  3. Agenda • What is Machine Learning ? • Brief introduction

    to CoreML • Sample Applications that use CoreML • What is CreateML • Demo • Using MLModel in an iOS App
  4. What is Machine Learning ? • “Machine learning is a

    type of artificial intelligence where computers “learn” without being explicitly programmed. Instead of coding an algorithm, machine learning tools enable computers to develop and refine algorithms, by finding patterns in huge amounts of data.” raywenderlich.com • AI that uses Data to Infer rules. Umbrella term for collection of algorithms that use data to derive value
  5. Humans can solve certain problems easily that machines find difficult.

    Algorithms that narrow the human - machine gap https://xkcd.com/1425/
  6. • Training set ( Labeled Data ) • Testing set

    • Validation • Transfer Learning • ML requires data in a particular format ( Vectors, Matrices, Tensors etc) • Preparing the data is most of the work.
  7. Demo • How many here know how to speak Kannada

    ? • How many here know how to write in Kannada ?
  8. Training set • ಆ - Aa

  9. Testing Data •ಅ

  10. Validation

  11. Agenda • What is Machine Learning ? • Brief introduction

    to CoreML • Sample Applications that use CoreML • What is CreateML • Demo • Using MLModel in an iOS App
  12. CoreML • CoreML is a framework that lets you use

    trained models in your app. • Introduced as a part of iOS 11 along with Vision APIs • Use the .mlmodel to make predictions on the new input data • Optimised to use the CPU, GPU and Neural Engine for better performance • Runs on device and hence user data stays private
  13. Agenda • What is Machine Learning ? • Brief introduction

    to CoreML • Sample Applications that use CoreML • What is CreateML • Demo • Using MLModel in an iOS App
  14. Sample Applications that use CoreML •

  15. • Home Court • PK Fitness • Pixelmator Pro •

    Swing Tennis • Halide
  16. Agenda • What is Machine Learning ? • Brief introduction

    to CoreML • Sample Applications that use CoreML • What is CreateML • Demo • Using MLModel in an iOS App
  17. CreateML • CreateML is an API that lets you create

    and train custom machine learning models on your Mac • CreateML app was introduced at WWDC 2019 • Several new templates added this year
  18. CreateML Templates • Image Classifier • Object Detector • Text

    Classifier • Sound Classifier • Activity Classifier • Tabular data
  19. Image Classifier • Model that recognises images and classifies them

    with a label • MLImageClassifier • JPGs or PNGs • At least 300 x 300
  20. Object Detector • Model that can identify specific type of

    objects in an image • Train with images and annotations for each object in the image • MLObjectDetector
  21. Text Classifier • Model to classify and recognise patterns in

    Natural Language text • Uses NLP, Semantic and Lexical analyser • Sentiment analysis, Profanity filter • MLTextClassifier • Data can be in JSON or CSV formats • MLWordTagger, MLGazetteer, MLWordEmbedding
  22. Sound Classification • Model that is used to classify audio

    data • Single Channel audio for training • M4A, MP3, AIFF or WAV • MLSoundClassifier
  23. Activity Classifier • Classify activities based on Motion Sensor Data

    • Train with tabular data using accelerometer and Gyro data • MLActivityClassifier
  24. Tabular data • Tabular regressor • Tabular classifier • Classification:

    When the decision we want to make is a “Category” • Regression: When the decision we want to make is “continuous”
  25. Classification • Binary classification ( Should I rent this house

    ? Is this email spam ? ) • Multinomial classification ( What product will a customer buy ? Character classification ? )
  26. Regression • Predict a numeric value • What should be

    the value of this house ? • What should be the credit score to approve this loan ? !26
  27. Demo

  28. Thank you ! @_kjagadish krishna@parjanya.org