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
Detect Body and Hand Pose with Vision
Search
Koki Hirokawa
July 01, 2020
Technology
970
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Detect Body and Hand Pose with Vision
Koki Hirokawa
July 01, 2020
More Decks by Koki Hirokawa
See All by Koki Hirokawa
KMP の Swift export
kokihirokawa
0
760
SwiftUI移行のためのインプレッショントラッキング基盤の構築
kokihirokawa
0
410
App内課金におけるトラブルを劇的に減らすための取り組み
kokihirokawa
2
1.3k
ABEMAのリアーキテクチャ
kokihirokawa
5
5.4k
Other Decks in Technology
See All in Technology
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
720
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
720
AIっぽい文章を採点して人間らしく直すアプリを作ってみた
yama3133
2
120
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.9k
EventBridge Connection
_kensh
5
690
Socrates × Looker 〜セマンティックレイヤーで進化するデータ分析エージェント〜
hanon52_
3
2.1k
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
1.4k
「エンジニア進化論」2028年の開発完全自動化、エンジニアはどう進化するか
cyberagentdevelopers
PRO
4
4.4k
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
170
How Timee Delivers Day 1 Production Ready LLM Features
tomoyks
0
110
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
生成 AI × MCP で切り拓く次世代 SRE!自律型運用への挑戦と開発者体験の進化
_awache
0
190
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
We Have a Design System, Now What?
morganepeng
55
8.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Writing Fast Ruby
sferik
630
63k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Claude Code のすすめ
schroneko
67
230k
How to Ace a Technical Interview
jacobian
281
24k
Everyday Curiosity
cassininazir
0
230
Building Adaptive Systems
keathley
44
3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Transcript
Koki Hirokawa Detect Body and Hand Pose With Vision CA.swift
#12
ኍ߉ل / Koki Hirokawa / ͽʔͻΖ GitHub -> KokiHirokawa Twitter
-> @pihero13
ਓؒͷࢹ֮γεςϜʹ͓͍ͯߦ͑ΔλεΫΛίϯϐϡʔλͰ࣮ݱ͢Δ͜ͱΛٻ͢Δݚڀ Computer Vision ͱʁ
iOS 11 Ͱಋೖ͞ΕͨϑϨʔϜϫʔΫ إͷϥϯυϚʔΫݕग़ɾςΩετݕग़ɾόʔίʔυೝࣝɾը૾ೝࣝ ྨମݕग़ʹಠࣗͷ Core ML ϞσϧΛ༻͢Δ͜ͱՄೳ iOS /
Vision ͱʁ
ମͱखͷϙʔζΛݕͰ͖ΔΑ͏ʹͳͬͨ Detect Body and Hand Pose with Vision
͏ࣗࡱΓ͍Βͳ͍ ಛఆͷδΣενϟʔΛݕͯ͠γϟολʔΛΔ ׆༻ྫᶃ
δΣενϟʔͷྨ ֆจࣈΛΦʔόʔϨΠ ׆༻ྫᶄ
࣮ࡍͲͷ͘Β͍ͷύϑΥʔϚϯε͕ ग़ͤΔͷʁ
ͪ͜ΒαϯϓϧΞϓϦͱͯ͠͞Ε͍ͯ·͢ ۭதͰจࣈΛॻ͚ΔΞϓϦͰݕূ
ྲྀੴʹֆݫ͍͠Μ͡Όͳ͍ʁ
ԿΛඳ͍͍ͯΔ͔νϟοτͰͯͯΈͯԼ͍͞
ࢥͬͨΑΓઢ͕៉ྷʹॻ͚Δʂ ࢦΛ͍Α͘ಈ͔ͯ͠ݕͯ͘͠ΕΔʂ Beta ൛͚ͩͲɺ҆ఆ͍ͯ͠Δɻ ͨͩɺશͯͷࢦ͕ݟ͑ΔΑ͏ʹ͠ͳ͍ͱ্ख͘ݕͯ͘͠Εͳ͍ɻ ମݧͯ͠Έͨॴײ
ը໘ͷͰ্ख͘ػೳ͠ͳ͍͜ͱ͕͋Δ Χϝϥͷࢹํʹରͯ͠ฒߦͳखݕ͕͍͠ खାΛ͍ͯ͠Δ߹ݕ͕͍͠ Λखͱצҧ͍ͯ͠͠·͏͜ͱ͕͋Δ σόΠεݻఆ͞ΕΔඞཁ͕͋Δ ਫ਼ΛߴΊΔͨΊͷߟྀࣄ߲
࣮໘ͷʹҠΓ·͢
Request ͷ࡞ Handler ͷ࡞ & Handler ʹ Request Λ͢ ݁Ռͱͯ͠
Observation Λऔಘ͢Δ λεΫͷྲྀΕ
var handPoseRequest = VNDetectHumanHandPoseRequest() let handler = VNImageRequestHandler( cmSampleBuffer: sampleBuffer,
orientation: .up, options: [:] ) try! handler.perform([handPoseRequest]) let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation
var handPoseRequest = VNDetectHumanHandPoseRequest() let handler = VNImageRequestHandler( cmSampleBuffer: sampleBuffer,
orientation: .up, options: [:] ) try! handler.perform([handPoseRequest]) let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation
var handPoseRequest = VNDetectHumanHandPoseRequest() let handler = VNImageRequestHandler( cmSampleBuffer: sampleBuffer,
orientation: .up, options: [:] ) try! handler.perform([handPoseRequest]) let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation
var handPoseRequest = VNDetectHumanHandPoseRequest() let handler = VNImageRequestHandler( cmSampleBuffer: sampleBuffer,
orientation: .up, options: [:] ) try! handler.perform([handPoseRequest]) let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation
public func captureOutput( _ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from
connection: AVCaptureConnection ) { var handPoseRequest = VNDetectHumanHandPoseRequest() let handler = VNImageRequestHandler(cmSampleBuffer: sampleBuffer, …) try handler.perform([handPoseRequest]) let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation } AVCaptureVideoDataOutputSampleBufferDelegate AVCaptureSession AVCaptureVideoDataOutput
֤ϥϯυϚʔΫͷऔಘ - VNRecognizedPointGroupKey Thumb Index Finger Middle Finger Ring Finger
Little Finger
֤ϥϯυϚʔΫͷऔಘ - VNRecognizedPoint
VNRecognizedPoint • ࠲ඪͷ৴པ • x ࠲ඪ • y ࠲ඪ •
ϥϕϧ
let thumbPoints = try observation.recognizedPoints(forGroupKey: .handLandmarkRegionKeyThumb) let thumbTipPoints = thumbPoints[.handLandmarkKeyThumbTIP]!
let x = thumbTipPoints.location.x let y = thumbTipPoints.location.y
let thumbPoints = try observation.recognizedPoints(forGroupKey: .handLandmarkRegionKeyThumb) let thumbTipPoints = thumbPoints[.handLandmarkKeyThumbTIP]!
let x = thumbTipPoints.location.x let y = thumbTipPoints.location.y
let thumbPoints = try observation.recognizedPoints(forGroupKey: .handLandmarkRegionKeyThumb) let thumbTipPoints = thumbPoints[.handLandmarkKeyThumbTIP]!
let x = thumbTipPoints.location.x let y = thumbTipPoints.location.y
None
VNDetectHumanHandPoseRequest ͷ maximumHandCount Λௐ͢Δ͜ͱͰෳͷख Λݕ͢Δ͜ͱ͕Մೳ σϑΥϧτ 2 ύϥϝʔλͷΛେ͖͘͢Εͦͷ͚ͩϨΠςϯγʹӨڹ͕ੜ͡Δ ͘ઃఆ͢ΕɺͦͷҎ্ͷखݕग़͞Εͳ͘ͳΓύϑΥʔϚϯε্͕Δ ϨΠςϯγʹؔ͢Δҙࣄ߲
BODY POSE ΄΅ಉ͡ॲཧʹͳΓ·͢
ARKit ͷϞʔγϣϯΩϟϓνϟʔͱͷҧ͍
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
ग़య ʮDetect Body and Hand Pose with Visionʯ ؔ࿈ηογϣϯ ʮCreate
ML Λ༻ͨ͠ΞΫγϣϯྨࢠͷ࡞ʯ ʮComputer Vision API ͷ୳ٻʯ