Awesome TensorFlow Lite
TensorFlow Liteを扱う資料や関連プロジェクトをまとめたAwesomeリストです。
目次
過去のお知らせ
TensorFlow Liteの過去の機能発表です。
- Announcement of the new converter - MLIRベースであり、マスクR-CNNやモバイルBERTなど、新しいモデルクラスの変換を可能にし、変換中の機能制御フローとエラーハンドリングをより改善します。夜間ビルドで既に有効になっています.
- Android Support Library - モバイル開発をより容易にします(Androidサンプルコード).
- Model Maker - 数行のコードで、カスタムimage & text分類モデルを作成できます。以下にコミュニティが提供したアイコン分類チュートリアルをご覧ください.
- On-device training - ついに到着!現在は画像分類用の転移学習に限定されていますが、非常に良いスタートです。公式のAndroidサンプルコードと、コミュニティから提供された別のサンプルコード(Blog | Android)をご覧ください.
- Hexagon delegate - Hexagon Delegateを使用して、モバイルおよびエッジデバイスでのモデル推論を高速化する方法について。また、ブログ記事 Accelerating TensorFlow Lite on Qualcomm Hexagon DSPsもご確認ください.
- Model Metadata - モデル記述の標準を提供し、同時にCode Gen and Android Studio ML Model Bindingを可能にします.
サンプル付きモデル
アプリ/デバイス実装と参考資料を備えたTensorFlow Liteモデルです。 注: MediaPipeの学習済みTensorFlow Liteモデルも含みます。MediaPipeの有無にかかわらず実装できます。
コンピュータービジョン
分類
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Classification | MobileNetV1 (download) | Android | iOS | Raspberry Pi | Overview | tensorflow.org |
| Classification | MobileNetV2 | Recognize Flowers on Android Codelab | Android | TensorFlow team |
| Classification | MobileNetV2 | Skin Lesion Detection Android | Community |
| Classification | MobileNetV2 | American Sign Language Detection | Colab Notebook | Android | Community |
| Classification | CNN + Quantisation Aware Training | Stone Paper Scissor Detection Colab Notebook | Flutter | Community |
| Classification | EfficientNet-Lite0 (download) | Icon Classifier Colab & Android | tutorial 1 | tutorial 2 | Community |
検出
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Object detection | Quantized COCO SSD MobileNet v1 (download) | Android | iOS | Overview | tensorflow.org |
| Object detection | YOLO | Flutter | Paper | Community |
| Object detection | YOLOv5 | Yolov5 Inference | Community |
| Object detection | MobileNetV2 SSD (download) | Reference | MediaPipe |
| Object detection | MobileDet (Paper) | Blog post (includes the TFLite conversion process) | MobileDet is from University of Wisconsin-Madison and Google and the blog post is from the Community |
| License Plate detection | SSD MobileNet (download) | Flutter | Community |
| Face detection | BlazeFace (download) | Paper | MediaPipe |
| Face Authentication | FaceNet | Flutter | Community |
| Hand detection & tracking | Palm detection & hand landmarks (download) | Blog post | Model card | Android | MediaPipe & Community |
セグメンテーション
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Segmentation | DeepLab V3 (download) | Android & iOS | Overview | Flutter Image | Realtime | Paper | tf.org & Community |
| Segmentation | Different variants of DeepLab V3 models | Models on TF Hub with Colab Notebooks | Community |
| Segmentation | DeepLab V3 model | Android | Tutorial | Community |
| Hair Segmentation | Download | Paper | MediaPipe |
スタイル変換
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Style transfer | Arbitrary image stylization | Overview | Android | Flutter | tf.org & Community |
| Style transfer | Better-quality style transfer models in .tflite | Models on TF Hub with Colab Notebooks | Community |
| Video Style Transfer | Download: Dynamic range models) | Android | Tutorial | Community |
| Segmentation & Style transfer | DeepLabV3 & Style Transfer models | Project repo | Android | Tutorial | Community |
生成
| Task | Model | App | Reference | Source |
|---|---|---|---|
| GANs | U-GAT-IT (Selfie2Anime) | Project repo | Android | Tutorial | Community |
| GANs | White-box CartoonGAN (download) | Project repo | Android | Tutorial | Community |
| GANs - Image Extrapolation | Boundless on TF Hub | Colab Notebook | Original Paper | Community |
姿勢推定
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Pose estimation | Posenet (download) | Android | iOS | Overview | tensorflow.org |
| Pose Classification based Video Game Control | MoveNet Lightning (download) | Project Repository | Community |
その他
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Low-light image enhancement | Models on TF Hub | Project repo | Original Paper | Flutter | |
| OCR | Models on TF Hub | Project Repository | Community |
テキスト
| Task | Model | Sample apps | Source |
|---|---|---|---|
| Question & Answer | DistilBERT | Android | Hugging Face |
| Text Generation | GPT-2 / DistilGPT2 | Android | Hugging Face |
| Text Classification | Download | Android |iOS | Flutter | tf.org & Community |
| Text Detection | CRAFT Text Detector (Paper) | Download | Project Repository | Blog1-Conversion to TFLite | Blog2-EAST vs CRAFT | Models on TF Hub | Android (Coming Soon) | Community |
| Text Detection | EAST Text Detector (Paper) | Models on TF Hub | Conversion and Inference Notebook | Community |
音声
| Task | Model | App | Reference | Source |
|---|---|---|---|
| Speech Recognition | DeepSpeech | Reference | Mozilla |
| Speech Recognition | CONFORMER | Inference Android | Community |
| Speech Synthesis | Tacotron-2, FastSpeech2, MB-Melgan | Android | TensorSpeech |
| Speech Synthesis(TTS) | Tacotron2, FastSpeech2, MelGAN, MB-MelGAN, HiFi-GAN, Parallel WaveGAN | Inference Notebook | Project Repository | Community |
推薦
| Task | Model | App | Reference | Source |
|---|---|---|---|
| On-device Recommendation | Dual-Encoder | Android | iOS | Reference | tf.org & Community |
ゲーム
モデル集
TensorFlow Liteモデル
These are the TensorFlow Lite models that could be implemented in apps and things:
- MobileNet - 事前学習済みのMobileNet v2およびv3モデル.
- TensorFlow Lite models
- TensorFlow Lite models - 公式AndroidおよびiOSのサンプルコードを提供しています.
- Pretrained models - 量子化および浮動小数点バリアントを提供しています.
- TensorFlow Hub - 「モデル形式 = TFLite」と設定することで、TensorFlow Liteモデルを検索できます.
TensorFlowモデル
These are TensorFlow models that could be converted to .tflite and then implemented in apps and things:
- TensorFlow models - 公式TensorFlowモデル.
- Tensorflow detection model zoo - COCO、KITTI、AVA v2.1、iNaturalist Speciesデータセットで事前学習済みです.
アイデアと着想
- E2E TFLite Tutorials - このリポジトリをチェックして、アプリアイデアやチュートリアルプロジェクトのサポートを受けてください。プロジェクトが完了したら、TensorFlow Liteモデル、サンプルコード、チュートリアルのリンクがこの素晴らしいリストに追加されます.
ML Kitのサンプル
ML Kit is a mobile SDK that brings Google’s ML expertise to mobile developers.
- 2019-10-01 ML Kit Translate demo - Material Design Android(Kotlin)サンプルを用いたチュートリアル - FirebaseのML Kitで、ライブカメラからのテキスト認識・分類・言語識別を行う.
- 2019-03-13 Computer Vision with ML Kit - Flutter In Focus.
- 2019-02-09 Flutter + MLKit: Business Card Mail Extractor - ブログ記事に含まれるFlutterサンプルコード.
- 2019-02-08 From TensorFlow to ML Kit: Power your Android application with machine learning - Android(Kotlin)サンプルコードを含む講演.
- 2018-08-07 Building a Custom Machine Learning Model on Android with TensorFlow Lite.
- 2018-07-20 ML Kit and Face Detection in Flutter.
- 2018-07-27 ML Kit on Android 4: Landmark Detection.
- 2018-07-28 ML Kit on Android 3: Barcode Scanning.
- 2018-05-31 ML Kit on Android 2: Face Detection.
- 2018-05-22 ML Kit on Android 1: Intro.
プラグインとSDK
- Edge Impulse - クラウド上でエッジデバイス用のTensorFlow Liteモデルを訓練するための@EdgeImpulseが作成されました.
- MediaPipe - Google AIが提供するクロスプラットフォーム(モバイル、デスクトップ、エッジTPU)AIパイプライン。(PM Ming Yong)| MediaPipe examples.
- Coral Edge TPU - Googleのエッジハードウェア.Coral Edge TPU examples.
- TensorFlow Lite Flutter Plugin - FlutterアプリでのTensorFlow Liteインタープリタのアクセスと推論を実行するためのDart APIを提供。tflite_flutter on pub.dev.
便利なリンク
- Netron - モデルを可視化するためのツール
- AI benchmark - スマートフォン上でコンピュータビジョンモデルをベンチマークするためのウェブサイト
- Performance measurement - AndroidおよびiOS上でモデルのパフォーマンスを測定する方法
- Material design guidelines for ML - 機械学習を活用した機能を設計する方法。良い例: ML Kit Showcase App。
- The People + AI Guide book - 人間中心のAI製品を設計する方法を学ぶ
- Adventures in TensorFlow Lite - TensorFlow Liteにおける非自明な変換プロセスおよび一般の探索を示すリポジトリ
- TFProfiler - AndroidベースのアプリでTensorFlow Liteモデルのプロファイリングおよびスマートフォンでのパフォーマンス測定を行う
- TensorFlow Lite for Microcontrollers
- TensorFlow Lite Examples - Android - TensorFlow公式ウェブサイトに含まれるすべてのTensorFlow Lite Android例をリファクタリング・リライトしたリポジトリ
- Tensorflow-lite-kotlin-samples - Kotlinで実装された異なる種類の example apps の実装を示すTensorFlow Lite Android例アプリのコレクション
学習資料
Interested but not sure how to get started? Here are some learning resources that will help you whether you are a beginner or a practitioner in the field for a while.
ブログ記事
- 2021-11-09 On-device training in TensorFlow Lite
- 2021-09-27 Optical character recognition with TensorFlow Lite: A new example app
- 2021-06-16 https://blog.tensorflow.org/2021/06/easier-object-detection-on-mobile-with-tf-lite.html
- 2020-12-29 YOLOv3 to TensorFlow Lite Conversion - Nitin Tiwariによって作成
- 2020-04-20 What is new in TensorFlow Lite - Khanh LeVietによって作成
- 2020-04-17 Optimizing style transfer to run on mobile with TFLite - Khanh LeVietおよびLuiz Gustavo Martinsによって作成
- 2020-04-14 How TensorFlow Lite helps you from prototype to product - Khanh LeVietによって作成
- 2019-11-08 Getting Started with ML on MCUs with TensorFlow - Brandon Satromによって作成
- 2019-08-05 TensorFlow Model Optimization Toolkit — float16 quantization halves model size - TensorFlowチームによって作成
- 2018-07-13 Training and serving a real-time mobile object detector in 30 minutes with Cloud TPUs - Sara Robinson、Aakanksha Chowdhery、およびJonathan Huangによって作成
- 2018-06-11 - Why the Future of Machine Learning is Tiny - Pete Wardenによって作成
- 2018-03-30 - Using TensorFlow Lite on Android) - Laurence Moroneyによって作成
書籍
- 2021-12-01 AI and Machine Learning On-Device Development (早期アクセス) - Laurence Moroneyによって作成(@lmoroney)
- 2020-10-01 AI and Machine Learning for Coders - Laurence Moroneyによって作成(@lmoroney)
- 2020-04-06 Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter: 実世界のスケーラブルなプロジェクトを構築して、AndroidおよびiOS(GitHub)上で端末から端末までをカバーするニューラルネットワークを実装する - Anubhav Singh(@xprilion)とRimjhim Bhadani(@Rimjhim28)による。
- 2020-03-01 Raspberry Pi for Computer Vision (Complete Bundle | TOC) - PyImageSearchチームによる:Adrian Rosebrock(@PyImageSearch)、David Hoffman、Asbhishek Thanki、Sayak Paul(@RisingSayak)、およびDavid Mcduffee。
- 2019-12-01 TinyML - Pete Warden(@petewarden)とDaniel Situnayake(@dansitu)による。
- 2019-10-01 Practical Deep Learning for Cloud, Mobile, and Edge - Anirudh Koul(@AnirudhKoul)、Siddha Ganju(@SiddhaGanju)、およびMeher Kasam(@MeherKasam)による。
動画
- 2021-10-06 Contributing to TensorFlow Lite with Sunit Roy (Hacktoberfest 2021)
- 2020-07-25 Android ML by Hoi Lam (GDG Kolkata メートアップ)。
- 2020-04-01 Easy on-device ML from prototype to production (TF Dev Summit 2020)。
- 2020-03-11 TensorFlow Lite: ML for mobile and IoT devices (TF Dev Summit 2020)。
- 2019-10-31 Keynote - TensorFlow Lite: ML for mobile and IoT devices.
- 2019-10-31 TensorFlow Lite: Solution for running ML on-device.
- 2019-10-31 TensorFlow model optimization: Quantization and pruning.
- 2019-10-29 Inside TensorFlow: TensorFlow Lite.
- 2018-04-18 TensorFlow Lite for Android (Coding TensorFlow).
ポッドキャスト
- 2020-08-08 Talking Machine Learning with Hoi Lam.
MOOC
- Introduction to TensorFlow Lite - Daniel Situnayake(@dansitu)によるUdacityコース、Paige Bailey(@DynamicWebPaige)、およびJuan Delgadoによる。
- Device-based Models with TensorFlow Lite - Laurence Moroney(@lmoroney)によるCourseraコース。
- The Future of ML is Tiny and Bright - ハーバード大学とGoogleが共同で開発したedXコースシリーズ。講師:Vijay Janapa Reddi、Laurence Moroney、およびPete Warden。