CN111814713A - An expression recognition method based on BN parameter transfer learning - Google Patents

An expression recognition method based on BN parameter transfer learning Download PDF

Info

Publication number
CN111814713A
CN111814713A CN202010682216.6A CN202010682216A CN111814713A CN 111814713 A CN111814713 A CN 111814713A CN 202010682216 A CN202010682216 A CN 202010682216A CN 111814713 A CN111814713 A CN 111814713A
Authority
CN
China
Prior art keywords
facial
facial expression
expression recognition
source
expression
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010682216.6A
Other languages
Chinese (zh)
Inventor
郭文强
黄梓轩
候勇严
徐成
毛玲玲
赵艳
徐紫薇
李梦然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi University of Science and Technology
Original Assignee
Shaanxi University of Science and Technology
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 Shaanxi University of Science and Technology filed Critical Shaanxi University of Science and Technology
Priority to CN202010682216.6A priority Critical patent/CN111814713A/en
Publication of CN111814713A publication Critical patent/CN111814713A/en
Pending legal-status Critical Current

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/174Facial expression recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of target recognition, and discloses an expression recognition method based on BN parameter migration learning. The invention fully utilizes the transfer learning mechanism to apply the learning knowledge in a certain field to different but related fields, can effectively solve the problem of insufficient sample data volume of facial expression modeling caused by illumination, shooting angle and the like in facial expression recognition, reduces the influence of insufficient sample number on parameter learning precision and recognition result, and can be widely applied to the environment with noisy, uncertain and difficult acquisition of a large amount of human face target data.

Description

一种基于BN参数迁移学习的表情识别方法An expression recognition method based on BN parameter transfer learning

技术领域technical field

本发明涉及人工智能、图像工程、管理科学与工程中的目标识别应用领域,具体涉及一种基于BN参数迁移学习的表情识别方法。The invention relates to the application field of target recognition in artificial intelligence, image engineering, management science and engineering, in particular to an expression recognition method based on BN parameter transfer learning.

背景技术Background technique

贝叶斯网络(Bayesian network,BN)在不确定性建模和决策支持中具有实际应用价值,贝叶斯网络参数学习是在结构已知的情况下,通过样本数据和先验知识,获得所有网络节点的条件概率分布的过程。Bayesian network (Bayesian network, BN) has practical application value in uncertainty modeling and decision support. Bayesian network parameter learning is to obtain all parameters through sample data and prior knowledge when the structure is known. The process of conditional probability distribution of network nodes.

将问题域转化为BN模型表示后,便可利用BN理论完成推理任务。其中,联合树(Junction tree)算法是目前计算速度快、应用最广的BN精确推理算法之一。由于BN有机地结合了概率论与图论的理论成果,是解决不确定性和不完备信息推理问题的有效方法,是可应用于面部表情识别的理想工具。After the problem domain is transformed into the BN model representation, the BN theory can be used to complete the reasoning task. Among them, the Junction tree algorithm is one of the BN accurate inference algorithms with fast calculation speed and the most widely used. Because BN organically combines the theoretical achievements of probability theory and graph theory, it is an effective method to solve the problem of uncertainty and incomplete information reasoning, and it is an ideal tool that can be applied to facial expression recognition.

BN模型的参数学习是指在BN模型结构已知的前提下估算出BN模型参数的问题。目前,最大似然估计(Maximum likelihood estimation,MLE)提供了一种给定观察数据评估模型参数的方法,即模型已定,参数未知。在数据比较充足时,通常采用最大似然估计算法,可以获得较好的参数学习精度。最大后验概率(Maximum A Posterior,MAP)估计是根据经验数据获得对难以观察的量的点估计。与最大似然估计类似,最大后验估计的融入了要估计量的先验分布在其中。The parameter learning of the BN model refers to the problem of estimating the parameters of the BN model under the premise that the structure of the BN model is known. Currently, Maximum Likelihood Estimation (MLE) provides a method for evaluating model parameters given observational data, that is, the model has been determined and the parameters are unknown. When the data is sufficient, the maximum likelihood estimation algorithm is usually used to obtain better parameter learning accuracy. Maximum A Posterior (MAP) estimates are point estimates of hard-to-observe quantities obtained from empirical data. Similar to maximum likelihood estimation, maximum a posteriori estimation incorporates the prior distribution of the quantity to be estimated.

人脸面部的表情识别是一个综合了人工智能、神经学、计算机等的交叉学科,在心理分析、临床医学、车辆监控以及商业领域都有很广泛的应用。面部表情是指通过脸部肌肉、眼部肌肉和口部肌肉的变化而表现出的各种情绪。随着对面部表情研究的深入,Ekman进一步完善了人类的面部表情,提出了基于运动单元(Action Unit,AU)的面部动作编码系统,通过分析这些运动单元的运动特征来说明与之联系的相关表情(出处:P.Ekman,W.V.Friesen,J.C.Hager,Facial Action Coding System,A Human Face,Salt LakeCity,UT,2002.)。Facial expression recognition is an interdisciplinary subject that integrates artificial intelligence, neurology, and computers. It has a wide range of applications in psychoanalysis, clinical medicine, vehicle monitoring, and business. Facial expressions refer to various emotions expressed through changes in facial muscles, eye muscles and mouth muscles. With the in-depth study of facial expressions, Ekman further improved human facial expressions, and proposed a facial action coding system based on Action Units (AUs), and analyzed the motion characteristics of these motor units to illustrate the correlation with them. Facial expressions (Source: P. Ekman, W. V. Friesen, J. C. Hager, Facial Action Coding System, A Human Face, Salt Lake City, UT, 2002.).

已有文献针对面部表情识别过程中获得的特征样本稀少的问题,提出了一种基于小数据集下贝叶斯网络建模的面部表情识别方法(详见:郭文强,高文强,肖秦琨,徐成,李梦然.基于小数据集下BN建模的面部表情识别[J].科学技术与工程,2018,18(35):179-183)。该方法首先提取面部表情图像的几何特征和HOG特征,经特征融合和归一化等处理构成动作单元(AU)标签样本集,其次提出了用于面部表情识别的BN结构,并将定性专家经验转化为BN条件概率之间的约束集合,随后引入凸优化最大化求解完成BN模型参数的估算。但是,专家经验的获取往往存在较大的主观性,不利于BN参数的估计。In view of the problem that the feature samples obtained in the process of facial expression recognition are scarce, the existing literature proposes a facial expression recognition method based on Bayesian network modeling under small data sets (see: Guo Wenqiang, Gao Wenqiang, Xiao Qinkun, Xu Cheng, Li Mengran. Facial expression recognition based on BN modeling under small dataset [J]. Science Technology and Engineering, 2018, 18(35):179-183). The method first extracts the geometric features and HOG features of facial expression images, and then forms an action unit (AU) label sample set through feature fusion and normalization. It is transformed into a set of constraints between BN conditional probabilities, and then convex optimization is introduced to maximize the solution to complete the estimation of BN model parameters. However, the acquisition of expert experience is often subject to considerable subjectivity, which is not conducive to the estimation of BN parameters.

迁移学习的原理就是将一个领域的知识经验应用到其他场景中,在一个或多个任务领域(源域)中对带有标签的样本进行训练分析,获得此类任务的参数模型,进而应用到另一个相关的任务领域(目标域)中,完成对另一领域数据的分类。The principle of transfer learning is to apply knowledge and experience in one field to other scenarios, train and analyze labeled samples in one or more task fields (source fields), obtain parameter models of such tasks, and then apply them to In another related task domain (target domain), the classification of data from another domain is done.

