[go: up one dir, main page]

CN111325123A - Face angle representation and annotation method, device and computer storage medium - Google Patents

Face angle representation and annotation method, device and computer storage medium Download PDF

Info

Publication number
CN111325123A
CN111325123A CN202010085400.2A CN202010085400A CN111325123A CN 111325123 A CN111325123 A CN 111325123A CN 202010085400 A CN202010085400 A CN 202010085400A CN 111325123 A CN111325123 A CN 111325123A
Authority
CN
China
Prior art keywords
representation data
angle
face angle
representation
facial
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
CN202010085400.2A
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.)
Beijing Deepglint Information Technology Co ltd
Original Assignee
Beijing Deepglint Information Technology Co ltd
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 Beijing Deepglint Information Technology Co ltd filed Critical Beijing Deepglint Information Technology Co ltd
Priority to CN202010085400.2A priority Critical patent/CN111325123A/en
Publication of CN111325123A publication Critical patent/CN111325123A/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/161Detection; Localisation; Normalisation
    • 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/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

面部角度表示和标注方法、装置及计算机存储介质,包括:确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=‑1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;将所述表示数据q进行三维可视化。采用本申请中的方案,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。

Figure 202010085400

A method, device, and computer storage medium for representing and labeling a face angle, comprising: determining the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk=-1, e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q; 3D visualization. The solution in this application solves the problems in the prior art, such as unknown rotation order, unknown rotation of coordinate axes, and universal lock caused by Euler angles representing the angle of the human face, and can provide more accurate facial angle labeling and improve facial The recognition accuracy of the angle recognition network.

Figure 202010085400

Description

面部角度表示和标注方法、装置及计算机存储介质Facial angle representation and labeling method, device and computer storage medium

技术领域technical field

本申请涉及人脸识别技术,具体地,涉及一种面部角度表示和标注方法、装置及计算机存储介质、电子设备。The present application relates to face recognition technology, and in particular, to a method, device, computer storage medium, and electronic device for representing and labeling a face angle.

背景技术Background technique

人脸角度识别主要应用于人脸识别前的质量过滤和挑选、驾驶员状态监控等场景。在传统机器学习方法中,通常是利用人脸的关键点和标准关键点的三维几何关系,通过OpenCV中的solvePNP函数迭代求解出人脸角度。在深度学习兴起后,越来越多的使用深度卷积网络直接求人脸角度。Face angle recognition is mainly used in scenes such as quality filtering and selection before face recognition, and driver status monitoring. In traditional machine learning methods, the three-dimensional geometric relationship between the key points of the face and the standard key points is usually used to iteratively solve the face angle through the solvePNP function in OpenCV. After the rise of deep learning, more and more deep convolutional networks are used to directly find the face angle.

在学术界和工业界,人脸角度表示沿用物体旋转的表示方式,一般用三个欧拉角:偏航角(yaw)、俯仰角(pitch)和翻滚角(roll)表示。如图1所示,偏航角表示左右摇头,俯仰角表示上下点头,翻滚角表示歪头。In academia and industry, face angle representation follows the representation of object rotation, generally represented by three Euler angles: yaw angle (yaw), pitch angle (pitch) and roll angle (roll). As shown in Figure 1, the yaw angle means shaking the head left and right, the pitch angle means nodding up and down, and the roll angle means tilting the head.

一般地,训练深度卷积网络需要大量的标注数据,如ImageNet数据量超过1400万,因此,训练人脸角度网络也需要人工标注大量的人脸角度数据。Generally, training a deep convolutional network requires a large amount of labeled data. For example, the amount of ImageNet data exceeds 14 million. Therefore, training a face angle network also requires manual labeling of a large amount of face angle data.

使用欧拉角表示人脸角度有三个缺点:Using Euler angles to represent face angles has three disadvantages:

1.需要指定旋转轴和旋转次序,因此一共有12种不同的旋转次序,给出三个欧拉角时必须同时给出旋转次序,但旋转次序很容易被忽略。人脸角度采用的次序一般为卡尔丹角,Roll-Pitch-Yaw。1. The rotation axis and rotation order need to be specified, so there are 12 different rotation orders. When three Euler angles are given, the rotation order must be given at the same time, but the rotation order is easily ignored. The order of face angle is generally Caldan angle, Roll-Pitch-Yaw.

2.需要约定坐标轴是否随人脸旋转,一般旋转时坐标轴随人脸一起旋转,则称为自身坐标,旋转时坐标轴固定不动则称为空间坐标。如果只给出三个欧拉角和旋转次序,而不给定坐标轴是否旋转,得到的角度表示是有歧义的。2. It is necessary to agree whether the coordinate axis rotates with the face. Generally, when the coordinate axis rotates with the face, it is called its own coordinate. When the coordinate axis is fixed, it is called the space coordinate. If only three Euler angles and rotation order are given, without specifying whether the coordinate axis is rotated, the resulting angle representation is ambiguous.

3.欧拉角存在万向锁现象。三个欧拉角中,如果第二个欧拉角旋转使得第一个旋转轴和第三个旋转轴重合,这样使得旋转的自由度由三变为二。以卡尔丹角为例,如果Pitch为±π/2,则Roll和Yaw的则合并为一个自由度。因此用欧拉角表示人脸角度会因为万向锁而导致有歧义的表示。3. There is a universal lock phenomenon in Euler angles. Among the three Euler angles, if the second Euler angle rotates so that the first rotation axis coincides with the third rotation axis, the degree of freedom of rotation changes from three to two. Taking Cardan angle as an example, if Pitch is ±π/2, then Roll and Yaw are combined into one degree of freedom. Therefore, using Euler angles to represent the face angle will lead to ambiguous representation due to the universal lock.

现有技术中存在的问题:Problems existing in the prior art:

