SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
Navigating the
!
ML Landscape
Meghan Kane, @meghafon
developer @novoda, Berlin
Swift & Fika, 9/2018
!
before we pack our bags..
why use machine learning .. at all?
ML tasks
→ detection: rectangles, face, barcode, text
→ classification: image, text, activity, column data
→ style transfer
→ image similarity
→ object detection
→ natural language processin
→ regression
Advantages of on device inference
1. user privacy
2. low latency user experience
Let's start our road trip
Classify
board game
pieces
ML approach
Label: "Border"
1. Detect game box (rectangle
detection)
2. Classify Agricola piece within
rectangle (image classification)
Capabilities
... built right into the Vision
framework, no model training
needed
→ detection: rectangles, face,
barcode, text
→ object tracking
→ image alignment
How?
1. create handler
2. create task specific request
3. send request to handler
4. handle results
// 1. Create handler
let handler = VNImageRequestHandler(cgImage: image,
orientation: orientation,
options: [:])
// 2. Create request
let request = VNDetectRectanglesRequest(completionHandler: self.handleDetectedRectangles)
// 3. Send request to handler
do {
try handler.perform([request])
} catch let error as NSError {
// handle error
return
}
// 4. Handle results
func handleDetectedRectangles(request: VNRequest?, error: Error?) {
if let results = request?.results as? [VNRectangleObservation] {
// Do something with results [*bounding box coordinates*]
}
}
ML approach
Label: "Border"
1. Detect game box (rectangle
detection)
2. Classify Agricola piece within
rectangle (image classification)
Why restrict input image to the box?
→ easier to train an accurate model
→ faster to collect image data
Capabilities
In Xcode playground, train custom
model for:
→ image classification
→ text classification
→ classification & regression of
column data
Collect Data
→ Collect images representative of real world use
cases
→ Vary angle & lighting
→ >10 images per label, but ideally more
→ Equal # images for each label
→ Recommended: >299x299 pixels
Collecting Data Quickly
// Extract .jpg frames from .mov @ 5 frames/sec
ffmpeg -i stone.mov -r 5 data/stone/stone_%04d.jpg
Prepare Data
→ Split data: 80% train / 20% test
what's happening behind the scenes?
Transfer
Learning
Evaluate
Save model
Capabilities
→ perform predictions using
model
→ quantized weights (32 bit -> 16,
8, 4... bit)
→ perform batch predictions
→ create custom model layer
Vision + Core ML
1. create Vision Core ML model
2. create handler
3. create task specific request
4. send request to handler
5. handle results
// 1. Create Vision Core ML model
let model = AgricolaPieceClassifier()
guard let visionCoreMLModel = try? VNCoreMLModel(for: model.model) else { return }
// 2. Create handler
let handler = VNImageRequestHandler(cgImage: cgImage, orientation: cgImageOrientation)
// 3. Create request
let request = VNCoreMLRequest(model: visionCoreMLModel,
completionHandler: self.handleClassificationResults)
// 4. Send request to handler
do {
try handler.perform([request])
} catch let error as NSError {
// handle error
return
}
// 5. Handle results
func handleClassificationResults(request: VNRequest?, error: Error?) {
if let results = request?.results as? [VNClassificationObservation] {
// Do something with results
}
}
Problem solved
✅
Label: "Border"
1. Detect game box (rectangle
detection)
2. Classify Agricola piece within
rectangle (image classification)
Next
challenge...
Capabilities
...robust Python training
framework
→ style transfer
→ activity classification
→ image similarity
→ recommmendations
→ object detection
Setting up python
virtualenv venv
source venv/bin/activate
pip install requests==2.18.4 turicreate==5.0b2 jupyter
Train style transfer
jupyter notebook
Navigating the Apple ML Landscape
Navigating the Apple ML Landscape

Weitere ähnliche Inhalte

Ähnlich wie Navigating the Apple ML Landscape

Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleAaron (Ari) Bornstein
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learningwesley chun
 
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Databricks
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceLviv Startup Club
 
Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Yuki Shimada
 
Gitter marionette deck
Gitter marionette deckGitter marionette deck
Gitter marionette deckMike Bartlett
 
Marker-based Augmented Monuments on iPhone and iPad
Marker-based Augmented Monuments on iPhone and iPadMarker-based Augmented Monuments on iPhone and iPad
Marker-based Augmented Monuments on iPhone and iPadEnrico Micco
 
Leaving Flatland: Getting Started with WebGL- SXSW 2012
Leaving Flatland: Getting Started with WebGL- SXSW 2012Leaving Flatland: Getting Started with WebGL- SXSW 2012
Leaving Flatland: Getting Started with WebGL- SXSW 2012philogb
 
5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR DataSafe Software
 
Overcoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitectureOvercoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitecturePeter Friese
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMeetupDataScienceRoma
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)wesley chun
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupDoug Needham
 
Cloudera Data Science Challenge
Cloudera Data Science ChallengeCloudera Data Science Challenge
Cloudera Data Science ChallengeMark Nichols, P.E.
 
From Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceFrom Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceSebastian Springer
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple featuresHirantha Pradeep
 
OReilly AI Transfer Learning
OReilly AI Transfer LearningOReilly AI Transfer Learning
OReilly AI Transfer LearningDanielle Dean
 