迁移学习在处理这两个具有相关性、共同性的任务时,不需要分别对源域和目标域两个任务的数据进行单独处理,而是使用对其中一个任务数据进行模式识别的经验和知识来对另一个任务数据进行处理。这样在BN参数学习过程中可以避免受到其中一个任务数据的差异性造成学习结果的不准确,尤其可以避免专家经验主观性的影响。When transfer learning processes these two related and common tasks, it does not need to process the data of the two tasks in the source domain and the target domain separately, but uses the experience and knowledge of pattern recognition on one of the task data. to process another task data. In this way, in the process of BN parameter learning, the inaccuracy of the learning result caused by the difference of one of the task data can be avoided, especially the influence of the subjectivity of expert experience can be avoided.

发明内容SUMMARY OF THE INVENTION

本发明提供一种基于BN参数迁移学习的表情识别方法,可以解决现有技术中的上述问题。The present invention provides an expression recognition method based on BN parameter transfer learning, which can solve the above problems in the prior art.

本发明提供了一种基于BN参数迁移学习的表情识别方法,包括以下步骤:The present invention provides an expression recognition method based on BN parameter transfer learning, comprising the following steps:

S1、获取面部活动单元AU;S1. Obtain the facial activity unit AU;

S2、判断面部表情BN是否建模;S2. Determine whether the facial expression BN is modeled;

判断建模标记BN_Flag是否为“真”,初始值设定为“假”,若BN_Flag为“真”,说明BN已建模,则跳转至S7,进入识别过程;否则,执行S3,进入建模过程;Judging whether the modeling flag BN_Flag is "true", the initial value is set to "false", if BN_Flag is "true", indicating that BN has been modeled, then jump to S7, enter the recognition process; otherwise, execute S3, enter the construction mold process;

S3、获取BN建模所需样本AU;S3. Obtain the sample AU required for BN modeling;

S31、确定人脸表情识别的类别数E_num及类别;S31. Determine the number of categories E_num and categories for facial expression recognition;

S32、根据每个类别的表情提取所需面部活动单元AU的样本数据集;S32, extract the sample data set of the required facial activity unit AU according to the expression of each category;

S4、确定人脸表情识别目标/源域网络BN模型结构图;S4. Determine the target/source domain network BN model structure diagram of facial expression recognition;

通过获取到的面部活动单元AU的样本数据集,以及对人脸面部表情与活动单元AU的关系作为先验信息,确定出建立目标网络人脸表情识别BN的模型结构图G1,确定出源域网络人脸表情识别BN的模型结构图G2;Through the obtained sample data set of the facial activity unit AU and the relationship between the facial expression and the activity unit AU as a priori information, the model structure diagram G1 for establishing the target network facial expression recognition BN is determined, and the source domain is determined. Model structure diagram G2 of BN for network facial expression recognition;

S5、源域BN参数学习;S5, source domain BN parameter learning;

S51、获取各源域面部活动单元AU的样本数据集M(Sn);S51, obtain the sample data set M (S n ) of each source domain face activity unit AU;

S52、计算各个源域样本值占源域总样本值的源权重系数k(n),用公式(1)所示:S52, calculate the source weight coefficient k(n) of each source domain sample value accounting for the total source domain sample value, as shown in formula (1):

Figure BDA0002586265450000031
Figure BDA0002586265450000031

其中,各个源权重系数之和为1,同时权重系数的值均为[0,1]之间的任意实数;Among them, the sum of each source weight coefficient is 1, and the value of the weight coefficient is any real number between [0, 1];

S53、采用最大似然估计MLE的方法得出各个源域BN模型的参数θni,i为源域BN模型子节点中的第i个节点;S53, using the method of maximum likelihood estimation MLE to obtain the parameter θ ni of each source domain BN model, where i is the ith node in the sub-nodes of the source domain BN model;

S54、融合各个源域BN模型的参数θni,得到总源域BN参数θSiS54, fuse the parameters θ ni of each source domain BN model to obtain the total source domain BN parameter θ Si ;

θSi=∑nk(n)θni (2);θ Si =∑ n k(n)θ ni (2);

S6、获取目标域人脸表情的BN参数;S6. Obtain the BN parameters of the facial expression in the target domain;

S61、采用最大后验概率估计MAP的方法获得目标域初始BN模型的参数θTi,i为目标域BN模型子节点中的第i个节点;S61, using the method of maximum a posteriori probability estimation MAP to obtain the parameter θ Ti of the initial BN model of the target domain, where i is the ith node in the sub-nodes of the BN model of the target domain;

S62、根据权重因子计算出目标域人脸表情BN的最终参数θiS62, calculate the final parameter θ i of the target domain facial expression BN according to the weight factor;

θi=α1θTi+α2θsi (3)θ i = α1θTi + α2θsi (3)

其中,α1和α2为权重因子,α1+α2=1;Among them, α1 and α2 are weighting factors, α1+α2=1;

S63、将BN_Flag标记设置为“真”,完成BN建模;返回S1;S63. Set the BN_Flag flag to "true" to complete the BN modeling; return to S1;

S7、面部表情识别;S7, facial expression recognition;

S71、设置面部表情属性概率阈值Ψ;S71, set the facial expression attribute probability threshold Ψ;

S72、将面部表情识别证据AU,置入构建好的BN模型,利用联合树推理算法进行BN推理,得到面部表情属性概率Ψ';S72, put the facial expression recognition evidence AU into the constructed BN model, and use the joint tree inference algorithm to perform BN inference to obtain the facial expression attribute probability Ψ';

S73、判别面部表情;S73. Discriminate facial expressions;

若面部表情属性概率Ψ'大于等于阈值Ψ,则输出面部表情属性,即面部表情识别结果,否则,重新获取新AU数据集。If the facial expression attribute probability Ψ' is greater than or equal to the threshold Ψ, output the facial expression attribute, that is, the facial expression recognition result, otherwise, re-acquire a new AU data set.

所述步骤S32中根据每类表情提取面部活动单元AU的具体步骤包括:The specific steps of extracting the facial activity unit AU according to each type of expression in the step S32 include:

S321、对人脸面部表情图像通过CLM算法得到人脸表情的几何特征;S321, obtaining the geometric features of the facial expression on the facial expression image of the human face through the CLM algorithm;

S322、对人脸面部表情图像通过HOG算法提取人脸表情的纹理特征;S322, extracting the texture feature of the facial expression by using the HOG algorithm on the facial expression image of the human face;

S323、对人脸表情的几何特征和纹理特征进行特征融合和归一化处理,得到人脸表情的融合特征;S323, performing feature fusion and normalization processing on the geometric features and texture features of the facial expressions to obtain the fusion features of the facial expressions;

S324、利用支持向量机SVM对人脸表情的融合特征进行分类,得到目标域面部活动单元AU的数据集M(t)和源域面部活动单元AU的数据集M(Sn),n=1,2,...,q,q为源域的个数,q取自然数。S324. Use the support vector machine SVM to classify the fusion features of the facial expressions, and obtain the dataset M(t) of the facial activity unit AU in the target domain and the dataset M(S n ) of the facial activity unit AU in the source domain, n=1 ,2,...,q, q is the number of source fields, and q is a natural number.

所述步骤S321中得到人脸表情的几何特征的具体步骤包括:The specific steps of obtaining the geometric features of facial expressions in the step S321 include:

S3211、获取表情图像特征点定位信息;S3211. Obtain the feature point positioning information of the facial expression image;

利用CLM面部特征点定位算法进行特征点定位,提取人脸表情的几何特征。The CLM facial feature point localization algorithm is used to locate the feature points and extract the geometric features of the facial expressions.

所述步骤S4中确定人脸表情识别目标/源网络BN模型结构图的具体步骤包括:The specific steps of determining the structure diagram of the facial expression recognition target/source network BN model in the step S4 include:

S41、确定人脸表情识别BN节点;S41, determine the face expression recognition BN node;

确定人脸表情识别BN的父节点和子节点;Determine the parent node and child node of the facial expression recognition BN;

