Upgrade to Pro — share decks privately, control downloads, hide ads and more …

モバイルアプリで機械学習入門/introduction-to-machine-learning-in-mobile-app

marchin
December 09, 2021

 モバイルアプリで機械学習入門/introduction-to-machine-learning-in-mobile-app

marchin

December 09, 2021
Tweet

More Decks by marchin

Other Decks in Programming

Transcript

  1. 自己紹介 - 名前: 阿部 - 仕事: 主にAndroidエンジニア - 最近はサーバサイド Kotlinの仕事も始めました

    - 趣味 - コーヒー、ビール、アニメ、ゲーム、読書、 etc... - Twitter: @marchin_1989
  2. アジェンダ - on-device machine learning とは - MLKitの紹介 - MLKit

    Face Detectionの機能の説明とデモンストレーション
  3. on-device MLの例(スマホアプリ) - Google翻訳 - YouTube(AR Beauty Try-On) 出典: ITmedia

    NEWS https://www.itmedia.co.jp/news/articles/1906/20/news069.html 出典: Google Play https://play.google.com/store/apps/details?id=com.google.android.apps.translate
  4. on-device MLの機能を実装するためのフレームワーク - モバイル端末上で推論するためのフレー ムワーク。 - tensor flowで作ったモデルをtensor flow liteのモデルに変換できる

    - Android, iOS, IoTデバイスで利用可能 - TensorFLow hubに学習済みのモデルが 提供されていたりする - よくある機械学習のユースケースと学習済み モデルをラップして、使いやすくしたもの。 - 機能によってはカスタムの TensorFlow Lite のモデルが使える。 - Android, iOSで利用可能
  5. on-device MLをスクラッチで作成すると... 出典: Google I/O 2021 TensorFlowセッション ML Kit: Turnkey

    APIs to use on-device ML in mobile apps | Session https://www.youtube.com/watch?v=CQ8iEqblWtY
  6. ML Kitを使うと... 出典: Google I/O 2021 TensorFlowセッション ML Kit: Turnkey

    APIs to use on-device ML in mobile apps | Session https://www.youtube.com/watch?v=CQ8iEqblWtY
  7. Face detectionの機能 - 顔認識 - 画像内のどこに顔があるのか認識(複数の顔も可能) - 顔のトラッキング - 一度認識した顔を、流れてくる画像に対してトラッキングしてくれる。

    - ランドマーク - 顔の輪郭や、左目、右目、眉毛、口、鼻の位置などが画像内のどこにあるか - 分類 - 目が開いているのか、閉じているのか - 笑っているのか 出典: ML Kit Guides https://developers.google.com/ml-kit/vision/face-detection/face-detection-concepts
  8. TensorFlow Lite or MLKit? - まずはMLKitがおすすめ - 認識精度、パフォーマンスが悪いなど要件が合わなければ TensorFlow Liteを検討

    - 自前でモデルを作ったとしても、推論結果をアプリで使いやすいように実装する必要がある - MLKitが認識できない例 - どの国の国旗か - どの会社のロゴか - その人が誰なのか - どのブランドの製品なのか - どの昆虫の種類なのか
  9. on-device ML向けのモデルを作るには? - TensorFlowでモデルを作り、TensorFlow Liteに変換 - AutoML - TensorFlow Lite

    Model Maker - 転移学習を用いて、 on-device向けにモデルを作成できるライブラリ。