WO2019033571A1 - Facial feature point detection method, apparatus and storage medium - Google Patents

Facial feature point detection method, apparatus and storage medium Download PDF

Info

Publication number
WO2019033571A1
WO2019033571A1 PCT/CN2017/108750 CN2017108750W WO2019033571A1 WO 2019033571 A1 WO2019033571 A1 WO 2019033571A1 CN 2017108750 W CN2017108750 W CN 2017108750W WO 2019033571 A1 WO2019033571 A1 WO 2019033571A1
Authority
WO
WIPO (PCT)
Prior art keywords
facial
feature
image
real
feature points
Prior art date
Application number
PCT/CN2017/108750
Other languages
French (fr)
Chinese (zh)
Inventor
陈林
张国辉
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to CN201710709109.6 priority Critical
Priority to CN201710709109.6A priority patent/CN107679447A/en
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019033571A1 publication Critical patent/WO2019033571A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06KRECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K9/00Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
    • G06K9/00221Acquiring or recognising human faces, facial parts, facial sketches, facial expressions
    • G06K9/00268Feature extraction; Face representation
    • G06K9/00281Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06KRECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K9/00Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
    • G06K9/00221Acquiring or recognising human faces, facial parts, facial sketches, facial expressions
    • G06K9/00288Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06KRECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K9/00Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
    • G06K9/62Methods or arrangements for recognition using electronic means
    • G06K9/6217Design or setup of recognition systems and techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06K9/6256Obtaining sets of training patterns; Bootstrap methods, e.g. bagging, boosting
    • G06K9/6257Obtaining sets of training patterns; Bootstrap methods, e.g. bagging, boosting characterised by the organisation or the structure of the process, e.g. boosting cascade

Abstract

A facial feature point detection method, an electronic apparatus and a computer readable storage medium. The method comprises: capturing a real-time image via an imaging apparatus, and extracting a real-time facial image from the real-time image via a human face identification algorithm; inputting the real-time facial image to a pre-trained facial average model, and identifying t facial feature points from the real-time facial image via the facial average model.

Description