S42、确定人脸表情识别BN的有向无环图;S42. Determine the directed acyclic graph of the facial expression recognition BN;

用有向边依次连接人脸表情识别BN的父节点和子节点,确定建立人脸表情识别目标网络BN模型结构图G1,建立人脸表情识别源网络BN模型结构图G2。Directed edges are used to connect the parent and child nodes of the face expression recognition BN in turn, and the BN model structure diagram G1 of the face expression recognition target network is determined to be established, and the face expression recognition source network BN model structure diagram G2 is established.

所述步骤S11中人脸表情识别的类别数E_num为6,包括:“快乐”、“惊讶”、“害怕”、“愤怒”、“厌恶”和“悲伤”6类表情。The number of categories E_num for facial expression recognition in the step S11 is 6, including: "happy", "surprised", "scared", "angry", "disgusted" and "sad".

与现有技术相比,本发明的有益效果在于:Compared with the prior art, the beneficial effects of the present invention are:

(1)利用迁移学习解决了目标域人脸表情识别过程中BN实验训练数据集数据不足(小数据问题)时其识别正确率较低的问题。迁移学习是从相近领域中获取数据和信息以解决数据量不充足领域的学习问题。通过源域数据中的知识,构建目标域上学习模型的学习方法,提高了识别正确率。(1) Transfer learning is used to solve the problem of low recognition accuracy when the BN experimental training data set is insufficient (small data problem) in the process of face expression recognition in the target domain. Transfer learning is to obtain data and information from similar fields to solve learning problems in fields with insufficient data. Through the knowledge in the source domain data, the learning method of constructing the learning model on the target domain improves the recognition accuracy.

(2)可以避免专家经验主观性对BN参数学习精度的影响。源任务中学习到的知识迁移到目标任务中,而源任务中学习算法是基于经典的充足样本下MLE、MAP等算法,其学习机制是基于数据驱动的方法,从而避免了BN参数学习中主观专家经验对学习精度的影响。(2) The influence of subjectivity of expert experience on the learning accuracy of BN parameters can be avoided. The knowledge learned in the source task is transferred to the target task, and the learning algorithm in the source task is based on the classic sufficient samples MLE, MAP and other algorithms, and its learning mechanism is based on a data-driven method, thus avoiding the subjective learning of BN parameters. The effect of expert experience on learning accuracy.

附图说明Description of drawings

图1为本发明提供的基于迁移机制的表情识别方法流程图。FIG. 1 is a flowchart of an expression recognition method based on a migration mechanism provided by the present invention.

图2为本发明提供的人脸表情识别目标域BN模型结构图。FIG. 2 is a structural diagram of a face expression recognition target domain BN model provided by the present invention.

图3为本发明提供的人脸表情识别源域BN模型结构图。FIG. 3 is a structural diagram of a face expression recognition source domain BN model provided by the present invention.

图4为本发明提供的源网络下人脸表情的BN参数学习流程图。FIG. 4 is a flow chart of learning BN parameters of facial expressions under the source network provided by the present invention.

图5为本发明提供的目标网络下人脸表情的BN参数学习流程图。FIG. 5 is a flow chart of learning BN parameters of facial expressions under the target network provided by the present invention.

图6为本发明实施例提供的CK数据集六种基本表情图。FIG. 6 is six basic expression diagrams of the CK data set provided by the embodiment of the present invention.

图7为本发明实施例提供的FER2013数据集六种基本表情图。FIG. 7 shows six basic facial expressions of the FER2013 dataset provided by an embodiment of the present invention.

图8为本发明实施例提供的面部特征点定位图。FIG. 8 is a facial feature point location map provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图1-8,对本发明的一个具体实施方式进行详细描述,但应当理解本发明的保护范围并不受具体实施方式的限制。A specific embodiment of the present invention will be described in detail below with reference to the accompanying drawings 1-8, but it should be understood that the protection scope of the present invention is not limited by the specific embodiment.

本发明实施例提供了一种基于BN参数迁移学习的表情识别方法,根据面部表情与AU标签关系构建出面部表情识别BN模型结构,其次利用人脸源域数据集计算的BN参数和人脸目标域数据集BN初始参数,根据迁移机制获得最终的人脸表情识别BN参数,并利用BN理论中推理算法进行BN推理,识别出面部表情。本发明充分利用了迁移学习机制将某个领域上学习的知识应用到不同但相关的领域中,可以有效地解决面部表情识别中由于光照、拍摄角度等导致的面部表情建模样本数据量不充足的问题,减少了样本数量不足对参数学习精度和识别结果的影响,可广泛应用于嘈杂、不确定以及难以获取大量人脸目标数据的环境中。The embodiment of the present invention provides an expression recognition method based on BN parameter transfer learning. The facial expression recognition BN model structure is constructed according to the relationship between the facial expression and the AU label, and then the BN parameters and the face target calculated by the face source domain data set are used. Domain data set BN initial parameters, obtain the final facial expression recognition BN parameters according to the migration mechanism, and use the inference algorithm in BN theory to perform BN inference to recognize facial expressions. The invention makes full use of the transfer learning mechanism to apply the knowledge learned in a certain field to different but related fields, and can effectively solve the problem of insufficient facial expression modeling sample data due to illumination, shooting angle, etc. in facial expression recognition. It reduces the influence of insufficient number of samples on parameter learning accuracy and recognition results, and can be widely used in noisy, uncertain and difficult to obtain a large amount of face target data environment.

如图1所示,本发明提供的一种基于BN参数迁移学习的表情识别方法,包括以下步骤:As shown in Fig. 1, a kind of expression recognition method based on BN parameter transfer learning provided by the present invention comprises the following steps:

S1:获取面部活动单元(AU);S1: Get facial activity unit (AU);

面部活动单元AU含义参见:Valstar M F,Almaev T,Girard J M,etal.FERA2015-second facial expression recognition and analysis challenge[C]//IEEE,International Conference and Workshops on Automatic Face and GestureRecognition.2015:1-8,其中动作单元AU6表示“下嘴轮廓上翘”发生与否、AU25代表“双唇分开暴露牙齿”发生与否事件等;Refer to: Valstar M F, Almaev T, Girard J M, et al. FERA2015-second facial expression recognition and analysis challenge[C]//IEEE, International Conference and Workshops on Automatic Face and GestureRecognition.2015:1-8, Among them, the action unit AU6 represents whether the "lower mouth contour is upturned" occurs or not, and AU25 represents the occurrence of the event of "splitting the lips and exposing the teeth", etc.;

