Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
tensorflow
GitHub Repository: tensorflow/docs-l10n
Path: blob/master/site/zh-cn/lite/guide/hosted_models.md
25118 views

托管模型

下面是一个不完整列表,其中包括为兼容 TensorFlow Lite 而进行优化的预训练模型。

要开始选择模型,请访问带有端到端示例的模型页面,或者从 TensorFlow Hub 中选择 TensorFlow Lite 模型

注:适用于某个给定应用的最佳模型取决于您的要求。例如,某些应用可能受益于较高的准确率,而另一些应用则需要较小的模型大小。您应该使用各种模型来测试您的应用,在大小、性能和准确率之间找到最佳平衡。

图像分类

有关图像分类的更多信息,请参阅图像分类。探索 TensorFlow Lite Task 库,以获取有关如何在短短几行代码中集成图像分类模型的说明。

量化模型

量化图像分类模型可以提供最小的模型大小和最快的性能,但以牺牲准确率为代价。性能值在运行 Android 10 的 Pixel 3 上测得。

您可以在 TensorFlow Hub 中找到许多量化模型,并获取更多模型信息。

模型名称论文和模型模型大小Top-1 准确率Top-5 准确率CPU(4 线程)NNAPI
Mobilenet_V1_0.25_128_quant论文tflite&pb0.5 Mb39.5%64.4%0.8 毫秒2 毫秒
Mobilenet_V1_0.25_160_quant论文tflite&pb0.5 Mb42.8%68.1%1.3 毫秒2.4 毫秒
Mobilenet_V1_0.25_192_quant论文tflite&pb0.5 Mb45.7%70.8%1.8 毫秒2.6 毫秒
Mobilenet_V1_0.25_224_quant论文tflite&pb0.5 Mb48.2%72.8%2.3 毫秒2.9 毫秒
Mobilenet_V1_0.50_128_quant论文tflite&pb1.4 Mb54.9%78.1%1.7 毫秒2.6 毫秒
Mobilenet_V1_0.50_160_quant论文tflite&pb1.4 Mb57.2%80.5%2.6 毫秒2.9 毫秒
Mobilenet_V1_0.50_192_quant论文tflite&pb1.4 Mb59.9%82.1%3.6 毫秒3.3 毫秒
Mobilenet_V1_0.50_224_quant论文tflite&pb1.4 Mb61.2%83.2%4.7 毫秒3.6 毫秒
Mobilenet_V1_0.75_128_quant论文tflite&pb2.6 Mb55.9%79.1%3.1 毫秒3.2 毫秒
Mobilenet_V1_0.75_160_quant论文tflite&pb2.6 Mb62.4%83.7%4.7 毫秒3.8 毫秒
Mobilenet_V1_0.75_192_quant论文tflite&pb2.6 Mb66.1%86.2%6.4 毫秒4.2 毫秒
Mobilenet_V1_0.75_224_quant论文tflite&pb2.6 Mb66.9%86.9%8.5 毫秒4.8 毫秒
Mobilenet_V1_1.0_128_quant论文tflite&pb4.3 Mb63.3%84.1%4.8 毫秒3.8 毫秒
Mobilenet_V1_1.0_160_quant论文tflite&pb4.3 Mb66.9%86.7%7.3 毫秒4.6 毫秒
Mobilenet_V1_1.0_192_quant论文tflite&pb4.3 Mb69.1%88.1%9.9 毫秒5.2 毫秒
Mobilenet_V1_1.0_224_quant论文tflite&pb4.3 Mb70.0%89.0%13 毫秒6.0 毫秒
Mobilenet_V2_1.0_224_quant论文tflite&pb3.4 Mb70.8%89.9%12 毫秒6.9 毫秒
Inception_V1_quant论文tflite&pb6.4 Mb70.1%89.8%39 毫秒36 毫秒
Inception_V2_quant论文tflite&pb11 Mb73.5%91.4%59 毫秒18 毫秒
Inception_V3_quant论文tflite&pb23 Mb77.5%93.7%148 毫秒74 毫秒
Inception_V4_quant论文tflite&pb41 Mb79.5%93.9%268 毫秒155 毫秒

注:模型文件包括 TF Lite FlatBuffer 和 Tensorflow 冻结计算图。

注:性能数值来自在 Pixel-3 (Android 10) 上进行的基准测试。准确率数值使用 TFLite 图像分类评估工具计算得出。

浮点模型

浮点模型可以提供最佳的准确率,但以牺牲模型的大小和性能为代价。GPU 加速需要使用浮点模型。性能值在运行 Android 10 的 Pixel 3 上测得。

您可以在 TensorFlow Hub 中找到许多图像分类模型,并获取更多模型信息。

