[TF Lite] TensorFlow Lite with OpenGL ES

2019/11/16 11:07
阅读数 137

TensorFlow Lite

一、源码

Ref: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite

 

二、性能实测

Ref: TensorFlow Lite GPU 代理,40 ms,即是22fps。

Ref: TensorFlow Lite 2019 Roadmap,OpenCL and Vulkan support on Android.

 

三、性能对比

Ref:  https://www.tensorflow.org/lite/models/object_detection/overview
 
Android手机
模型名称 设备 平均推理时间
Mobilenet_1.0_224(float) Pixel 2 123.3 ms
Pixel XL 113.3 ms
Mobilenet_1.0_224 (quant) Pixel 2 65.4 ms
Pixel XL 74.6 ms
NASNet mobile Pixel 2 273.8 ms
Pixel XL 210.8 ms
SqueezeNet Pixel 2 234.0 ms
Pixel XL 158.0 ms
Inception_ResNet_V2 Pixel 2 2846.0 ms
Pixel XL 1973.0 ms
Inception_V4 Pixel 2 3180.0 ms
Pixel XL 2262.0 ms

 

iPhone手机

模型名称 设备 平均推理时间
Mobilenet_1.0_224(float) iPhone 8 32.2 ms
Mobilenet_1.0_224 (quant) iPhone 8 24.4 ms
NASNet mobile iPhone 8 60.3 ms
SqueezeNet iPhone 8 44.3
Inception_ResNet_V2 iPhone 8 562.4 ms
Inception_V4 iPhone 8 661.0 ms
 
 
2019年的旗舰手机

Performance benchmark numbers are generated with the tool described here.

Model Name Model size Device GPU CPU
COCO SSD MobileNet v1 27 Mb Pixel 3 (Android 10) 22ms 46ms*
Pixel 4 (Android 10) 20ms 29ms*
iPhone XS (iOS 12.4.1) 7.6ms 11ms**

* 4 threads used.

** 2 threads used on iPhone for the best performance result.

 

 

 

TensorFlow Lite GPU delegate

一、Demo App Tutorials

Ref: https://www.tensorflow.org/lite/performance/gpu 

 

 

 

 

 

 

 

 /* implement */

 

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部