WO2020001082A1 - 一种基于迁移学习的人脸属性分析方法 - Google Patents

一种基于迁移学习的人脸属性分析方法 Download PDF

Info

Publication number
WO2020001082A1
WO2020001082A1 PCT/CN2019/078472 CN2019078472W WO2020001082A1 WO 2020001082 A1 WO2020001082 A1 WO 2020001082A1 CN 2019078472 W CN2019078472 W CN 2019078472W WO 2020001082 A1 WO2020001082 A1 WO 2020001082A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
attributes
samples
attribute prediction
sample
Prior art date
Application number
PCT/CN2019/078472
Other languages
English (en)
French (fr)
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
Application filed by 东南大学 filed Critical 东南大学
Publication of WO2020001082A1 publication Critical patent/WO2020001082A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • the invention discloses a method for analyzing face attributes based on transfer learning, and belongs to the technical field of computational estimation, in particular to the field of computer vision technology for identifying face attributes.
  • Face attribute analysis refers to analyzing whether a particular picture is a human face, correcting a human face that is not in the center of the image or is too small, positioning key points of the face, and judging the facial features of other people's faces.
  • the different attributes analyzed can be applied to different occasions: judging whether it is a human face, filtering non-human faces that are misdetected in face detection; correcting faces that are not in the center of the image or being too large or too small, and positioning key points of the face, can fine-tune the face Detection results; judging the facial features of other people's faces can further provide feature indexes for large sample face recognition tasks and can be used to assist other face related tasks.
  • face attribute analysis uses deep learning convolutional neural networks for feature extraction, and then classifies according to the extracted features to obtain the relevant attributes of the face.
  • convolutional neural networks do not require a large amount of prior knowledge. After training, as long as a picture is input, the features of the picture can be automatically extracted.
  • Multi-task learning is a technology widely used in the field of deep learning. Because a single task is too simple, it is easy to fall into a local minimum during training, and it is difficult to achieve good results in prediction. Therefore, when analyzing face attributes, it is often Train multiple related attributes simultaneously. However, face attributes are different from tasks such as face recognition where multi-class samples are easy to obtain. Traditional face attribute analysis methods have only a few simple classification tasks and no regression tasks with high accuracy requirements, so they are still prone to overfitting.
  • face attribute analysis usually requires face detection before inputting the detected face image into the attribute analysis system. Because the face detection results are extremely unstable under complex conditions, there are often deviations, which leads to the accuracy of face attribute analysis being affected. For example, when a non-face is input, because there is no assistance in the face recognition task, the traditional attribute analysis system will also output a certain face attribute without identifying a negative sample of the non-face.
  • the object of the present invention is to address the shortcomings of the background art described above, and to provide a face attribute analysis method based on transfer learning, to achieve a more flexible and accurate face attribute analysis, and to solve the problem caused by traditional attribute analysis using only simple classification tasks. Overfitting technical issues.
  • a method for analyzing face attributes based on transfer learning includes the following steps:
  • Step 1 Design the structure of the convolutional neural network.
  • the convolutional neural network includes a multi-attribute prediction network and a main attribute prediction network.
  • the output of the fully connected layer of the main attribute prediction network only includes the main attribute prediction part.
  • the convolution of the main attribute prediction network Layer and the convolutional layer part of the multi-attribute prediction network are exactly the same;
  • Step 2 Prepare a training data set.
  • the data set includes training sample sets and corresponding annotations established through various face databases. Each picture has its own label.
  • the training sample set includes positive face samples (with border information). , Face negative samples, face partial samples (with border information), face keypoint samples, and face facial feature samples.
  • the face positive, negative, and partial sample generation steps include random cropping of the face detection data set. And scaling, the generation steps of the face keypoint samples include random cutting and scaling of the face keypoint data set;
  • Step 3 Jointly train the sample set containing various types of face attribute samples on the multi-attribute prediction network to basic convergence, and according to the shared feature vector extracted by the convolutional layer in the multi-attribute prediction network and the dimension of the feature attributes required by the loss function Form a fully-connected layer.
  • the fully-connected layer discriminates the input sample feature attributes and calls the loss function according to the sample labels to calculate the loss function value.
  • the fully-connected layer discriminates the positive, negative, and part of the face and the facial features to call Softmax as Loss function.
  • Softmax Softmax
  • the discrimination of key points and frames of the face by the fully connected layer calls the mean square error as the loss function.
  • the forward loss is calculated by the fully connected layer, only the attributes related to the input sample are activated.
  • the loss of each batch is the average of the loss function values of all samples in the batch;
  • Step 4 The trained multi-attribute prediction network model is migrated to the main attribute prediction network for retraining to identify the main attribute.
  • the parameters of the multi-attribute prediction network loss function are used to initialize the main attribute prediction network.
  • the parameters include weight parameters and Offset parameter.
  • the face detection data set includes the true border annotations of all faces in the picture, and the division of the positive, negative, and some samples is determined according to the overlap ratio ⁇ of the randomly cut border and all real borders: when ⁇ ⁇ 1
  • a positive sample is determined when ⁇ > ⁇ 2 and a partial sample is determined when ⁇ 1 ⁇ ⁇ 2 .
  • the face keypoint data set is augmented by randomly rotating the face keypoint data set containing the true coordinates of the face keypoints.
  • the specific method is: 1) Set the rotation angle ⁇ , the positive rotation angle corresponds to a counterclockwise, and accordingly , The negative angle corresponds to clockwise; 2) calculate the new coordinates of the four corner points of the picture after rotation to determine the display area after rotation; 3) find the affine transformation matrix based on the coordinates of the four corner points before and after rotation; 4) pair The affine transformation obtained in step 3 is applied to all key points to obtain the key point coordinates after rotation.
  • the randomly cropped picture is scaled to the size according to the size of the input image of each layer of the convolutional neural network.
  • the face attributes include various face-related linear regression and logistic regression tasks, wherein the face attributes based on logistic regression include face judgment and face facial features, and the face attributes based on linear regression include key points Such as the relative positions of facial features in the face, the relative position of the face frame in the entire picture, etc.
  • the present invention first performs joint training on multi-tasks containing various types of face attributes to extract isolated feature attributes, and then migrates the trained model to the main attribute prediction network that trains more attribute-oriented and continues training to achieve isolation.
  • the combined analysis of feature attributes improves the prediction accuracy of a single class of attributes, which not only avoids local miniaturization, but also reduces the accuracy reduction caused by overly complex tasks, and can complete high-precision recognition based on regression face attributes;
  • the face attribute analysis method disclosed by the present invention enhances the data through the operation of cropping, scaling, and rotation of the existing face data, thereby improving the generalization ability of the model, and can realize the high precision of complex face attribute recognition such as face borders. Recognition can avoid the defect that the traditional face attribute analysis method depends on the face result, and is more accurate and flexible in practical applications.
  • FIG. 1 is a flowchart of a face attribute analysis method disclosed in the present invention.
  • Figure 2 is a schematic diagram of model parameter migration.
  • This application aims at the traditional face attribute analysis method because the task is too simple, and it is easy to fall into the problem of over-fitting during training, and proposes multi-task training that integrates multiple complex face attributes such as face bounding boxes.
  • Face attributes include various face-related linear regression and logistic regression tasks. Face attributes based on logistic regression include face judgment and facial features. Face attributes based on linear regression include relative positions of facial features on the face. , The relative position of the face frame in the entire picture, etc.
  • the face learning analysis method based on transfer learning proposed by the present invention is shown in FIG. 1, and mainly includes the following four major steps.
  • Step 1 Design the structure of the convolutional neural network
  • the design of convolutional neural network includes multi-attribute prediction network design and main attribute prediction network design.
  • the convolutional neural network structure consists of a convolutional layer and a fully connected layer.
  • the output size of the fully connected layer is determined by specific feature attributes.
  • the feature vector shared by the output of the convolutional layer is used as the input of the fully connected layer.
  • the fully connected layer of the main attribute prediction network only contains the main attribute prediction part, and the convolution layer and the convolution layer part of the multi-attribute prediction network are exactly the same.
  • the method uses face keypoint detection as the main attribute.
  • Step 2 Prepare the training data set
  • the data set includes training sample sets and corresponding annotations established through various face databases, and each picture has its own label.
  • the training sample set includes positive face samples (with border information), negative face samples, and face. Partial samples (with border information), face keypoint samples, and face facial feature samples.
  • Face positive, negative, and part sample generation steps include random cropping and scaling of the face detection data set, and face keypoint samples.
  • the generation steps include random rotation, random cropping, and scaling of the keypoint data set of the face.
  • the scaled size of the cropped image is determined by the size of the input image of each layer of the convolutional neural network.
  • positive, negative, and partial samples of the face are generated from the Wider face data set, and key points and various face attributes of the face are generated from the CelebA data set. There are more than 40 types of each image in the CelebA data set.
  • the labeled attributes 16 attributes related to the key points of the face are selected as samples of the key points of the face and the facial features of the face, such as the width of the eyes, the height of the nose, the thickness of the lips, whether 16 features such as smile.
  • the face detection data set includes the true border annotations of all faces in the picture, and the division of the positive, negative, and partial samples is based on the overlap ratio ⁇ of the randomly cut border and all real borders. determine.
  • (x 1 , y 1 ) be the coordinates of the upper-left corner of the border
  • (x 2 , y 2 ) be the coordinates of the lower-right corner of the border
  • w, h are the width and height of the real border
  • Face positive samples ( ⁇ > 0.65) are generated as follows:
  • the calculation method of the border offset is as follows:
  • the face part samples (0.4 ⁇ ⁇ 0.65) are generated in a similar way to the positive samples, and are not repeated here.
  • the picture is rotated counterclockwise around the lower left corner to expand the face key point data set
  • the method for determining the coordinates of the key point after the rotation on the new picture includes the following steps:
  • i is a natural number
  • n is the number of key points
  • x ′ i x i cos ⁇ -y i sin ⁇ +
  • y ′ i x i sin ⁇ + y i cos ⁇ +
  • Step 3 Jointly train a sample set containing various types of face attribute samples on a multi-attribute prediction network to basic convergence
  • the convolutional layer in the multi-attribute prediction network extracts shared feature vectors from the sample set, constructs a fully connected layer according to the feature vector dimensions required by the loss function, the fully connected layer discriminates the feature attributes of the input sample and calls the loss function according to the sample label to calculate the loss function Values, for example, the fully connected layer calls Softmax as a loss function for the determination of positive, negative, and partial facial features, and the fully connected layer calls the mean square error for the key points and frames of the face as a loss function.
  • the fully connected layer calculates the loss for forward propagation, only the attributes related to the sample are activated.
  • a batch of data is randomly selected from various types of attribute samples to ensure that the number of types of attribute samples meets a certain level. Proportion.
  • the loss for each batch is the average of the loss function values for all samples in the batch.
  • Step 4 Transfer the trained model to the main attribute prediction network for retraining to obtain the final main attribute neural network model
  • the parameters of the multi-attribute prediction network after joint training are used as the parameters of the main attribute prediction network, and the parameters include weight parameters and bias parameters.
  • the present invention has the following beneficial effects:
  • the present invention first performs joint training on multi-tasks containing various types of face attributes to extract isolated feature attributes, and then migrates the trained model to the main attribute prediction network that trains more attribute-oriented and continues training to achieve isolation.
  • the combined analysis of feature attributes improves the prediction accuracy of a single class of attributes, which not only avoids local miniaturization, but also reduces the accuracy reduction caused by overly complex tasks, and can complete high-precision recognition based on regression face attributes;
  • the face attribute analysis method disclosed by the present invention enhances the data through the operation of cropping, scaling, and rotation of the existing face data, thereby improving the generalization ability of the model, and can realize the high precision of complex face attribute recognition such as face borders. Recognition can avoid the defect that the traditional face attribute analysis method depends on the face result, and is more accurate and flexible in practical applications.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

