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
4.1k
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.3k
Core ML 🏃 iOS Engineer
_shingt
1
490
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
950
Other Decks in Programming
See All in Programming
Security_for_introducing_eBPF
kentatada
0
110
Criando Commits Incríveis no Git
marcelgsantos
2
170
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
770
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
命名をリントする
chiroruxx
1
380
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
Featured
See All Featured
The Language of Interfaces
destraynor
154
24k
Fireside Chat
paigeccino
34
3.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Building an army of robots
kneath
302
44k
Gamification - CAS2011
davidbonilla
80
5.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing Experiences People Love
moore
138
23k
It's Worth the Effort
3n
183
28k
The Cost Of JavaScript in 2023
addyosmani
45
7k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Making Projects Easy
brettharned
116
5.9k
Side Projects
sachag
452
42k
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