Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Core ML / Vision Frameworkを使ってできること / What can ...
Search
Shinichi Goto
June 30, 2017
Programming
3
4k
Core ML / Vision Frameworkを使ってできること / What can we achieve using Core ML and Vision framework
2017/06/30 WWDC - Developer's Living #lifull_wwdc
Shinichi Goto
June 30, 2017
Tweet
Share
More Decks by Shinichi Goto
See All by Shinichi Goto
WWDC18 ML Overview
_shingt
1
1.2k
Core ML 🏃 iOS Engineer
_shingt
1
480
Wantedly Peopleのスキャン画面の裏側 / Wantedly People Scanning Screen
_shingt
6
6.2k
Providing Better Feedback in Real-time Object Detection Apps
_shingt
2
1.4k
Value Types in WWDC16
_shingt
3
2.5k
debug-remote-local-notification-on-watchos
_shingt
0
10k
Server Side Swift question
_shingt
3
940
Other Decks in Programming
See All in Programming
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
色々なIaCツールを実際に触って比較してみる
iriikeita
0
270
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
500
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
EventSourcingの理想と現実
wenas
6
2.1k
Golang と Erlang
taiyow
8
1.9k
hotwire_or_react
harunatsujita
8
4k
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4k
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
200
Honoの来た道とこれから
yusukebe
19
3k
Outline View in SwiftUI
1024jp
1
110
役立つログに取り組もう
irof
26
8.6k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
A designer walks into a library…
pauljervisheath
202
24k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
We Have a Design System, Now What?
morganepeng
50
7.2k
Done Done
chrislema
181
16k
For a Future-Friendly Web
brad_frost
175
9.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Statistics for Hackers
jakevdp
796
220k
Fireside Chat
paigeccino
32
3k
Transcript
Core ML / Vision Framework ΛͬͯͰ͖Δ͜ͱ ɹ 2017/06/30 WWDC -
Developer's Living @ LIFULL shingt (Shinichi Goto)
shingt (Shinichi Goto) GitHub: @shingt Twi5er: @_shingt 2
Core ML Vision Framework 3
4
Outline • Core MLͷ֓ཁ • Vision Frameworkͷ֓ཁ • Ͱ͖Δ͜ͱ /
ࣄྫհ 5
Core ML 6
ML (Machine Learning) 7
8
9
10
Core ML • ֶशࡁͷModelΛར༻ͯ͠ͷਪʹಛԽ • Core ML model format (**.mlmodel)
• Xcode͕Swi6ͷΠϯλʔϑΣΠεΛࣗಈੜ • αϯϓϧϞσϧApple͕ެ։ • Accerelate / Metal্ʹࡌ͓ͬͯΓϋΠύϑΥʔϚϯε • coremltools 11
ɹ let animalModel = AnimalModel() if let prediction = try?
animalModel.prediction(animalImage: image) { return prediction.animalType } 12
ɹ let animalModel = AnimalModel() if let prediction = try?
animalModel.prediction(animalImage: image) { return prediction.animalType } 13
ɹ let animalModel = AnimalModel() if let prediction = try?
animalModel.prediction(animalImage: image) { return prediction.animalType } 14
ɹ let animalModel = AnimalModel() if let prediction = try?
animalModel.prediction(animalImage: image) { return prediction.animalType } 15
coremltools • "iOS্Ͱѻ͏ͨΊͷModelΛͲ͏༻ҙ͢Δ͔" ͷղܾࡦ • ओཁͳػցֶशπʔϧͷֶशࡁModelΛCore ML༻ͷModelม • Keras,
Caffe, scikit-learn, etc. 16
17
6/28ʹKeras 2.0αϙʔτʢൃද࣌1.2.2ͷΈͩͬͨʣ h"ps:/ /forums.developer.apple.com/thread/81196 18
Vision Framework 19
Vision Framework • Core ML্ʹࡌͬͨը૾ೝࣝɾମݕग़ͳͲͷը૾ղੳ༻ͷϑϨʔϜϫʔΫ • Detec,on • Face, Face
landmarks, Rectangle, Barcode, Text, Horizon • طଘͷͷਫ਼্ʢDeep Learningͷ׆༻ʣ • Tracking • Image Registra,on • Core MLͱͷΈ߹Θͤ 20
21
Tracking • ը૾ʢಈըʣதͷମͷ • إͷTrackingCIDetectorͰՄೳͩͬͨ • ҙͷରʹରͯ͠ͷTracking͕Մೳʹ • VisionͰͷݕग़݁Ռ •
ҙͷྖҬࢦఆ 22
23
Demo (Rectangle Detec,on + Tracking) h"ps:/ /github.com/shingt/VisionTrackerSample 24
զʑCV/MLͷΤΩεύʔτͰ͋Δඞཁͳ͍ ʢͱɺAppleηογϣϯதʹݴ͍ͬͯΔʣ 25
Կ͕Ͱ͖Δͷ͔ʁ ʢΞϓϦέʔγϣϯΤϯδχΞͱͯ͠ͷࢹ͔Βʣ 26
27
28
ࣄྫհ 29
ମݕग़ 30
31
YOLO • YOLO (You only look once) • ߴͳ͜ͱ͕ಛͷମݕग़༻ͷ χϡʔϥϧωοτϫʔΫ
• h1ps:/ /www.youtube.com/watch? v=VOC3huqHrss • ͜ΕҰൠతͳYOLO 32
• iOSࣄྫ • YOLO: Core ML versus MPSNNGraph • Core
MLΛ༻͍ͯiOS্ͰYOLOΛಈ࡞ • Tiny YOLOʢެ։͞Ε͍ͯΔModelʣΛར༻ 33
34
ը૾ੜ 35
Goodfellow, Ian J.; Pouget-Abadie, Jean; Mirza, Mehdi; Xu, Bing; Warde-Farley,
David; Ozair, Sherjil; Courville, Aaron; Bengio, Yoshua. GeneraIve Adversarial Networks. arXiv:1406.2661, 2014. 36
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representa>on learning
with deep convolu>onal genera>ve adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 37
• GAN (Genera+ve Adversarial Nets) • ֶशσʔλͱࣅͨσʔλΛੜ͢ΔϞσϧͷҰछ • iOSࣄྫ •
Crea+ve AI on the iPhone: Genera+ve Adversarial Networks (GAN) with Apple's CoreML Tools • MNISTΛσʔληοτͱͯ͠ɺCore MLΛ༻͍ͯiOS্Ͱࣈ ʢʹࣅͨʣը૾Λੜ 38
39
Summary • Core ML / Vision Framework • iOS্Ͱͷը૾ղੳٕज़ͷར༻ϋʔυϧ͕Լ •
ͱ͍͑ࣝ͋Δఔඞཁʢͱײͨ͡ʣ • Ͱ͖Δ͜ͱ • ը૾ೝࣝ / τϥοΩϯά / ମݕग़ / ը૾ੜ / etc. • Follow @mhollemans 40
ࢀߟηογϣϯ • Introducing Core ML • Core ML in depth
• Vision Framework: Building on Core ML 41
ࢀߟࢿྉ • iOS 11: Machine Learning for everyone • Google’s
MobileNets on the iPhone • YOLO: Core ML versus MPSNNGraph • CreaAve AI on the iPhone: GeneraAve Adversarial Networks (GAN) with Apple's CoreML Tools - Zedge • Why Core ML will not work for your app (most likely) • θϩ͔Β࡞ΔDeep Learning 42
Thanks! 43
ʢิʣͰ͖ͳ͍͜ͱ / ੍ͳͲ • ֶशෆՄ • αϙʔτ͍ͯ͠ΔػցֶशϑϨʔϜϫʔΫʹ͍ͭͯɺಛఆͷόʔδϣϯʹറΒΕΔʢগͳ͘ͱ ݱঢ়ʣ • Kerasͷ2.0αϙʔτೖͬͨ͠ɺࠓޙ͍͛ͯ͘ͷ͔
• ModelͷαΠζ͕େ͖͗͢Δ • RegressionͱClassifica5onͷΈʢ☓ ΫϥελϦϯάɺϥϯΩϯάֶशɺetc.ʣ • ϥϯλΠϜͰϢʔβͷೖྗɾߦಈΛModelʹөͤ͞Δ͜ͱͰ͖ͳ͍ • etc. 44