[TF Lite] TensorFlow Lite with OpenGL ES
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.
三、性能对比
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 */
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律