可选的,利用Openface开源工具(出处:Baltrusaitis T,Robinson P,Morency LP.OpenFace:An open source facial behavior analysis toolkit[C]//2016IEEEWinter Conference on Applications of Computer Vision(WACV).IEEE,2016.),对输入的图片信息进行CLM算法得到人脸表情的几何特征,HOG算法提取人脸表情的HOG特征经过特征融合和归一化处理得到人脸表情的融合特征,利用支持向量机(SVM)进行分类,得到目标域面部活动单元(AU)的数据集M(t)和源域面部活动单元(AU)的数据集M(Sn)n=1,2,...,q。q为源域的个数,q取自然数。Optionally, use the Openface open source tool (source: Baltrusaitis T, Robinson P, Morency LP. OpenFace: An open source facial behavior analysis toolkit[C]//2016IEEEWinter Conference on Applications of Computer Vision(WACV).IEEE, 2016.) , perform the CLM algorithm on the input picture information to obtain the geometric features of the facial expression, and the HOG algorithm extracts the HOG features of the facial expression through feature fusion and normalization to obtain the fusion features of the facial expression, and uses the support vector machine (SVM) to carry out Classify to obtain a dataset M(t) of target-domain face active units (AU) and a dataset M(S n ) of source-domain face active units (AU) n=1, 2, . . . , q. q is the number of source fields, and q is a natural number.

S2:判断判断面部表情BN是否已经建模。S2: Determine whether the facial expression BN has been modeled.

判断BN结构建模标记BN_Flag是否为“真”。BN_Flag初始值设定为“假”,BN_Flag=0(0为“假”)。如果建模,BN_Flag=1(1为“真”),则跳转至S7,进行人脸表情识别。否则,执行S3,进入BN建模过程;Determine whether the BN structure modeling flag BN_Flag is "true". The initial value of BN_Flag is set to "false", BN_Flag=0 (0 is "false"). If modeling, BN_Flag=1 (1 is "true"), then jump to S7 to perform facial expression recognition. Otherwise, execute S3 and enter the BN modeling process;

S3:获取BN建模所需样本AU。S3: Obtain the sample AU required for BN modeling.

S31:确定人脸表情识别的类别数E_num;本例中E_num取6。即对应“快乐”、“惊讶”、“害怕”、“愤怒”、“厌恶”和“悲伤”6类表情。S31: Determine the number of categories E_num for facial expression recognition; in this example, E_num is 6. That is, it corresponds to six types of expressions: "happy", "surprised", "frightened", "angry", "disgusted" and "sad".

S32:根据每类表情提取面部活动单元AU;S32: extract facial activity unit AU according to each type of expression;

可选的,对人脸面部表情图像利用CLM算法和HOG算法得到人脸表情的几何特征和纹理特征,经过特征融合和归一化处理得到人脸表情的融合特征,利用支持向量机(SVM)进行分类,得到目标域面部活动单元(AU)的数据集M(t)和源域面部活动单元(AU)的数据集M(Sn)n=1,2,...,q。q为源域的个数,q取自然数。Optionally, use the CLM algorithm and the HOG algorithm to obtain the geometric features and texture features of the facial expression on the facial expression image, obtain the fusion features of the facial expression through feature fusion and normalization, and use the support vector machine (SVM) to obtain the fusion features of the facial expression. Perform classification to obtain a dataset M(t) of target-domain face active units (AU) and a dataset M(S n ) of source-domain face active units (AU) n=1, 2, . . . , q. q is the number of source fields, and q is a natural number.

S4:确定人脸表情识别的目标(源)网络的BN模型结构图;S4: determine the BN model structure diagram of the target (source) network for facial expression recognition;

S41:人脸表情识别BN节点的确定。S41: Determination of the face expression recognition BN node.

可选的,选用“Expression”节点人脸表情识别BN的父节点(待查询节点);“AU1”、“AU2”、“AU4”、“AU5”、“AU6”、“AU7”、“AU9”、“AU12”、“AU15”、“AU17”、“AU23”、“AU25”等节点人脸表情识别BN的子节点(证据节点)。Optionally, select the "Expression" node to identify the parent node of the BN (the node to be queried); "AU1", "AU2", "AU4", "AU5", "AU6", "AU7", "AU9" , "AU12", "AU15", "AU17", "AU23", "AU25" and other nodes are the child nodes (evidence nodes) of BN for facial expression recognition.

S42:确定人脸表情识别BN的有向无环图。S42: Determine the directed acyclic graph of the facial expression recognition BN.

用有向边依次连接父节点和子节点,即依次以Expression作为12条有向边的箭尾,箭头分别指向AU1、AU2、AU4、AU5、AU6、AU7、AU9、AU12、AU15、AU17、AU23、AU25。确定出建立目标人脸表情识别BN模型结构G1,源域人脸表情识别BN模型结构G2;Directed edges are used to connect parent nodes and child nodes in turn, that is, Expression is used as the nock tail of 12 directed edges in turn, and the arrows point to AU1, AU2, AU4, AU5, AU6, AU7, AU9, AU12, AU15, AU17, AU23, AU25. Determined to establish the target facial expression recognition BN model structure G1, the source domain facial expression recognition BN model structure G2;

S5:源域BN参数学习;S5: source domain BN parameter learning;

S51:根据人脸表情识别的源网络的BN模型计算各个源域网络的小样本数量阈值C(n)(BN模型学习所需的小样本数量阈值确定参见:D.Koller,and N.Friedman,Probabilistic Graphical Models:Principles and Techniques-Adaptive Computationand Machine Learning,United States of America,the MIT Press,2009.)S51: Calculate the small sample number threshold C(n) of each source domain network according to the BN model of the source network for face expression recognition (for the determination of the small sample number threshold required for BN model learning, see: D. Koller, and N. Friedman, Probabilistic Graphical Models: Principles and Techniques-Adaptive Computation and Machine Learning, United States of America, the MIT Press, 2009.)

S52:判断源域面部活动单元(AU)的数据集M(Sn)是否大于C(n),如果大于C(n),执行S122,否则利用S10方法,继续获取M(Sn)。S52: Determine whether the data set M(Sn) of the source domain face activity unit (AU) is greater than C( n ), if greater than C(n), execute S122, otherwise use the S10 method to continue to obtain M( Sn ).

S53:计算各个源域样本值占源域总样本值的源权重系数k(n);如公式(1)所示。S53: Calculate the source weight coefficient k(n) of each source domain sample value accounting for the total source domain sample value; as shown in formula (1).

Figure BDA0002586265450000081
Figure BDA0002586265450000081

各源权重系数之和为1,同时权重系数的值均为[0,1]之间的任意实数。其中M(Sn)为各源域AU样本集(n=1,2,...,q);The sum of the weight coefficients of each source is 1, and the value of the weight coefficients is any real number between [0, 1]. where M(S n ) is each source domain AU sample set (n=1,2,...,q);

S54:采用最大似然估计(MLE)的方法学习出各个源域BN模型的参数S54: Use the maximum likelihood estimation (MLE) method to learn the parameters of each source domain BN model

θni(i为源域BN模型子节点的第i个节点),θ ni (i is the ith node of the child node of the source domain BN model),

S55:融合源域的BN参数θniS55: the BN parameter θ ni of the fusion source domain;

θSi=∑nk(n)θni (2)θ Si =∑ n k(n)θ ni (2)

S6:获取目标域人脸表情的BN参数;S6: Obtain the BN parameters of the facial expression in the target domain;

S61:采用最大后验概率估计(MAP)的方法学习出目标域初始BN模型的参数θTiS61: adopt the method of maximum a posteriori probability estimation (MAP) to learn the parameter θ Ti of the initial BN model of the target domain;

S62:根据权重因子计算出目标BN最终参数θiS62: calculate the final parameter θ i of the target BN according to the weight factor;

θi=α1θTi+α2θsi (3)θ i = α1θTi + α2θsi (3)

其中α1和α2为权重因子,α1+α2=1;where α1 and α2 are weighting factors, α1+α2=1;

可选的,α1取0.7。Optionally, α1 is set to 0.7.

S63:将BN_Flag标记设置为“真”,表明BN建模已完成;返回S1获取面部表情识别证据AU;S63: Set the BN_Flag flag to "true", indicating that the BN modeling has been completed; return to S1 to obtain the facial expression recognition evidence AU;

若BN_Flag=真,返回S1获取面部表情AU后,将不会再次建模,而是进入S7进行表情识别。If BN_Flag=True, after returning to S1 to obtain the facial expression AU, it will not model again, but enter S7 for expression recognition.

S7:人脸表情识别;S7: face expression recognition;

S71:设置面部表情属性概率阈值Ψ。S71: Set the facial expression attribute probability threshold Ψ.

可选的,Ψ取0.7。Optionally, Ψ is 0.7.

S72:利用BN理论中的推理算法进行BN推理,得到面部表情属性概率Ψ';S72: utilize the reasoning algorithm in the BN theory to carry out BN reasoning to obtain the facial expression attribute probability Ψ';

可选的,推理算法取联合树推理算法。Optionally, the inference algorithm adopts the associative tree inference algorithm.

S73:判别面部表情。若面部表情属性概率Ψ'大于等于阈值Ψ,则输出面部表情属性,即面部表情识别结果。否则,重新获取新AU证据样本。S73: Discriminate facial expressions. If the facial expression attribute probability Ψ' is greater than or equal to the threshold Ψ, output the facial expression attribute, that is, the facial expression recognition result. Otherwise, re-acquire new AU evidence samples.

实施例Example

本实施例中的数据集来源为两部分:The source of the data set in this example consists of two parts:

(1)CK数据库(出处:Swati NigamRajiv SinghEmailauthorA.K.Misra.Efficient facial expression recognition using histogram oforiented gradients in wavelet domain,Multimedia Tools and Applications,Vol.77(21)(2018)28725-28747.)可用部分中的主题是97名入门心理学课程的大学生。他们的年龄从18岁到30岁不等。女性占65%,非裔美国人占15%,亚洲或拉丁美洲人占3%。包括六种基本表情,是目前比较通用的人脸表情数据集。如图6所示。(1) CK database (source: Swati NigamRajiv SinghEmailauthorA.K.Misra.Efficient facial expression recognition using histogram oforiented gradients in wavelet domain,Multimedia Tools and Applications,Vol.77(21)(2018)28725-28747.) in the available part The subject is 97 undergraduates in introductory psychology courses. Their ages ranged from 18 to 30 years old. 65% were female, 15% African American, and 3% Asian or Latino. Including six basic expressions, it is a relatively common facial expression dataset at present. As shown in Figure 6.

(2)FER2013数据集(2) FER2013 dataset

FER2013人脸表情数据集(出处:Hong-Wei Ng,Viet Dung Nguyen,VassiliosVonikakis,Stefan Winkler,Deep learning for emotion recognition on smalldatasets using transfer learning,2015.)由35886张人脸表情图片组成,其中包括测试图、公告验证图和私有验证图。每张图片是由大小固定为48x48的灰度图像组成。如图7所示。FER2013 facial expression dataset (source: Hong-Wei Ng, Viet Dung Nguyen, Vassilios Vonikakis, Stefan Winkler, Deep learning for emotion recognition on small datasets using transfer learning, 2015.) consists of 35886 facial expression images, including test images , Announcement Verification Graph and Private Verification Graph. Each image is composed of grayscale images with a fixed size of 48x48. As shown in Figure 7.

在人脸表情识别的目标数据库CK在数量上非常广泛,但参与人数(97人)和人际相似度方面相当有限,同时该数据库的获取是在实验室环境下获取,并不能完全模拟真实场景。为了提高算法的鲁棒性即识别准确率,提出了迁移学习机制。通过源域数据库FER2013用于学习任务中的知识,从而增强目标数据库CK的表情分类。The target database CK for facial expression recognition is very extensive in number, but the number of participants (97 people) and interpersonal similarity are quite limited. At the same time, the database is obtained in a laboratory environment and cannot fully simulate real scenes. In order to improve the robustness of the algorithm, that is, the recognition accuracy, a transfer learning mechanism is proposed. The source domain database FER2013 is used to learn the knowledge in the task, thereby enhancing the expression classification of the target database CK.

本实施例将CK库作为实验的目标域数据集,每种表情选取240张图像(图像序列的最后几帧图像),其中120张表情图像做训练集用于参数学习,可利用基于BN参数迁移学习方法,获取BN参数,进而完成表情识别,CK数据集余下120张图像做测试集使用。将FER2013数据库作为源域,选取300张作为实验的源域数据集,每种表情选取300组AU样本数据用于参数模型迁移。In this embodiment, the CK library is used as the target domain data set of the experiment, and 240 images (the last few frames of the image sequence) are selected for each expression, of which 120 expression images are used as the training set for parameter learning, and the BN-based parameter migration can be used. Learning method, obtain BN parameters, and then complete expression recognition, the remaining 120 images of CK data set are used as test set. Taking the FER2013 database as the source domain, 300 datasets were selected as the source domain dataset for the experiment, and 300 groups of AU sample data were selected for each expression for parameter model migration.

本发明涉及的一种基于迁移机制的表情识别方法,在本实施例中源域数据集M(Sn)=300;用于训练的目标域数据集M(t)=120,然后进行BN参数迁移,得到面部表情最终的BN参数。测试数据集为120组;The present invention relates to an expression recognition method based on a migration mechanism. In this embodiment, the source domain data set M(S n )=300; the target domain data set used for training M(t)=120, and then the BN parameter is performed. Migrate to get the final BN parameters of facial expressions. The test data set is 120 groups;

包括以下步骤:Include the following steps:

S1:获取面部活动单元(AU);S1: Get facial activity unit (AU);

可选的,利用Openface开源工具(出处:Baltrusaitis T,Robinson P,Morency LP.OpenFace:An open source facial behavior analysis toolkit[C]//2016IEEEWinter Conference on Applications of Computer Vision(WACV).IEEE,2016.),对输入的图片信息进行CLM算法得到人脸表情的几何特征,HOG算法提取人脸表情的HOG特征经过特征融合和归一化处理得到人脸表情的融合特征,利用支持向量机(SVM)进行分类,得到目标域面部活动单元(AU)的数据集M(t)=120和源域面部活动单元(AU)的数据集M(sn)n=1,2,...,q。q为源域的个数,q取自然数。本例中,源域的数据集个数q=1,即有一个源域的数据集M(s1)。Optionally, use the Openface open source tool (source: Baltrusaitis T, Robinson P, Morency LP. OpenFace: An open source facial behavior analysis toolkit[C]//2016IEEEWinter Conference on Applications of Computer Vision(WACV).IEEE, 2016.) , perform the CLM algorithm on the input image information to obtain the geometric features of the facial expressions, and the HOG algorithm extracts the HOG features of the facial expressions through feature fusion and normalization to obtain the fusion features of the facial expressions. Classification to obtain a dataset M(t)=120 of target domain face active units (AU) and a dataset M(sn) n=1, 2, . . . , q of source domain face active units (AU). q is the number of source fields, and q is a natural number. In this example, the number of datasets in the source domain is q=1, that is, there is one dataset M(s1) in the source domain.

S2:判断面部表情BN是否已经建模。S2: Determine whether the facial expression BN has been modeled.

本方法首次运用时,初始值BN_Flag=0,即BN未建模,需执行S3,进行BN建模。When this method is used for the first time, the initial value BN_Flag=0, that is, BN is not modeled, and S3 needs to be executed to carry out BN modeling.

S3:获取BN建模所需样本AUS3: Obtain the sample AU required for BN modeling

S31:确定人脸表情识别的类别数E_num;本例中E_num取6。即对应“快乐”、“惊讶”、“害怕”、“愤怒”、“厌恶”和“悲伤”6类表情。S31: Determine the number of categories E_num for facial expression recognition; in this example, E_num is 6. That is, it corresponds to six types of expressions: "happy", "surprised", "frightened", "angry", "disgusted" and "sad".

S32:根据每类表情提取面部活动单元AU。S32: Extract the facial activity unit AU according to each type of expression.

利用Openface开源工具,对输入的表情图像图片信息进行CLM算法得到人脸表情的几何特征,HOG算法提取参考(郭文强,高文强,等.基于小数据集下贝叶斯网络建模的面部表情识别[J].科学技术与工程,2018,018(035):179-183.)算法得到人脸表情的几何特征,HOG算法提取人脸表情的HOG特征经过特征融合和归一化处理得到人脸表情的融合特征,利用支持向量机(SVM)进行分类,得到目标域面部活动单元(AU)的数据集M(t)和源域面部活动单元(AU)的数据集M(S1):Using the Openface open source tool, the CLM algorithm is performed on the input facial expression image information to obtain the geometric features of the facial expression, and the HOG algorithm extracts the reference (Guo Wenqiang, Gao Wenqiang, etc. Facial expression recognition based on Bayesian network modeling under small data sets [ J]. Science Technology and Engineering, 2018, 018(035): 179-183.) The algorithm obtains the geometric features of the facial expression, and the HOG algorithm extracts the HOG features of the facial expression through feature fusion and normalization to obtain the facial expression The fusion features of , are classified by support vector machine (SVM), and the data set M(t) of the target domain face active unit (AU) and the data set M(S 1 ) of the source domain face active unit (AU) are obtained:

S321:获取表情图像特征点定位信息。可选的,利用CLM面部特征点定位算法进行特征点定位,提取人脸表情的几何特征;如图8所示,目标域某表情图像中68个特征点在图像中的的部分坐标为S321: Acquire the feature point positioning information of the facial expression image. Optionally, use the CLM facial feature point positioning algorithm to locate feature points and extract the geometric features of facial expressions; as shown in Figure 8, the partial coordinates of the 68 feature points in a certain expression image in the target domain in the image are:

{260.892 243.672;263.012 269.343;266.038 293.998;270.955 317.406{260.892 243.672; 263.012 269.343; 266.038 293.998; 270.955 317.406

281.108 340.161;299.33 357.192;326.176 367.506;353.233 376.735281.108 340.161; 299.33 357.192; 326.176 367.506; 353.233 376.735

……...

407.442 305.409;387.881 304.42;379.841 306.079;372.826 306.621}407.442 305.409; 387.881 304.42; 379.841 306.079; 372.826 306.621}

S322:得到AU样本数据集。可选的,表情图像经过特征融合和归一化处理,并利用支持向量机(SVM)进行分类,得到AU样本数据集,源域的为M(S1)和;目标域的为M(t);得到部分人脸表情AU样本标签数据集如表1所示。本例六种基本表情为:“快乐”、“惊讶”、“害怕”、“愤怒”、“厌恶”和“悲伤”。S322: Obtain the AU sample data set. Optionally, the facial expression image is processed by feature fusion and normalization, and is classified by a support vector machine (SVM) to obtain an AU sample data set. The source domain is M(S 1 ) and; the target domain is M(t ); get part of the facial expression AU sample label dataset as shown in Table 1. The six basic expressions in this example are: "happy", "surprised", "frightened", "angry", "disgusted" and "sad".

表1 AU样本标签数据集Table 1 AU sample label dataset

Figure BDA0002586265450000121
Figure BDA0002586265450000121

S4:确定人脸表情识别的目标(源)网络的BN模型结构图;S4: determine the BN model structure diagram of the target (source) network for facial expression recognition;

获取到的AU样本数据集,确定出建立目标人脸表情识别BN模型结构G1,源域人脸表情识别BN模型结构G2;From the obtained AU sample data set, it is determined that the target facial expression recognition BN model structure G1 and the source domain facial expression recognition BN model structure G2 are established;

得到目标域、源域的BN模型结构分别如图2、图3所示。在该节点的个数及指向是根据表2中面部表情与AU之间的关系确定的。其中,父节点Expression_S、Expression_T节点代表面部表情的状态,包括六种表情状态;以12个AU作为子节点,每个AU有两个取值事件,分别为“不发生”和“发生”。用“1”,“2”表示此AU节点“发生”和“不发生”两种状态;当“Expression_S=快乐”时,AU6=1,AU12=1,其他AU标签为0。(1表示当前AU发生,0表示AU不发生)。显然,面部表情的状态可由AU状态所表征。The BN model structures of the target domain and source domain are obtained as shown in Figure 2 and Figure 3, respectively. The number and direction of this node are determined according to the relationship between facial expressions and AUs in Table 2. Among them, the parent node Expression_S and Expression_T nodes represent the state of facial expressions, including six kinds of expression states; 12 AUs are used as child nodes, and each AU has two value events, namely "doesn't happen" and "occurs". "1" and "2" are used to represent the two states of "occurrence" and "non-occurrence" of this AU node; when "Expression_S=happy", AU6=1, AU12=1, and other AU labels are 0. (1 means that the current AU occurs, 0 means that the AU does not occur). Obviously, the state of facial expressions can be characterized by the AU state.

S5:源域BN参数学习;S5: source domain BN parameter learning;

S51:本实施例中,源域数据集采用FER2013数据集,其中数据集M(S1)=300;S51: In this embodiment, the source domain data set adopts the FER2013 data set, wherein the data set M(S 1 )=300;

S52:计算各个源域样本值占源域总样本值的源权重系数k(n);S52: Calculate the source weight coefficient k(n) of each source domain sample value accounting for the total source domain sample value;

本实施例中,采用了一个源网络模型,根据上述公式(1)所示,In this embodiment, a source network model is adopted. According to the above formula (1),

Figure BDA0002586265450000131
Figure BDA0002586265450000131

S53:根据最大似然估计得到源域BN参数;S53: Obtain source domain BN parameters according to maximum likelihood estimation;

本实施例中,选择了FER2013数据集的300组AU作为源域数据集,根据MAP可以得到BN节点i的参数。当i=1时,In this embodiment, 300 groups of AUs in the FER2013 data set are selected as the source domain data set, and the parameters of the BN node i can be obtained according to the MAP. When i=1,

Figure BDA0002586265450000132
Figure BDA0002586265450000132

其他i=2…12,方法相同。Other i=2...12, the method is the same.

S54:计算总源域的BN参数θS1;如上述公式(2)所示,结果如下。S54: Calculate the BN parameter θ S1 of the total source domain; as shown in the above formula (2), the result is as follows.

Figure BDA0002586265450000133
Figure BDA0002586265450000133

S6:获取目标域人脸表情的BN参数;S6: Obtain the BN parameters of the facial expression in the target domain;

S61:采用最大后验概率估计的方法学习出目标域初始BN模型的参数θTiS61: adopt the method of maximum a posteriori probability estimation to learn the parameter θ Ti of the initial BN model of the target domain;

本实施例中,选择了CK数据集中120张图像的AU作为目标域数据集,根据最大后验估计可以得到,当i=1时,目标域初始BN参数,其他i=2…12方法相同。In this embodiment, the AUs of 120 images in the CK dataset are selected as the target domain dataset, which can be obtained according to the maximum a posteriori estimation. When i=1, the initial BN parameter of the target domain is the same for other i=2...12 methods.

Figure BDA0002586265450000134
Figure BDA0002586265450000134

S62:计算出目标域BN参数θi,如参数融合公式(3)所示。S62: Calculate the target domain BN parameter θ i , as shown in the parameter fusion formula (3).

θi=α1θTi+α2θsi (3)θ i = α1θTi + α2θsi (3)

在本实施例中,α1=0.7,α2=0.3。根据上式(3),可以计算得到当i=1时,即目标域BN第一个子节点的参数In this embodiment, α1=0.7 and α2=0.3. According to the above formula (3), it can be calculated that when i=1, that is, the parameters of the first child node of the target domain BN

Figure BDA0002586265450000141
Figure BDA0002586265450000141

S63:将BN_Flag标记设置为“真”,表明BN建模已完成;返回S1获取面部表情识别证据AU;S63: Set the BN_Flag flag to "true", indicating that the BN modeling has been completed; return to S1 to obtain the facial expression recognition evidence AU;

由于BN_Flag=真,返回S1获取面部表情AU后,将不会再次建模,即跳过S3至S6,而是进入S7进行表情识别。Since BN_Flag=true, after returning to S1 to obtain the facial expression AU, it will not be modeled again, that is, skipping S3 to S6, and entering S7 for expression recognition.

S7:面部表情识别;S7: facial expression recognition;

S71:设置面部表情属性概率阈值Ψ=0.7;S71: set the facial expression attribute probability threshold Ψ=0.7;

S72:在BN模型中,由D得到待识别的观测证据ev,利用BN理论中的推理算法进行BN推理,得到面部表情属性概率Ψ';S72: in the BN model, the observation evidence ev to be identified is obtained by D, and the inference algorithm in the BN theory is used to carry out BN inference to obtain the facial expression attribute probability Ψ';

如,在本实施例中,输入“生气”的一组处理数据,其待观测证据ev=[1 1 2 1 1 21 1 1 2 2 1],其中“1”、“2”、表示为生气表情通过特征处理得到的AU标签样本集。当输入ev=[1 1 2 1 1 2 1 1 1 2 2 1],利用联合树(Junction Tree)推理算法可以得到Ψ'=0.975;For example, in this embodiment, a set of processing data of “angry” is input, and the evidence to be observed ev=[1 1 2 1 1 21 1 1 2 2 1], where “1”, “2” represent angry The AU label sample set obtained by feature processing for expressions. When input ev=[1 1 2 1 1 2 1 1 1 2 2 1], we can get Ψ'=0.975 by using the Junction Tree inference algorithm;

S73:判别面部表情。S73: Discriminate facial expressions.

在本实施例中,可以得到Ψ'=0.975>Ψ,即输出面部表情属性为“生气”。In this embodiment, it can be obtained that Ψ'=0.975>Ψ, that is, the output facial expression attribute is "angry".

输入待诊断观测证据ev,利用联合树算法进行推理结果如表所示。Input the observation evidence ev to be diagnosed, and use the joint tree algorithm to infer the results as shown in the table.

为“生气”的属性概率为Ψ'=0.975;而Expression_T为其他的表情的属性概率如表3所示。The attribute probability of "angry" is Ψ'=0.975; while Expression_T is the attribute probability of other expressions as shown in Table 3.

表3 表情属性概论推理结果Table 3 The general inference results of expression attributes

目标属性target attribute 快乐hapiness 害怕Fear 厌恶disgust 悲伤sad 惊讶surprise 属性概率Ψ'Attribute probability Ψ' 0.0000.000 0.0020.002 0.0120.012 0.0100.010 0.0010.001

类似的,输入CK数据集的120组测试集AU标签数据集的6种基本表情,根据本实施例提出的基于BN参数迁移学习的表情识别方法,可以得到表情识别结果,如表4所示。Similarly, input the 6 basic expressions of the 120 groups of test set AU label datasets of the CK dataset, according to the expression recognition method based on BN parameter transfer learning proposed in this embodiment, the expression recognition results can be obtained, as shown in Table 4.

表4 CK数据表情分类结果Table 4 Expression classification results of CK data

Figure BDA0002586265450000151
Figure BDA0002586265450000151

本发明提出了一种基于迁移机制的表情识别方法,根据面部表情与动作单元标签关系构建出面部表情识别BN模型结构,其次利用人脸源域数据集计算的BN参数和人脸目标域数据集BN初始参数,根据迁移机制获得最终的人脸表情识别BN参数,并利用BN理论中推理算法进行BN推理,识别出面部表情。本发明充分利用了迁移学习机制将某个领域上学习的知识应用到不同但相关的领域中,可以有效地解决面部表情识别中由于光照、拍摄角度等导致的面部表情建模样本数据量不充足的问题,减少了样本数量不足对参数学习精度和识别结果的影响,可广泛应用于嘈杂、不确定以及难以获取大量人脸目标数据的环境中。The invention proposes an expression recognition method based on a migration mechanism. The facial expression recognition BN model structure is constructed according to the relationship between facial expressions and action unit labels, and then the BN parameters calculated by the face source domain data set and the face target domain data set are used. BN initial parameters, obtain the final facial expression recognition BN parameters according to the migration mechanism, and use the inference algorithm in BN theory to perform BN inference to recognize facial expressions. The invention makes full use of the transfer learning mechanism to apply the knowledge learned in a certain field to different but related fields, and can effectively solve the problem of insufficient facial expression modeling sample data due to illumination, shooting angle, etc. in facial expression recognition. It reduces the influence of insufficient number of samples on parameter learning accuracy and recognition results, and can be widely used in environments that are noisy, uncertain, and difficult to obtain a large amount of face target data.

本发明利用迁移学习解决了目标域人脸表情识别过程中BN实验训练数据集数据不足(小数据问题)时其识别正确率较低的问题。迁移学习是从相近领域中获取数据和信息以解决数据量不充足领域的学习问题。通过源域数据中的知识,构建目标域上学习模型的学习方法,提高了识别正确率。The invention uses migration learning to solve the problem that the recognition accuracy rate is low when the BN experimental training data set data is insufficient (small data problem) in the face expression recognition process of the target domain. Transfer learning is to obtain data and information from similar fields to solve learning problems in fields with insufficient data. Through the knowledge in the source domain data, the learning method of constructing the learning model on the target domain improves the recognition accuracy.

本发明可以避免专家经验主观性对BN参数学习精度的影响。源任务中学习到的知识迁移到目标任务中,而源任务中学习算法是基于经典的充足样本下MLE、MAP等算法,其学习机制是基于数据驱动的方法,从而避免了BN参数学习中主观专家经验对学习精度的影响。The present invention can avoid the influence of the subjectivity of expert experience on the learning accuracy of BN parameters. The knowledge learned in the source task is transferred to the target task, and the learning algorithm in the source task is based on the classic sufficient samples MLE, MAP and other algorithms, and its learning mechanism is based on the data-driven method, thus avoiding the subjective learning of BN parameters. The effect of expert experience on learning accuracy.

以上公开的仅为本发明的几个具体实施例,但是,本发明实施例并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。The above disclosures are only a few specific embodiments of the present invention, however, the embodiments of the present invention are not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.

Claims (5)

1. A facial expression recognition method based on BN parameter transfer learning is characterized by comprising the following steps:
s1, acquiring a face activity unit AU;
s2, judging whether the facial expression BN is modeled or not;
judging whether the modeling Flag BN _ Flag is 'true', setting the initial value to be 'false', if the BN _ Flag is 'true', indicating that the BN is modeled, jumping to S7, and entering an identification process; otherwise, executing S3 and entering the modeling process;
s3, obtaining a sample AU required by BN modeling;
s31, determining the number E _ num and the type of the facial expression recognition;
s32, extracting a sample data set of a required facial activity unit AU according to the expression of each category;
s4, determining a facial expression recognition target/source domain network BN model structure diagram;
determining a model structure chart G1 for establishing a target network human face expression recognition BN and determining a model structure chart G2 for a source domain network human face expression recognition BN by using the acquired sample data set of the face activity unit AU and the relationship between the human face expression and the activity unit AU as prior information;
s5, learning source domain BN parameters;
s51, obtaining sample data set M of each source area face activity unit AU (S)n);
S52, calculating a source weight coefficient k (n) of each source domain sample value in the total source domain sample value, and using a formula (1) to show that:
Figure FDA0002586265440000011
wherein, the sum of the weight coefficients of all the sources is 1, and the values of the weight coefficients are all arbitrary real numbers between [0,1 ];
s53, obtaining parameter theta of each source domain BN model by adopting a Maximum Likelihood Estimation (MLE) methodniI is the ith node in the source domain BN model child nodes;
s54, fusing parameters theta of BN models in various source domainsniObtaining the total source domain BN parameter thetaSi
θSi=∑nk(n)θni(2);
S6, acquiring BN parameters of the facial expressions of the target domain;
s61, obtaining parameter theta of target domain initial BN model by adopting maximum posterior probability MAP estimation methodTiI is the ith node in the target domain BN model child nodes;
s62, calculating the final parameter theta of the target domain facial expression BN according to the weight factori
θi=α1θTi+α2θsi(3)
Wherein α 1 and α 2 are weighting factors, α 1+ α 2 ═ 1;
s63, setting the BN _ Flag to be true, and finishing the modeling of the BN; returning to S1;
s7, recognizing facial expressions;
s71, setting a facial expression attribute probability threshold psi;
s72, putting the facial expression recognition evidence AU into the constructed BN model, and carrying out BN inference by using a joint tree inference algorithm to obtain a facial expression attribute probability psi';
s73, judging facial expressions;
and if the probability Ψ' of the facial expression attributes is greater than or equal to the threshold Ψ, outputting the facial expression attributes, namely the facial expression recognition result, and otherwise, acquiring the new AU data set again.
2. The BN parameter migration learning-based expression recognition method as claimed in claim 1, wherein the step S32 of extracting facial activity units AU according to each type of expression includes:
s321, obtaining geometric characteristics of the facial expression of the human face through a CLM algorithm on the facial expression image of the human face;
s322, extracting the texture features of the facial expressions from the facial expression images of the human faces through an HOG algorithm;
s323, carrying out feature fusion and normalization processing on the geometric features and the textural features of the facial expression to obtain fusion features of the facial expression;
s324, classifying the fusion characteristics of the facial expressions by using a Support Vector Machine (SVM) to obtain a data set M (t) of a target domain facial activity unit AU and a data set M (S) of a source domain facial activity unit AUn) N is 1,2, the. q, q is the number of source domains, and q is a natural number.
3. The expression recognition method based on BN parameter migration learning of claim 2, wherein the specific step of obtaining the geometric features of the facial expression in step S321 includes:
s3211, obtaining positioning information of feature points of the expression image;
and (5) positioning the feature points by utilizing a CLM facial feature point positioning algorithm, and extracting the geometric features of the facial expression.
4. The expression recognition method based on BN parameter migration learning of claim 1, wherein the specific step of determining the facial expression recognition target/source network BN model structure diagram in step S4 includes:
s41, determining a BN node for recognizing the facial expressions;
determining a father node and a child node of the BN;
s42, determining a directed acyclic graph of the BN (facial expression recognition);
and sequentially connecting the father node and the child node of the BN by using the directed edge, determining to establish a BN model structure diagram G1 of the target network for facial expression recognition, and establishing a BN model structure diagram G2 of the source network for facial expression recognition.
5. The expression recognition method based on BN parameter migration learning of claim 1, wherein the number of categories E _ num of facial expression recognition in step S11 is 6, including: "happy", "surprised", "fear", "angry", "disgust" and "sad" 6 types of expressions.
CN202010682216.6A 2020-07-15 2020-07-15 An expression recognition method based on BN parameter transfer learning Pending CN111814713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010682216.6A CN111814713A (en) 2020-07-15 2020-07-15 An expression recognition method based on BN parameter transfer learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010682216.6A CN111814713A (en) 2020-07-15 2020-07-15 An expression recognition method based on BN parameter transfer learning

