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
ブラウザだけで使える機械学習モデル / Shape Detection Sample
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
radiocat
November 28, 2018
Technology
810
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ブラウザだけで使える機械学習モデル / Shape Detection Sample
2018.11.28 第20回 梅キャンX勉強会
radiocat
November 28, 2018
More Decks by radiocat
See All by radiocat
EMの仕事、あるいは顧客価値創出のアーキテクト
radiocat
0
380
アジャイルを支える心理的安全性の守破離 / Psychological safety for Agile
radiocat
1
910
経験ゼロからはじめる!10年以上続くプロダクトのアウトカム創出戦略 / Challenges of product management
radiocat
1
4.9k
変化の時代に活かす「みんなのプロジェクトマネジメント」 / Utilize project management for change
radiocat
0
2k
「中小企業のエンジニアチームを”楽”にする」を目指す組織マネジメントの変わる勇気と変えない勇気 / Challenge to Scrum 4
radiocat
2
4.2k
関西的なノリで変化の波をノリこなすチームの取り組み / 3 Steps and Kansai-soul to Riding the Waves of Change
radiocat
2
3.8k
スクラムちゃうがなと言われてもやってみぃひん? / Challenge to Scrum 3
radiocat
4
11k
Re:ゼロから始めるアジャイル開発 / restart agile
radiocat
3
1.8k
スクラム開発について / What is Scrum?
radiocat
0
610
Other Decks in Technology
See All in Technology
サーバー常駐型の 簡易障害調査AI エージェントを作ってみた話
masayoshi
1
500
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
55k
魔法少女がClaude Codeを監視する / ccportal-deck
noriyukitakei
3
110
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
「ミスを許さない手順書」を作ってみた 〜 個人的にはこれ以上できることはあまりなさそう/20260827-ssmjp-operation-procedure-update
opelab
17
17k
tamachi.goを支える技術
rymiyamoto
0
130
承認ゲートは何を守っているのか? AIエージェントの自律購入を実測した結果
yama3133
1
110
Claude Teamプランの コスト最適化を考える
rfdnxbro
2
860
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.3k
AIエージェントを雇う前に決める5つのこと
knishioka
1
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.9k
Introduction to Bill One Development Engineer
sansan33
PRO
0
480
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
64k
Thoughts on Productivity
jonyablonski
76
5.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
480
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Chasing Engaging Ingredients in Design
codingconduct
0
290
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
460
The SEO identity crisis: Don't let AI make you average
varn
0
550
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
Darren the Foodie - Storyboard
khoart
PRO
3
3.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
ブラウザだけで 使える 機械学習モデル 2018.11.28 / @radiocatz 第20回 梅キャンX勉強会
おしごと 現職:株式会社 ラクス 所属:楽楽精算 開発チーム リーダー/マネジメント スクラムマスター About me radiocat
Twitter : @radiocatz Android派/Vim派/野球派/ KIRINビール派 大学時代は軽音楽部で電子音楽を作った りしてました。 Blog : http://radiocat.hatenablog.com/ Qiita : https://qiita.com/radiocat GitHub : https://github.com/radiocat https://youtu.be/8J-ZTQVKWMw
9月にオフィス移転で近所に来ました 梅田ゲートタワー 7階
お知らせ • 会社のMeetupを運営しています • 次回は2月に開催予定 https://rakus.connpass.com/ https://news.mynavi.jp/kikaku/20180801-662693/ • 社内勉強会も運営しています •
1月からもくもく勉強会を外部開放予定
スクラム開発の取り組み 会社のブログでスクラムについて書いています Scrum Fest Osaka 2019のCfPに応募中 http://tech-blog.rakus.co.jp/ https://confengine.com/scrum-fest-osaka-2019/propos al/8554/-
ブラウザだけで使える 機械学習モデル 今日のテーマ
ML(機械学習)モデル とは?
さまざまなサービスで活用できる学習済みモデル 学習 さまざまな サービスで活用
モバイルアプリ向けMLモデル • Google:ML Kit ◦ https://developers.google.com/ml-kit/ • Apple:Core ML ◦
https://developer.apple.com/documentation/coreml
ML Kit for Firebase • Android/iOS向け機械学習SDK • 現在パブリックベータ • Googleに訓練されたMLモデルを利用可能
• TensorFlow Liteの自作モデル(Custom Models)も利用可能 • 2種類のAPI ◦ On-device:デバイスに組み込んで通信なしで使える軽量なモデル ▪ 無料で使える ◦ In the Cloud:クラウド上の高度なモデル ▪ Cloud Vision APIを使う(重量課金)
None
参考 https://speakerdeck.com/radiocat/ml-kit-wo-android-te-dong-kasitemita
2018年5月に モバイルSDKやWeb APIで MLモデルを利用可能になった つまり
2018年10月 Chrome 70 正式リリース
Chrome 70 • 10月に正式リリース • ブラウザから顔・バーコード・テキスト識別APIが使えるようになった https://forest.watch.impress.co.jp/docs/news/1143859.html
つまりこういうこと Chromeで できます
Shape Detection Origin Trial Shape Detection APIがOrigin Trialになった https://blog.chromium.org/2018/09/chrom e-70-beta-shape-detection-web.html
Origin Trial その名の通り「特定のオリジンにだけ、実験中の機能を、期限付きで提供する」仕組みであ る https://blog.jxck.io/entries/2016-09-29/vender-prefix-to-origin-trials.html
Web Platform Incubator Community Group(WICG) 新しい技術の普及について皆で検討し支援するのを目的とした グループです。W3Cのスタッフやベンダーも参加していますが、 あくまでコミュニティというかたちで運営されます。 https://www.publickey1.jp/blog/15/html5whatwgw3c_tpac _2015.html
https://wicg.io/
Shape Detection API 3つのJavaScript API • BarcodeDetector • FaceDetector •
TextDetector https://www.chromestatus.com/fe ature/4757990523535360
使いかた
Experimental Web Platform features • Experimental Web Platform featuresをEnabledにする •
アドレスバーに以下を入力して設定(要Chrome再起動) chrome://flags/#enable-experimental-web-platform-features
FaceDetectorの使い方 const faceDetector = new FaceDetector(); const image = document.getElementById('image');
// 取得した画像をdetect()に渡す faceDetector.detect(image) .then(faces => ...(以下略
取得できる情報 [ { boundingBox: { // 検出した顔の位置 x: 545, y:
187, top: 187, left: 545, right: 855, bottom: 497, width: 310, height: 310 }, landmarks: [ // 目や口の位置 { locations: { x: 627.5, y: 262.5 }, type: 'eye' }, { locations: { x: 763, y: 258 }, type: 'eye' }, { locations: { x: 701, y: 418 }, type: 'mouth', } } } ]
同様に3つのAPIが利用可能 TextDetectorとBarcodeDetectorもほぼ同じような使い方 ※参考 • Introduction to the Shape Detection API
◦ https://blog.arnellebalane.com/introduction-to-the-shape-detection-api-e07425396861 サンプルコード • shape-detection-sample ◦ https://github.com/radiocat/shape-detection-sample
DEMO https://radiocat.github.io/shape-detection-sample/examples/face/
まとめ
所感 • 5月にML Kitを触って驚いた半年後にそれがChromeでできるようになった • <video>を使ってリアルタイムの顔認識もできそう • TextDetectorは実用にはまだまだ • BarcodeDetectorは充分実用レベル
• PWA化したらブラウザだけでQRコードリーダーアプリが実現できそう
Thank you
Credits • Unsplash ◦ https://unsplash.com/ • いらすとや ◦ https://www.irasutoya.com/