gpt4 book ai didi

android - 将 ML Kit 与 NNAPI 结合使用

转载 作者:行者123 更新时间:2023-11-30 09:04:57 25 4
gpt4 key购买 nike

我正在尝试在运行 Android 9 的 Android 设备上使用新的 Google 机器学习 sdk ML Kit。来自官方网站:

ML Kit makes it easy to apply ML techniques in your apps by bringing Google's ML technologies, such as the Google Cloud Vision API, TensorFlow Lite, and the Android Neural Networks API together in a single SDK. Whether you need the power of cloud-based processing, the real-time capabilities of mobile-optimized on-device models, or the flexibility of custom TensorFlow Lite models, ML Kit makes it possible with just a few lines of code.

我认为这意味着在至少具有Android 8.1的设备上(根据nnapi的文档),SDK可以使用NNAPI。但是,当我在 Android 7.1(不支持 nnapi)的设备上运行相同的应用程序时,我获得了与使用 Android 9(理论上是 NNAPI)的设备相同的性能。如何将 ML Kit 与 NNAPI 结合使用?我做错了什么吗?mlkit 文档链接:https://firebase.google.com/docs/ml-kit/

最佳答案

根据 2018 年 10 月的这篇论文:AI Benchmark: Running Deep Neural Networkson Android Smartphones ,当没有特定硬件和/或没有可用驱动程序时,NNAPI 默认为 CPU 路径。在本文的最后,它指出许多设备存在实现问题。

由于该论文的作者包括来自高通、ARM、华为、联发科和苏黎世联邦理工学院的代表,因此它可能是对 Android 机器学习现状最全面的概述。

2019 年 1 月,Google 宣布 TensorFlow Lite with GPU acceleration in developer preview这将解决本文中提出的一些问题。

2020 年 7 月更新:

研究人员有一个网站:http://ai-benchmark.com/

并于 2019 年 10 月更新了他们的论文: AI Benchmark: All About Deep Learning on Smartphones in 2019

关于android - 将 ML Kit 与 NNAPI 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54557026/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com