一种基于迁移学习的人脸属性分析方法,属于计算推算的技术领域,尤其涉及识别人脸属性的计算机视觉技术领域。方法包括在多属性预测网络上联合训练样本集以预测特征属性,将收敛的多属性预测网络迁移到主属性预测网络,继续训练主属性预测网络并微调参数直至主属性预测网络的损失函数收敛,所述主属性包含但不限于基于逻辑回归的人脸属性以及基于线性回归的人脸属性的主属性,既防止了局部极小,又避免了任务过于复杂导致的精度降低,在实际应用中更加精确灵活。

Description

一种基于迁移学习的人脸属性分析方法 技术领域
本发明公开了一种基于迁移学习的人脸属性分析方法,属于计算推算的技术领域,尤其涉及识别人脸属性的计算机视觉技术领域。
背景技术
人脸属性分析指对特定图片分析其是否为人脸、校正不在图像中心或过大过小的人脸、定位人脸关键点以及判别人脸面部特征。分析出来的不同属性能应用于不同场合:判别是否为人脸能过滤人脸检测中误检的非人脸;校正不在图像中心或过大过小的人脸、定位人脸关键点能微调人脸检测的结果;判别人脸面部特征能进一步为大样本人脸识别任务提供特征索引且可用于辅助其它人脸相关的任务。
通常人脸属性分析使用深度学习的卷积神经网络进行特征提取,再根据提取到的特征进行分类以得到人脸的相关属性。与传统的人工提取特征相比,卷积神经网络不需要大量的先验知识,经过训练后只要输入一张图片就能自动提取图片的特征。
多任务学习是目前深度学习领域广泛应用的技术,由于单个任务过于简单,在训练时很容易陷入局部极小值,在预测时很难达到很好的效果,因此,人脸属性分析时,往往将多个相关属性同时训练。然而,人脸属性不同于容易取得多分类样本的人脸识别等任务,传统的人脸属性分析方法只有几个简单分类任务而没有精度需求很高的回归任务,因此仍然容易陷入过拟合。
此外,通常人脸属性分析需要先经过人脸检测,再将检测到的人脸图像输入属性分析系统。由于人脸检测结果在复杂条件下极不稳定,往往存在偏差,导致人脸属性分析的准确性也受到影响。比如,当输入一张非人脸时,因为没有人脸辨识任务的辅助,传统的属性分析系统也会输出某个人脸属性而不会识别出非人脸的负样本。
发明内容
本发明的发明目的是针对上述背景技术的不足,提供了一种基于迁移学习的人脸属性分析方法,实现了更加灵活准确的人脸属性分析,解决了传统属性分析仅采用简单分类任务导致的过拟合的技术问题。
本发明为实现上述发明目的采用如下技术方案:
一种基于迁移学习的人脸属性分析方法,包括如下步骤:
步骤一:设计卷积神经网络的结构,卷积神经网络包括多属性预测网络和主属性预测网络,主属性预测网络的全连接层的输出只包含主属性预测部分,主属性预测网络的卷积层和多属性预测网络的卷积层部分完全相同;
步骤二:准备训练数据集,数据集包括通过各类人脸数据库建立的训练样本集以及相应的标注,每张图片均带有自己的标签,训练样本集包括人脸正样本(带边框信息)、人脸负样本、人脸部分样本(带边框信息)、人脸关键点样本和人脸面部特征样本,人脸正、负、部分样本的产生步骤包括对人脸检测数据集的随机剪切和缩放,人脸关键点样本的产生步骤包括对人脸关键点数据集的随机剪切和缩放;
步骤三:将包含各类人脸属性样本的样本集在多属性预测网络进行联合训练至基本收敛,根据多属性预测网络中卷积层提取的共享特征向量和损失函数需要的特征属性的维数构成全连接层,全连接层判别输入样本特征属性并根据样本标签调用损失函数以计算损失函数值,如,全连接层对人脸正、负、部分的判别和人脸面部特征判别调用Softmax作为损失函数,全连接层对人脸关键点和边框的判别调用均方误差作为损失函数,全连接层每次前向传播计算损失时,只有与输入样本相关的属性被激活,当对训练数据集分批训练时,每批次的损失是该批次内所有样本损失函数值的平均值;
步骤四:将训练后的多属性预测网络模型迁移到主属性预测网络进行再训练以识别主属性,具体是采用多属性预测网络损失函数收敛时的参数初始化主属性预测网络,参数包括权重参数和偏置参数。
优选的,人脸检测数据集包含图片中所有人脸的真实边框标注,正、负、部分样本的划分根据随机剪切后的边框与所有真实边框交叠率δ确定:当δ<δ 1时为判定负样本,当δ>δ 2时判定为正样本,当δ 1<δ<δ 2时判定为部分样本。
优选地,通过随机旋转包含人脸关键点真实坐标标注的人脸关键点数据集以扩充人脸关键点数据集,具体方法为:1)设置旋转角度θ,旋转正角度对应逆时针,相应地,负角度对应顺时针;2)计算旋转之后图片四个角点的新坐标,确定旋转后的显示区域;3)依据四个角点旋转前后的坐标,求出仿射变换矩阵;4)对所有关键点应用步骤3中求得的仿射变换,求出旋转之后的关键点坐标。
优选的,步骤二中按照卷积神经网络各层输入图像的尺寸对随机剪切后的图片进行缩放至尺寸。
可选的,人脸属性包括各种人脸相关的线性回归和逻辑回归任务,其中,基于逻辑回归的人脸属性包括人脸判断和人脸面部特征,基于线性回归的人脸属性包括关键点如五官在人脸的相对位置、人脸框在整张图片中的相对位置等。
本发明采用上述技术方案,具有以下有益效果:
(1)本发明首先对包含各类人脸属性的多任务进行联合训练以提取孤立的特征属性,然后将训练好的模型迁移到训练更侧重属性的主属性预测网络中继续训练进而实现对孤立特征属性的结合分析,提升使单类属性的预测精度,既防止了局部极小,又避免了任务过于复杂导致的精度降低,能够完成基于回归人脸属性的高精度识别;
(2)本发明公开的人脸属性分析方法通过对现有人脸数据可进行裁剪、缩放、旋转的操作增强数据进而提高模型泛化能力,能够实现人脸边框等复杂人脸属性识别的高精度识别,能够避免传统人脸属性分析方法依赖于人脸结果的缺陷,在实际应用中更加精确灵活。
附图说明
图1为本发明公开的人脸属性分析方法的流程图。
图2为模型参数迁移的示意图。
具体实施方式
下面结合附图对发明的技术方案进行详细说明。
本申请针对传统人脸属性分析方法由于任务过于简单,在训练时容易陷入过拟合的问题,提出了融合人脸边界框等多种复杂人脸属性的多任务训练。
人脸属性包括各种与人脸相关的线性回归和逻辑回归任务,基于逻辑回归的人脸属性包括人脸判断和人脸面部特征,基于线性回归的人脸属性包括五官在人脸的相对位置、人脸框在整张图片中的相对位置等。
本发明提出的基于迁移学习的人脸属性分析方法如图1所示,主要包括如下四个大步骤。
步骤一:设计卷积神经网络的结构
卷积神经网络的设计包括多属性预测网络设计和主属性预测网络设计。卷积神经网络结构由卷积层和全连接层组成,其中,全连接层输出大小由具体的特征属性确定,卷积层输出共享的特征向量作为全连接层的输入。主属性预测网络的全连接层只包含主属性预测部分,卷积层和多属性预测网络的卷积层部分完全相同。示例性地,本方法将人脸关键点检测作为主属性。
步骤二:准备训练数据集
数据集包括通过各类人脸数据库建立的训练样本集以及相应的标注,每张图片均带有自己的标签,训练样本集包括人脸正样本(带边框信息)、人脸负样本、人脸部分样本(带边框信息)、人脸关键点样本和人脸面部特征样本,人脸正、负、部分样本的产生步骤包括对人脸检测数据集的随机剪切和缩放,人脸关键点样本的产生步骤包括对人脸关键点数据集的随机 旋转、随机剪切和缩放,经剪切的图片缩放后的大小由卷积神经网络各层的输入图像的大小来确定。
在本发明的实施例中,人脸正、负、部分样本由Wider face数据集生成,人脸关键点和各种人脸属性由CelebA数据集生成,CelebA数据集中的每个图像有40余种标注好的属性,在本实施例中,从中选出与人脸关键点相关的16个属性作为人脸关键点样本和人脸面部特征样本,如,眼间距宽窄、鼻子高低、嘴唇厚薄、是否微笑等16种特征。
在本发明的实施例中,人脸检测数据集包含图片中所有人脸的真实边框标注,其中,正、负、部分样本的划分根据随机剪切后的边框与所有真实边框的交叠率δ确定。
人脸负样本(δ<0.4)的产生方式为:
设(x 1,y 1)为边框左上角点坐标,(x 2,y 2)为边框右下角点坐标,w,h为真实边框的宽度和高度。Δx,Δy为边框左上角(x 1,y 1)的随机偏移量,示例性地,取Δx=RAND(-x 1,w),Δy=RAND(-y 1,h),RAND为随机数。
人脸正样本(δ>0.65)的产生方式为:
对随机裁剪后的图片进行边框信息计算并求取边框偏移,示例性地,取,Δx=RAND(-0.2w,0.2w),Δy=RAND(-0.2h,-0.2h),裁剪的大小L=RAND(min(w,h)*0.8,max(w,h)*1.25),RAND为随机数,(x′ 1,y′ 1)为平移后边框左上角点坐标,(x′ 2,y′ 2)平移后边框右下角点坐标,
Figure PCTCN2019078472-appb-000001
Figure PCTCN2019078472-appb-000002
x′ 2=x′ 1+L,
y′ 2=y′ 1+L,
则边框偏移计算方法如下:
Figure PCTCN2019078472-appb-000003
Figure PCTCN2019078472-appb-000004
Figure PCTCN2019078472-appb-000005
Figure PCTCN2019078472-appb-000006
人脸部分样本(0.4<δ<0.65)的产生方式和正样本类似,这里不再赘述。
在本发明的实施例中,将图片绕左下角逆时针旋转以扩充人脸关键点数据集,其中,确定旋转之后的关键点在新图片上的坐标的方法包括如下步骤:
1):设置旋转角度θ,旋转正角度为逆时针,相应地,负角度指顺时针;
2):以图片左下角为坐标原点,计算旋转之后A、B、C、D四个角点的新坐标,确定旋转后的显示区域,w,h为原始图片的宽度和高度,
其中,1≤i≤n,i是自然数,n为关键点个数,
A x=h sin θ,
A y=h cos θ,
B x=0,
B y=0,
C x=w cos θ,
C x=w sin θ,
D x=w cos θ-hsinθ,
D y=w sin θ-hcosθ,
(x i,y i)为第i个关键点在原图中的坐标;
3)对n个关键点应用步骤二中求得的仿射变换,求出旋转之后的关键点坐标(x′ i,y′ i):
x′ i=x icosθ-y isinθ+|min(A x,B x,C x,D x)|,
y′ i=x isinθ+y icosθ+|min(A y,B y,C y,D y)|。
步骤三:将包含各类人脸属性样本的样本集在多属性预测网络进行联合训练至基本收敛
多属性预测网络中卷积层从样本集中提取共享特征向量,根据损失函数需要的特征向量维数构建全连接层,全连接层判别输入样本的特征属性并根据样本标签调用损失函数以计算损失函数值,如,全连接层对人脸正、负、部分的判别和人脸面部特征判别调用Softmax作为损失函数,全连接层对人脸关键点和边框的判别调用均方误差作为损失函数,但全连接层每次前向传播计算损失时,只有与样本相关的属性被激活,当训练数据集分批训练时,从各类属性样本中随机抽取一批数据以保证各类属性样本数量满足一定比例,每批次的损失是该批次内所有样本损失函数值的平均值。
步骤四:将训练后的模型迁移到主属性预测网络进行再训练得到最终的主属性神经网络模型
如图2所示,将联合训练后的多属性预测网络参数作为主属性预测网络的参数,参数包括权重参数和偏置参数。
综上,本发明具有以下有益效果:
(1)本发明首先对包含各类人脸属性的多任务进行联合训练以提取孤立的特征属性,然后将训练好的模型迁移到训练更侧重属性的主属性预测网络中继续训练进而实现对孤立特征属性的结合分析,提升使单类属性的预测精度,既防止了局部极小,又避免了任务过于复杂 导致的精度降低,能够完成基于回归人脸属性的高精度识别;
(2)本发明公开的人脸属性分析方法通过对现有人脸数据可进行裁剪、缩放、旋转的操作增强数据进而提高模型泛化能力,能够实现人脸边框等复杂人脸属性识别的高精度识别,能够避免传统人脸属性分析方法依赖于人脸结果的缺陷,在实际应用中更加精确灵活。

