ml kit_在移动应用程序开发中使用ML Kit的原因

ml kit

Recently, a growing interest to Machine Learning forced the companies to focus and invest on it. Machine Learning (ML) is the field of computational science, which focuses on analyzing and interpreting patterns and structures in data to enable learning, reasoning, and decision making outside of human being interaction. As a result, the introduction of new mobile SDK called ML Kit has been a prominent topic in the IT industry. Today, more than 25,000 applications on Android and iOS make use of ML Kit’s features. This essay aims to introduce and discuss ML Kit as an advanced SDK for having smarter mobile apps.

最近,对机器学习的兴趣日益浓厚,迫使公司专注于此并进行投资。 机器学习(ML)是计算科学领域,其重点是分析和解释数据中的模式和结构,以使人们能够进行交互之外的学习,推理和决策。 因此,引入新的称为ML Kit的移动SDK成为IT行业的一个突出主题。 如今,Android和iOS上有超过25,000个应用程序使用ML Kit的功能。 本文旨在介绍和讨论ML Kit作为具有更智能移动应用程序的高级SDK。

简介与概述 (Introduction and Overview)

Nowadays, Machine learning (ML) is an exciting field of research in computer science and engineering. It is considered a subset of Artificial Intelligence (AI) because it enables the extraction of meaningful patterns from samples, which is a capability of human intelligence. The demand of having a computer that performs repetitive and well-defined tasks is clear: computers will perform a given task consistently and tirelessly, but these tasks would be difficult to accomplish for human. Recently, machines have showed the ability to learn and even master tasks that were thought to be extremely complicated for machines, showing that machine learning algorithms are potentially useful elements of detection and decision support systems. Another exciting point is the finding that in some situations, computers seem to be able to observe patterns that are beyond human perception. This discovery has led to substantial and increased interest in the major of machine learning in various areas. At a high level, machine learning is the process of teaching a computer system how to make accurate predictions when fed data. Those predictions could be answering whether a piece of fruit in a photo is a banana or an apple, spotting people crossing the road in front of a self-driving car, whether the use of the word book in a sentence relates to a paperback or a hotel reservation, whether an email is spam, or recognizing speech accurately enough to generate captions for a video. The key difference between traditional computer software and machine learning approach is that a human developer has not written codes that instructs the system how to tell the difference between the banana and the apple. Instead, a machine-learning model has been taught how to reliably discriminate between the fruits by training on a large amount of data, in this instance likely a massive number of images labelled as containing a banana or an apple.

如今,机器学习(ML)是计算机科学与工程领域一个令人兴奋的研究领域。 它被认为是人工智能(AI)的子集,因为它可以从样本中提取有意义的模式,这是人类的一种能力。 拥有一台执行重复性和定义明确的任务的计算机的需求显而易见:计算机将始终如一且不知疲倦地执行给定任务,但是这些任务对于人类而言将很难完成。 最近,机器已经显示出学习甚至掌握被认为对机器来说极其复杂的任务的能力,这表明机器学习算法是检测和决策支持系统的潜在有用元素。 另一个令人兴奋的发现是,在某些情况下,计算机似乎能够观察到人类无法感知的模式。 这一发现导致人们对各个领域的机器学习领域产生了浓厚的兴趣,并增加了兴趣。 从高层次上讲,机器学习是教会计算机系统如何在馈入数据时进行准确预测的过程。 这些预测可能会回答照片中的水果是香蕉还是苹果,发现人们在无人驾驶汽车前横过马路,句子中使用的单词书是平装本还是旅馆预订,无论电子邮件是垃圾邮件,还是识别语音的准确性足以产生视频字幕。 传统计算机软件和机器学习方法之间的主要区别在于,人类开发人员尚未编写代码来指示系统如何分辨香蕉和苹果之间的区别。 取而代之的是,已经教了一种机器学习模型,该模型如何通过训练大量数据来可靠地区分水果,在这种情况下,可能是大量标记为包含香蕉或苹果的图像。

Machine learning (ML) is the study of computer algorithms that enhance automatically through experience. It is seen as a subset of Artificial Intelligence (AI). Machine learning algorithms build a mathematical model based on sample data, known as “training data”, in order to make predictions or decisions without being explicitly programmed to do.