面部特征点检测方法、装置及存储介质Facial feature point detecting method, device and storage medium
优先权申明Priority claim
本申请基于巴黎公约申明享有2017年8月17日递交的申请号为CN 201710709109.6、名称为“面部特征点检测方法、装置及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application is based on the priority of the Chinese Patent Application entitled "Face Feature Point Detection Method, Apparatus and Storage Medium" filed on August 17, 2017, with the application number CN 201710709109.6 submitted on August 17, 2017, the overall content of the Chinese patent application It is incorporated herein by reference.
技术领域Technical field
本申请涉及计算机视觉处理技术领域,尤其涉及一种面部特征点检测方法、装置及计算机可读存储介质。The present application relates to the field of computer vision processing technologies, and in particular, to a facial feature point detecting method and apparatus, and a computer readable storage medium.
背景技术Background technique
人脸识别是基于人的脸部特征信息进行用户识别的一种生物识别技术。目前,人脸识别的应用领域很广泛,在门禁考勤、身份识别等众多领域起到非常重要的作用,给人们的生活带来很大便利。人脸识别,一般产品的做法是使用深度学习方法,通过深度学习训练出面部特征点识别模型,然后使用面部特征点识别模型来识别脸部特征。Face recognition is a biometric recognition technology based on human facial feature information for user recognition. At present, face recognition has a wide range of applications, and plays a very important role in many areas such as access control attendance and identity recognition, which brings great convenience to people's lives. Face recognition, the general product approach is to use the deep learning method to train the facial feature point recognition model through deep learning, and then use the facial feature point recognition model to identify facial features.
人脸识别中有包括面部微表情识别,微表情识别广泛应用于心理学、广告效果评估、人因工程学及人机交互等领域,故如何准确识别面部微表情至关重要。Face recognition includes facial micro-expression recognition. Micro-expression recognition is widely used in psychology, advertising effect evaluation, human factors engineering and human-computer interaction. Therefore, how to accurately recognize facial micro-expression is very important.
然而,业内目前可以检测5个、68个特征点,5个特征点检测包括两个眼球,鼻尖和嘴角两边;68个特征点检测不包括眼球,对于面部微表情识别来说的话,上述识别出的特征点还不够。However, the industry can currently detect 5 and 68 feature points. The 5 feature points include two eyeballs, the tip of the nose and the corners of the mouth; 68 feature points do not include the eyeball. For facial micro-expression recognition, the above identification The feature points are not enough.
发明内容Summary of the invention
本申请提供一种面部特征点检测方法、装置及计算机可读存储介质,其主要目的在于识别出更全面的特征点,可使人脸识别及面部微表情的判断更为准确。The present application provides a facial feature point detecting method, device and computer readable storage medium, the main purpose of which is to identify a more comprehensive feature point, which can make the face recognition and the facial micro expression judgment more accurate.
为实现上述目的,本申请提供一种电子装置,该装置包括:存储器、处理器及摄像装置,所述存储器中包括面部特征点检测程序,所述面部特征点检测程序被所述处理器执行时实现如下步骤:To achieve the above object, the present application provides an electronic device, including: a memory, a processor, and an imaging device, wherein the memory includes a facial feature point detecting program, and the facial feature point detecting program is executed by the processor Implement the following steps:
实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm;
特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
优选地,所述特征点识别步骤还包括:Preferably, the feature point identification step further comprises:
将所述实时脸部图像与该面部平均模型进行对齐,利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的t个面部特征点匹配的t个面部特征点。 The real-time facial image is aligned with the facial average model, and the feature extraction algorithm searches for the t facial feature points matching the t facial feature points of the facial average model in the real-time facial image.
优选地,所述面部平均模型的训练步骤包括:Preferably, the training step of the facial average model comprises:
建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points.
优选地,每个眼球标记4个位置特征点。Preferably, each eyeball marks 4 position feature points.
此外,为实现上述目的,本申请还提供一种面部特征点检测方法,该方法包括:In addition, to achieve the above object, the present application further provides a facial feature point detecting method, the method comprising:
实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm;
特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
优选地,所述特征点识别步骤还包括:Preferably, the feature point identification step further comprises:
将所述实时脸部图像与该面部平均模型进行对齐,利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的t个面部特征点匹配的t个面部特征点。The real-time facial image is aligned with the facial average model, and the feature extraction algorithm searches for the t facial feature points matching the t facial feature points of the facial average model in the real-time facial image.
优选地,所述面部平均模型的训练步骤包括:Preferably, the training step of the facial average model comprises:
建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points.
优选地,所述人脸特征识别模型为ERT算法,公式如下:Preferably, the face feature recognition model is an ERT algorithm, and the formula is as follows:
Figure PCTCN2017108750-appb-000001
Figure PCTCN2017108750-appb-000001
其中t表示级联序号,τt(·,·)表示当前级的回归器,每个回归器由很多棵回归树(tree)组成,S(t)为当前模型的形状估计,每个回归器τt(·,·)根据输入的当前图像I和S(t)来预测一个增量
Figure PCTCN2017108750-appb-000002
在模型训练的过程中,从n张样本图片的每张样本图片的t个特征点中取一部分特征点训练出第一棵回归树,将第一棵回归树的预测值与所述部分特征点的真实值的残差用来训练第二棵树...依次类推,直到训练出第N棵树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到关于面部特征点的面部平均模型。
Where t represents the cascading sequence number, τ t (·, ·) represents the current level of the regression, each regression is composed of a number of regression trees, S (t) is the shape estimation of the current model, each regression τ t (·,·) predicts an increment based on the input current image I and S(t)
Figure PCTCN2017108750-appb-000002
In the process of model training, a part of the feature points of each sample picture of n sample pictures is taken to train the first regression tree, and the predicted value of the first regression tree and the part of the feature points are The residual of the true value is used to train the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the partial feature point is close to 0, and all the regression trees of the ERT algorithm are obtained. A facial average model for facial feature points is obtained from these regression trees.
优选地,每个眼球标记4个位置特征点。Preferably, each eyeball marks 4 position feature points.
优选地,所述特征提取算法包括:SIFT算法,SURF算法,LBP算法,HOG算法。 Preferably, the feature extraction algorithm comprises: a SIFT algorithm, a SURF algorithm, an LBP algorithm, and an HOG algorithm.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中包括面部特征点检测程序,所述面部特征点检测程序被处理器执行时,实现如上所述的面部特征点检测方法中的任意步骤。In addition, in order to achieve the above object, the present application further provides a computer readable storage medium including a facial feature point detecting program, when the facial feature point detecting program is executed by a processor, implementing the above Any of the steps of the facial feature point detection method described.
本申请提出的面部特征点检测方法、装置及计算机可读存储介质,通过从实时脸部图像中识别出包括眼球的位置特征点的多个特征点,识别出的特征点更全面,可使人脸识别及面部微表情的判断更为准确。The facial feature point detecting method and device and the computer readable storage medium proposed by the present application can identify a feature point more comprehensively by recognizing a plurality of feature points including a position feature point of an eyeball from a real-time facial image. Face recognition and facial micro-expressions are more accurate.
附图说明DRAWINGS
图1为本申请面部特征点检测方法较佳实施例的运行环境示意图;1 is a schematic diagram of an operating environment of a preferred embodiment of a facial feature point detecting method of the present application;
图2为图1中面部特征点检测程序的模块示意图;2 is a block diagram of a facial feature point detecting program of FIG. 1;
图3为本申请面部特征点检测方法较佳实施例的流程图。3 is a flow chart of a preferred embodiment of a facial feature point detecting method of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
本申请提供一种面部特征点检测方法。参照图1所示,为本申请面部特征点检测方法较佳实施例的运行环境示意图。The application provides a facial feature point detecting method. Referring to FIG. 1 , it is a schematic diagram of an operating environment of a preferred embodiment of a facial feature point detecting method of the present application.
在本实施例中,面部特征点检测方法应用于一种电子装置1,该电子装置1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有运算功能的终端设备。In the embodiment, the facial feature point detecting method is applied to an electronic device 1. The electronic device 1 may be a terminal device having a computing function, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
该电子装置1包括:处理器12、存储器11、摄像装置13、网络接口14及通信总线15。其中,摄像装置13安装于特定场所,如办公场所、监控区域,对进入该特定场所的目标实时拍摄得到实时图像,通过网络将拍摄得到的实时图像传输至处理器12。网络接口14可选地可以包括标准的有线接口、无线接口(如WI-FI接口)。通信总线15用于实现这些组件之间的连接通信。The electronic device 1 includes a processor 12, a memory 11, an imaging device 13, a network interface 14, and a communication bus 15. The camera device 13 is installed in a specific place, such as an office place and a monitoring area, and real-time images are taken in real time for the target entering the specific place, and the captured real-time image is transmitted to the processor 12 through the network. Network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). Communication bus 15 is used to implement connection communication between these components.
存储器11包括至少一种类型的可读存储介质。所述至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,所述可读存储介质可以是所述电子装置1的内部存储单元,例如该电子装置1的硬盘。在另一些实施例中,所述可读存储介质也可以是所述电子装置1的外部存储器,例如所述电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), Secure Digital (SD) card, Flash Card, etc.
在本实施例中,所述存储器11的可读存储介质通常用于存储安装于所述电子装置1的面部特征点检测程序10、人脸图像样本库及构建并训练好的面部平均模型等。所述存储器11还可以用于暂时地存储已经输出或者将要输出 的数据。In the present embodiment, the readable storage medium of the memory 11 is generally used to store the facial feature point detecting program 10 installed on the electronic device 1, the face image sample library, and the constructed and trained facial average model and the like. The memory 11 can also be used to temporarily store the output that has been output or will be output The data.
处理器12,在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行面部特征点检测程序10等。The processor 12, in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing facial features. Point detection program 10, etc.
图1仅示出了具有组件11-15以及面部特征点检测程序10的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Figure 1 shows only the electronic device 1 having the components 11-15 and the facial feature point detection program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead. .
可选地,该电子装置1还可以包括用户接口,用户接口可以包括输入单元比如键盘(Keyboard)、语音输入装置比如麦克风(microphone)等具有语音识别功能的设备、语音输出装置比如音响、耳机等,可选地用户接口还可以包括标准的有线接口、无线接口。Optionally, the electronic device 1 may further include a user interface, and the user interface may include an input unit such as a keyboard, a voice input device such as a microphone, a device with a voice recognition function, a voice output device such as an audio, a headphone, and the like. Optionally, the user interface may also include a standard wired interface and a wireless interface.
可选地,该电子装置1还可以包括显示器,显示器也可以适当的称为显示屏或显示单元。在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器用于显示在该电子装置1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a display, which may also be appropriately referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like. The display is used to display information processed in the electronic device 1 and a user interface for displaying visualizations.
可选地,该电子装置1还包括触摸传感器。所述触摸传感器所提供的供用户进行触摸操作的区域称为触控区域。此外,这里所述的触摸传感器可以为电阻式触摸传感器、电容式触摸传感器等。而且,所述触摸传感器不仅包括接触式的触摸传感器,也可包括接近式的触摸传感器等。此外,所述触摸传感器可以为单个传感器,也可以为例如阵列布置的多个传感器。Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform a touch operation is referred to as a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. Moreover, the touch sensor includes not only a contact type touch sensor but also a proximity type touch sensor or the like. Furthermore, the touch sensor may be a single sensor or a plurality of sensors arranged, for example, in an array.
此外,该电子装置1的显示器的面积可以与所述触摸传感器的面积相同,也可以不同。可选地,将显示器与所述触摸传感器层叠设置,以形成触摸显示屏。该装置基于触摸显示屏侦测用户触发的触控操作。In addition, the area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display. The device detects a user-triggered touch operation based on a touch screen display.
可选地,该电子装置1还可以包括RF(Radio Frequency,射频)电路,传感器、音频电路等等,在此不再赘述。Optionally, the electronic device 1 may further include an RF (Radio Frequency) circuit, a sensor, an audio circuit, and the like, and details are not described herein.
在图1所示的装置实施例中,作为一种计算机存储介质的存储器11中可以包括操作系统、以及面部特征点检测程序10;处理器12执行存储器11中存储的面部特征点检测程序10时实现如下步骤:In the apparatus embodiment shown in FIG. 1, an operating system and a facial feature point detecting program 10 may be included in the memory 11 as a computer storage medium; when the processor 12 executes the facial feature point detecting program 10 stored in the memory 11, Implement the following steps:
实时脸部图像获取步骤:利用摄像装置13拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像。当摄像装置13拍摄到一张实时图像,摄像装置13将这张实时图像发送到处理器12,当处理器12接受到该实时图像后,先获取图片的大小,建立一个相同大小的灰度图像;将获取的彩色图像,转换成灰度图像,同时创建一个内存空间;将灰度图像直方图均衡化,可以使灰度图像信息量减少,以加快检测速度,然后加载训练库,检测图片中的人脸,并返回一个包含人脸信息的对象,获得人脸所在位置的数据,并记录个数;最终获取头像的区域且保存下来,这样就完成了一次实时脸部图像提取的过程。Real-time facial image acquisition step: a real-time image is captured by the camera device 13, and a real-time facial image is extracted from the real-time image by using a face recognition algorithm. When the camera 13 captures a real-time image, the camera 13 transmits the real-time image to the processor 12. When the processor 12 receives the real-time image, it first acquires the size of the image to create a grayscale image of the same size. Converting the acquired color image into a grayscale image and creating a memory space; equalizing the grayscale image histogram can reduce the amount of grayscale image information to speed up the detection, and then load the training library to detect the image. The face of the face, and return an object containing the face information, obtain the data of the location of the face, and record the number; finally obtain the area of the avatar and save it, thus completing a real-time facial image extraction process.
具体地,从该实时图像中提取实时脸部图像的人脸识别算法还可以为: 基于几何特征的方法、局部特征分析方法、特征脸方法、基于弹性模型的方法、神经网络方法,等等。Specifically, the face recognition algorithm for extracting a real-time facial image from the real-time image may also be: Geometric feature based methods, local feature analysis methods, feature face methods, elastic model based methods, neural network methods, and the like.
特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点。建立一个有n张人脸图像的样本库,在每张人脸图像中人工标记t个面部特征点,所述眼睛的位置特征点包括:眼眶的位置特征点和眼球的位置特征点。Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour A position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball. A sample library having n face images is created, and t facial feature points are manually marked in each face image, and the position feature points of the eye include: a position feature point of the eyelid and a position feature point of the eyeball.
利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。所述人脸特征识别模型为Ensemble of Regression Tress(简称ERT)算法。ERT算法用公式表示如下:The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points. The face feature recognition model is an Ensemble of Regression Tress (ERT) algorithm. The ERT algorithm is expressed as follows:
Figure PCTCN2017108750-appb-000003
Figure PCTCN2017108750-appb-000003
其中t表示级联序号,τt(·,·)表示当前级的回归器。每个回归器由很多棵回归树(tree)组成,训练的目的就是得到这些回归树。Where t represents the cascading sequence number and τ t (·, ·) represents the regression of the current stage. Each regression is composed of a number of regression trees, and the purpose of training is to obtain these regression trees.
其中S(t)为当前模型的形状估计;每个回归器τt(·,·)根据输入图像I和S(t)来预测一个增量
Figure PCTCN2017108750-appb-000004
把这个增量加到当前的形状估计上来改进当前模型。其中每一级回归器都是根据特征点来进行预测。训练数据集为:(I1,S1),...,(In,Sn)其中I是输入的样本图像,S是样本图像中的特征点组成的形状特征向量。
Where S(t) is the shape estimate of the current model; each regression τ t (·, ·) predicts an increment based on the input images I and S(t)
Figure PCTCN2017108750-appb-000004
Add this increment to the current shape estimate to improve the current model. Each level of regression is based on feature points for prediction. The training data set is: (I1, S1), ..., (In, Sn) where I is the input sample image and S is the shape feature vector composed of the feature points in the sample image.
在本实施例中的模型训练的过程中,每一张样本图片有76个人脸特征点,取所有样本图像的部分特征点(例如在每个样本图像的76个特征点中随机取70个特征点)训练出第一颗回归树,将第一颗回归树的预测值与所述部分特征点的真实值(每个样本图片所取的70个特征点的加权平均值)的残差用来训练第二颗树…依次类推,直到训练出第N颗树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到面部标记点的平均模型,并将模型文件及样本库保存至存储器11中。In the process of model training in this embodiment, each sample picture has 76 face feature points, and part of the feature points of all sample images are taken (for example, 70 features are randomly selected among 76 feature points of each sample image). Point) training the first regression tree, using the residual of the predicted value of the first regression tree and the true value of the partial feature points (weighted average of 70 feature points taken from each sample picture) Training the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the part of the feature points is close to 0, and all the regression trees of the ERT algorithm are obtained, and the average of the face points is obtained according to the regression trees. The model is saved to the memory 11 and the model file and the sample library.
在本实施例中,因为样本库中的每张人脸样本图像中均标记了76个面部特征点,故面部平均模型中也有76个面部特征点,从存储器中调用训练好的面部平均模型后,将实时脸部图像与面部平均模型进行对齐,然后利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的76个面部特征点匹配的76个面部特征点,并将识别出的76个面部特征点依然记为P1~P76,所述76个面部特征点的坐标分别为:(x1、y1)、(x2、y2)、(x3、y3)、…、(x76、y76)。In this embodiment, since 76 facial feature points are marked in each face sample image in the sample library, there are also 76 facial feature points in the face average model, and the trained facial average model is called from the memory. Aligning the real-time facial image with the facial average model, and then using the feature extraction algorithm to search for 76 facial feature points matching the 76 facial feature points of the facial average model in the real-time facial image, and identifying the recognized facial features The 76 facial feature points are still recorded as P1 to P76, and the coordinates of the 76 facial feature points are: (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), ..., (x 76 , y 76 ).
其中,面部的外轮廓有17个特征点(P1~P17,均匀分布在人脸的外轮廓),左右眉毛分别有5个特征点(分别记为P18~P22,P23~P27,均匀分布在眉毛上端),鼻子有9个特征点(P28~P36),左右眼眶分别有6个特征点(分别记为P37~P42,P43~P48),左右眼球分别有4个特征点(分别记为P49~P52,P53~P56),唇部有20个特征点(P57~P76),唇部的上、下嘴唇分别有8个特征点(分别记为P57~P64,P65~P72),左右唇角分别有2个特征点(分别记 为P73~P74,P75~P76)。上嘴唇的8个特征点中,5个位于上嘴唇外轮廓线(P57~61)、3个位于上嘴唇内轮廓线(P62~P64,P63为上嘴唇内侧中心特征点);下嘴唇的8个特征点中,5个位于下嘴唇外轮廓线(P65~P69)、3个位于下嘴唇内轮廓线(P70~P72,P71为下嘴唇内侧中心特征点)。左右唇角各自的2个特征点中,1个位于嘴唇外轮廓线(例如P74、P76,可称作外唇角特征点),1个位于嘴唇外轮廓线(例如P73、P75,可称作内唇角特征点)。Among them, the outer contour of the face has 17 feature points (P1 ~ P17, evenly distributed on the outer contour of the face), and the left and right eyebrows respectively have 5 feature points (respectively recorded as P18 ~ P22, P23 ~ P27, evenly distributed in the eyebrows) The upper end), the nose has 9 feature points (P28 ~ P36), the left and right eyelids have 6 feature points (respectively labeled as P37 ~ P42, P43 ~ P48), the left and right eyeballs have 4 feature points (respectively recorded as P49 ~ P52, P53~P56), there are 20 feature points in the lip (P57~P76), and there are 8 feature points on the upper and lower lips of the lip (respectively labeled as P57~P64, P65~P72), respectively. There are 2 feature points (remember separately It is P73 to P74, P75 to P76). Of the 8 feature points of the upper lip, 5 are located on the outer contour line of the upper lip (P57-61), 3 are located on the contour line of the upper lip (P62-P64, P63 is the central feature point on the inner side of the upper lip); 8 of the lower lip Of the feature points, 5 are located on the outer contour line of the lower lip (P65 to P69), and 3 are located in the outline of the lower lip (P70 to P72, and P71 is the central feature point on the inner side of the lower lip). One of the two feature points of the left and right lip angles is located on the outer contour line of the lips (for example, P74 and P76, which can be called outer lip feature points), and one is located on the outer contour line of the lips (for example, P73 and P75, which can be called Inner lip corner feature point).
在本实施例中,该特征提取算法为SIFT(scale-invariant feature transform)算法。SIFT算法从面部特征点的面部平均模型后提取每个面部特征点的局部特征,选择一个面部特征点为参考特征点,在实时脸部图像中查找与该参考特征点的局部特征相同或相似的特征点(例如,两个特征点的局部特征的差值在预设范围内),依此原理直到在实时脸部图像中查找出所有面部特征点。在其他实施例中,该特征提取算法还可以为SURF(Speeded Up Robust Features)算法,LBP(Local Binary Patterns)算法,HOG(Histogram of Oriented Gridients)算法等。In this embodiment, the feature extraction algorithm is a SIFT (scale-invariant feature transform) algorithm. The SIFT algorithm extracts the local features of each facial feature point from the facial average model of the facial feature points, selects a facial feature point as the reference feature point, and searches for the same or similar local feature of the reference feature point in the real-time facial image. The feature points (for example, the difference of the local features of the two feature points are within a preset range), according to this principle until all the face feature points are found in the real-time face image. In other embodiments, the feature extraction algorithm may also be a SURF (Speeded Up Robust Features) algorithm, an LBP (Local Binary Patterns) algorithm, a HOG (Histogram of Oriented Gridients) algorithm, or the like.
本实施例提出的电子装置1,从实时图像中提取实时脸部图像,利用面部平均模型识别出该实时脸部图像中的面部特征点,识别出的特征点更全面,可使人脸识别及面部微表情的判断更为准确。The electronic device 1 of the present embodiment extracts a real-time facial image from a real-time image, and uses the facial average model to identify a facial feature point in the real-time facial image, and the recognized feature point is more comprehensive, and the face recognition and the face recognition can be performed. The judgment of the facial micro-expression is more accurate.
在其他实施例中,面部特征点检测程序10还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由处理器12执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。参照图2所示,为图1中面部特征点检测程序10的模块示意图。在本实施例中,所述面部特征点检测程序10可以被分割为:获取模块110、识别模块120及计算模块130。所述模块110-130所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:In other embodiments, facial feature point detection program 10 may also be partitioned into one or more modules, one or more modules being stored in memory 11 and executed by processor 12 to complete the application. A module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function. Referring to FIG. 2, it is a block diagram of the facial feature point detecting program 10 of FIG. In this embodiment, the facial feature point detecting program 10 can be divided into: an obtaining module 110, an identifying module 120, and a calculating module 130. The functions or operational steps implemented by the modules 110-130 are similar to the above, and are not described in detail herein, by way of example, for example:
获取模块110,用于获取摄像装置13拍摄的实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;及The acquiring module 110 is configured to acquire a real-time image captured by the camera device 13 and extract a real-time facial image from the real-time image by using a face recognition algorithm; and
识别模块120,用于将该实时脸部图像输入面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。The identification module 120 is configured to input the real-time facial image into a facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
此外,本申请还提供一种面部特征点检测方法。参照图3所示,为本申请面部特征点检测方法较佳实施例的流程图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。In addition, the present application also provides a facial feature point detecting method. Referring to FIG. 3, it is a flowchart of a preferred embodiment of the facial feature point detecting method of the present application. The method can be performed by a device that can be implemented by software and/or hardware.
在本实施例中,面部特征点检测方法包括:In this embodiment, the facial feature point detecting method includes:
步骤S10,利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像。当摄像装置拍摄到一张实时图像,摄像装置将这张实时图像发送到处理器,当处理器接受到该实时图像后,先获取图片的大小,建立一个相同大小的灰度图像;将获取的彩色图像,转换成灰度图像,同时创建一个内存空间;将灰度图像直方图均衡化,可以使灰度图 像信息量减少,以加快检测速度,然后加载训练库,检测图片中的人脸,并返回一个包含人脸信息的对象,获得人脸所在位置的数据,并记录个数;最终获取头像的区域且保存下来,这样就完成了一次实时脸部图像提取的过程。In step S10, a real-time image is captured by the camera device, and a real-time face image is extracted from the real-time image by using a face recognition algorithm. When the camera captures a real-time image, the camera sends the real-time image to the processor. When the processor receives the real-time image, the image is first acquired to create a grayscale image of the same size; Color image, converted into grayscale image, and create a memory space; equalize the grayscale image histogram to make grayscale image Reduce the amount of information to speed up the detection, then load the training library, detect the face in the picture, and return an object containing the face information, obtain the data of the location of the face, and record the number; finally get the area of the avatar And save it, this completes the process of real-time facial image extraction.
具体地,从该实时图像中提取实时脸部图像的人脸识别算法还可以为:基于几何特征的方法、局部特征分析方法、特征脸方法、基于弹性模型的方法、神经网络方法,等等。Specifically, the face recognition algorithm for extracting the real-time facial image from the real-time image may also be: a geometric feature-based method, a local feature analysis method, a feature face method, an elastic model-based method, a neural network method, and the like.
步骤S20,将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Step S20: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点。建立一个有n张人脸图像的样本库,在每张人脸图像中人工标记t个面部特征点,所述眼睛的位置特征点包括:眼眶的位置特征点和眼球的位置特征点。Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour A position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball. A sample library having n face images is created, and t facial feature points are manually marked in each face image, and the position feature points of the eye include: a position feature point of the eyelid and a position feature point of the eyeball.
利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。所述人脸特征识别模型为ERT算法。ERT算法用公式表示如下:The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points. The face feature recognition model is an ERT algorithm. The ERT algorithm is expressed as follows:
Figure PCTCN2017108750-appb-000005
Figure PCTCN2017108750-appb-000005
其中t表示级联序号,τt(·,·)表示当前级的回归器。每个回归器由很多棵回归树(tree)组成,训练的目的就是得到这些回归树。Where t represents the cascading sequence number and τ t (·, ·) represents the regression of the current stage. Each regression is composed of a number of regression trees, and the purpose of training is to obtain these regression trees.
其中S(t)为当前模型的形状估计;每个回归器τt(·,·)根据输入图像I和S(t)来预测一个增量
Figure PCTCN2017108750-appb-000006
把这个增量加到当前的形状估计上来改进当前模型。其中每一级回归器都是根据特征点来进行预测。训练数据集为:(I1,S1),...,(In,Sn)其中I是输入的样本图像,S是样本图像中的特征点组成的形状特征向量。
Where S(t) is the shape estimate of the current model; each regression τ t (·, ·) predicts an increment based on the input images I and S(t)
Figure PCTCN2017108750-appb-000006
Add this increment to the current shape estimate to improve the current model. Each level of regression is based on feature points for prediction. The training data set is: (I1, S1), ..., (In, Sn) where I is the input sample image and S is the shape feature vector composed of the feature points in the sample image.
在本实施例中的模型训练的过程中,每一张样本图片有76个人脸特征点,取所有样本图像的部分特征点(例如在每个样本图像的76个特征点中随机取70个特征点)训练出第一颗回归树,将第一颗回归树的预测值与所述部分特征点的真实值(每个样本图片所取的70个特征点的加权平均值)的残差用来训练第二颗树…依次类推,直到训练出第N颗树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到面部标记点的平均模型,并将模型文件及样本库保存至存储器中。In the process of model training in this embodiment, each sample picture has 76 face feature points, and part of the feature points of all sample images are taken (for example, 70 features are randomly selected among 76 feature points of each sample image). Point) training the first regression tree, using the residual of the predicted value of the first regression tree and the true value of the partial feature points (weighted average of 70 feature points taken from each sample picture) Training the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the part of the feature points is close to 0, and all the regression trees of the ERT algorithm are obtained, and the average of the face points is obtained according to the regression trees. Model and save the model file and sample library to memory.
在本实施例中,因为样本库中的每张人脸样本图像中均标记了76个面部特征点,故面部平均模型中也有76个面部特征点,从存储器中调用训练好的面部平均模型后,将实时脸部图像与面部平均模型进行对齐,然后利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的76个面部特征点匹配的76个面部特征点,并将识别出的76个面部特征点依然记为P1~P76,所述76个面部特征点的坐标分别为:(x1、y1)、(x2、y2)、(x3、y3)、…、(x76、y76)。In this embodiment, since 76 facial feature points are marked in each face sample image in the sample library, there are also 76 facial feature points in the face average model, and the trained facial average model is called from the memory. Aligning the real-time facial image with the facial average model, and then using the feature extraction algorithm to search for 76 facial feature points matching the 76 facial feature points of the facial average model in the real-time facial image, and identifying the recognized facial features The 76 facial feature points are still recorded as P1 to P76, and the coordinates of the 76 facial feature points are: (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), ..., (x 76 , y 76 ).
其中,面部的外轮廓有17个特征点(P1~P17,均匀分布在人脸的外轮廓),左右眉毛分别有5个特征点(分别记为P18~P22,P23~P27,均匀分布在眉毛 上端),鼻子有9个特征点(P28~P36),左右眼眶分别有6个特征点(分别记为P37~P42,P43~P48),左右眼球分别有4个特征点(分别记为P49~P52,P53~P56),唇部有20个特征点(P57~P76),唇部的上、下嘴唇分别有8个特征点(分别记为P57~P64,P65~P72),左右唇角分别有2个特征点(分别记为P73~P74,P75~P76)。上嘴唇的8个特征点中,5个位于上嘴唇外轮廓线(P57~61)、3个位于上嘴唇内轮廓线(P62~P64,P63为上嘴唇内侧中心特征点);下嘴唇的8个特征点中,5个位于下嘴唇外轮廓线(P65~P69)、3个位于下嘴唇内轮廓线(P70~P72,P71为下嘴唇内侧中心特征点)。左右唇角各自的2个特征点中,1个位于嘴唇外轮廓线(例如P74、P76,可称作外唇角特征点),1个位于嘴唇外轮廓线(例如P73、P75,可称作内唇角特征点)。Among them, the outer contour of the face has 17 feature points (P1 ~ P17, evenly distributed on the outer contour of the face), and the left and right eyebrows respectively have 5 feature points (respectively recorded as P18 ~ P22, P23 ~ P27, evenly distributed in the eyebrows) The upper end), the nose has 9 feature points (P28 ~ P36), the left and right eyelids have 6 feature points (respectively labeled as P37 ~ P42, P43 ~ P48), the left and right eyeballs have 4 feature points (respectively recorded as P49 ~ P52, P53~P56), there are 20 feature points in the lip (P57~P76), and there are 8 feature points on the upper and lower lips of the lip (respectively labeled as P57~P64, P65~P72), respectively. There are two feature points (respectively labeled as P73 to P74 and P75 to P76). Of the 8 feature points of the upper lip, 5 are located on the outer contour line of the upper lip (P57-61), 3 are located on the contour line of the upper lip (P62-P64, P63 is the central feature point on the inner side of the upper lip); 8 of the lower lip Of the feature points, 5 are located on the outer contour line of the lower lip (P65 to P69), and 3 are located in the outline of the lower lip (P70 to P72, and P71 is the central feature point on the inner side of the lower lip). One of the two feature points of the left and right lip angles is located on the outer contour line of the lips (for example, P74 and P76, which can be called outer lip feature points), and one is located on the outer contour line of the lips (for example, P73 and P75, which can be called Inner lip corner feature point).
在本实施例中,该特征提取算法为SIFT算法。SIFT算法从面部特征点的面部平均模型后提取每个面部特征点的局部特征,选择一个面部特征点为参考特征点,在实时脸部图像中查找与该参考特征点的局部特征相同或相似的特征点(例如,两个特征点的局部特征的差值在预设范围内),依此原理直到在实时脸部图像中查找出所有面部特征点。在其他实施例中,该特征提取算法还可以为SURF算法,LBP算法,HOG算法等。In this embodiment, the feature extraction algorithm is a SIFT algorithm. The SIFT algorithm extracts the local features of each facial feature point from the facial average model of the facial feature points, selects a facial feature point as the reference feature point, and searches for the same or similar local feature of the reference feature point in the real-time facial image. The feature points (for example, the difference of the local features of the two feature points are within a preset range), according to this principle until all the face feature points are found in the real-time face image. In other embodiments, the feature extraction algorithm may also be a SURF algorithm, an LBP algorithm, an HOG algorithm, or the like.
本实施例提出的面部特征点检测方法,从实时图像中提取实时脸部图像,利用面部平均模型识别出该实时脸部图像中的面部特征点,识别出的特征点更全面,可使人脸识别及面部微表情的判断更为准确。The facial feature point detecting method proposed in the embodiment extracts a real-time facial image from a real-time image, and uses the facial average model to identify a facial feature point in the real-time facial image, and the recognized feature point is more comprehensive and can make a face The recognition and facial micro-expressions are more accurate.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质中包括面部特征点检测程序,所述面部特征点检测程序被处理器执行时实现如下操作:In addition, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium includes a facial feature point detecting program, and when the facial feature point detecting program is executed by the processor, the following operations are implemented:
实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;及Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm; and
特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
可选地,所述面部平均模型的训练步骤包括:Optionally, the training step of the facial average model includes:
建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points.
可选地,所述人脸特征识别模型为ERT算法,公式如下:Optionally, the face feature recognition model is an ERT algorithm, and the formula is as follows:
Figure PCTCN2017108750-appb-000007
Figure PCTCN2017108750-appb-000007
其中t表示级联序号,τt(·,·)表示当前级的回归器,每个回归器由很多棵回归树(tree)组成,S(t)为当前模型的形状估计,每个回归器τt(·,·)根据输入的当前图像I和S(t)来预测一个增量
Figure PCTCN2017108750-appb-000008
在模型训练的过程中,从n张样本图片的每张样本图片的t个特征点中取一部分特征点训练出第一棵回归树, 将第一棵回归树的预测值与所述部分特征点的真实值的残差用来训练第二棵树...依次类推,直到训练出第N棵树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到关于面部特征点的面部平均模型。
Where t represents the cascading sequence number, τ t (·, ·) represents the current level of the regression, each regression is composed of a number of regression trees, S (t) is the shape estimation of the current model, each regression τ t (·,·) predicts an increment based on the input current image I and S(t)
Figure PCTCN2017108750-appb-000008
In the process of model training, a part of the feature points of each sample picture of n sample pictures is taken to train the first regression tree, and the predicted value of the first regression tree and the part of the feature points are The residual of the true value is used to train the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the partial feature point is close to 0, and all the regression trees of the ERT algorithm are obtained. A facial average model for facial feature points is obtained from these regression trees.
本申请之计算机可读存储介质的具体实施方式与上述面部特征点检测方法的具体实施方式大致相同,在此不再赘述。The specific implementation manner of the computer readable storage medium of the present application is substantially the same as the specific embodiment of the facial feature point detecting method described above, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a series of elements includes those elements. It also includes other elements not explicitly listed, or elements that are inherent to such a process, device, item, or method. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, the device, the item, or the method that comprises the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。 The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种电子装置,其特征在于,所述装置包括:存储器、处理器及摄像装置,所述存储器中包括面部特征点检测程序,所述面部特征点检测程序被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, a processor, and an imaging device, wherein the memory includes a facial feature point detecting program, and the facial feature point detecting program is executed by the processor to implement the following steps :
    实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm;
    特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
  2. 根据权利要求1所述的电子装置,其特征在于,所述特征点识别步骤还包括:The electronic device according to claim 1, wherein the feature point identification step further comprises:
    将所述实时脸部图像与该面部平均模型进行对齐,利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的t个面部特征点匹配的t个面部特征点。The real-time facial image is aligned with the facial average model, and the feature extraction algorithm searches for the t facial feature points matching the t facial feature points of the facial average model in the real-time facial image.
  3. 根据权利要求2所述的电子装置,其特征在于,所述面部平均模型的训练步骤包括:The electronic device according to claim 2, wherein the training step of the facial average model comprises:
    建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
    利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points.
  4. 根据权利要求3所述的电子装置,其特征在于,所述人脸特征识别模型为ERT算法,公式如下:The electronic device according to claim 3, wherein the face feature recognition model is an ERT algorithm, and the formula is as follows:
    Figure PCTCN2017108750-appb-100001
    Figure PCTCN2017108750-appb-100001
    其中t表示级联序号,τt(·,·)表示当前级的回归器,每个回归器由很多棵回归树(tree)组成,S(t)为当前模型的形状估计,每个回归器τt(·,·)根据输入的当前图像I和S(t)来预测一个增量
    Figure PCTCN2017108750-appb-100002
    在模型训练的过程中,从n张样本图片的每张样本图片的t个特征点中取一部分特征点训练出第一棵回归树,将第一棵回归树的预测值与所述部分特征点的真实值的残差用来训练第二棵树...依次类推,直到训练出第N棵树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到关于面部特征点的面部平均模型。
    Where t represents the cascading sequence number, τ t (·, ·) represents the current level of the regression, each regression is composed of a number of regression trees, S (t) is the shape estimation of the current model, each regression τ t (·,·) predicts an increment based on the input current image I and S(t)
    Figure PCTCN2017108750-appb-100002
    In the process of model training, a part of the feature points of each sample picture of n sample pictures is taken to train the first regression tree, and the predicted value of the first regression tree and the part of the feature points are The residual of the true value is used to train the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the partial feature point is close to 0, and all the regression trees of the ERT algorithm are obtained. A facial average model for facial feature points is obtained from these regression trees.
  5. 根据权利要求2所述的电子装置,其特征在于,所述特征提取算法包括:SIFT算法,SURF算法,LBP算法,HOG算法。 The electronic device according to claim 2, wherein the feature extraction algorithm comprises: a SIFT algorithm, a SURF algorithm, an LBP algorithm, and an HOG algorithm.
  6. 根据权利要求3所述的电子装置,其特征在于,每个眼球标记4个位置特征点。The electronic device according to claim 3, wherein each eyeball marks four position feature points.
  7. 根据权利要求1所述的电子装置,其特征在于,所述人脸识别算法包括:基于几何特征的方法、局部特征分析方法、特征脸方法、基于弹性模型的方法、神经网络方法。The electronic device according to claim 1, wherein the face recognition algorithm comprises: a geometric feature based method, a local feature analyzing method, a feature face method, an elastic model based method, and a neural network method.
  8. 一种面部特征点检测方法,应用电子装置,其特征在于,所述方法包括:A facial feature point detecting method, the application electronic device, wherein the method comprises:
    实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm;
    特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
  9. 根据权利要求8所述的面部特征点检测方法,其特征在于,所述特征点识别步骤还包括:The facial feature point detecting method according to claim 8, wherein the feature point identifying step further comprises:
    将所述实时脸部图像与该面部平均模型进行对齐,利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的t个面部特征点匹配的t个面部特征点。The real-time facial image is aligned with the facial average model, and the feature extraction algorithm searches for the t facial feature points matching the t facial feature points of the facial average model in the real-time facial image.
  10. 根据权利要求9所述的面部特征点检测方法,其特征在于,所述面部平均模型的训练步骤包括:The facial feature point detecting method according to claim 9, wherein the training step of the facial average model comprises:
    建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
    利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average mode for the face feature points.
  11. 根据权利要求10所述的面部特征点检测方法,其特征在于,所述人脸特征识别模型为ERT算法,公式如下:The facial feature point detecting method according to claim 10, wherein the facial feature recognition model is an ERT algorithm, and the formula is as follows:
    Figure PCTCN2017108750-appb-100003
    Figure PCTCN2017108750-appb-100003
    其中t表示级联序号,τt(·,·)表示当前级的回归器,每个回归器由很多棵回归树(tree)组成,S(t)为当前模型的形状估计,每个回归器τt(·,·)根据输入的当前图像I和S(t)来预测一个增量
    Figure PCTCN2017108750-appb-100004
    在模型训练的过程中,从n张样本图片的每张样本图片的t个特征点中取一部分特征点训练出第一棵回归树,将第一棵回归树的预测值与所述部分特征点的真实值的残差用来训练第二棵树...依次类推,直到训练出第N棵树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到关于面部特征点的面部平均模型。
    Where t represents the cascading sequence number, τ t (·, ·) represents the current level of the regression, each regression is composed of a number of regression trees, S (t) is the shape estimation of the current model, each regression τ t (·,·) predicts an increment based on the input current image I and S(t)
    Figure PCTCN2017108750-appb-100004
    In the process of model training, a part of the feature points of each sample picture of n sample pictures is taken to train the first regression tree, and the predicted value of the first regression tree and the part of the feature points are The residual of the true value is used to train the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the partial feature point is close to 0, and all the regression trees of the ERT algorithm are obtained. A facial average model for facial feature points is obtained from these regression trees.
  12. 根据权利要求9所述的面部特征点检测方法,其特征在于,所述特征提取算法包括:SIFT算法,SURF算法,LBP算法,HOG算法。The facial feature point detecting method according to claim 9, wherein the feature extraction algorithm comprises: a SIFT algorithm, a SURF algorithm, an LBP algorithm, and an HOG algorithm.
  13. 根据权利要求10所述的面部特征点检测方法,其特征在于,每个眼球标记4个位置特征点。The facial feature point detecting method according to claim 10, wherein each eyeball marks four position feature points.
  14. 根据权利要求8所述的面部特征点检测方法,其特征在于,所述人脸识别算法包括:基于几何特征的方法、局部特征分析方法、特征脸方法、基于弹性模型的方法、神经网络方法。The facial feature point detecting method according to claim 8, wherein the face recognition algorithm comprises: a geometric feature based method, a local feature analyzing method, a feature face method, an elastic model based method, and a neural network method.
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括面部特征点检测程序,所述面部特征点检测程序被处理器执行时实现如下步骤:A computer readable storage medium, comprising: a facial feature point detecting program, wherein the facial feature point detecting program is executed by a processor to implement the following steps:
    实时脸部图像获取步骤:利用摄像装置拍摄得到一张实时图像,利用人脸识别算法从该实时图像中提取一张实时脸部图像;Real-time facial image acquisition step: capturing a real-time image by using a camera device, and extracting a real-time facial image from the real-time image by using a face recognition algorithm;
    特征点识别步骤:将该实时脸部图像输入预先训练好的面部平均模型,利用该面部平均模型从该实时脸部图像中识别出t个面部特征点。Feature point identification step: input the real-time facial image into a pre-trained facial average model, and use the facial average model to identify t facial feature points from the real-time facial image.
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述特征点识别步骤还包括:The computer readable storage medium according to claim 15, wherein the feature point identification step further comprises:
    将所述实时脸部图像与该面部平均模型进行对齐,利用特征提取算法在该实时脸部图像中搜索与该面部平均模型的t个面部特征点匹配的t个面部特征点。The real-time facial image is aligned with the facial average model, and the feature extraction algorithm searches for the t facial feature points matching the t facial feature points of the facial average model in the real-time facial image.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述面部平均模型的训练步骤包括:The computer readable storage medium of claim 16, wherein the training step of the facial average model comprises:
    建立一个有n张人脸样本图像的样本库,在每张人脸样本图像中标记t个面部特征点,所述t个面部特征点包括:眼睛、眉毛、鼻子、嘴巴、脸部外轮廓的位置特征点,其中眼睛的位置特征点包括眼球的位置特征点;及Establishing a sample library with n face sample images, and marking t facial feature points in each face sample image, the t facial feature points including: eyes, eyebrows, nose, mouth, and facial contour a position feature point, wherein the position feature point of the eye includes a position feature point of the eyeball; and
    利用所述标记了t个面部特征点的人脸样本图像对人脸特征识别模型进行训练,得到关于面部特征点的面部平均模型。The face feature recognition model is trained by using the face sample image marked with t facial feature points to obtain a face average model for the face feature points.
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述人脸特征识别模型为ERT算法,公式如下:The computer readable storage medium according to claim 17, wherein the face feature recognition model is an ERT algorithm, and the formula is as follows:
    Figure PCTCN2017108750-appb-100005
    Figure PCTCN2017108750-appb-100005
    其中t表示级联序号,τt(·,·)表示当前级的回归器,每个回归器由很多棵回归树(tree)组成,S(t)为当前模型的形状估计,每个回归器τt(·,·)根据输入的当前图像I和S(t)来预测一个增量
    Figure PCTCN2017108750-appb-100006
    在模型训练的过程中,从n张样本图片的每张样本图片的t个特征点中取一部分特征点训练出第一棵回归树, 将第一棵回归树的预测值与所述部分特征点的真实值的残差用来训练第二棵树...依次类推,直到训练出第N棵树的预测值与所述部分特征点的真实值接近于0,得到ERT算法的所有回归树,根据这些回归树得到关于面部特征点的面部平均模型。
    Where t represents the cascading sequence number, τ t (·, ·) represents the current level of the regression, each regression is composed of a number of regression trees, S (t) is the shape estimation of the current model, each regression τ t (·,·) predicts an increment based on the input current image I and S(t)
    Figure PCTCN2017108750-appb-100006
    In the process of model training, a part of the feature points of each sample picture of n sample pictures is taken to train the first regression tree, and the predicted value of the first regression tree and the part of the feature points are The residual of the true value is used to train the second tree... and so on, until the predicted value of the Nth tree is trained and the true value of the partial feature point is close to 0, and all the regression trees of the ERT algorithm are obtained. A facial average model for facial feature points is obtained from these regression trees.
  19. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述特征提取算法包括:SIFT算法,SURF算法,LBP算法,HOG算法。The computer readable storage medium according to claim 16, wherein the feature extraction algorithm comprises: a SIFT algorithm, a SURF algorithm, an LBP algorithm, and an HOG algorithm.
  20. 根据权利要求17所述的计算机可读存储介质,其特征在于,每个眼球标记4个位置特征点。 A computer readable storage medium according to claim 17, wherein each eyeball marks 4 position feature points.
