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
radiocat
November 28, 2018
Technology
800
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
370
アジャイルを支える心理的安全性の守破離 / Psychological safety for Agile
radiocat
1
900
経験ゼロからはじめる!10年以上続くプロダクトのアウトカム創出戦略 / Challenges of product management
radiocat
1
4.9k
変化の時代に活かす「みんなのプロジェクトマネジメント」 / Utilize project management for change
radiocat
0
2k
「中小企業のエンジニアチームを”楽”にする」を目指す組織マネジメントの変わる勇気と変えない勇気 / Challenge to Scrum 4
radiocat
2
4.1k
関西的なノリで変化の波をノリこなすチームの取り組み / 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.7k
スクラム開発について / What is Scrum?
radiocat
0
610
Other Decks in Technology
See All in Technology
PLaMo 3.0 Primeの構造化出力サポート
pfn
PRO
0
160
AI時代の強いチームの作り方
yuukiyo
23
13k
20260724 情シスAI #1 「全従業員をAIネイティブにする」ために情シスがやっていること(公開版)
frtckty
0
150
BigQuery を検索ソースとした AI Agent の作り方って 〇〇 通りあんねん
satohjohn
0
150
Claude Code並行開発環境の ムダ‧ムラ‧ムリを見直した話
muranakaaa
1
390
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
390
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
200
ウォーターフォール開発案件のPMとしてAI活用を模索している話
hatahata021
3
250
WEBフロントエンド研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
2
900
大 AI 時代におけるC# の事情 ~ぶっちゃけトークを交えながら~
nenonaninu
1
610
AWS環境のセキュリティ不安を解消した企業事例 ~よくある課題と対策を一挙公開~
asanoharuki
1
270
実践が先生だった— 新卒サーバーエンジニア1年目のリアル
mixi_engineers
PRO
0
220
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
190
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
30 Presentation Tips
portentint
PRO
1
360
Done Done
chrislema
186
16k
KATA
mclloyd
PRO
35
15k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
4 Signs Your Business is Dying
shpigford
187
22k
Documentation Writing (for coders)
carmenintech
77
5.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
470
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
670
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/