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
物流システムにおけるリファクタリングとアーキテクチャの再構築 〜依存関係とモジュール分割の重要性〜
deeprain
1
940
42 best practices for Symfony, a decade later
tucksaun
1
150
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
240
StarlingMonkeyを触ってみた話 - 2024冬
syumai
2
220
似たもの同士のPerlとPHP
uzulla
1
110
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
150
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
0
3.1k
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
760
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
11
3.5k
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
7.3k
Testing Assembly: Code or Low Code - Navigating the Test Automation Options
maaretp
0
100
useSyncExternalStoreを使いまくる
ssssota
4
860
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
We Have a Design System, Now What?
morganepeng
51
7.3k
How to Think Like a Performance Engineer
csswizardry
21
1.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Scaling GitHub
holman
458
140k
Faster Mobile Websites
deanohume
305
30k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Side Projects
sachag
452
42k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
900
Adopting Sorbet at Scale
ufuk
73
9.1k
A Tale of Four Properties
chriscoyier
157
23k
No one is an island. Learnings from fostering a developers community.
thoeni
19
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