Claims (10)

  1. 一种基于迁移学习的人脸属性分析方法,其特征在于,在多属性预测网络上联合训练样本集以预测特征属性,将收敛的多属性预测网络迁移到主属性预测网络,继续训练主属性预测网络并微调参数直至主属性预测网络的损失函数收敛,所述主属性包含但不限于基于逻辑回归的人脸属性以及基于线性回归的人脸属性的主属性。
  2. 根据权利要求1所述一种基于迁移学习的人脸属性分析方法,其特征在于,所述样本集包含但不限于带边框信息的人脸正样本、人脸负样本、带边框信息的人脸部分样本、人脸关键点样本和人脸面部特征样本。
  3. 根据权利要求2所述一种基于迁移学习的人脸属性分析方法,其特征在于,基于逻辑回归的人脸属性包含但不限于人脸判断和人脸面部特征,基于线性回归的人脸属性包含但不限于关键点在人脸的相对位置、人脸框在整张图片中的相对位置。
  4. 根据权利要求2所述一种基于迁移学习的人脸属性分析方法,其特征在于,带边框信息的人脸正样本、人脸负样本、带边框信息的人脸部分样本的生成方法为:对包含人脸真实边框标注的人脸检测数据集进行剪切和/或缩放的预处理,依据预处理后图片的边框与人脸检测数据集的所有真实边框的交叠率δ划分样本,将δ<δ 1的图片划分为人脸负样本,将δ>δ 2的图片划分为带边框信息的正样本,将δ 1<δ<δ 2的图片划分为带边框信息的人脸部分样本,δ 2、δ 1为预处理后图片的边框与人脸检测数据集的所有真实边框的交叠率的上下限。
  5. 根据权利要求2所述一种基于迁移学习的人脸属性分析方法,其特征在于,所述人脸关键点样本的生成方法为:对人脸关键点数据集进行剪切和/或缩放的预处理。
  6. 根据权利要求5所述一种基于迁移学习的人脸属性分析方法,其特征在于,对人脸关键点数据集进行旋转以扩充数据的方法为:依据人脸关键点数据集中图片角点旋转前后的坐标确定图片的仿射变换矩阵以及旋转后的图片显示区域,对图片中的关键点坐标进行仿射变换得到旋转后的关键点坐标。
  7. 根据权利要求2所述一种基于迁移学习的人脸属性分析方法,其特征在于,在多属性预测网络上联合训练样本集以预测特征属性的具体方法为:通过卷积层提取训练样本集的共享特征,判别输入样本的特征属性并根据输入样本的标签调用损失函数,与输入样本相关的属性在前向传播预测样本的损失值时激活。
  8. 根据权利要求7所述一种基于迁移学习的人脸属性分析方法,其特征在于,输入样本的标签为带边框信息的人脸正样本、人脸负样本、带边框信息的人脸部分样本和人脸面部特征样本时,调用预Softmax作为损失函数。
  9. 根据权利要求7所述一种基于迁移学习的人脸属性分析方法,其特征在于,输入样本为人脸关键点样本时,调用均方误差作为损失函数。
  10. 根据权利要求1所述一种基于迁移学习的人脸属性分析方法,其特征在于,将收敛的多属性预测网络迁移到主属性预测网络为:采用收敛的多属性预测网络的参数初始化主属性预测网络参数,参数包括权重参数和偏置参数。