机器学习 ( ML )是对计算机算法的研究,这些算法会根据经验自动增强。 它被视为人工智能(AI)的子集。 机器学习算法基于样本数据(称为“训练数据”)建立数学模型,以便进行预测或决策而无需明确地编程。

ml kit_在移动应用程序开发中使用ML Kit的原因_第1张图片
Oracle Oracle提供

In fact, we use algorithms to learn from data and then we make predictions about similar data that has not been seen before by using Machine Learning. Thus, it would be a two-step process: training and inference. First, the model learns, and then we use it to make predictions. The process of model learning is what we typically call training, and when the model is making predictions about the data is what we call inference. This is a high-level view of what is happening during training the model for extracting knowledge from input data with using prediction and decision. Because we know what the right answer in our case, we are able to calculate the errors that occurs many times. As a result, we use these errors to enhance our model, and this process is repeated many times until we reach the point that we make sure that the model is good enough or that this is the best result that we can do. This involves a number of steps and preparations and that is why we have to use a framework to make this easier.

实际上,我们使用算法从数据中学习,然后使用机器学习对之前未见过的相似数据进行预测。 因此,这将分为两个步骤:训练和推理。 首先,模型学习,然后我们使用它进行预测。 模型学习的过程通常称为训练,而模型对数据进行预测时则称为推理。 这是培训模型的高层视图,该模型用于使用预测和决策从输入数据中提取知识。 因为我们知道正确的答案,所以我们能够计算出多次发生的错误。 结果,我们使用这些错误来增强我们的模型,并且重复此过程很多次,直到达到确保模型足够好或这是我们可以做到的最佳结果的程度。 这涉及许多步骤和准备工作,这就是为什么我们必须使用框架来简化此过程的原因。

Machine Learning (ML) is the science of computer algorithms that improve automatically through past experiences.

机器学习(ML)是计算机算法的科学,可根据过去的经验自动改进。

To sum up this section, Machine Learning is considered as a subset of AI, which uses statistical methods to enable machines to improve with experience. It enables a computer system to make decisions to carry out a certain task. These programs or algorithms are designed in such a way, which they can learn and enhance over time by observing new data. The aim of machine learning is to derive meaning from data. Thus, data is the key to unlock Machine Learning. The more qualified data ML has, the more accurate the ML algorithm becomes.

总结本节,机器学习被视为AI的一个子集,它使用统计方法来使机器根据经验进行改进。 它使计算机系统能够决策执行某项任务。 这些程序或算法的设计方式是,它们可以通过观察新数据随着时间的推移而学习和增强。 机器学习的目的是从数据中获取意义。 因此,数据是解锁机器学习的关键。 ML拥有的数据越多,则ML算法变得越准确。

Machine Learning is the extraction of knowledge from data.

机器学习是从数据中提取知识。

AI和ML之间的区别 (Difference between AI and ML)

Basically, the goal of Artificial Intelligence is to create a machine that can mimic a human mind, and it needs learning capabilities as well. However, it is more than just about learning; it is also about knowledge representation, reasoning and abstract thinking. In contrast, Machine Learning is solely focused on writing software that can learn from past experiences. Besides, Machine Learning is more closely related to Data Mining and Statistics than it is to Artificial Intelligence.

基本上,人工智能的目标是创建一种可以模仿人类思维的机器,并且它还需要学习能力。 但是,这不仅仅是学习。 它还涉及知识表示,推理和抽象思维。 相反,机器学习仅专注于编写可以从过去的经验中学到的软件。 此外,机器学习与数据挖掘和统计的关系比与人工智能的关系更紧密。

Machine Learning: Using data to answer questions. “Using data” is what is generally referred to as “training”, and also “answering questions” is referred to as “making predictions”, or “inference”.

机器学习:使用数据回答问题。 “使用数据”通常被称为“培训”,并且“回答问题”也被称为“做出预测”或“推论”。

适用于应用程序开发人员的ML Kit (ML Kit for app developers)

As a matter of fact, ML Kit SDK is a new product from Google, which was presented in 2018. ML Kit is a software development kit that makes it possible for developers to simplify the integration of machine learning models into their mobile apps. In addition, even a junior developer can address this task easily. Another point is that it makes your iOS and Android apps much more engaging, personalized, and useful with solutions that are optimized to run on device. Today, more than 25,000 applications on Android and iOS make use of ML Kit’s features.