PCT/CN2017/108750 2017-08-17 2017-10-31 Facial feature point detection method, apparatus and storage medium WO2019033571A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710709109.6 2017-08-17
CN201710709109.6A CN107679447A (en) 2017-08-17 2017-08-17 Facial characteristics point detecting method, device and storage medium

Publications (1)

Publication Number Publication Date
WO2019033571A1 true WO2019033571A1 (en) 2019-02-21

Family

ID=61136036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108750 WO2019033571A1 (en) 2017-08-17 2017-10-31 Facial feature point detection method, apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN107679447A (en)
WO (1) WO2019033571A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629278B (en) * 2018-03-26 2021-02-26 奥比中光科技集团股份有限公司 System and method for realizing information safety display based on depth camera
CN108597074A (en) * 2018-04-12 2018-09-28 广东汇泰龙科技有限公司 A kind of door opening method and system based on face registration Algorithm and face lock
CN108763897A (en) * 2018-05-22 2018-11-06 平安科技(深圳)有限公司 Method of calibration, terminal device and the medium of identity legitimacy
CN109117716A (en) * 2018-06-28 2019-01-01 众安信息技术服务有限公司 A kind of makings similarity acquisition methods and device
CN109255327A (en) * 2018-09-07 2019-01-22 北京相貌空间科技有限公司 Acquisition methods, face's plastic operation evaluation method and the device of face characteristic information
CN109308584A (en) * 2018-09-27 2019-02-05 深圳市乔安科技有限公司 A kind of noninductive attendance system and method
CN109389069B (en) * 2018-09-28 2021-01-05 北京市商汤科技开发有限公司 Gaze point determination method and apparatus, electronic device, and computer storage medium
CN109376621A (en) * 2018-09-30 2019-02-22 北京七鑫易维信息技术有限公司 A kind of sample data generation method, device and robot
CN109657550B (en) * 2018-11-15 2020-11-06 中科院微电子研究所昆山分所 Fatigue degree detection method and device
CN109886213B (en) * 2019-02-25 2021-01-08 湖北亿咖通科技有限公司 Fatigue state determination method, electronic device, and computer-readable storage medium
CN111839519A (en) * 2020-05-26 2020-10-30 合肥工业大学 Non-contact respiratory frequency monitoring method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650682A (en) * 2016-12-29 2017-05-10 Tcl集团股份有限公司 Method and device for face tracking
CN106845327A (en) * 2015-12-07 2017-06-13 展讯通信(天津)有限公司 The training method of face alignment model, face alignment method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512627B (en) * 2015-12-03 2019-04-12 腾讯科技(深圳)有限公司 A kind of localization method and terminal of key point
CN105426867B (en) * 2015-12-11 2019-08-30 小米科技有限责任公司 Recognition of face verification method and device
CN106295566B (en) * 2016-08-10 2019-07-09 北京小米移动软件有限公司 Facial expression recognizing method and device
CN106295602A (en) * 2016-08-18 2017-01-04 无锡天脉聚源传媒科技有限公司 A kind of face identification method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845327A (en) * 2015-12-07 2017-06-13 展讯通信(天津)有限公司 The training method of face alignment model, face alignment method and device
CN106650682A (en) * 2016-12-29 2017-05-10 Tcl集团股份有限公司 Method and device for face tracking

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
VAHID KAZEMI ET AL.: "One Millisecond Face Alignment with an Ensemble of Regression Trees", PROCEEDINGS OF THE IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNISION (CVPR, 31 December 2014 (2014-12-31), pages 1867 - 1874, XP032649427 *

Also Published As

Publication number Publication date
CN107679447A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
US10650040B2 (en) Object recognition of feature-sparse or texture-limited subject matter
Li et al. Reliable crowdsourcing and deep locality-preserving learning for unconstrained facial expression recognition
Carcagnì et al. Facial expression recognition and histograms of oriented gradients: a comprehensive study
CN105678250B (en) Face identification method and device in video
AU2014368997B2 (en) System and method for identifying faces in unconstrained media
Li et al. Clothing attributes assisted person reidentification
Gong et al. The re-identification challenge
Sariyanidi et al. Automatic analysis of facial affect: A survey of registration, representation, and recognition
WO2017190646A1 (en) Facial image processing method and apparatus and storage medium
Fathy et al. Face-based active authentication on mobile devices
US10366313B2 (en) Activation layers for deep learning networks
Xu et al. Human re-identification by matching compositional template with cluster sampling
US9721156B2 (en) Gift card recognition using a camera
Han et al. Matching composite sketches to face photos: A component-based approach
US9043349B1 (en) Image-based character recognition
Yi et al. Portable camera-based assistive text and product label reading from hand-held objects for blind persons
Yi et al. Scene text recognition in mobile applications by character descriptor and structure configuration
Koestinger et al. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization
CN103793697B (en) The identity mask method and face personal identification method of a kind of facial image
WO2018177379A1 (en) Gesture recognition, gesture control and neural network training methods and apparatuses, and electronic device
Lin et al. Triangle-based approach to the detection of human face
JP6045549B2 (en) Method and system for recognizing emotions and actions
Greenspan et al. Mixture model for face-color modeling and segmentation
US10013624B2 (en) Text entity recognition
WO2019174439A1 (en) Image recognition method and apparatus, and terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17921932

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 24.09.2020)