Publications (1)

Publication Number Publication Date
CN111814713A true CN111814713A (en) 2020-10-23

Family

ID=72865209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010682216.6A Pending CN111814713A (en) 2020-07-15 2020-07-15 An expression recognition method based on BN parameter transfer learning

Country Status (1)

Country Link
CN (1) CN111814713A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112454390A (en) * 2020-11-27 2021-03-09 中国科学技术大学 Humanoid robot facial expression simulation method based on deep reinforcement learning
CN113724367A (en) * 2021-07-13 2021-11-30 北京理工大学 Robot expression driving method and device
CN113780456A (en) * 2021-09-17 2021-12-10 陕西科技大学 Pain recognition method, system and computer storage medium
CN114333027A (en) * 2021-12-31 2022-04-12 之江实验室 A new cross-domain facial expression recognition method based on joint and alternating learning framework

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573282A (en) * 2018-04-16 2018-09-25 陕西科技大学 Target recognition method based on BN parameter learning under small data set
CN109190490A (en) * 2018-08-08 2019-01-11 陕西科技大学 Based on the facial expression BN recognition methods under small data set
CN109376692A (en) * 2018-11-22 2019-02-22 河海大学常州校区 A Transfer Convolutional Neural Network Method for Facial Expression Recognition
CN110689130A (en) * 2019-10-24 2020-01-14 陕西科技大学 Bearing fault diagnosis method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573282A (en) * 2018-04-16 2018-09-25 陕西科技大学 Target recognition method based on BN parameter learning under small data set
CN109190490A (en) * 2018-08-08 2019-01-11 陕西科技大学 Based on the facial expression BN recognition methods under small data set
CN109376692A (en) * 2018-11-22 2019-02-22 河海大学常州校区 A Transfer Convolutional Neural Network Method for Facial Expression Recognition
CN110689130A (en) * 2019-10-24 2020-01-14 陕西科技大学 Bearing fault diagnosis method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112454390A (en) * 2020-11-27 2021-03-09 中国科学技术大学 Humanoid robot facial expression simulation method based on deep reinforcement learning
CN113724367A (en) * 2021-07-13 2021-11-30 北京理工大学 Robot expression driving method and device
CN113780456A (en) * 2021-09-17 2021-12-10 陕西科技大学 Pain recognition method, system and computer storage medium
CN113780456B (en) * 2021-09-17 2023-10-27 陕西科技大学 Pain identification method, system and computer storage medium
CN114333027A (en) * 2021-12-31 2022-04-12 之江实验室 A new cross-domain facial expression recognition method based on joint and alternating learning framework
CN114333027B (en) * 2021-12-31 2024-05-14 之江实验室 Cross-domain novel facial expression recognition method based on combined and alternate learning frames

