人脸检测模型_使用tflite模型进行人脸检测,没有扑火声

人脸检测模型

In this article, we will see how to detect faces using Tensorflow models without using libraries like Firebase in Flutter, the process is based on the BlazeFace model, a lightweight and well-performing face detector tailored for mobile GPU inference.

在本文中,我们将了解如何在不使用Flutter之类的库的情况下使用Tensorflow模型检测人脸,该过程基于BlazeFace模型(一种针对移动GPU推理量身定制的轻巧且性能良好的面部检测器)。

介绍 (Intro)

BlazeFace, a lightweight and well-performing face detector tailored for mobile GPU inference. It runs at a speed of 200–1000+ FPS on flagship devices. This super-realtime performance enables it to be applied to any augmented reality pipeline that requires an accurate facial region of interest as an input for task-specific models, such as 2D/3D facial keypoint or geometry estimation, facial features or expression classification, and face region segmentation.

BlazeFace是专为移动GPU推理量身定制的轻巧性能良好的面部检测器。 在旗舰设备上,它以200–1000 + FPS的速度运行。 这种超实时性能使其可以应用于需要准确的感兴趣面部区域作为特定于任务的模型(例如2D / 3D面部关键点或几何估计,面部特征或表情分类,以及脸部区域分割。

工作流程 (Workflow)

  • Get frames by camera plugin and parse planes

    通过相机插件获取帧并解析平面

  • Create and initialize face detection model using tflite_flutter.

    使用tflite_flutter创建和初始化人脸检测模型。

  • Create functions for parse inference results and get the coordinates of the faces.

    创建用于解析推理结果的函数并获取人脸的坐标。

实作 (Implementation)

In this story we will only focus on the handling of tensors and initialization of the model, the installation of dependencies can be done with the help of the corresponding readme of the libraries.

在这个故事中,我们仅关注张量的处理和模型的初始化,依赖项的安装可以在相应的库自述文件的帮助下完成。

Step 1 — Model declaration

第1步-模型声明

Get BlazeFace model and put in assets folder.

获取BlazeFace模型并将其放入资产文件夹。

We will start by defining each of the models necessary for the processing of the results produced by the model:

我们将首先定义处理模型产生的结果所需的每个模型:

This class contains the necessary characteristics to be able to limit the results of the model, as well as properties or conditionals when we handle the image</

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值