当前位置:   article > 正文

flutter 人脸识别_使用flutter和tensorflow lite进行人脸识别认证

flutter 人脸识别 1:n

flutter 人脸识别

The growth of processing power in devices and Machine learning allows us to create new solutions that a few years ago couldn’t have been achieved. In this case, I want to show an interesting way to perform authentication using Flutter and Tensorflow Lite with face recognition.

设备和机器学习中处理能力的增长使我们能够创建几年前无法实现的新解决方案。 在这种情况下,我想展示一种有趣的方式来使用FlutterTensorflow Lite进行人脸识别。

介绍 (Introduction)

I will explain step by step, how is the process of building a fairly simple facial recognition app that contains 3 functionalities: Sign Up, Sign In and Clear DB.

我将逐步解释如何构建一个包含3个功能的简单面部识别应用程序:注册登录清除数据库。

Craft.io总结 (Process summary)

注册(Sign up)

  1. The user takes a photo.

    用户拍照。
  2. The ML models process it and create an output (array of numbers) to be stored in a database.

    ML模型对其进行处理,并创建一个输出(数字数组)以存储在数据库中。
  3. A name and a password are requested (the name is not actually necessary, it’s requested just to show a greeting in your profile).

    要求提供名称和密码(名称实际上不是必需的,只要求在个人资料中显示问候语即可)。

登入 (Sign in)

  1. The user takes a photo.

    用户拍照。
  2. The ML models process it and creates an output.

    ML模型对其进行处理并创建输出。
  3. The output will be compared against the outputs already stored in the database (it compares by proximity the closest one it finds). As condition, the proximity has to be under the threshold (minimum distance), if overcomes it, it will process it as a non-existent user.

    将输出与已经存储在数据库中的输出进行比较(按接近度比较找到的结果)。 作为条件,接近度必须低于阈值(最小距离),如果超过该阈值,它将作为不存在的用户进行处理。

  4. If the user exists (face already processed) it requests the password for that user, validates and authenticates it.

    如果该用户存在(面部已经处理过),它将请求该用户的密码,然后对其进行验证和认证。

清除数据库 (Clear DB)

This functionality is just for debugging, It deletes all the data saved in memory.

此功能仅用于调试,它将删除内存中保存的所有数据。

Note: The purpose of this application is simply to show the main functionality (which is facial recognition). Tha’s why the records are not stored in a database on a server, but saved in a json file in the device memory.

注意:此应用程序的目的仅仅是显示主要功能(即面部识别)。 这就是为什么记录没有存储在服务器上的数据库中,而是存储在设备内存中的json文件中的原因。

怎么运行的 (How it works)

It works with two computer vision models working together, the Firebase ML vision model to perform the face detection and preprocessing in the image, and the MobileFaceNet model to process, classify and transform into a data structure ‘savable’ by a database (an array of numbers).

它与两个共同工作的计算机视觉模型一起工作, Firebase ML视觉模型用于执行图像中的人脸检测和预处理,而MobileFaceNet模型则用于处理,分类并转换为可由数据库“保存”的数据结构(数组数字)。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/748720
推荐阅读
相关标签
  

闽ICP备14008679号