Similar Documents

Publication Publication Date Title
CN111814713A (en) An expression recognition method based on BN parameter transfer learning
CN110837846B (en) An image recognition model construction method, image recognition method and device
Wang et al. A unified probabilistic approach modeling relationships between attributes and objects
CN108288051B (en) Pedestrian re-recognition model training method and device, electronic equipment and storage medium
CN110363210A (en) An image semantic segmentation model training method and server
WO2022001123A1 (en) Key point detection method and apparatus, and electronic device and storage medium
CN105809672B (en) A Multi-object Collaborative Image Segmentation Method Based on Superpixels and Structural Constraints
CN106650806A (en) Cooperative type deep network model method for pedestrian detection
CN102938070B (en) A kind of behavior recognition methods based on action subspace and weight behavior model of cognition
CN104966104A (en) Three-dimensional convolutional neural network based video classifying method
Salunke et al. A new approach for automatic face emotion recognition and classification based on deep networks
CN110765873A (en) Facial expression recognition method and device based on expression intensity label distribution
CN110363228B (en) Noise label correction method
CN105956570B (en) Smile recognition method based on lip features and deep learning
CN109829422A (en) A kind of video frequency identifying method based on the movement of impulsive neural networks falling over of human body
Cui et al. Label error correction and generation through label relationships
CN109190490B (en) Facial expression BN recognition method based on small data set
CN115223239A (en) Gesture recognition method and system, computer equipment and readable storage medium
CN116403262A (en) Online learning concentration monitoring method, system and medium based on machine vision
CN116052254A (en) Visual continuous emotion recognition method based on extended Kalman filtering neural network
CN112818887B (en) Human skeleton sequence behavior identification method based on unsupervised learning
Tøn et al. Wild animal species classification from camera traps using metadata analysis
CN109657586A (en) A kind of facial Expression Analysis method and system based on sequence convolutional neural networks
CN118552868A (en) A method for identifying wild animals and estimating their population size
CN118015117A (en) Unbiased scene graph generation system and method based on causal reasoning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201023

RJ01 Rejection of invention patent application after publication