采用欧拉角来表示人脸角度容易产生歧义进而导致人脸角度识别精度较低。The use of Euler angles to represent the face angle is prone to ambiguity, which leads to low recognition accuracy of the face angle.

发明内容SUMMARY OF THE INVENTION

本申请实施例中提供了一种面部角度表示和标注方法、装置及计算机存储介质、电子设备,以在一定程度上缓解上述技术问题。Embodiments of the present application provide a method, apparatus, computer storage medium, and electronic device for representing and labeling a face angle, so as to alleviate the above-mentioned technical problems to a certain extent.

根据本申请实施例的第一个方面,提供了一种面部角度表示方法,包括如下步骤:According to a first aspect of the embodiments of the present application, a method for representing a face angle is provided, comprising the following steps:

确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;Determine the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk=−1 , e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q;

将所述表示数据q进行三维可视化。The representation data q is visualized in three dimensions.

根据本申请实施例的第二个方面,提供了一种面部角度表示装置,包括:According to a second aspect of the embodiments of the present application, a device for representing a face angle is provided, including:

数据确定模块,用于确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;A data determination module, used for determining the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk=-1, e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q;

表示模块,用于将所述表示数据q进行三维可视化。The representation module is used for three-dimensional visualization of the representation data q.

根据本申请实施例的第三个方面,提供了一种面部角度标注方法,包括:According to a third aspect of the embodiments of the present application, a method for labeling a face angle is provided, including:

确定待标注的面部图像;Determine the facial image to be annotated;

根据预先三维可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标,得到表示数据q1According to the initial face angle representation data q 0 visualized in advance and the three-dimensional coordinates of the face image to be marked, the representation data q 1 is obtained;

根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qgAccording to the representation data q 1 and the representation data q 0 , obtain the face angle representation data q g of the facial image to be marked;

根据所述面部角度表示数据qg标注所述面部图像的面部角度;Label the face angle of the face image according to the face angle representation data q g ;

其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts.

根据本申请实施例的第四个方面,提供了一种面部角度标注装置,包括:According to a fourth aspect of the embodiments of the present application, a device for labeling facial angles is provided, including:

图像确定模块,用于确定待标注的面部图像;an image determination module, used to determine the facial image to be marked;

第一处理模块,用于根据预先可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标,得到表示数据q1a first processing module, configured to obtain the representation data q 1 according to the pre-visualized initial face angle representation data q 0 and the three-dimensional coordinates of the facial image to be marked;

第二处理模块,用于根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qga second processing module, configured to obtain, according to the representation data q 1 and the representation data q 0 , the face angle representation data q g of the facial image to be marked;

标注模块,用于根据所述面部角度表示数据qg标注所述面部图像的面部角度;a labeling module, configured to label the facial angle of the facial image according to the facial angle representation data qg ;

其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts.

根据本申请实施例的第五个方面,提供了一种计算机存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述方法的步骤。According to a fifth aspect of the embodiments of the present application, a computer storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

根据本申请实施例的第六个方面,提供了一种电子设备,包括存储器、以及一个或多个处理器,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如上所述的方法。According to a sixth aspect of the embodiments of the present application, an electronic device is provided, including a memory and one or more processors, where the memory is used to store one or more programs; the one or more programs are When executed by the one or more processors, the methods described above are implemented.

采用本申请实施例中提供的面部角度表示和标注方法、装置及计算机存储介质、电子设备,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the method, device, computer storage medium, and electronic device for representing and labeling the face angle provided in the embodiments of the present application, and using the quaternion to represent the face angle, the rotation caused by the Euler angle representing the face angle in the prior art is solved. Problems such as unclear order, unknown rotation of the coordinate axis, and universal lock can provide more accurate facial angle annotations and improve the recognition accuracy of the facial angle recognition network.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:

图1示出了现有技术中人脸角度表示方法的示意图;1 shows a schematic diagram of a method for representing a face angle in the prior art;

图2示出了本申请实施例一中面部角度表示方法实施的流程示意图;FIG. 2 shows a schematic flowchart of the implementation of the method for representing a face angle in Embodiment 1 of the present application;

图3示出了本申请实施例二中面部角度标注方法实施的流程示意图;FIG. 3 shows a schematic flowchart of the implementation of the facial angle labeling method in Embodiment 2 of the present application;

图4示出了本申请实施例三中面部角度表示装置的结构示意图;FIG. 4 shows a schematic structural diagram of a device for representing a face angle in Embodiment 3 of the present application;

图5示出了本申请实施例四中面部角度标注装置的结构示意图;FIG. 5 shows a schematic structural diagram of a device for labeling a face angle in Embodiment 4 of the present application;

图6示出了本申请实施例七中电子设备的结构示意图;FIG. 6 shows a schematic structural diagram of an electronic device in Embodiment 7 of the present application;

图7示出了本申请实施例八中电子设备的结构示意图;FIG. 7 shows a schematic structural diagram of an electronic device in Embodiment 8 of the present application;

图8示出了本申请实施例九中标注工具界面的示意图;FIG. 8 shows a schematic diagram of an annotation tool interface in Embodiment 9 of the present application;

图9示出了本申请实施例九中标注流程示意图。FIG. 9 shows a schematic diagram of the labeling process in Embodiment 9 of the present application.

具体实施方式Detailed ways

为了使本申请实施例中的技术方案及优点更加清楚明白,以下结合附图对本申请的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本申请的一部分实施例,而不是所有实施例的穷举。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。In order to make the technical solutions and advantages of the embodiments of the present application more clear, the exemplary embodiments of the present application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and Not all embodiments are exhaustive. It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.

实施例一Example 1

图2示出了本申请实施例一中面部角度表示方法实施的流程示意图。FIG. 2 shows a schematic flowchart of the implementation of the method for representing a face angle in Embodiment 1 of the present application.

