[Tensorflow] Android Meets TensorFlow

TF走向手机领域

一、2017峰会

From: TensorFlow Dev Summit 2017

From: Android Meets TensorFlow: How to Accelerate Your App with AI (Google I/O '17)

Start from 12:47 / 39:07

 

  • 关于布置

 

  • 关于优化

内存带宽是瓶颈,计算反而次要些。

 

优化的几个角度,such as Inception v3, is 93MB --> 24MB

 

  • 压缩的一种方式

 

  • 一个例子

自动分类黄瓜,使用草莓π。

 

握手机的行为识别。

 

From: On-device machine learning: TensorFlow on Android (Google Cloud Next '17)

 

 

二、参考应用

From: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android/

很好的官方例子,以及例子的演示:

Mobile and Embedded TensorFlow (TensorFlow Dev Summit 2017)

    1. TF Classify: Uses the Google Inception model to classify camera frames in real-time, displaying the top results in an overlay on the camera image.
    2. TF Detect: Demonstrates an SSD-Mobilenet model trained using the Tensorflow Object Detection API introduced in Speed/accuracy trade-offs for modern convolutional object detectors to localize and track objects (from 80 categories) in the camera preview in real-time.
    3. TF Stylize: Uses a model based on A Learned Representation For Artistic Style to restyle the camera preview image to that of a number of different artists.
    4. TF Speech: Runs a simple speech recognition model built by the audio training tutorial. Listens for a small set of words, and highlights them in the UI when they are recognized.

 

 

 

三、硬件支持

 高通芯片:Qualcomm Snapdragon 820 Processor featuring the Hexagon DSP

 

 

 

 

TensorFlow Lite

一、正式发布

From: 终于!谷歌移动端深度学习框架TensorFlow Lite正式发布(2017.12)

机器之心 2017-11-15

TensorFlow Lite 已经支持多个面向移动端训练和优化的模型:

    • MobileNet:一种能够识别超过 1000 种不同物体的视觉模型,专为移动端和嵌入式设备设计;

    • Inception V3:一种图像识别模型,功能上类似于 MobileNet,但能提供更高的准确率(当然模型也更大);

    • Smart Reply:一种设备端对话模型,能对接收到的会话聊天信息提供触发性应答。第一方和第三方通信 App 可在 Android Wear 上使用该特性。

Inception v3 和 MobileNet 都在 ImageNet 数据集上训练过,你可以通过迁移学习轻松地在自己的图像数据集上重新训练这些模型。

 

二、非 TensorFlow Mobile API

优先TensorFlow Lite,而非TensorFlow Mobile API。

如你所知,TensorFlow 已经支持通过 TensorFlow Mobile API 在移动端和嵌入端部署模型。

进一步来说,TensorFlow Lite 可以看作 TensorFlow Mobile 的升级,它成熟之后,就可以作为在移动设备、嵌入设备上部署模型的首要推荐。

此次公开的 TensorFlow Lite 是开发者预览版,而 TensorFlow Mobile 依旧支持 APP 开发。

 

End.

posted @ 2017-10-19 17:46  郝壹贰叁  阅读(303)  评论(0编辑  收藏  举报