如何检测人的脸部特征_自动面部特征检测

如何检测人的脸部特征

Identify faces and extract up to 6 facial features with few lines of code!

只需几行代码即可识别面部并提取多达6个面部特征!

Detection of facial landmarks and their feature points plays an important role in many facial image-related applications such as face recognition or verification, facial expression analysis, pose normalization, and 3D face reconstruction.

面部界标及其特征点的检测在许多与面部图像相关的应用程序中扮演重要角色,例如面部识别或验证,面部表情分析,姿势归一化和3D面部重构。

Detection of facial features is easy for persons; however, for machines it is not an easy task at all. The difficulty comes from high inter-personal variation (e.g., gender, race), intra-personal changes (e.g., pose, expression), and from acquisition conditions (e.g., lighting, image resolution). As a beginner in computer vision, I am sure all of us would have faced a similar challenge of detecting features. To cover variety of facial landmarks needs endless lines of codes.

人的面部特征检测很容易; 但是,对于机器而言,这绝非易事。 困难来自人际间的高度差异(例如性别,种族),人际内部的变化(例如姿势,表情)以及获取条件(例如照明,图像分辨率)。 作为计算机视觉的初学者,我相信我们每个人都会面临类似的特征检测挑战。 要覆盖各种面部标志,需要无休止的代码行。

This motivated me to write a python module called AutoFacialFeatures for performing an automated facial features detection on virtually any image. I am sharing this module so that you can customize and add additional functions as per your choice.

这促使我编写了一个名为AutoFacialFeatures的python模块,用于对几乎所有图像执行自动面部特征检测。 我正在共享此模块,以便您可以根据需要自定义和添加其他功能。

For the source code please visit the following link:

有关源代码,请访问以下链接:

AutoFacialFeatures可以做什么? (What AutoFacialFeatures can do?)

This customizable automated facial features detection module allows the user to detect facial features real-time using webcam, capture a selfie using webcam and detect its facial features, detect for stored face images while taking care of face alignment, image sharpening, image resizing and facial features extraction.

该可自定义的自动面部特征检测模块允许用户使用网络摄像头实时检测面部特征,使用网络摄像头捕获自拍并检测其面部特征,检测存储的面部图像,同时注意面部对齐,图像锐化,图像调整大小和面部特征提取。

I will demonstrate the working of AutoFacialFeatures using real-time and strored images.

我将使用实时图像和强化图像演示AutoFacialFeatures的工作。

先决条件 (Prerequisites)

There are a few packages that must be installed before we can proceed any further. You must install Anaconda distribution which includes most of the packages . You can read this article for a guide to install Anaconda.

在继续进行下一步之前,必须先安装一些软件包。 您必须安装包含大多数软件包的Anaconda发行版 。 您可以阅读文章的指南,安装Python。

Other packages need to be installed separately by following these steps:

其他套餐 需要按照以下步骤单独安装:

  • Make sure that you have Python 3.6 or greater installed.

    确保您已安装Python 3.6或更高版本。

  • Install imutils, cmake, cv2 and dlib using PIP command either in Command Prompt or Anaconda Prompt:

    在命令提示符或Anaconda提示符中使用PIP命令安装imutils,cmake,cv2dlib

$ 
$ pip install cmake
$ pip install opencv-python
$ pip install dlib

Without further ado, let us use the face detection module!

事不宜迟,让我们使用人脸检测模块!

导入模块 (Importing Module

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值