实际上, ML Kit SDK是Google的一项新产品,于2018年推出。ML Kit是一种软件开发工具包,使开发人员能够简化将机器学习模型集成到其移动应用程序的过程。 此外,即使是初级开发人员也可以轻松解决此任务。 另一个要点是,通过优化以在设备上运行的解决方案,它可以使您的iOS和Android应用程序更具吸引力,个性化并且更加有用。 如今,Android和iOS上的25,000多个应用程序都在使用ML Kit的功能。

A new SDK that brings Google’s Machine Learning experience to mobile developers in a powerful, easy-to-use package on Firebase.

新的SDK通过Firebase上功能强大且易于使用的软件包为移动开发人员带来了Google的机器学习经验。

ml kit_在移动应用程序开发中使用ML Kit的原因_第2张图片
Google Documents Google Documents提供

ML Kit has some features that can be categorized in three sections:

ML Kit具有一些功能,可以分为三部分:

  1. Vision: Video and image analysis APIs to label images and detect bar-codes, text, faces, and objects.

    视觉:视频和图像分析API,用于标记图像并检测条形码,文本,面部和对象。

  2. Natural Language: Natural language processing APIs to identify and translate between 58 languages and provide reply suggestions.

    自然语言:自然语言处理API,可识别和翻译58种语言并提供回复建议。

  3. Custom: Build your own models using AutoML Vision Edge, or bring your own TensorFlow Lite models, run experiments, and deploy them in production with ML Kit.

    自定义:使用AutoML Vision Edge构建您自己的模型,或者带来您自己的TensorFlow Lite模型,运行实验,并使用ML Kit在生产中部署它们。

Each category has some features. For instance, Vision has some features as Base APIs: Barcode Scanning, Face Detection, Image Labeling, Object Detection, Landmark Detection, and Text Detection.

每个类别都有一些功能。 例如,Vision具有作为基本API的某些功能:条形码扫描,面部检测,图像标记,对象检测,地标检测和文本检测。

ml kit_在移动应用程序开发中使用ML Kit的原因_第3张图片
Google Documents Google Documents提供

ML Kit中面向开发人员的某些功能 (Some features in ML Kit for developers)

Fundamentally, some features in ML Kit that are classified into Vision category have been introduced as follows:

从根本上讲,已将ML Kit中分类为Vision类别的某些功能引入如下:

Barcode Scanning

条码扫描

By using ML Kit’s barcode scanning API, you can be able to read data encoded using most standard barcode formats. Barcode scanning happens on the device, and does not need a network connection. In fact, barcode is an efficient way to pass information from the real world to your application.To be specific, when using 2D formats like QR code, you can encode structured data such as contact information or WiFi network credentials. Since ML Kit can automatically recognize and parse this data, your application can respond intelligently when a user scans a barcode

通过使用ML Kit的条形码扫描API ,您可以读取使用大多数标准条形码格式编码的数据。 条形码扫描在设备上进行,不需要网络连接。 实际上,条形码是一种将信息从真实世界传递到您的应用程序的有效方法。具体来说,当使用二维码(例如QR码)时,您可以对结构化数据(例如联系信息或WiFi网络凭据)进行编码。 由于ML Kit可以自动识别和解析此数据,因此您的应用程序可以在用户扫描条形码时做出智能响应

Face Detection

人脸检测

There are a lot of possibilities in you apps where you may want to utilize the detection of faces. Probably, you want to perform facial verification, tag photos, or add filters to a camera. Now, this feature is available as a part of the ML Kit. When API gets an image, it returns coordinates of nose, mouth, eyes, cheeks, and ears. Furthermore, this API supports the information whether a person on the picture has eyes closed or smiles. However, take into consideration that this determination works only for frontal faces. Another important aspect is the speed of face detection. As API performs tasks extremely immediately, it can be used in real-time apps. Besides, it is important to note that face detection via ML Kit is just only available as on-device recognition. So, you cannot perform face recognition on the cloud. This is probably a noticeable point for your users in terms of their personal data and privacy.