如图所示,所述面部角度表示方法包括:As shown in the figure, the facial angle representation method includes:

步骤201、确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;Step 201: Determine the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk =-1, e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q;

步骤202、将所述表示数据q进行三维可视化。Step 202: Perform three-dimensional visualization of the representation data q.

采用本申请实施例中提供的面部角度表示方法,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。The facial angle representation method provided in the embodiment of the present application is adopted, and the quaternion is used to represent the facial angle, which solves the problems in the prior art, which are caused by the Euler angle representing the face angle. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

在一种实施方式中,所述将表示数据q进行三维可视化,为:根据所述表示数据q生成三维坐标系,所述三维坐标系的X、Y、Z轴分别为根据表示数据q的e0、e1、e2、e3计算得到的向量。In one embodiment, the three-dimensional visualization of the representation data q is: generating a three-dimensional coordinate system according to the representation data q, and the X, Y, and Z axes of the three-dimensional coordinate system are respectively e according to the representation data q 0 , e 1 , e 2 , e 3 computed vectors.

在一种实施方式中,所述表示数据q与三维坐标系的关系,为:In one embodiment, the relationship between the representation data q and the three-dimensional coordinate system is:

对于三维空间中任一点,根据表示数据q旋转后得到新的表示数据:For any point in the three-dimensional space, the new representation data is obtained after rotating according to the representation data q:

Figure BDA0002381871780000051
Figure BDA0002381871780000051

其中,

Figure BDA0002381871780000052
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;q*=e0-e1i-e2j-e3k;所述新的表示数据对应的三维坐标系下的点为r'=(r′1,r′2,r′3)。in,
Figure BDA0002381871780000052
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) in the three-dimensional coordinate system before rotation; q * = e 0 -e 1 ie 2 je 3 k; the three-dimensional coordinates corresponding to the new representation data The point under the system is r'=(r' 1 , r' 2 , r' 3 ).

在一种实施方式中,所述确定面部角度的表示数据q,包括:通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到,或者,通过预先设置得到。In an embodiment, the determining of the representation data q of the face angle includes: obtaining through a pre-established face angle model or pre-labeled face angle data, or obtaining through a preset.

实施例二Embodiment 2

图3示出了本申请实施例二中面部角度标注方法实施的流程示意图。FIG. 3 shows a schematic flowchart of the implementation of the facial angle labeling method in Embodiment 2 of the present application.

如图所示,所述面部角度标注方法包括:As shown in the figure, the facial angle labeling method includes:

步骤301、确定待标注的面部图像;Step 301, determine the facial image to be marked;

步骤302、根据预先三维可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1Step 302, obtaining the representation data q 1 according to the preliminary three-dimensional visualization of the initial face angle representation data q 0 and the three-dimensional coordinate system of the facial image to be marked;

步骤303、根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qgStep 303, according to the representation data q 1 and the representation data q 0 , obtain the face angle representation data q g of the facial image to be marked;

步骤304、根据所述面部角度表示数据qg标注所述面部图像的面部角度;Step 304, label the facial angle of the facial image according to the facial angle representation data q g ;

其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts.

采用本申请实施例中提供的面部角度标注方法,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the face angle labeling method provided in the embodiment of the present application, and using quaternion to represent the face angle, it solves the problems in the prior art due to the Euler angle representing the face angle. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

在一种实施方式中,所述待标注的面部图像的三维坐标系可以为预先设置得到,例如:根据面部图像中两眼连线的方向、两眼中点到下巴的方向、人脸朝向的方向分别确定所述待标注的面部图像的三维坐标系的X、Y、Z轴。In one embodiment, the three-dimensional coordinate system of the facial image to be marked can be obtained by preset, for example: according to the direction of the line connecting the two eyes in the facial image, the direction from the midpoint of the two eyes to the chin, and the direction the face is facing The X, Y, and Z axes of the three-dimensional coordinate system of the facial image to be marked are respectively determined.

在一种实施方式中,所述初始面部角度无歧义表示q0通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到,或者,所述初始面部角度无歧义表示q0设置为q0=1+0i+0j+0k。In one embodiment, the initial face angle unambiguous representation q 0 is obtained from a pre-established face angle model or pre-labeled face angle data, or the initial face angle unambiguous representation q 0 is set to q 0 =1+0i+0j+0k.

在一种实施方式中,所述根据预先可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1,包括:In an embodiment, the representation data q 1 is obtained according to the pre-visualized initial face angle representation data q 0 and the three-dimensional coordinate system of the face image to be marked, including:

旋转预先可视化的初始面部角度表示数据q0对应的三维坐标系,使得所述三维坐标系与待标注的面部图像的三维坐标系重合,获取此时的表示数据q1The three-dimensional coordinate system corresponding to the pre-visualized initial face angle representation data q 0 is rotated so that the three-dimensional coordinate system coincides with the three-dimensional coordinate system of the facial image to be marked, and the representation data q 1 at this time is obtained.

在一种实施方式中,两个三维坐标系的旋转以至重合可以采用现有技术实现,本申请在此不做赘述。In an implementation manner, the rotation and even the coincidence of the two three-dimensional coordinate systems can be realized by using the prior art, which will not be described in detail in this application.

在一种实施方式中,每个点旋转后的表示数据为:In one embodiment, the rotated representation data of each point is:

Figure BDA0002381871780000061
Figure BDA0002381871780000061

其中,

Figure BDA0002381871780000062
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;所述待标注的面部图像的三维坐标系下的点为r'=(r′1,r′2,r′3)。in,
Figure BDA0002381871780000062
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) under the three-dimensional coordinate system before rotation; the point under the three-dimensional coordinate system of the facial image to be marked is r′=(r′ 1 , r ' 2 , r' 3 ).

在一种实施方式中,所述待标注的面部图像的面部角度表示数据qg=q1q0In one embodiment, the facial angle of the facial image to be labeled represents data q g =q 1 q 0 .

