link kit sdk_ML Kit SDK使所有机器学习都在设备上

link kit sdk

Google has introduced a new ML Kit SDK aimed at working in standalone mode without requiring tight integration with Firebase, as the original ML Kit did. There are now more than 25,000 applications on Android and iOS which are using ML Kit’s features, up from just a handful at its introduction in May 2018. This shows that ML is an important part of many applications and its on-device dedicated version can increase its popularity.

Google推出了一个新的ML Kit SDK,其目的是在独立模式下工作,而无需像原始ML Kit那样与Firebase紧密集成。 如今,Android和iOS上有超过25,000个应用程序在使用ML Kit的功能,而2018年5月才推出了少数应用程序。这表明ML是许多应用程序的重要组成部分,并且其设备专用版本可能会增加它的受欢迎程度。

With the transition from ML Kit for Firebase’s on-device APIs to the standalone ML Kit SDK, a face contours model, which can detect over 100 points in and around a user’s face and overlay masks and beautification elements atop them, has been added to the list of APIs shipped through Google Play Services. This may help to reduce the size of apps that are using these features. Beyond this, Android Jetpack Lifecycle support has been added to all ML Kit APIs, making easier integration with the CameraX support library. As we can see Google provides global changes that optimize most of Machine Learning features and integration needs.

随着从用于Firebase的设备上API的ML Kit到独立的ML Kit SDK的过渡,一个面部轮廓模型可以检测到用户面部及其周围的100多个点,并在其上方覆盖蒙版和美化元素。通过Google Play服务提供的API列表。 这可能有助于减小使用这些功能的应用程序的大小。 除此之外,Android Jetpack Lifecycle支持已添加到所有ML Kit API中,从而使与CameraX支持库的集成更加容易。 如我们所见,Google提供了全局更改,可优化大多数机器学习功能和集成需求。

ML Kit SDK is now fully focused on on-device machine learning, it offers

ML Kit SDK现在完全专注于设备上的机器学习,它提供了

  • fast, unlocking real-time use cases, because processing happens on the device and there is no network latency,

    快速,解锁的实时用例,因为处理是在设备上进行的,并且没有网络延迟,

  • works offline so even when the network is spotty or your app’s end-user is in an area without connectivity it works,

    可以离线运行,因此即使网络不正常或您的应用的最终用户位于无法连接的区域,它也可以正常工作,

  • privacy is retained: since all processing is performed locally, there is no need to send sensitive user data over the network to a server.

    保留隐私 :由于所有处理都在本地执行,因此无需通过网络将敏感的用户数据发送到服务器。

ML Kit SDK retains its original feature set covering vision and natural language processing. Vision-related features include barcode scanning, face detection, image labeling, object detection and tracking, and text recognition. Natural language-related features include language identification from a string of text, on-device translation, and smart reply. Additionally, it introduces two new APIs that provide Entity Extraction, to detect text entities and make them actionable, and Pose Detection, which supports 33 skeletal points and makes possible hands and feet tracking. The new APIs are available to interested developers through the early access program.

ML Kit SDK保留其原始功能集,涵盖视觉和自然语言处理。 与视觉相关的功能包括条形码扫描,面部检测,图像标记,物体检测和跟踪以及文本识别。 与自然语言相关的功能包括从一串文本进行语言识别,设备上翻译和智能回复。 此外,它引入了两个新的API,它们提供了实体提取功能以检测文本实体并使它们可操作,而姿势检测则支持33个骨骼点并可以进行手脚跟踪。 有兴趣的开发人员可以通过早期访问计划获得新的API。

Image for post
Pose Detection (early access program)
姿势检测(早期访问程序)

Code differences compared to old API are rather not huge, in most cases, only Firebase word was removed from class names and the API/methods stay almost the same.

与旧API相比,代码差异不是很大,在大多数情况下,仅从类名称中删除了Firebase单词,并且API /方法几乎保持不变。

Here is an example of a face detector which looks quote similar like Firebase ML Kit API:

这是面部检测器的示例,其外观类似于Firebase ML Kit API:


val imageLabeler = ImageLabeling.getClient(ImageLabelerOptions.DEFAULT_OPTIONS)
lifecycle.addObserver(imageLabeler)
val objectDetector = ObjectDetection.getClient(ObjectDetectorOptions.DEFAULT_OPTIONS)
val faceDetector = FaceDetection.getClient(options)
val localModel =
AutoMLImageLabelerLocalModel.Builder()
.setAssetFilePath("automl/manifest.json")
.build()
val autoMLImageLabeler =
ImageLabeling.getClient(
AutoMLImageLabelerOptions.Builder(localModel)
.setConfidenceThreshold(0.3F).build())

In the case of performance, the new SDK is faster than Firebase one which mostly depends on Internet connection, so it is difficult to compare them in that case. We should remember that the new SDK was created to do Machine Learning offline on the device and in that case It works better.

就性能而言,新SDK比主要依赖Internet连接的Firebase更快,因此在这种情况下很难对其进行比较。 我们应该记住,新的SDK是为在设备上离线进行机器学习而创建的,在这种情况下,它可以更好地工作。

Google mentions that for the time being, ML Kit will continue to work with Firebase features like A/B testing, Cloud Firestore and that the cloud-based APIs and model deployment will remain available through Firebase Machine Learning. However, developers who wish to take advantage of the new features and updates should switch to the new standalone SDK.

Google提到ML Kit暂时将继续与Firebase功能一起使用,例如A / B测试,Cloud Firestore,并且基于云的API和模型部署将可通过Firebase Machine Learning继续使用。 但是,希望利用新功能和更新的开发人员应切换到新的独立SDK。

This article is the second one of my ML Kit seriesStay turned

本文是我的ML套件系列的第二篇

翻译自: https://medium.com/mobilepeople/ml-kit-sdk-keeps-all-machine-learning-on-the-device-4cc581696afd

link kit sdk

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值