您的应用程序中有很多可能需要利用面部检测的可能性。 可能您想执行面部验证,标记照片或向相机添加滤镜。 现在,此功能已作为ML Kit的一部分提供。 当API获取图像时,它将返回鼻子,嘴巴,眼睛,脸颊和耳朵的坐标。 此外,此API支持图片上的人是睁眼还是微笑的信息。 但是,请考虑到此确定仅适用于正面。 另一个重要方面是面部检测的速度。 由于API非常立即执行任务,因此可以在实时应用中使用。 此外,需要注意的是,通过ML Kit进行的人脸检测仅在设备上识别时才可用。 因此,您无法在云上执行面部识别。 就用户的个人数据和隐私而言,这可能是值得注意的一点。

Image Labeling

图像标注

By utilizing ML Kit’s image labeling APIs you can be able to detect and extract information about entities in an image across a broad group of categories. The default image labeling model can identify general objects, places, activities, animal species, products, and more. Also, you can use a custom image classification model.

通过使用ML Kit的图像标签 API,您可以检测并提取涉及广泛类别的图像中实体的信息。 默认的图像标签模型可以识别一般对象,场所,活动,动物种类,产品等。 另外,您可以使用自定义图像分类模型。

Object Detection and Tracking

目标检测与追踪

Initially, with ML Kit’s on-device Object Detection and Tracking API, you can identify and track objects in an image or live camera feed. Another choice is that you can classify detected objects, either by using the coarse classifier built into the API, or utilizing your own custom image classification model.

最初,使用ML Kit的设备上对象检测和跟踪 API,您可以识别和跟踪图像或实时摄像机Feed中的对象。 另一个选择是,您可以使用API​​内置的粗分类器或使用自己的自定义图像分类模型对检测到的对象进行分类。

Text Recognition

文字识别

With ML Kit’s text recognition APIs can recognize text in any Latin-based character set. Furthermore, they could be used to automate data-entry tasks such as processing credit cards, receipts, and business cards.

使用ML Kit的文本识别 API,可以识别任何基于拉丁语的字符集中的文本。 此外,它们可用于自动化数据输入任务,例如处理信用卡,收据和名片。

Digital Ink Recognition

数字墨水识别

By using ML Kit’s Digital Ink Recognition API, you can detect handwritten text on a digital surface in lots of languages. Also, you can classify sketches. In fact, the Digital Ink Recognition API uses the same technology that uses handwriting recognition in Gboard, Google Translate, and the Quick, Draw! game. So, digital Ink Recognition makes it possible to write on the screen instead of typing on a virtual keyboard. This lets users draw characters that are not available on their keyboards. Another key point is that the API can also transcribe handwritten notes, and recognize hand‑drawn shapes and emojis.

通过使用ML Kit的数字墨水识别 API,您可以检测多种语言在数字表面上的手写文本。 另外,您可以对草图进行分类。 实际上,数字墨水识别API使用的技术与在Gboard,Google Translate和Quick,Draw!中使用手写识别的技术相同。 游戏。 因此,数字墨水识别可以在屏幕上书写,而不必在虚拟键盘上打字。 这使用户可以绘制键盘上不可用的字符。 另一个要点是,API还可以转录手写笔记,并识别手绘形状和表情符号。

在移动应用中使用ML Kit的好处 (Benefits of utilizing ML Kit in mobile apps)

  1. Easy-to-use framework for developers

    开发人员易于使用的框架

Typically, adding ML to a mobile app is a challenging and time-consuming process. By using this new SDK, this process is dramatically simplified. All you need is to pass data to the API, and wait until SDK will send a response. Google’s team stated, that implementing their APIs. Therefore, you don not need deep knowledge of neural networks.

通常,将ML添加到移动应用程序是一个挑战性且耗时的过程。 通过使用这个新的SDK,可以大大简化此过程。 您需要做的就是将数据传递给API,然后等待SDK发送响应。 Google的团队表示,要实现其API。 因此,您不需要深入了解神经网络。

2. Custom models

2. 定制型号

This option is helpful for experienced developers. If base ML Kit APIs do not cover all your needs, you can have your own ML model. New SDK can work with Tensor Flow and mobile app machine learning library. Besides, it supports developers with the possibility to download their own model to Firebase console, and bundle it with their products. Another significant key factor is that models are updated dynamically. It suggests that model will be updated even without updating the whole app.