PCT/CN2019/078472 2018-06-30 2019-03-18 一种基于迁移学习的人脸属性分析方法 WO2020001082A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810702472.X 2018-06-30
CN201810702472.XA CN109325398B (zh) 2018-06-30 2018-06-30 一种基于迁移学习的人脸属性分析方法

Publications (1)

Publication Number Publication Date
WO2020001082A1 true WO2020001082A1 (zh) 2020-01-02

Family

ID=65263517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078472 WO2020001082A1 (zh) 2018-06-30 2019-03-18 一种基于迁移学习的人脸属性分析方法

Country Status (2)

Country Link
CN (1) CN109325398B (zh)
WO (1) WO2020001082A1 (zh)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209873A (zh) * 2020-01-09 2020-05-29 杭州趣维科技有限公司 一种基于深度学习的高精度人脸关键点定位方法及系统
CN111507263A (zh) * 2020-04-17 2020-08-07 电子科技大学 一种基于多源数据的人脸多属性识别方法
CN111524226A (zh) * 2020-04-21 2020-08-11 中国科学技术大学 讽刺肖像画的关键点检测与三维重建方法
CN111611920A (zh) * 2020-05-21 2020-09-01 杭州智珺智能科技有限公司 一种基于属性特征提取的ai人脸风格辨识方法
CN111626115A (zh) * 2020-04-20 2020-09-04 北京市西城区培智中心学校 一种人脸属性识别方法和装置
CN111666846A (zh) * 2020-05-27 2020-09-15 厦门大学 一种人脸属性识别方法和装置
CN111723762A (zh) * 2020-06-28 2020-09-29 湖南国科微电子股份有限公司 人脸属性识别方法、装置、电子设备及存储介质
CN111798546A (zh) * 2020-06-03 2020-10-20 浙江大学 一种基于生成对抗机制的多人表情迁移方法
CN111985439A (zh) * 2020-08-31 2020-11-24 中移(杭州)信息技术有限公司 人脸检测方法、装置、设备和存储介质
CN112183332A (zh) * 2020-09-28 2021-01-05 成都希盟泰克科技发展有限公司 一种基于迁移学习的牦牛脸识别方法
CN112287877A (zh) * 2020-11-18 2021-01-29 上海泗科智能科技有限公司 一种多角色特写镜头追踪方法
CN112597944A (zh) * 2020-12-29 2021-04-02 北京市商汤科技开发有限公司 关键点检测方法及装置、电子设备和存储介质
CN112633203A (zh) * 2020-12-29 2021-04-09 上海商汤智能科技有限公司 关键点检测方法及装置、电子设备和存储介质
CN112818770A (zh) * 2021-01-19 2021-05-18 中科方寸知微(南京)科技有限公司 跨数据集的人脸关键点检测方法
CN112906500A (zh) * 2021-01-29 2021-06-04 华南理工大学 基于深度特权网络的人脸表情识别方法及系统
CN113191195A (zh) * 2021-04-01 2021-07-30 珠海全志科技股份有限公司 基于深度学习的人脸检测方法及系统
CN113657486A (zh) * 2021-08-16 2021-11-16 浙江新再灵科技股份有限公司 基于电梯图片数据的多标签多属性分类模型建立方法
CN113989586A (zh) * 2021-10-26 2022-01-28 山东省人工智能研究院 一种基于人脸几何运动特征的真假视频检测方法
CN114005150A (zh) * 2020-07-28 2022-02-01 北京君正集成电路股份有限公司 一种可量化的前端人脸检测的设计方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325398B (zh) * 2018-06-30 2020-10-09 东南大学 一种基于迁移学习的人脸属性分析方法
CN110197146B (zh) * 2019-05-23 2021-02-23 招商局金融科技有限公司 基于深度学习的人脸图像分析方法、电子装置及存储介质
CN111695736B (zh) * 2020-06-15 2023-04-21 河北锐景能源科技有限公司 一种基于多模型融合的光伏发电短期功率预测方法
CN111967389B (zh) * 2020-08-18 2022-02-18 厦门理工学院 基于深度双路径学习网络的人脸属性识别方法及系统
CN112329752B (zh) * 2021-01-06 2021-04-06 腾讯科技(深圳)有限公司 人眼图像处理模型的训练方法、图像处理方法及装置
CN114708073B (zh) * 2022-03-29 2023-03-24 湖南华菱电子商务有限公司 一种围标串标智能检测方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825191A (zh) * 2016-03-23 2016-08-03 厦门美图之家科技有限公司 基于人脸多属性信息的性别识别方法、系统及拍摄终端
CN106447625A (zh) * 2016-09-05 2017-02-22 北京中科奥森数据科技有限公司 基于人脸图像序列的属性识别方法及装置
CN106529402A (zh) * 2016-09-27 2017-03-22 中国科学院自动化研究所 基于多任务学习的卷积神经网络的人脸属性分析方法
CN106845549A (zh) * 2017-01-22 2017-06-13 珠海习悦信息技术有限公司 一种基于多任务学习的场景与目标识别的方法及装置
CN106846364A (zh) * 2016-12-30 2017-06-13 明见(厦门)技术有限公司 一种基于卷积神经网络的目标跟踪方法及装置
CN109325398A (zh) * 2018-06-30 2019-02-12 东南大学 一种基于迁移学习的人脸属性分析方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130185314A1 (en) * 2012-01-16 2013-07-18 Microsoft Corporation Generating scoring functions using transfer learning
CN106203395B (zh) * 2016-07-26 2020-01-14 厦门大学 基于多任务深度学习的人脸属性识别方法
CN106652025B (zh) * 2016-12-20 2019-10-01 五邑大学 一种基于视频流与人脸多属性匹配的三维人脸建模方法和打印装置
CN107437092B (zh) * 2017-06-28 2019-11-15 苏州比格威医疗科技有限公司 基于三维卷积神经网络的视网膜oct图像的分类方法
CN108021916B (zh) * 2017-12-31 2018-11-06 南京航空航天大学 基于注意力机制的深度学习糖尿病视网膜病变分类方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825191A (zh) * 2016-03-23 2016-08-03 厦门美图之家科技有限公司 基于人脸多属性信息的性别识别方法、系统及拍摄终端
CN106447625A (zh) * 2016-09-05 2017-02-22 北京中科奥森数据科技有限公司 基于人脸图像序列的属性识别方法及装置
CN106529402A (zh) * 2016-09-27 2017-03-22 中国科学院自动化研究所 基于多任务学习的卷积神经网络的人脸属性分析方法
CN106846364A (zh) * 2016-12-30 2017-06-13 明见(厦门)技术有限公司 一种基于卷积神经网络的目标跟踪方法及装置
CN106845549A (zh) * 2017-01-22 2017-06-13 珠海习悦信息技术有限公司 一种基于多任务学习的场景与目标识别的方法及装置
CN109325398A (zh) * 2018-06-30 2019-02-12 东南大学 一种基于迁移学习的人脸属性分析方法

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209873A (zh) * 2020-01-09 2020-05-29 杭州趣维科技有限公司 一种基于深度学习的高精度人脸关键点定位方法及系统
CN111507263A (zh) * 2020-04-17 2020-08-07 电子科技大学 一种基于多源数据的人脸多属性识别方法
CN111507263B (zh) * 2020-04-17 2022-08-05 电子科技大学 一种基于多源数据的人脸多属性识别方法
CN111626115A (zh) * 2020-04-20 2020-09-04 北京市西城区培智中心学校 一种人脸属性识别方法和装置
CN111524226A (zh) * 2020-04-21 2020-08-11 中国科学技术大学 讽刺肖像画的关键点检测与三维重建方法
CN111524226B (zh) * 2020-04-21 2023-04-18 中国科学技术大学 讽刺肖像画的关键点检测与三维重建方法
CN111611920A (zh) * 2020-05-21 2020-09-01 杭州智珺智能科技有限公司 一种基于属性特征提取的ai人脸风格辨识方法
CN111666846A (zh) * 2020-05-27 2020-09-15 厦门大学 一种人脸属性识别方法和装置
CN111666846B (zh) * 2020-05-27 2023-05-30 厦门大学 一种人脸属性识别方法和装置
CN111798546A (zh) * 2020-06-03 2020-10-20 浙江大学 一种基于生成对抗机制的多人表情迁移方法
CN111798546B (zh) * 2020-06-03 2022-04-26 浙江大学 一种基于生成对抗机制的多人表情迁移方法
CN111723762A (zh) * 2020-06-28 2020-09-29 湖南国科微电子股份有限公司 人脸属性识别方法、装置、电子设备及存储介质
CN114005150A (zh) * 2020-07-28 2022-02-01 北京君正集成电路股份有限公司 一种可量化的前端人脸检测的设计方法
CN114005150B (zh) * 2020-07-28 2024-05-03 北京君正集成电路股份有限公司 一种可量化的前端人脸检测的设计方法
CN111985439A (zh) * 2020-08-31 2020-11-24 中移(杭州)信息技术有限公司 人脸检测方法、装置、设备和存储介质
CN112183332A (zh) * 2020-09-28 2021-01-05 成都希盟泰克科技发展有限公司 一种基于迁移学习的牦牛脸识别方法
CN112287877A (zh) * 2020-11-18 2021-01-29 上海泗科智能科技有限公司 一种多角色特写镜头追踪方法
CN112597944A (zh) * 2020-12-29 2021-04-02 北京市商汤科技开发有限公司 关键点检测方法及装置、电子设备和存储介质
CN112633203A (zh) * 2020-12-29 2021-04-09 上海商汤智能科技有限公司 关键点检测方法及装置、电子设备和存储介质
CN112597944B (zh) * 2020-12-29 2024-06-11 北京市商汤科技开发有限公司 关键点检测方法及装置、电子设备和存储介质
CN112818770A (zh) * 2021-01-19 2021-05-18 中科方寸知微(南京)科技有限公司 跨数据集的人脸关键点检测方法
CN112906500B (zh) * 2021-01-29 2023-08-22 华南理工大学 基于深度特权网络的人脸表情识别方法及系统
CN112906500A (zh) * 2021-01-29 2021-06-04 华南理工大学 基于深度特权网络的人脸表情识别方法及系统
CN113191195A (zh) * 2021-04-01 2021-07-30 珠海全志科技股份有限公司 基于深度学习的人脸检测方法及系统
CN113657486A (zh) * 2021-08-16 2021-11-16 浙江新再灵科技股份有限公司 基于电梯图片数据的多标签多属性分类模型建立方法
CN113657486B (zh) * 2021-08-16 2023-11-07 浙江新再灵科技股份有限公司 基于电梯图片数据的多标签多属性分类模型建立方法
CN113989586A (zh) * 2021-10-26 2022-01-28 山东省人工智能研究院 一种基于人脸几何运动特征的真假视频检测方法