模型名称论文和模型模型大小Top-1 准确率Top-5 准确率CPU(4 线程)GPUNNAPI
DenseNet论文tflite&pb43.6 Mb64.2%85.6%195 毫秒60 毫秒1656 毫秒
SqueezeNet论文tflite&pb5.0 Mb49.0%72.9%36 毫秒9.5 毫秒18.5 毫秒
NASNet mobile论文tflite&pb21.4 Mb73.9%91.5%56 毫秒---102 毫秒
NASNet large论文tflite&pb355.3 Mb82.6%96.1%1170 毫秒---648 毫秒
ResNet_V2_101论文tflite&pb178.3 Mb76.8%93.6%526 毫秒92 毫秒1572 毫秒
Inception_V3论文tflite&pb95.3 Mb77.9%93.8%249 毫秒56 毫秒148 毫秒
Inception_V4论文tflite&pb170.7 Mb80.1%95.1%486 毫秒93 毫秒291 毫秒
Inception_ResNet_V2论文tflite&pb121.0 Mb77.5%94.0%422 毫秒100 毫秒201 毫秒
Mobilenet_V1_0.25_128论文tflite&pb1.9 Mb41.4%66.2%1.2 毫秒1.6 毫秒3 毫秒
Mobilenet_V1_0.25_160论文tflite&pb1.9 Mb45.4%70.2%1.7 毫秒1.7 毫秒3.2 毫秒
Mobilenet_V1_0.25_192论文tflite&pb1.9 Mb47.1%72.0%2.4 毫秒1.8 毫秒3.0 毫秒
Mobilenet_V1_0.25_224论文tflite&pb1.9 Mb49.7%74.1%3.3 毫秒1.8 毫秒3.6 毫秒
Mobilenet_V1_0.50_128论文tflite&pb5.3 Mb56.2%79.3%3.0 毫秒1.7 毫秒3.2 毫秒
Mobilenet_V1_0.50_160论文tflite&pb5.3 Mb59.0%81.8%4.4 毫秒2.0 毫秒4.0 毫秒
Mobilenet_V1_0.50_192论文tflite&pb5.3 Mb61.7%83.5%6.0 毫秒2.5 毫秒4.8 毫秒
Mobilenet_V1_0.50_224论文tflite&pb5.3 Mb63.2%84.9%7.9 毫秒2.8 毫秒6.1 毫秒
Mobilenet_V1_0.75_128论文tflite&pb10.3 Mb62.0%83.8%5.5 毫秒2.6 毫秒5.1 毫秒
Mobilenet_V1_0.75_160论文tflite&pb10.3 Mb65.2%85.9%8.2 毫秒3.1 毫秒6.3 毫秒
Mobilenet_V1_0.75_192论文tflite&pb10.3 Mb67.1%87.2%11.0 毫秒4.5 毫秒7.2 毫秒
Mobilenet_V1_0.75_224论文tflite&pb10.3 Mb68.3%88.1%14.6 毫秒4.9 毫秒9.9 毫秒
Mobilenet_V1_1.0_128论文tflite&pb16.9 Mb65.2%85.7%9.0 毫秒4.4 毫秒6.3 毫秒
Mobilenet_V1_1.0_160论文tflite&pb16.9 Mb68.0%87.7%13.4 毫秒5.0 毫秒8.4 毫秒
Mobilenet_V1_1.0_192论文tflite&pb16.9 Mb69.9%89.1%18.1 毫秒6.3 毫秒10.6 毫秒
Mobilenet_V1_1.0_224论文tflite&pb16.9 Mb71.0%89.9%24.0 毫秒6.5 毫秒13.8 毫秒
Mobilenet_V2_1.0_224论文tflite&pb14.0 Mb71.8%90.6%17.5 毫秒6.2 毫秒11.23 毫秒

AutoML 移动端模型

下列图像分类模型使用 Cloud AutoML 创建。性能值在运行 Android 10 的 Pixel 3 上测定。

您可以在 TensorFlow Hub 中找到这些模型,并获取更多模型信息。

模型名称论文和模型模型大小Top-1 准确率Top-5 准确率CPU(4 线程)GPUNNAPI
MnasNet_0.50_224论文tflite&pb8.5 Mb68.03%87.79%9.5 毫秒5.9 毫秒16.6 毫秒
MnasNet_0.75_224论文tflite&pb12 Mb71.72%90.17%13.7 毫秒7.1 毫秒16.7 毫秒
MnasNet_1.0_96论文tflite&pb17 Mb62.33%83.98%5.6 毫秒5.4 毫秒12.1 毫秒
MnasNet_1.0_128论文tflite&pb17 Mb67.32%87.70%7.5 毫秒5.8 毫秒12.9 毫秒
MnasNet_1.0_160论文tflite&pb17 Mb70.63%89.58%11.1 毫秒6.7 毫秒14.2 毫秒
MnasNet_1.0_192论文tflite&pb17 Mb72.56%90.76%14.5 毫秒7.7 毫秒16.6 毫秒
MnasNet_1.0_224论文tflite&pb17 Mb74.08%91.75%19.4 毫秒8.7 毫秒19 毫秒
MnasNet_1.3_224论文tflite&pb24 Mb75.24%92.55%27.9 毫秒10.6 毫秒22.0 毫秒

注:性能数值来自在 Pixel-3 (Android 10) 上进行的基准测试。准确率数值使用 TFLite 图像分类评估工具计算得出。

物体检测

有关物体检测的更多信息,请参阅物体检测。探索 TensorFlow Lite Task 库,以获取有关如何在短短几行代码中集成物体检测模型的说明。

请从 TensorFlow Hub 中获取物体检测模型

姿势预测

有关姿态估计的更多信息,请参阅姿势预测

请从 TensorFlow Hub 中获取姿势预测模型

图像分割

有关图像分割的更多信息,请参阅分割。探索 TensorFlow Lite Task 库,以获取有关如何在短短几行代码中集成图像分割模型的说明。

请从 TensorFlow Hub 中获取图像分割模型

问答

有关使用 MobileBERT 进行问答的更多信息,请参阅问答。探索 TensorFlow Lite Task 库,以获取有关如何在短短几行代码中集成问答模型的说明。

请从 TensorFlow Hub 中获取 Mobile BERT 模型

智能回复

有关智能回复的更多信息,请参阅智能回复

请从 TensorFlow Hub 中获取智能回复模型