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
350
アジャイルを支える心理的安全性の守破離 / Psychological safety for Agile
radiocat
1
890
経験ゼロからはじめる!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.7k
スクラムちゃうがなと言われてもやってみぃひん? / Challenge to Scrum 3
radiocat
4
11k
Re:ゼロから始めるアジャイル開発 / restart agile
radiocat
3
1.7k
スクラム開発について / What is Scrum?
radiocat
0
600
Other Decks in Technology
See All in Technology
記録をかんたんに、提案をパーソナルに ── AIであすけんが目指すもの
oprstchn
0
140
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
540
はじめてのWDM
miyukichi_ospf
0
110
トークン最適化のためのユーザーストーリー分析 / User Story Analysis for Token Optimization
oomatomo
0
170
Agentic AI 時代のテスト手法: Kiro とはじめるプロパティベーステスト (AWS Summit Japan 2026 | DEV212)
ymhiroki
0
210
そのハーネス、本当に境界になっていますか? AIエージェント時代の実行環境設計【MEGU-Meet #4】
cscengineer
PRO
0
110
事業価値を⽣み出すSREへ SREが担うべき意思決定の5層
kenta_hi
0
170
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
260
cccccc
moznion
0
1.7k
“全部コピーしない”ファイルデータの活用 : — FSx for ONTAP × S3 Tables × Icebergで作るメタデータカタログ
yoshiki0705
0
420
【FinOps】データドリブンな意思決定を目指して
z63d
3
610
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
300
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.1k
We Have a Design System, Now What?
morganepeng
55
8.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
640
Scaling GitHub
holman
464
140k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
We Are The Robots
honzajavorek
0
270
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
250
Into the Great Unknown - MozCon
thekraken
41
2.6k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Test your architecture with Archunit
thirion
1
2.3k
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/