Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
first step of ML Kit
Yuki Anzai
August 01, 2018
Technology
0
2k
first step of ML Kit
Yuki Anzai
August 01, 2018
Tweet
Share
More Decks by Yuki Anzai
See All by Yuki Anzai
Now in Android アプリ解説 / Now in Android App
yanzm
1
550
キャッチアップ Android 13 / Catch up Android 13
yanzm
2
1.4k
(Android アプリ開発の)その書き方古いかも。/ Devfest Tokyo 2021
yanzm
3
1.7k
プロダクトレベルで必要になる Jetpack Compose テクニック
yanzm
9
6k
Material Design Components カスタマイズ最前線
yanzm
7
3.7k
ML Kit's on-device APIs
yanzm
1
480
ML Kit 最新情報 (@ DevFest Tokyo 2019)
yanzm
4
2.9k
Jetpack Compose どうなの?(Android Dev Summit 2019報告会)
yanzm
7
3k
今からはじめる Android Kotlin
yanzm
9
3.3k
Other Decks in Technology
See All in Technology
セキュリティ 開運研修2022 / security 2022
cybozuinsideout
PRO
3
3.9k
情報の世界 2022年度 第11回「都市のデータ」 #情報の世界 / Data of City 2022
yumulab
0
110
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
3
9.1k
Design for Humans: How to make better modernization decisions
indualagarsamy
2
120
インフラのCI/CDはGitHub Actionsに任せた
mihyon
0
120
Camp Digital 2022: tailored advice
kyliehavelock
0
150
Security Hub のマルチアカウント 管理・運用をサーバレスでやってみる
ch6noota
0
870
LINEのB2Bプラットフォームにおけるトラブルシューティング2選
line_developers
PRO
4
310
Custom GitHub Actions by Java
kazamori
0
290
OpsJAWS Meetup21 システム運用アンチパターンのすすめ
yoshiiryo1
0
1.5k
Lessons Learned from Scaling Infrastructure as Code
joatmon08
0
800
Data in Google I/O - IO Extended GDG Seoul
kennethanceyer
0
160
Featured
See All Featured
Writing Fast Ruby
sferik
612
57k
Typedesign – Prime Four
hannesfritz
34
1.4k
GraphQLの誤解/rethinking-graphql
sonatard
28
6.6k
Unsuck your backbone
ammeep
659
55k
StorybookのUI Testing Handbookを読んだ
zakiyama
5
2.3k
GraphQLとの向き合い方2022年版
quramy
16
8.3k
4 Signs Your Business is Dying
shpigford
169
20k
Rebuilding a faster, lazier Slack
samanthasiow
62
7.2k
The Invisible Side of Design
smashingmag
290
48k
Done Done
chrislema
174
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
49k
A Philosophy of Restraint
colly
192
15k
Transcript
ML Kit の概要と Base API Yuki Anzai @yanzm Google Developers
Expert for Android
ML Kit とは • Firebase の機能の⼀つ • 機械学習を利⽤する機能をアプリに簡単に組み込むためのモバイル SDK •
現在は β • iOS と Android で使える • https://firebase.google.com/docs/ml-kit/
on-device or in the cloud On-device Cloud Text recognition :
テキスト認識 O O Face detection : 顔検出 O - Barcode scanning : バーコードスキャン O - Image labeling : 画像のラベル付け O O Landmark recognition : ランドマーク認識 - O Custom model inference : カスタムモデル推論 O -
on-device vs Cloud • on-device API • ローカルで動作、速い • Firebase
が機械学習のモデルをあらかじめダウンロードしてくれる • Cloud API • サーバーで処理、⾼機能 • ネットワーク接続が必要
Pricing https://firebase.google.com/pricing/ your account's first 1000 Cloud Vision API calls/month
are free
• Features • 画像からテキストを認識 • on-device API • 無料 •
全てのラテン⽂字を認識 • Cloud API • 毎⽉最初の 1000 API call は無料(1000+ からは従量課⾦) • 50 をこえる⾔語を認識(⽇本語含む) Text recognition (OCR) : テキスト認識
None
None
• Features • on-device API のみ • 顔の領域、ランドマーク(⽬・頬・⿐・⽿・⼝)の位置認識 • 顔の表情(⽬の開閉度合い、笑顔の度合い)の認識
• 動画のフレーム間で同じ顔をトラック可能 • 100以上の点から構成される2次元の輪郭情報(顔の外郭・⽬・眉・⿐・⼝) Face detection : 顔検出
Face contour https://firebase.google.com/docs/ml-kit/detect-faces
• Features • on-device API のみ • ほとんどの標準フォーマットをサポート • 1次元フォーマット
: Codabar, Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E • 2次元フォーマット : Aztec, Data Matrix, PDF417, QR Code • ⾃動フォーマット検出 • structured data の取り出し • バーコードの向きによらず検出可能 Barcode scanning : バーコードスキャン
format : 256 valueType : 9 rawValue : WIFI:S:SB1Guest;P:12345;T:WEP;; displayValue
: SB1Guest 12345 boundingBox : Rect(300, 457 - 669, 824) encryptionType : 3 ssid : SB1Guest password : 12345
• Features • 画像の内容を解析し、認識したもののラベルをつける : ⼈、物、場所、活動など • on-device API •
無料 • 400+ labels をサポート • Cloud API • 毎⽉最初の 1000 API call は無料(1000+ からは従量課⾦) • 10,000+ labels をサポート Image labeling : 画像のラベル付け
label : Building confidence : 0.77894384 entityId : /m/0cgh4 label
: Palace confidence : 0.75397676 entityId : /m/05zp8 label : landmark confidence : 0.9432406 entityId : /m/05_5t0l label : town confidence : 0.9333225 entityId : /m/0dx1j
label : Food confidence : 0.9649049 entityId : /m/02wbm label
: Cuisine confidence : 0.91778296 entityId : /m/01ykh label : food confidence : 0.9399401 entityId : /m/02wbm label : cuisine confidence : 0.9263104 entityId : /m/01ykh
val options = FirebaseVisionLabelDetectorOptions .Builder() .setConfidenceThreshold(0.9f) .build()
• Features • 画像から有名なランドマークを認識 • ランドマーク名 • 地理座標 • Knowledge
Graph entity ID • 画像内でのランドマークの領域 • 毎⽉最初の 1000 API call は無料(1000+ からは従量課⾦) Landmark detection : ランドマーク認識
landmark : Amsterdam Centraal Railway Station confidence : 0.86155003 entityId
: /m/0bbw52 locations : 52.378068, 4.899774 boundingBox : Rect(33, 504 - 956, 928) landmark : Amsterdam confidence : 0.5167069 entityId : /m/0k3p locations : 52.373811, 4.890951 boundingBox : Rect(187, 644 - 757, 843)
カスタムモデル推論 • Firebase で TensorFlow Lite のモデルをホスティング • Firebase SDK
がモデルのダウンロードをハンドリング • モデルの更新も可能 • apk にバンドルしたモデルを Firebase SDK 経由で利⽤することも可能 • on-device API として利⽤