实施例三Embodiment 3

基于同一发明构思,本申请实施例提供了一种面部角度表示装置,该装置解决技术问题的原理与一种面部角度表示方法相似,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application provides a device for representing a face angle. The principle of the device for solving the technical problem is similar to that of a method for representing a face angle, and repeated details are not repeated here.

图4示出了本申请实施例三中面部角度表示装置的结构示意图。FIG. 4 shows a schematic structural diagram of a device for representing a face angle in Embodiment 3 of the present application.

如图所示,所述面部角度表示装置包括:As shown in the figure, the facial angle representation device includes:

数据确定模块401,用于确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;The data determination module 401 is used to determine the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 = k 2 =ijk=-1, e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q;

表示模块402,用于将所述表示数据q进行三维可视化。The representation module 402 is used for three-dimensional visualization of the representation data q.

采用本申请实施例中提供的面部角度表示装置,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。The facial angle representation device provided in the embodiment of the present application is adopted, and the quaternion is used to represent the facial angle, which solves the problems in the prior art, which are caused by the Euler angle representing the face angle, the unknown rotation order, the unknown rotation of the coordinate axis, and the universal orientation. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

在一种实施方式中,所述表示模块具体用于对于三维空间中任一点,根据表示数据q旋转后按照下式计算得到新的表示数据:In one embodiment, the representation module is specifically used for any point in the three-dimensional space, after rotating according to the representation data q, the new representation data is calculated according to the following formula:

Figure BDA0002381871780000071
Figure BDA0002381871780000071

其中,

Figure BDA0002381871780000072
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;q*=e0-e1i-e2j-e3k;所述新的表示数据对应的三维坐标系下的点为r'=(r′1,r′2,r′3)。in,
Figure BDA0002381871780000072
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) in the three-dimensional coordinate system before rotation; q * = e 0 -e 1 ie 2 je 3 k; the three-dimensional coordinates corresponding to the new representation data The point under the system is r'=(r' 1 , r' 2 , r' 3 ).

在一种实施方式中,所述数据确定模块具体用于通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到面部角度的表示数据q,或者,通过预先设置得到面部角度的表示数据q。In an embodiment, the data determination module is specifically configured to obtain the representation data q of the face angle through a pre-established face angle model or pre-labeled face angle data, or obtain the representation data q of the face angle by preset .

实施例四Embodiment 4

基于同一发明构思,本申请实施例提供了一种面部角度标注装置,该装置解决技术问题的原理与一种面部角度标注方法相似,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application provides a device for labeling a face angle. The principle of the device for solving the technical problem is similar to a method for labeling a face angle, and the repeated details will not be repeated.

图5示出了本申请实施例四中面部角度标注装置的结构示意图。FIG. 5 shows a schematic structural diagram of a device for labeling a face angle in Embodiment 4 of the present application.

如图所示,所述面部角度标注装置包括:As shown in the figure, the facial angle labeling device includes:

图像确定模块501,用于确定待标注的面部图像;An image determination module 501, configured to determine the facial image to be marked;

第一处理模块502,用于根据预先可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1The first processing module 502 is configured to obtain the representation data q 1 according to the pre-visualized initial face angle representation data q 0 and the three-dimensional coordinate system of the facial image to be marked;

第二处理模块503,用于根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qgThe second processing module 503 is configured to obtain, according to the representation data q 1 and the representation data q 0 , the facial angle representation data q g of the facial image to be marked;

标注模块504,用于根据所述面部角度表示数据qg标注所述面部图像的面部角度;A labeling module 504, configured to label the facial angle of the facial image according to the facial angle representation data q g ;

其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts.

采用本申请实施例中提供的面部角度标注装置,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。The facial angle labeling device provided in the embodiment of the present application is adopted, and the quaternion is used to represent the facial angle, which solves the problems caused by the unknown rotation order, unknown rotation of the coordinate axis and universal orientation caused by the Euler angle representing the face angle in the prior art. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

在一种实施方式中,所述初始面部角度无歧义表示q0通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到,或者,所述初始面部角度无歧义表示q0设置为q0=1+0i+0j+0k。In one embodiment, the initial face angle unambiguous representation q 0 is obtained from a pre-established face angle model or pre-labeled face angle data, or the initial face angle unambiguous representation q 0 is set to q 0 =1+0i+0j+0k.

在一种实施方式中,所述第一处理模块具体用于旋转预先可视化的初始面部角度表示数据q0对应的三维坐标系,使得所述三维坐标系与待标注的面部图像的三维坐标系重合,获取此时的表示数据q1In one embodiment, the first processing module is specifically configured to rotate the three-dimensional coordinate system corresponding to the pre-visualized initial facial angle representation data q 0 , so that the three-dimensional coordinate system coincides with the three-dimensional coordinate system of the facial image to be labeled , and obtain the representation data q 1 at this time.

在一种实施方式中,每个点旋转后的表示数据为:In one embodiment, the rotated representation data of each point is:

Figure BDA0002381871780000081
Figure BDA0002381871780000081

其中,

Figure BDA0002381871780000082
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;所述待标注的面部图像的三维坐标系下的点为r'=(r′1,r′2,r′3)。in,
Figure BDA0002381871780000082
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) under the three-dimensional coordinate system before rotation; the point under the three-dimensional coordinate system of the facial image to be marked is r′=(r′ 1 , r ' 2 , r' 3 ).

在一种实施方式中,所述待标注的面部图像的面部角度表示数据qg=q1q0In one embodiment, the facial angle of the facial image to be labeled represents data q g =q 1 q 0 .

实施例五Embodiment 5

基于同一发明构思,本申请实施例还提供一种计算机存储介质,下面进行说明。Based on the same inventive concept, an embodiment of the present application further provides a computer storage medium, which will be described below.