Also Published As

Publication number Publication date
CN109325398B (zh) 2020-10-09
CN109325398A (zh) 2019-02-12

Similar Documents

Publication Publication Date Title
WO2020001082A1 (zh) 一种基于迁移学习的人脸属性分析方法
CN109344693B (zh) 一种基于深度学习的人脸多区域融合表情识别方法
WO2022111236A1 (zh) 一种结合注意力机制的面部表情识别方法及系统
US11227147B2 (en) Face image processing methods and apparatuses, and electronic devices
CN109344701B (zh) 一种基于Kinect的动态手势识别方法
WO2020108362A1 (zh) 人体姿态检测方法、装置、设备及存储介质
WO2021120752A1 (zh) 域自适应模型训练、图像检测方法、装置、设备及介质
WO2022134337A1 (zh) 人脸遮挡检测方法、系统、设备及存储介质
CN112800903B (zh) 一种基于时空图卷积神经网络的动态表情识别方法及系统
WO2022257408A1 (zh) 一种基于u型网络的医学图像分割方法
US11915514B2 (en) Method and apparatus for detecting facial key points, computer device, and storage medium
CN108776983A (zh) 基于重建网络的人脸重建方法和装置、设备、介质、产品
WO2019232862A1 (zh) 嘴巴模型训练方法、嘴巴识别方法、装置、设备及介质
WO2017088432A1 (zh) 图像识别方法和装置
WO2020187160A1 (zh) 基于级联的深层卷积神经网络的人脸识别方法及系统
CN101964064A (zh) 一种人脸比对方法
WO2020001084A1 (zh) 一种在线学习的人脸识别方法
CN109190561B (zh) 一种视频播放中的人脸识别方法及系统
CN102654903A (zh) 一种人脸比对方法
WO2021127916A1 (zh) 脸部情感识别方法、智能装置和计算机可读存储介质
WO2021196928A1 (zh) 表情识别方法、装置、计算机设备及可读存储介质
WO2023284182A1 (en) Training method for recognizing moving target, method and device for recognizing moving target
WO2022184133A1 (zh) 一种基于视觉的人脸表情识别方法
WO2020151148A1 (zh) 基于神经网络的黑白照片色彩恢复方法、装置及存储介质
US11893773B2 (en) Finger vein comparison method, computer equipment, 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: 19824523

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19824523

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19824523

Country of ref document: EP

Kind code of ref document: A1

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 10.08.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19824523

Country of ref document: EP

Kind code of ref document: A1