此选项对有经验的开发人员很有帮助。 如果基本ML Kit API不能满足您的所有需求,那么您可以拥有自己的ML模型。 新的SDK可以与Tensor Flow和移动应用程序机器学习库一起使用。 此外,它支持开发人员将自己的模型下载到Firebase控制台并将其与产品捆绑在一起的可能性。 另一个重要的关键因素是模型是动态更新的。 这表明即使不更新整个应用程序,模型也会被更新。

3. Cloud and on-device APIs

3. 云和设备上的API

In fact, developers can choose between cloud-based and on-device APIs. To make a right choice it is significant to take into consideration some differences between these two variants. Cloud APIs process data on the Google Cloud Platform; therefore, recognizes objects more accurately. However, cloud models are larger in comparison to on-device ones. Offline models need less free space, can work offline and process data faster, but their accuracy is lower.

实际上,开发人员可以在基于云的API和设备上的API之间进行选择。 为了做出正确的选择,重要的是要考虑这两个变体之间的一些差异。 Cloud API在Google Cloud Platform上处理数据; 因此,可以更准确地识别物体。 但是,与设备上的云模型相比,云模型更大。 离线模型需要较少的可用空间,可以离线工作并更快地处理数据,但是其准确性较低。

4. Security Concern and privacy

4. 安全问题和隐私

As we know, most models are app-specific. Thus, probably, your customize model should be protected from other accesses from other developers. Now, you can do this task safely by using ML Kit. Furthermore, Google claims that cloud APIs do not store user’s data, and it is removed when processing is done.

众所周知,大多数模型都是特定于应用程序的。 因此,可能应该保护您的自定义模型不受其他开发人员的其他访问。 现在,您可以使用ML Kit安全地执行此任务。 此外,谷歌声称云API不存储用户数据,并且在处理完成后会将其删除。

In addition to this section, you can make your model smaller and it runs faster on mobile devices by using conversion and compression. Also, A/B testing and report performance can be done via Analytics for A/B testing.

除了本节之外,您还可以使用转换和压缩来缩小模型的尺寸,并使其在移动设备上的运行速度更快。 此外,可以通过Analytics for A / B测试完成A / B测试和报告效果。

使用ML Kit进行设备上的机器学习 (On-device machine learning with ML Kit)

To be exact, the original version of ML Kit was exceedingly integrated with Firebase. However, developers wanted more flexibility when implementing these features in their mobile apps. Therefore, Google are making all the on-device APIs available in a new standalone ML Kit SDK that no longer needs Firebase although you can still use both ML Kit and Firebase to get the best of both products if you want to. After making these changes by Google, ML Kit is currently fully focused on on-device machine learning. So, this gives developers access to the some benefits that on-device versus cloud ML offers such as no network latency, work offline, and privacy for sensitive users’ data.

确切地说,ML Kit的原始版本已与Firebase过度集成。 但是,开发人员希望在移动应用程序中实现这些功能时具有更大的灵活性。 因此,Google可以在不再需要Firebase的新的独立ML Kit SDK中提供所有设备上的API,不过如果您愿意,您仍然可以同时使用ML Kit和Firebase来获得两种产品的最佳性能。 在Google做出了这些更改之后,ML Kit目前完全专注于设备上的机器学习。 因此,这使开发人员可以访问设备上与云ML相比提供的一些好处,例如无网络延迟,脱机工作以及敏感用户数据的隐私性。

结论 (In conclusion)

As a matter of fact, Machine Learning (ML) is the major of computational science, which focuses on analyzing and interpreting patterns and structures in data to enable learning, reasoning, and decision making outside of human being interaction. Therefore, the introduction of new mobile SDK called ML Kit has been a prominent topic in the IT industry. This article discussed some reasons for using this software development kit in mobile app development.

实际上,机器学习(ML)是计算科学的专业,它专注于分析和解释数据中的模式和结构,以实现人机交互之外的学习,推理和决策。 因此,引入新的称为ML Kit的移动SDK一直是IT行业中的重要话题。 本文讨论了在移动应用程序开发中使用此软件开发套件的一些原因。

翻译自: https://medium.com/kayvan-kaseb/reasons-for-using-ml-kit-in-mobile-app-development-898fcd6c0c1a

ml kit

你可能感兴趣的:(python,java,linux,android,人工智能)