所述计算机存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如实施例一所述方法的步骤。The computer storage medium stores a computer program thereon, and when the computer program is executed by the processor, implements the steps of the method described in the first embodiment.

采用本申请实施例中提供的计算机存储介质,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the computer storage medium provided in the embodiment of the present application, the quaternion is used to represent the face angle, which solves the problems in the prior art, which are caused by the Euler angle representing the face angle, such as the unknown rotation order, the unknown rotation of the coordinate axis, and the universal lock. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

实施例六Embodiment 6

基于同一发明构思,本申请实施例还提供一种计算机存储介质,下面进行说明。Based on the same inventive concept, an embodiment of the present application further provides a computer storage medium, which will be described below.

所述计算机存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如实施例二所述方法的步骤。The computer storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the steps of the method described in Embodiment 2 are implemented.

采用本申请实施例中提供的计算机存储介质,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the computer storage medium provided in the embodiment of the present application, the quaternion is used to represent the face angle, which solves the problems in the prior art, which are caused by the Euler angle representing the face angle, such as the unknown rotation order, the unknown rotation of the coordinate axis, and the universal lock. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

实施例七Embodiment 7

基于同一发明构思,本申请实施例还提供一种电子设备,下面进行说明。Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which will be described below.

图6示出了本申请实施例七中电子设备的结构示意图。FIG. 6 shows a schematic structural diagram of an electronic device in Embodiment 7 of the present application.

如图所示,所述电子设备包括存储器601、以及一个或多个处理器602,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如实施例一所述的方法。As shown, the electronic device includes a memory 601 and one or more processors 602, the memory is used to store one or more programs; the one or more programs are stored by the one or more processors When executed, the method described in the first embodiment is implemented.

采用本申请实施例中提供的电子设备,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the electronic device provided in the embodiment of the present application, the quaternion is used to represent the face angle, which solves the problems in the prior art, such as the unknown rotation order, the unknown rotation of the coordinate axis and the universal lock caused by the Euler angle representing the face angle. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

实施例八Embodiment 8

基于同一发明构思,本申请实施例还提供一种电子设备,下面进行说明。Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which will be described below.

图7示出了本申请实施例八中电子设备的结构示意图。FIG. 7 shows a schematic structural diagram of an electronic device in Embodiment 8 of the present application.

如图所示,所述电子设备包括存储器701、以及一个或多个处理器702,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如实施例二所述的方法。As shown, the electronic device includes a memory 701 and one or more processors 702, the memory is used to store one or more programs; the one or more programs are stored by the one or more processors When executed, the method described in Embodiment 2 is implemented.

采用本申请实施例中提供的电子设备,采用四元数进行面部角度表示,解决了现有技术中因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题,能够提供更准确的面部角度标注,提高面部角度识别网络的识别精度。Using the electronic device provided in the embodiment of the present application, the quaternion is used to represent the face angle, which solves the problems in the prior art, such as the unknown rotation order, the unknown rotation of the coordinate axis and the universal lock caused by the Euler angle representing the face angle. It can provide more accurate facial angle annotation and improve the recognition accuracy of the facial angle recognition network.

实施例九Embodiment 9

为了便于本申请的实施,本申请实施例以一具体实例进行说明。In order to facilitate the implementation of the present application, the embodiment of the present application is described with a specific example.

本申请实施例选用无歧义的四元数表示人脸旋转。四元数是一个四维向量,它可以被表示为q=e0+e1i+e2j+e3k,其中i2=j2=k2=ijk=-1。式子中第一项e0称为q的实部,e1i+e2j+e3k称为q的虚部。In the embodiment of the present application, an unambiguous quaternion is used to represent the rotation of the face. A quaternion is a four-dimensional vector that can be represented as q=e 0 +e 1 i+e 2 j+e 3 k, where i 2 =j 2 =k 2 =ijk=−1. The first item e 0 in the formula is called the real part of q, and e 1 i+e 2 j+e 3 k is called the imaginary part of q.

可定义四元数的加法为:The addition of quaternions can be defined as:

p+tq=(d0+te0)+(d1+te1)i+(d2+te2)j+(d3+te3)kp+tq=(d 0 +te 0 )+(d 1 +te 1 )i+(d 2 +te 2 )j+(d 3 +te 3 )k

四元数的乘法为:The multiplication of quaternions is:

pq=(d0e0-d1e1-d2e2-d3e3)+(d1e0+d0e1+d2e3-d3e2)ipq=(d 0 e 0 -d 1 e 1 -d 2 e 2 -d 3 e 3 )+(d 1 e 0 +d 0 e 1 +d 2 e 3 -d 3 e 2 )i

+(d2e0+d0e2+d3e1-d1e3)j+(d3e0+d0e3+d1e2-d2e1)k+(d 2 e 0 +d 0 e 2 +d 3 e 1 -d 1 e 3 )j+(d 3 e 0 +d 0 e 3 +d 1 e 2 -d 2 e 1 )k

四元数的共轭为:The conjugation of a quaternion is:

q*=e0-e1i-e2j-e3kq * = e 0 -e 1 ie 2 je 3 k

当|q|=1,定义q为单位四元数。When |q|=1, define q as a unit quaternion.

对于三维欧氏空间中任意的一个旋转,都可以用一个单位四元数表示,设为q。假设三维欧氏空间中的一个点r=(r1,r2,r3),它对应的四元数表示为

Figure BDA0002381871780000101
Figure BDA0002381871780000102
那么经过旋转q可以得到新的四元数为:For any rotation in the three-dimensional Euclidean space, it can be represented by a unit quaternion, set as q. Assuming a point r=(r 1 , r 2 , r 3 ) in the three-dimensional Euclidean space, its corresponding quaternion is expressed as
Figure BDA0002381871780000101
Figure BDA0002381871780000102
Then after rotating q, the new quaternion can be obtained as:

