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
920
経験ゼロからはじめる!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
620
Other Decks in Technology
See All in Technology
Benchmarking Vector Databases: pgvector vs. LanceDB
tsho
0
140
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
220
その指示、Bobにしっかり伝わってる?初心者でも即実践できる プロンプト/コンテキスト設計のコツ
muehara
1
150
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
260
DGX Sparkを2台使って いろいろ動かす話
sonoda_mj
1
130
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
130
AI時代のAPI品質を支えるガードレール / API Guardrails for API quality in the AI era
yokawasa
1
110
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
3
2.1k
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
140
設計の世代交代を乗り越える、14年続くAndroidアプリの開発戦略
sansantech
PRO
1
130
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
0
190
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
790
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
490
Practical Orchestrator
shlominoach
191
12k
WENDY [Excerpt]
tessaabrams
12
39k
From π to Pie charts
rasagy
0
350
Music & Morning Musume
bryan
47
7.4k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
420
Claude Code のすすめ
schroneko
67
230k
Code Review Best Practice
trishagee
74
20k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
440
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing for Timeless Needs
cassininazir
1
470
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/