plant-raspberrypi3のブログ

ラズベリーパイ3とPythonに挑戦して、植物を愛でたり画像を加工したりします。最近はscikit-imageの勉強してます。

ラズパイでも使えるTensorflowの公式版 Tensorflow Lite

こんにちは。らずべりーです。

先日TensorflowとKerasの環境構築をしていたのですが、

plant-raspberrypi3.hatenablog.com

今日、Tensorflowについて調べていたら、モバイル用のTensorflowLiteなるものが公式からリリースされているのを知りました。最新版ではラズパイのサポートが追加されているそうです。

developers.googleblog.com

引用

We're also sharing the latest updates to TensorFlow Lite, TensorFlow's lightweight, cross-platform solution for deploying trained ML models on mobile and other edge devices. In addition to existing support for Android and iOS, we're announcing support for Raspberry Pi, increased support for ops/models (including custom ops), and describing how developers can easily use TensorFlow Lite in their own apps. The TensorFlow Lite core interpreter is now only 75KB in size (vs 1.1 MB for TensorFlow) and we're seeing speedups of up to 3x when running quantized image classification models on TensorFlow Lite vs. TensorFlow.

Google翻訳

また、TensorFlowの軽量でクロスプラットフォームのソリューションであるTensorFlow Liteの最新のアップデートを共有し、訓練されたMLモデルをモバイルデバイスやその他のエッジデバイスに導入しています。 AndroidiOSの既存のサポートに加えて、Raspberry Piのサポート、ops /モデル(カスタム操作を含む)に対するサポートの強化、開発者がTensorFlow Liteを自分のアプリケーションで簡単に使用する方法について説明します。 TensorFlow Liteコアインタプリタのサイズは現在75KB(TensorFlowの場合は1.1MB)で、TensorFlow LiteとTensorFlowの両方で量子化画像分類モデルを実行すると、最大3倍のスピードアップが見られます。

TensorflowLiteへのリンク:

Introduction to TensorFlow Lite  |  TensorFlow

github.com

ラズパイさん用のセットアップページはこちら。

github.com

関連ニュース記事(日本語):

tech.nikkeibp.co.jp

blog.gclue.com

学習済みモデルを専用のフォーマット(.tflite)に変換して使用するらしいので、リアルタイム画像認識などにはこちらのほうがよいのかもしれませんね。

また時間が丸っと空いたら試してみたいところ。