Figure BDA0002381871780000103
Figure BDA0002381871780000103

该四元数对应的旋转后的点r'=(r′1,r′2,r′3)。The rotated point r'=(r' 1 , r' 2 , r' 3 ) corresponding to the quaternion.

图8示出了本申请实施例九中标注工具界面的示意图。FIG. 8 shows a schematic diagram of an interface of an annotation tool in Embodiment 9 of the present application.

如图所示,标注工具中:As shown in the figure, in the annotation tool:

1为待标注图片所在目录,可以包括初始化人脸角度表示;1 is the directory where the picture to be marked is located, which can include the initialized face angle representation;

2为当前人脸角度的无歧义表示,以四元数为例;2 is an unambiguous representation of the current face angle, taking quaternion as an example;

3为复位按钮,标注值恢复到无旋转状态;3 is the reset button, and the marked value returns to the non-rotation state;

4为当前待标注人脸图片;4 is the current face image to be labeled;

5为保存当前人脸角度的无歧义表示,导入下一张待标注人脸图片;5 In order to save the unambiguous representation of the current face angle, import the next face image to be labeled;

6为当前标注情况下人脸角度三维坐标轴可视化。6 is the visualization of the three-dimensional coordinate axis of the face angle under the current labeling situation.

图9示出了本申请实施例九中标注流程示意图。FIG. 9 shows a schematic diagram of the labeling process in Embodiment 9 of the present application.

如图所示,标注流程可以为:As shown in the figure, the labeling process can be as follows:

1.通过已有人脸角度模型或已标注数据获取人脸角度的无歧义表示q0=e0+e1i+e2j+e3k,如没有初始化表示则将q0设为1+0i+0j+0k;1. Obtain the unambiguous representation of the face angle through the existing face angle model or the labeled data q 0 =e 0 +e 1 i+e 2 j+e 3 k, if there is no initialized representation, set q 0 to 1+ 0i+0j+0k;

具体的,可以预先建立人脸角度模型,通过所述人脸角度模型直接输出人脸角度的无歧义表示q0;若该人脸图像已经被标注过,那么可以从磁盘中读取所述人脸角度的无歧义表示q0Specifically, a face angle model can be established in advance, and an unambiguous representation q 0 of the face angle can be directly output through the face angle model; if the face image has been marked, the face image can be read from the disk. An unambiguous representation of the face angle q 0 .

2.将q0在标注工具中三维可视化;2. 3D visualization of q 0 in the annotation tool;

具体的,可以通过三维坐标系来表示旋转q0,其中,x轴可以用向量

Figure BDA0002381871780000111
Figure BDA0002381871780000112
表示,y轴可以用向量
Figure BDA0002381871780000113
Figure BDA0002381871780000114
表示,z轴可以用向量
Figure BDA0002381871780000115
Figure BDA0002381871780000116
表示,将这三个向量绘制到界面上便可可视化q0。Specifically, the rotation q 0 can be represented by a three-dimensional coordinate system, wherein the x-axis can be represented by a vector
Figure BDA0002381871780000111
Figure BDA0002381871780000112
Represented, the y-axis can be represented by a vector
Figure BDA0002381871780000113
Figure BDA0002381871780000114
Represented, the z-axis can be represented by a vector
Figure BDA0002381871780000115
Figure BDA0002381871780000116
represents that q 0 can be visualized by plotting these three vectors on the interface.

3.标注人员旋转标注工具中的三维坐标系,使得该坐标系与待标注图像中人脸的设想三维坐标重合,获取此时的旋转表示q1=d0+d1i+d2j+d3k;3. The labeler rotates the 3D coordinate system in the labeling tool so that the coordinate system coincides with the assumed 3D coordinates of the face in the image to be labelled, and obtains the rotation representation at this time q 1 =d 0 +d 1 i+d 2 j+ d3k ;

具体实施时,三维坐标系具体可以通过上述步骤2可视化得到,待标注图像中人脸的设想三维坐标系可以为人脸图像中两眼水平方向代表x轴方向,两眼中点到下巴方向代表y轴方向,人脸朝向的方向代表z轴方向,旋转时可通过Unity3D获取旋转表示,该旋转表示可以为q1=d0+d1i+d2j+d3k。During specific implementation, the three-dimensional coordinate system can be obtained by visualization in the above step 2. The assumed three-dimensional coordinate system of the face in the image to be marked can be the horizontal direction of the two eyes in the face image to represent the x-axis direction, and the direction from the midpoint of the two eyes to the chin represents the y-axis. Direction, the direction the face is facing represents the z-axis direction, and the rotation representation can be obtained through Unity3D during rotation, and the rotation representation can be q 1 =d 0 +d 1 i+d 2 j+d 3 k.

4.计算出待标注图片中人脸的人脸角度无歧义表示qg=q1q04. Calculate the unambiguous expression q g =q 1 q 0 of the face angle of the face in the image to be labeled.

计算得到qg=(d0e0-d1e1-d2e2-d3e3)+(d1e0+d0e1+d2e3-d3e2)i+(d2e0+d0e2+d3e1-d1e3)j+(d3e0+d0e3+d1e2一d2e1)k。Calculated q g =(d 0 e 0 -d 1 e 1 -d 2 e 2 -d 3 e 3 )+(d 1 e 0 +d 0 e 1 +d 2 e 3 -d 3 e 2 )i+( d 2 e 0 +d 0 e 2 +d 3 e 1 -d 1 e 3 )j+(d 3 e 0 +d 0 e 3 +d 1 e 2 -d 2 e 1 )k.

本申请实施例提出一种无歧义的人脸角度表示,解决因为欧拉角表示人脸角度导致的旋转次序不明、坐标轴是否旋转不明和万向锁等问题。基于这种人脸角度表示能够提供更准确的人脸角度标注,提高人脸角度识别网络的识别精度。The embodiment of the present application proposes an unambiguous representation of a face angle, which solves the problems of unclear rotation order, unknown rotation of the coordinate axis, and gimbal lock caused by the Euler angle representing the face angle. Based on this face angle representation, more accurate face angle annotation can be provided, and the recognition accuracy of the face angle recognition network can be improved.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。本申请实施例中的方案可以采用各种计算机语言实现,例如,面向对象的程序设计语言Java和直译式脚本语言JavaScript等。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. The solutions in the embodiments of the present application may be implemented in various computer languages, for example, the object-oriented programming language Java and the literal translation scripting language JavaScript, and the like.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While the preferred embodiments of the present application have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of this application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (12)

1.一种面部角度表示方法,其特征在于,包括:1. a face angle representation method, is characterized in that, comprising: 确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;Determine the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk=−1 , e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q; 将所述表示数据q进行三维可视化。The representation data q is visualized in three dimensions. 2.根据权利要求1所述的方法,其特征在于,所述表示数据q与三维坐标系的关系,为:2. The method according to claim 1, wherein the relationship between the representation data q and the three-dimensional coordinate system is: 对于三维空间中任一点,根据表示数据q旋转后得到新的表示数据:For any point in the three-dimensional space, the new representation data is obtained after rotating according to the representation data q:
Figure FDA0002381871770000011
Figure FDA0002381871770000011
其中,
Figure FDA0002381871770000012
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;q*=e0-e1i-e2j-e3k;所述新的表示数据对应的三维坐标系下的点为r'=(r′1,r′2,r′3)。
in,
Figure FDA0002381871770000012
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) in the three-dimensional coordinate system before rotation; q * = e 0 -e 1 ie 2 je 3 k; the three-dimensional coordinates corresponding to the new representation data The point under the system is r'=(r' 1 , r' 2 , r' 3 ).
3.根据权利要求1所述的方法,其特征在于,所述确定面部角度的表示数据q,包括:通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到,或者,通过预先设置得到。3. The method according to claim 1, wherein said determining the representation data q of the face angle comprises: obtaining through a pre-established face angle model or pre-marked face angle data, or obtaining by preset . 4.一种面部角度标注方法,其特征在于,包括:4. a face angle labeling method, is characterized in that, comprises: 确定待标注的面部图像;Determine the facial image to be annotated; 根据预先三维可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1According to the initial face angle representation data q 0 visualized in advance and the three-dimensional coordinate system of the face image to be marked, the representation data q 1 is obtained; 根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qgAccording to the representation data q 1 and the representation data q 0 , obtain the face angle representation data q g of the facial image to be marked; 根据所述面部角度表示数据qg标注所述面部图像的面部角度;Label the face angle of the face image according to the face angle representation data q g ; 其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts. 5.根据权利要求4所述的方法,其特征在于,所述初始面部角度无歧义表示q0通过预先建立的面部角度模型或者预先标注的面部角度数据获取得到,或者,所述初始面部角度无歧义表示q0设置为q0=1+0i+0j+0k。5. The method according to claim 4, wherein the initial facial angle unambiguous representation q 0 is obtained by a pre-established facial angle model or pre-labeled facial angle data, or the initial facial angle is unambiguous. Ambiguity means that q 0 is set to q 0 =1+0i+0j+0k. 6.根据权利要求4所述的方法,其特征在于,所述根据预先可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1,包括:6. The method according to claim 4, characterized in that, according to the pre-visualized initial face angle representation data q 0 and the three-dimensional coordinate system of the facial image to be marked, the representation data q 1 is obtained, comprising: 旋转预先可视化的初始面部角度表示数据q0对应的三维坐标系,使得所述三维坐标系与待标注的面部图像的三维坐标系重合,获取此时的表示数据q1The three-dimensional coordinate system corresponding to the pre-visualized initial face angle representation data q 0 is rotated so that the three-dimensional coordinate system coincides with the three-dimensional coordinate system of the facial image to be marked, and the representation data q 1 at this time is obtained. 7.根据权利要求6所述的方法,其特征在于,每个点旋转后的表示数据为:7. The method according to claim 6, wherein the representation data after each point is rotated is:
Figure FDA0002381871770000021
Figure FDA0002381871770000021
其中,
Figure FDA0002381871770000022
为旋转前三维坐标系下点r=(r1,r2,r3)的四元数表示;所述待标注的面部图像的三维坐标系下的点为r'=(r′1,r′2,r′3)。
in,
Figure FDA0002381871770000022
is the quaternion representation of the point r=(r 1 , r 2 , r 3 ) under the three-dimensional coordinate system before rotation; the point under the three-dimensional coordinate system of the facial image to be marked is r′=(r′ 1 , r ' 2 , r' 3 ).
8.根据权利要求4所述的方法,其特征在于,所述待标注的面部图像的面部角度表示数据qg=q1q08 . The method according to claim 4 , wherein the face angle representation data of the face image to be marked is q g =q 1 q 0 . 9.一种面部角度表示装置,其特征在于,包括:9. A face angle representation device, characterized in that, comprising: 数据确定模块,用于确定面部角度的表示数据q;其中,所述表示数据q为四元数,q=e0+e1i+e2j+e3k,i2=j2=k2=ijk=-1,e0称为q的实部,e1i+e2j+e3k称为q的虚部;A data determination module, used for determining the representation data q of the face angle; wherein, the representation data q is a quaternion, q=e 0 +e 1 i+e 2 j+e 3 k, i 2 =j 2 =k 2 =ijk=-1, e 0 is called the real part of q, e 1 i+e 2 j+e 3 k is called the imaginary part of q; 表示模块,用于将所述表示数据q进行三维可视化。The representation module is used for three-dimensional visualization of the representation data q. 10.一种面部角度标注装置,其特征在于,包括:10. A device for labeling facial angles, comprising: 图像确定模块,用于确定待标注的面部图像;an image determination module, used to determine the facial image to be marked; 第一处理模块,用于根据预先可视化的初始面部角度表示数据q0与所述待标注的面部图像的三维坐标系,得到表示数据q1a first processing module, configured to obtain the representation data q 1 according to the pre-visualized initial face angle representation data q 0 and the three-dimensional coordinate system of the facial image to be marked; 第二处理模块,用于根据所述表示数据q1以及所述表示数据q0,得到所述待标注的面部图像的面部角度表示数据qga second processing module, configured to obtain, according to the representation data q 1 and the representation data q 0 , the face angle representation data q g of the facial image to be marked; 标注模块,用于根据所述面部角度表示数据qg标注所述面部图像的面部角度;a labeling module, configured to label the facial angle of the facial image according to the facial angle representation data qg ; 其中,所述表示数据q0、q1、qg均为四元数,包括实部和虚部。Wherein, the representation data q 0 , q 1 , and q g are all quaternions, including real and imaginary parts. 11.一种计算机存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至3任一所述方法或者如权利要求4至8任一所述方法的步骤。11. A computer storage medium, characterized in that, a computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 or any one of claims 4 to 8 is implemented. steps of the method described. 12.一种电子设备,其特征在于,包括存储器、以及一个或多个处理器,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如权利要求1至3任一所述的方法或者如权利要求4至8任一所述的方法。12. An electronic device, characterized by comprising a memory and one or more processors, wherein the memory is used to store one or more programs; the one or more programs are controlled by the one or more processors When executed, the method according to any one of claims 1 to 3 or the method according to any one of claims 4 to 8 is implemented.
CN202010085400.2A 2020-02-10 2020-02-10 Face angle representation and annotation method, device and computer storage medium Pending CN111325123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010085400.2A CN111325123A (en) 2020-02-10 2020-02-10 Face angle representation and annotation method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010085400.2A CN111325123A (en) 2020-02-10 2020-02-10 Face angle representation and annotation method, device and computer storage medium