Ähnlich wie Navigating the Apple ML Landscape (20)

Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at Scale
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
 
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
Analytics Zoo: Building Analytics and AI Pipeline for Apache Spark and BigDL ...
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning Service
 
Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)
 
Gitter marionette deck
Gitter marionette deckGitter marionette deck
Gitter marionette deck
 
Marker-based Augmented Monuments on iPhone and iPad
Marker-based Augmented Monuments on iPhone and iPadMarker-based Augmented Monuments on iPhone and iPad
Marker-based Augmented Monuments on iPhone and iPad
 
Leaving Flatland: Getting Started with WebGL- SXSW 2012
Leaving Flatland: Getting Started with WebGL- SXSW 2012Leaving Flatland: Getting Started with WebGL- SXSW 2012
Leaving Flatland: Getting Started with WebGL- SXSW 2012
 
5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data
 
Apple Machine Learning
Apple Machine LearningApple Machine Learning
Apple Machine Learning
 
Overcoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitectureOvercoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And Architecture
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image Processing
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup Group
 
Cloudera Data Science Challenge
Cloudera Data Science ChallengeCloudera Data Science Challenge
Cloudera Data Science Challenge
 
From Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceFrom Zero to Hero – Web Performance
From Zero to Hero – Web Performance
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
OReilly AI Transfer Learning
OReilly AI Transfer LearningOReilly AI Transfer Learning
OReilly AI Transfer Learning
 

Kürzlich hochgeladen

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 

Kürzlich hochgeladen (20)

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 

Navigating the Apple ML Landscape

  • 1. Navigating the ! ML Landscape Meghan Kane, @meghafon developer @novoda, Berlin Swift & Fika, 9/2018
  • 2.
  • 3.
  • 4. ! before we pack our bags..
  • 5. why use machine learning .. at all?
  • 6. ML tasks → detection: rectangles, face, barcode, text → classification: image, text, activity, column data → style transfer → image similarity → object detection → natural language processin → regression
  • 7.
  • 8. Advantages of on device inference 1. user privacy 2. low latency user experience
  • 9. Let's start our road trip
  • 10.
  • 12. ML approach Label: "Border" 1. Detect game box (rectangle detection) 2. Classify Agricola piece within rectangle (image classification)
  • 13. Capabilities ... built right into the Vision framework, no model training needed → detection: rectangles, face, barcode, text → object tracking → image alignment
  • 14. How? 1. create handler 2. create task specific request 3. send request to handler 4. handle results
  • 15. // 1. Create handler let handler = VNImageRequestHandler(cgImage: image, orientation: orientation, options: [:])
  • 16. // 2. Create request let request = VNDetectRectanglesRequest(completionHandler: self.handleDetectedRectangles)
  • 17. // 3. Send request to handler do { try handler.perform([request]) } catch let error as NSError { // handle error return }
  • 18. // 4. Handle results func handleDetectedRectangles(request: VNRequest?, error: Error?) { if let results = request?.results as? [VNRectangleObservation] { // Do something with results [*bounding box coordinates*] } }
  • 19. ML approach Label: "Border" 1. Detect game box (rectangle detection) 2. Classify Agricola piece within rectangle (image classification)
  • 20. Why restrict input image to the box? → easier to train an accurate model → faster to collect image data
  • 21. Capabilities In Xcode playground, train custom model for: → image classification → text classification → classification & regression of column data
  • 22. Collect Data → Collect images representative of real world use cases → Vary angle & lighting → >10 images per label, but ideally more → Equal # images for each label → Recommended: >299x299 pixels
  • 23. Collecting Data Quickly // Extract .jpg frames from .mov @ 5 frames/sec ffmpeg -i stone.mov -r 5 data/stone/stone_%04d.jpg
  • 24. Prepare Data → Split data: 80% train / 20% test
  • 25.
  • 26.
  • 27.
  • 28. what's happening behind the scenes?
  • 30.
  • 32.
  • 34. Capabilities → perform predictions using model → quantized weights (32 bit -> 16, 8, 4... bit) → perform batch predictions → create custom model layer
  • 35. Vision + Core ML 1. create Vision Core ML model 2. create handler 3. create task specific request 4. send request to handler 5. handle results
  • 36. // 1. Create Vision Core ML model let model = AgricolaPieceClassifier() guard let visionCoreMLModel = try? VNCoreMLModel(for: model.model) else { return }
  • 37. // 2. Create handler let handler = VNImageRequestHandler(cgImage: cgImage, orientation: cgImageOrientation)
  • 38. // 3. Create request let request = VNCoreMLRequest(model: visionCoreMLModel, completionHandler: self.handleClassificationResults)
  • 39. // 4. Send request to handler do { try handler.perform([request]) } catch let error as NSError { // handle error return }
  • 40. // 5. Handle results func handleClassificationResults(request: VNRequest?, error: Error?) { if let results = request?.results as? [VNClassificationObservation] { // Do something with results } }
  • 41. Problem solved ✅ Label: "Border" 1. Detect game box (rectangle detection) 2. Classify Agricola piece within rectangle (image classification)
  • 43.
  • 44. Capabilities ...robust Python training framework → style transfer → activity classification → image similarity → recommmendations → object detection
  • 45. Setting up python virtualenv venv source venv/bin/activate pip install requests==2.18.4 turicreate==5.0b2 jupyter