Publications (1)

Publication Number Publication Date
CN111325123A true CN111325123A (en) 2020-06-23

Family

ID=71171242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010085400.2A Pending CN111325123A (en) 2020-02-10 2020-02-10 Face angle representation and annotation method, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN111325123A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991526A (en) * 2021-05-18 2021-06-18 创新奇智(北京)科技有限公司 Method and device for marking three-dimensional posture of image, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598221A (en) * 2016-11-17 2017-04-26 电子科技大学 Eye key point detection-based 3D sight line direction estimation method
CN107478223A (en) * 2016-06-08 2017-12-15 南京理工大学 A kind of human body attitude calculation method based on quaternary number and Kalman filtering
CN109931929A (en) * 2019-01-25 2019-06-25 南京薄幕软件科技有限公司 A kind of UAV Attitude calculation method based on quaternary number
CN110390307A (en) * 2019-07-25 2019-10-29 首都师范大学 Expression recognition method, expression recognition model training method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107478223A (en) * 2016-06-08 2017-12-15 南京理工大学 A kind of human body attitude calculation method based on quaternary number and Kalman filtering
CN106598221A (en) * 2016-11-17 2017-04-26 电子科技大学 Eye key point detection-based 3D sight line direction estimation method
CN109931929A (en) * 2019-01-25 2019-06-25 南京薄幕软件科技有限公司 A kind of UAV Attitude calculation method based on quaternary number
CN110390307A (en) * 2019-07-25 2019-10-29 首都师范大学 Expression recognition method, expression recognition model training method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991526A (en) * 2021-05-18 2021-06-18 创新奇智(北京)科技有限公司 Method and device for marking three-dimensional posture of image, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN110096925B (en) Enhancement method, acquisition method and device of facial expression image
CN110675475B (en) A face model generation method, device, equipment and storage medium
CN112487923A (en) Method and system for acquiring training data of human face head posture
US8933928B2 (en) Multiview face content creation
CN107240129A (en) Object and indoor small scene based on RGB D camera datas recover and modeling method
CN113706689B (en) Assembly guidance method and system based on Hololens depth data
CN105631161B (en) A kind of determination method and apparatus that actual situation model is overlapped
CN116310076A (en) Three-dimensional reconstruction method, device, equipment and storage medium based on nerve radiation field
Huang et al. Hybrid skeletal-surface motion graphs for character animation from 4d performance capture
CN110942511B (en) Indoor scene model reconstruction method and device
CN112598807A (en) Training method and device for face key point detection model, computer equipment and storage medium
CN115205383A (en) Method, device, electronic device and storage medium for determining camera pose
CN114202640A (en) Data acquisition method and device, computer equipment and storage medium
CN114022542A (en) A method of making 3D database based on 3D reconstruction
WO2023025175A1 (en) Spatial positioning method and apparatus
CN111325123A (en) Face angle representation and annotation method, device and computer storage medium
CN112967329B (en) Image data optimization method and device, electronic equipment and storage medium
Liu et al. GDRNPP: A geometry-guided and fully learning-based object pose estimator
CN113129362B (en) Method and device for acquiring three-dimensional coordinate data
CN112732075B (en) A teaching method and system for teaching experiment-oriented virtual-reality fusion machine teacher
CN115222809B (en) Target pose estimation method, device, computing equipment and storage medium
CN115984482A (en) Reconstruction method, device, electronic device and medium of hand-object interaction process
CN116958450B (en) A three-dimensional human body reconstruction method based on two-dimensional data
Mei et al. Multi-modal 6-DoF object pose tracking: integrating spatial cues with monocular RGB imagery
CN115937964B (en) Method, device, equipment and storage medium for estimating gesture

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: 20200623

RJ01 Rejection of invention patent application after publication