CN110874575A - A face image processing method and related equipment - Google Patents
A face image processing method and related equipment Download PDFInfo
- Publication number
- CN110874575A CN110874575A CN201911061482.0A CN201911061482A CN110874575A CN 110874575 A CN110874575 A CN 110874575A CN 201911061482 A CN201911061482 A CN 201911061482A CN 110874575 A CN110874575 A CN 110874575A
- Authority
- CN
- China
- Prior art keywords
- face
- feature
- full
- image
- face image
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/174—Facial expression recognition
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本申请涉及人工智能技术领域,尤其涉及一种脸部图像处理方法及相关设备。The present application relates to the technical field of artificial intelligence, and in particular, to a facial image processing method and related equipment.
背景技术Background technique
随着科学技术的不断发展,图像补全技术备受青睐。人脸图像补全技术是指将包含残缺区域的人脸图像进行补全,得到完整的人脸图像。通常是提取包含残缺区域的人脸图像中的特征图,再根据包含残缺区域的人脸图像中的特征图,预测残缺人脸图像,最后获得补全后的人脸图像。目前的人脸补全方法通常是提取残缺人脸图像的层级化特征图像,对残缺人脸图像进行非线性地表达和补全。With the continuous development of science and technology, image completion technology is very popular. The face image completion technology refers to the completion of the face image containing the incomplete area to obtain a complete face image. Usually, the feature map in the face image containing the incomplete area is extracted, and then the incomplete face image is predicted according to the feature map in the face image containing the incomplete area, and finally the completed face image is obtained. The current face completion method usually extracts the hierarchical feature image of the incomplete face image, and expresses and completes the incomplete face image nonlinearly.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种脸部图像处理方法及相关设备,用于提供一种基于特征点实现脸部图像处理方法,可以根据需要对脸部特征进行调整,从而获得相应的全脸图像。Embodiments of the present application provide a facial image processing method and related equipment, which are used to provide a facial image processing method based on feature points, which can adjust facial features as needed to obtain a corresponding full-face image.
第一方面,提供一种脸部图像处理方法,包括:In a first aspect, a method for processing a face image is provided, including:
获得待处理脸部图像,所述待处理脸部图像包括部分脸部未显示区域;obtaining a face image to be processed, where the face image to be processed includes a part of the face that is not displayed;
将所述待处理脸部图像输入已训练的脸部特征点预测模型,获得所述待处理脸部图像的全脸特征点集;Inputting the facial image to be processed into a trained facial feature point prediction model to obtain a full-face feature point set of the facial image to be processed;
根据脸部特征调整信息,对所述全脸特征点集中相应的特征点进行调整,获得调整后的全脸特征点集;According to the facial feature adjustment information, adjusting the corresponding feature points in the full-face feature point set to obtain an adjusted full-face feature point set;
将调整后的全脸特征点集,以及所述待处理脸部图像输入已训练的图像补全模型,获得将所述待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。Input the adjusted full-face feature point set and the to-be-processed face image into the trained image completion model to obtain a full-face that completes the undisplayed area of the face in the to-be-processed face image image.
第二方面,提供一种脸部图像处理方法,包括:In a second aspect, a method for processing a face image is provided, including:
响应在脸部图像补全界面上的脸部图像补全输入操作,向服务器发送补全请求,以使所述服务器对根据如第一方面中任一所述的方法对待处理脸部图像和脸部特征调整信息进行处理,得到脸部图像补全后的全脸图像;其中,所述补全请求包括所述待处理脸部图像和所述脸部特征调整信息;In response to the facial image completion input operation on the facial image completion interface, a completion request is sent to the server, so that the server can respond to the facial image and face to be processed according to the method according to any one of the first aspects. The facial feature adjustment information is processed to obtain a full-face image after the facial image is completed; wherein, the completion request includes the to-be-processed facial image and the facial feature adjustment information;
获取并显示所述服务器返回的所述全脸图像。Acquire and display the full-face image returned by the server.
第三方面,提供一种脸部图像处理装置,包括:In a third aspect, a facial image processing apparatus is provided, including:
收发模块,用于获得待处理脸部图像,所述待处理脸部图像包括部分脸部未显示区域;a transceiver module, configured to obtain a face image to be processed, where the face image to be processed includes a part of the face that is not displayed;
处理模块,用于将所述待处理脸部图像输入已训练的脸部特征点预测模型,获得所述待处理脸部图像的全脸特征点集;以及,根据脸部特征调整信息,对所述全脸特征点集中相应的特征点进行调整,获得调整后的全脸特征点集;以及,将调整后的全脸特征点集,以及所述待处理脸部图像输入已训练的图像补全模型,获得将所述待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The processing module is used for inputting the face image to be processed into the trained facial feature point prediction model to obtain the full face feature point set of the face image to be processed; The corresponding feature points in the full-face feature point set are adjusted to obtain the adjusted full-face feature point set; The model obtains a full-face image obtained by performing complement processing on the undisplayed area of the face in the to-be-processed face image.
在一种可能的实施例中,所述脸部特征点预测模型包括第一编码模块、多个第二编码模块和全连接模块,所述处理模块具体用于:In a possible embodiment, the facial feature point prediction model includes a first encoding module, a plurality of second encoding modules and a fully connected module, and the processing module is specifically used for:
通过所述第一编码模块,对所述待处理脸部图像进行多种尺度下的特征提取,获得第一特征图集;Through the first encoding module, feature extraction is performed on the face image to be processed under various scales to obtain a first feature atlas;
分别通过所述多个第二编码模块中各个编码模块,对所述第一特征图集进行卷积池化处理,获得第二特征值集;Perform convolution pooling processing on the first feature map set through each coding module in the plurality of second coding modules respectively to obtain a second feature value set;
通过所述全连接模块,对多个第二特征值集进行拼接,获得全脸特征点集。Through the full connection module, a plurality of second feature value sets are spliced to obtain a full face feature point set.
在一种可能的实施例中,所述脸部特征调整信息为表情分类标签,所述处理模块具体用于:In a possible embodiment, the facial feature adjustment information is an expression classification label, and the processing module is specifically configured to:
将所述表情分类标签,以及全脸特征点集输入脸部调整模型,获得调整后的全脸特征点集;Inputting the facial expression classification label and the full-face feature point set into the face adjustment model to obtain the adjusted full-face feature point set;
其中,所述脸部调整模型是根据样本脸部表情图像集,所述样本脸部表情图像集中每个样本脸部表情图像标注对应的表情分类标签。The face adjustment model is based on a sample facial expression image set, and each sample facial expression image in the sample facial expression image set is marked with a corresponding expression classification label.
在一种可能的实施例中,所述处理模块具体用于:In a possible embodiment, the processing module is specifically used for:
提取所述脸部特征调整信息对应的脸部轮廓特征;其中,所述脸部轮廓特征用于表示脸部关键点构成的轮廓;Extracting the facial contour feature corresponding to the facial feature adjustment information; wherein, the facial contour feature is used to represent the contour formed by the facial key points;
根据所述脸部轮廓特征,对所述全脸特征点集中对应特征点的坐标进行调整,获得调整后的全脸特征点集。According to the facial contour feature, the coordinates of the corresponding feature points in the full-face feature point set are adjusted to obtain an adjusted full-face feature point set.
在一种可能的实施例中,所述图像补全模型包括第三编码模块,空洞卷积模块和解码模块,所述处理模块具体用于:In a possible embodiment, the image completion model includes a third encoding module, a hole convolution module and a decoding module, and the processing module is specifically used for:
将所述调整后的全脸特征点集转换为脸部特征点图;converting the adjusted full-face feature point set into a facial feature point map;
通过所述第三编码模块,对所述脸部特征点图,以及所述待处理脸部图像进行不同尺度下的卷积处理,获得第三特征图集;其中,所述第三特征图集包括卷积处理后特征图集,所述卷积处理后特征图集所述第三编码模块是对所述脸部特征点图,以及所述待处理脸部图像进行不同尺度下的卷积处理过程中,输出的最后卷积特征图;Through the third encoding module, the face feature point map and the face image to be processed are subjected to convolution processing at different scales to obtain a third feature atlas; wherein, the third feature atlas Including a feature map set after convolution processing, the third encoding module of the feature map set after convolution processing is to perform convolution processing at different scales on the facial feature point map and the face image to be processed In the process, the final convolution feature map of the output;
通过所述空洞卷积模块中的残差单元,对所述卷积处理后特征图集进行空洞卷积,获得第四特征图集;Through the residual unit in the hole convolution module, perform hole convolution on the feature atlas after the convolution processing to obtain a fourth feature atlas;
通过所述空洞卷积模块中的注意力单元,提取所述第四特征图集,以及所述卷积处理后特征图集的局部特征,获得第五特征图集;Extracting the fourth feature atlas and the local features of the feature atlas after the convolution processing through the attention unit in the hole convolution module to obtain the fifth feature atlas;
通过所述解码模块对所述第五特征图集,以及所述第三特征图集进行上采样处理,获得将所述待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。Perform upsampling processing on the fifth feature atlas and the third feature atlas by the decoding module, so as to obtain a full face obtained by performing complement processing on the undisplayed area of the face in the face image to be processed image.
在一种可能的实施例中,所述第三特征图集还包括第一中间特征图集和第二中间特征图集,所述第一中间特征图集是对所述脸部特征点图,以及所述待处理脸部图像依次进行预设次卷积处理获得的中间卷积结果,所述第二中间特征图集是对所述第一中间特征图集进行预设次卷积处理获得的中间卷积结果,所述处理模块具体用于:In a possible embodiment, the third feature atlas further includes a first intermediate feature atlas and a second intermediate feature atlas, the first intermediate feature atlas is a map of the facial feature points, and the intermediate convolution results obtained by sequentially performing preset sub-convolution processing on the face images to be processed, and the second intermediate feature atlas is obtained by performing preset sub-convolution processing on the first intermediate feature atlas. Intermediate convolution results, the processing module is specifically used for:
通过所述解码模块对所述第五特征图集进行上采样处理,获得第六特征图集;Perform up-sampling processing on the fifth feature atlas by the decoding module to obtain a sixth feature atlas;
通过所述解码模块对所述第二中间特征图集,以及所述第六特征图集进行加权处理,获得第七特征图集;Perform weighting processing on the second intermediate feature atlas and the sixth feature atlas by the decoding module to obtain a seventh feature atlas;
通过所述解码模块对所述第七特征图集,以及所述第一中间特征图集进行加权和上采样处理,获得第八特征图集;Perform weighting and upsampling processing on the seventh feature atlas and the first intermediate feature atlas by the decoding module to obtain an eighth feature atlas;
通过所述解码模块对所述第八特征图集进行卷积处理,获得将所述待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。Perform convolution processing on the eighth feature atlas by the decoding module to obtain a full-face image obtained by performing complement processing on the undisplayed area of the face in the face image to be processed.
在一种可能的实施例中,所述脸部特征点预测模型是通过如下步骤训练得到的:In a possible embodiment, the facial feature point prediction model is obtained by training through the following steps:
获取第一样本数据集;其中,所述第一样本数据集中包括所述样本待处理脸部图像集,所述与每个样本待处理脸部图像对应的真值样本全脸特征点集;Obtain a first sample data set; wherein, the first sample data set includes the sample face image set to be processed, and the true-value sample full-face feature point set corresponding to each sample face image to be processed ;
基于所述第一样本数据集,训练脸部特征点预测模型;Based on the first sample data set, train a facial feature point prediction model;
直到脸部特征点预测模型的预测损失满足第一预设条件,获得已训练的脸部特征点预测模型;其中,所述预测损失用于表示预测样本全脸特征点集和真值样本全脸特征点集之间的损失。Until the prediction loss of the facial feature point prediction model satisfies the first preset condition, the trained facial feature point prediction model is obtained; wherein, the prediction loss is used to represent the full face feature point set of the predicted sample and the full face of the true value sample loss between feature point sets.
在一种可能的实施例中,所述图像补全模型包括生成子模型和判别子模型,所述图像补全模型的损失根据逐像素损失、感知损失、风格损失、全微分损失以及对抗损失加权得到的;In a possible embodiment, the image completion model includes a generative sub-model and a discriminative sub-model, and the loss of the image completion model is weighted according to pixel-wise loss, perceptual loss, style loss, total differential loss and adversarial loss owned;
其中,所述逐像素损失用于表示补全后的样本全脸图像和样本待处理脸部图像的像素值误差;所述感知损失用于表示补全后的样本全脸图像的特征图和样本待处理脸部图像的特征图之间的误差;所述风格损失用于表示补全后的样本全脸图像加遮挡区域后的图像,和样本待处理脸部图像加所述遮挡区域后的图像的特征图的各通道信息向量化后通道间的格雷姆矩阵差值之和;全微分损失用于表示补全后的样本全脸图像横向、纵向导数之和与样本待处理脸部图像包括的像素点的总数之间的比值;所述生成损失用于表示所述判别子模型对所述生成子模型的生成结果来源的判别结果与生成结果的真实来源的损失。Wherein, the pixel-by-pixel loss is used to represent the pixel value error of the sample full-face image after completion and the sample face image to be processed; the perceptual loss is used to represent the feature map and sample of the sample full-face image after completion The error between the feature maps of the to-be-processed face image; the style loss is used to represent the completed sample full-face image plus the occluded area image, and the sample to-be-processed face image plus the occlusion area. The information of each channel of the feature map is the sum of the Gramm matrix differences between the channels after quantization; the full differential loss is used to represent the sum of the horizontal and vertical derivatives of the completed sample full face image and the sample face image to be processed. The ratio between the total number of pixel points; the generation loss is used to represent the loss of the discriminant sub-model for the source of the generation result of the generation sub-model and the loss of the real source of the generation result.
第二方面,提供一种脸部图像处理方法,包括:In a second aspect, a method for processing a face image is provided, including:
响应在脸部图像补全界面上的脸部图像补全输入操作,向服务器发送补全请求,以使所述服务器对根据如第一方面中任一所述的方法对待处理脸部图像和脸部特征调整信息进行处理,得到脸部图像补全后的全脸图像;其中,所述补全请求包括所述待处理脸部图像和所述脸部特征调整信息;In response to the facial image completion input operation on the facial image completion interface, a completion request is sent to the server, so that the server can respond to the facial image and face to be processed according to the method according to any one of the first aspects. The facial feature adjustment information is processed to obtain a full-face image after the facial image is completed; wherein, the completion request includes the to-be-processed facial image and the facial feature adjustment information;
获取并显示所述服务器返回的所述全脸图像。Acquire and display the full-face image returned by the server.
第三方面,提供一种脸部图像处理装置,包括:In a third aspect, a facial image processing apparatus is provided, including:
收发模块,用于获得待处理脸部图像,所述待处理脸部图像包括部分脸部未显示区域;a transceiver module, configured to obtain a face image to be processed, where the face image to be processed includes a part of the face that is not displayed;
处理模块,用于将所述待处理脸部图像输入已训练的脸部特征点预测模型,获得所述待处理脸部图像的全脸特征点集;以及,根据脸部特征调整信息,对所述全脸特征点集中相应的特征点进行调整,获得调整后的全脸特征点集;以及,将调整后的全脸特征点集,以及所述待处理脸部图像输入已训练的图像补全模型,获得将所述待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The processing module is used for inputting the face image to be processed into the trained facial feature point prediction model to obtain the full face feature point set of the face image to be processed; The corresponding feature points in the full-face feature point set are adjusted to obtain the adjusted full-face feature point set; The model obtains a full-face image obtained by performing complement processing on the undisplayed area of the face in the to-be-processed face image.
第四方面,提供一种终端设备,包括:In a fourth aspect, a terminal device is provided, including:
发送模块,用于响应在脸部图像补全界面上的脸部图像补全输入操作,向服务器发送补全请求,以使所述服务器对根据如第一方面中任一所述的方法对待处理脸部图像和脸部特征调整信息进行处理,得到脸部图像补全后的全脸图像;其中,所述补全请求包括所述待处理脸部图像和所述脸部特征调整信息;以及获取所述服务器返回的所述全脸图像;A sending module, configured to send a completion request to the server in response to a face image completion input operation on the face image completion interface, so that the server is to be processed according to the method described in any one of the first aspects The facial image and the facial feature adjustment information are processed to obtain a full-face image after the facial image is completed; wherein, the completion request includes the to-be-processed facial image and the facial feature adjustment information; and obtaining the full-face image returned by the server;
显示模块,用于显示所述全脸图像。The display module is used for displaying the full face image.
第五方面,提供一种脸部图像处理设备,包括:In a fifth aspect, a facial image processing device is provided, including:
至少一个处理器,以及at least one processor, and
与所述至少一个处理器通信连接的存储器;a memory communicatively coupled to the at least one processor;
其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述至少一个处理器通过执行所述存储器存储的指令实现如第一方面或第二方面中任一项所述的方法。Wherein, the memory stores instructions executable by the at least one processor, and the at least one processor implements the method according to any one of the first aspect or the second aspect by executing the instructions stored in the memory .
第六方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如第一方面或第二方面中任一项所述的方法。In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores computer instructions that, when the computer instructions are executed on a computer, cause the computer to perform any one of the first aspect or the second aspect. method described in item.
由于本申请实施例采用上述技术方案,至少具有如下技术效果:Because the embodiment of the present application adopts the above technical solution, it has at least the following technical effects:
本申请实施例中,通过获得待处理脸部图像的全脸特征点集,实现基于特征点进行的脸部补全方法,以及基于对全脸特征点集的精确修改,以获得更加准确地调整后的全脸图像。且,由于无需用户手动对全脸特征点集进行调整,相对可以提高调整全脸特征点集的效率,进而提高脸部图像处理的效率。进一步的,可以根据需要设定不同的脸部特征调整信息,进而生成不同的全脸图像,以满足不同用户的个性化需求,提升用户进行脸部补全的趣味性。通过调整脸部特征点,可以对图像的姿态、表情以及面部轮廓等各个方面进行修改,实现了一种可调性图像补全方案。In the embodiment of the present application, by obtaining the full-face feature point set of the face image to be processed, a face completion method based on feature points is implemented, and based on the accurate modification of the full-face feature point set, so as to obtain a more accurate adjustment Full face image after. Moreover, since the user does not need to manually adjust the full-face feature point set, the efficiency of adjusting the full-face feature point set can be relatively improved, thereby improving the efficiency of facial image processing. Further, different facial feature adjustment information can be set as required, and then different full-face images can be generated to meet the individual needs of different users and improve the fun of the user's face completion. By adjusting the facial feature points, the pose, expression and facial contour of the image can be modified, and an adjustable image completion scheme is realized.
附图说明Description of drawings
图1为本申请实施例提供的一种脸部图像处理设备的结构示意图;FIG. 1 is a schematic structural diagram of a facial image processing device according to an embodiment of the present application;
图2为本申请实施例提供的一种脸部图像处理方法的应用场景示意图;FIG. 2 is a schematic diagram of an application scenario of a face image processing method provided by an embodiment of the present application;
图3为本申请实施例提供的一种脸部图像处理方法的原理示意图;3 is a schematic diagram of the principle of a facial image processing method provided by an embodiment of the present application;
图4为本申请实施例提供的各个模型的分布示意图;4 is a schematic diagram of the distribution of each model provided by the embodiment of the present application;
图5为本申请实施例提供的两种添加遮挡方式所生成的样本待处理脸部图像;FIG. 5 is a sample face image to be processed generated by two occlusion methods provided by the embodiment of the present application;
图6为本申请实施例提供的一种调整全脸特征点集过程示例图;6 is an example diagram of a process for adjusting a full-face feature point set provided by an embodiment of the present application;
图7为本申请实施例提供的一种调整全脸特征点集的过程示意图;7 is a schematic diagram of a process for adjusting a full-face feature point set provided by an embodiment of the present application;
图8为本申请实施例提供的一种脸部图像处理方法的交互示意图;FIG. 8 is an interactive schematic diagram of a facial image processing method provided by an embodiment of the present application;
图9为本申请实施例提供的一种脸部图像补全界面的示意图;9 is a schematic diagram of a face image completion interface provided by an embodiment of the present application;
图10为本申请实施例提供的一种在原图上增加遮挡以生成待处理图像的过程示意图;FIG. 10 is a schematic diagram of a process of adding occlusion to an original image to generate an image to be processed according to an embodiment of the present application;
图11为本申请实施例提供的一种补全获得全脸图像过程中的示例图一;FIG. 11 is an example diagram 1 of a process of obtaining a full-face image by complementing provided by an embodiment of the application;
图12为本申请实施例提供的一种补全获得全脸图像过程中的示例图二;FIG. 12 is an example FIG. 2 in the process of obtaining a full-face image by complementing provided by an embodiment of the present application;
图13为本申请实施例提供的一种补全获得全脸图像过程中的示例图三;FIG. 13 is an example FIG. 3 in the process of obtaining a full-face image by complementing provided by an embodiment of the present application;
图14为本申请实施例提供的一种补全获得全脸图像过程中的示例图四;FIG. 14 is an example FIG. 4 in the process of obtaining a full-face image by complementing provided by an embodiment of the present application;
图15为本申请实施例提供的一种补全获得全脸图像过程中的示例图五;FIG. 15 is an example FIG. 5 in the process of obtaining a full-face image by complementing provided by an embodiment of the present application;
图16为本申请实施例提供的一种补全获得全脸图像过程中的示例图六;FIG. 16 is an example FIG. 6 in the process of obtaining a full-face image by complementing provided by an embodiment of the present application;
图17为本申请实施例提供的一种显示全脸图像的界面示意图一;17 is a schematic diagram 1 of an interface for displaying a full-face image provided by an embodiment of the present application;
图18为本申请实施例提供的一种显示全脸图像的界面示意图二;18 is a schematic diagram 2 of an interface for displaying a full-face image provided by an embodiment of the present application;
图19为本申请实施例提供的一种图像处理装置的结构示意图;FIG. 19 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the application;
图20为本申请实施例提供的一种终端设备的结构示意图一;FIG. 20 is a schematic structural diagram 1 of a terminal device according to an embodiment of the present application;
图21为本申请实施例提供的一种终端设备的结构示意图二。FIG. 21 is a second schematic structural diagram of a terminal device according to an embodiment of the application.
具体实施方式Detailed ways
为了更好的理解本申请实施例提供的技术方案,下面将结合说明书附图以及具体的实施方式进行详细的说明。In order to better understand the technical solutions provided by the embodiments of the present application, detailed descriptions will be given below with reference to the accompanying drawings and specific implementation manners.
为了便于本领域技术人员更好地理解本申请的技术方案,下面对本申请涉及的专业术语进行介绍。In order to facilitate those skilled in the art to better understand the technical solutions of the present application, the technical terms involved in the present application are introduced below.
人工智能(Artificial Intelligence,AI):是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。Artificial Intelligence (AI): It is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technology and software-level technology. The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
计算机视觉技术(Computer Vision,CV):计算机视觉是一门研究如何使机器“看”的科学,更进一步的说,就是指用摄影机和电脑代替人眼对目标进行识别、跟踪和测量等机器视觉,并进一步做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取信息的人工智能系统。计算机视觉技术通常包括图像处理、图像识别、图像语义理解、图像检索、OCR、视频处理、视频语义理解、视频内容/行为识别、三维物体重建、3D技术、虚拟现实、增强现实、同步定位与地图构建等技术,还包括常见的人脸识别、指纹识别等生物特征识别技术。Computer Vision (CV): Computer vision is a science that studies how to make machines "see". Further, it refers to the use of cameras and computers instead of human eyes to identify, track and measure objects. , and further do graphic processing, so that the computer processing becomes a more suitable image for human eye observation or transmission to the instrument for detection. As a scientific discipline, computer vision studies related theories and technologies, trying to build artificial intelligence systems that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping It also includes common biometric identification technologies such as face recognition and fingerprint recognition.
脸部图像补全:图像补全是指对不完整的脸部图像进行补全以及编辑脸部属性,生成的全脸图像既可以与原始全脸图像一样精确,也可以与完整脸部图像在内容上保持一致,以使补全的全脸图像看起来具有真实的视觉感受。编辑脸部属性例如对脸部表情、脸部姿态和脸部轮廓中的一种或几种进行编辑。脸部图像补全可以应用于用户日常的照片处理中,也可以应用于安防领域等。Face image completion: Image completion refers to the completion of incomplete face images and editing of face attributes. The generated full-face image can be as accurate as the original full-face image, or it can be matched with the complete face image. Consistent in content, so that the completed full-face image looks realistic. Editing facial attributes, for example, edits one or more of facial expressions, facial postures, and facial contours. Facial image completion can be applied to the user's daily photo processing, as well as to the security field.
待处理脸部图像:是指该脸部图像包括部分没有显示的脸部区域,例如脸部具有部分残缺,或脸部具有遮挡等等。本申请中所指的脸部包括但不限于人脸或动物脸部等。To-be-processed face image: means that the face image includes a part of the face area that is not displayed, for example, the face has partial defects, or the face has occlusions, and so on. The face referred to in this application includes, but is not limited to, a human face or an animal face.
脸部特征调整信息:用于调整全脸特征点集中各个特征点的坐标的信息,可以用于脸部的轮廓、表情和姿态等。脸部特征调整信息的格式可以是坐标点,也可以是图像,也可以是简笔画等等。Facial feature adjustment information: the information used to adjust the coordinates of each feature point in the full-face feature point set, which can be used for the outline, expression, and posture of the face. The format of the facial feature adjustment information may be a coordinate point, an image, a sketch, and the like.
需要说明的是,本申请中,脸部是指人脸或者动物脸,本申请主要以人脸为例进行详细说明,而对于动物脸部也是可以依据同样的原理实现补全处理的。It should be noted that, in this application, a face refers to a human face or an animal face. This application mainly takes a human face as an example for detailed description, and the animal face can also be complemented according to the same principle.
设计思想design thinking
在拍摄环境光线条件差,或图像受到人为或自然的损害等各种情况下,可能造成脸部图像不完整。例如在夜晚摄像头拍摄不法分子时,未拍摄到完整的脸部图像,此时可以采用脸部补全方法对该脸部图像进行处理。In various situations, such as poor lighting conditions in the shooting environment, or the image is damaged by man or nature, the face image may be incomplete. For example, when a camera shoots a criminal at night, a complete face image is not captured. At this time, a face completion method can be used to process the face image.
目前,脸部图像方法一般是通过非线性地表达及补全脸部图像,无法实现对待处理脸部图像的精确补全以及精确修改等。At present, the facial image method generally expresses and complements the facial image in a non-linear manner, and cannot achieve accurate complementing and accurate modification of the facial image to be processed.
鉴于此,本申请发明人提供一种脸部图像处理方法,先预测待处理脸部图像的全脸特征点集,根据脸部特征调整信息,对全脸特征点集进行调整,获得调整后的全脸特征点集,再基于调整后的全脸特征点集,以及待处理脸部图像,实现对待处理脸部图像的补全。由于本申请实施例中是提取全脸特征点集,也就是说获得了用于精确量化脸部的信息,有利于精确地补全脸部图像,且,便于更精确地对全脸特征点集进行修改,在修改全脸特征点集之后,补全后的全脸图像也有所不同,丰富了补全后的全脸图像,满足了不同用户对全脸补全的不同需求。In view of this, the inventor of the present application provides a facial image processing method, which first predicts the full-face feature point set of the face image to be processed, adjusts the full-face feature point set according to the facial feature adjustment information, and obtains the adjusted facial feature point set. The full-face feature point set is based on the adjusted full-face feature point set and the face image to be processed to complete the face image to be processed. Because the whole-face feature point set is extracted in the embodiment of the present application, that is to say, the information for accurately quantifying the face is obtained, which is beneficial to accurately complete the face image, and facilitates the more accurate analysis of the full-face feature point set. After modifying the full-face feature point set, the completed full-face image is also different, which enriches the completed full-face image and meets the different needs of different users for full-face completion.
本申请发明人进一步考虑,如果是手动对全脸特征点集进行调整,调整效率低,且无法保证调整后的全脸特征点集生成的全脸图像的准确性。因此本申请发明人考虑引入脸部调整模型,用户只需选择对应的表情的分类标签,脸部调整模型就能实现对全脸特征点集的精确调整。The inventor of the present application further considers that if the full-face feature point set is adjusted manually, the adjustment efficiency is low, and the accuracy of the full-face image generated by the adjusted full-face feature point set cannot be guaranteed. Therefore, the inventor of the present application considers introducing a face adjustment model, and the user only needs to select the classification label of the corresponding expression, and the face adjustment model can accurately adjust the feature point set of the whole face.
应用场景示例Application Scenario Example
请参照图1,表示执行本申请实施例中的脸部图像处理方法的脸部图像处理设备的结构示意图,该脸部图像处理设备100包括一个或多个输入设备101、一个或多个处理器102、一个或多个存储器103和一个或多个输出设备104。Please refer to FIG. 1 , which shows a schematic structural diagram of a facial image processing device that executes the facial image processing method in the embodiment of the present application. The facial
输入设备101用于提供输入接口,以获取外界设备/用户输入的待处理脸部图像等。在获得输入待处理脸部图像之后,输入设备101将该待处理脸部图像发送给处理器102,处理器102利用存储器103中存储的程序指令,实现对待处理脸部图像的补全过程,获得补全后的全脸图像。通过输出设备104输出全脸图像。The
其中,输入设备101可以包括但不限于物理键盘、功能键、轨迹球、鼠标、触摸屏、操作杆等中的一种或多种。处理器102可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等。存储器103可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器103也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard diskdrive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器103是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器103可以是上述存储器的组合。输出设备104例如显示器、扬声器和打印机等等。The
在可能的实施例中,脸部图像处理设备100可以是用户端设备,也可以是服务端设备。用户端设备可以是移动终端、固定终端或便携式终端,例如移动手机、站点、单元、设备、多媒体计算机、多媒体平板、互联网节点、通信器、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、个人通信系统(PCS)设备、个人导航设备、个人数字助理(PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者其任意组合,包括这些设备的配件和外设或者其任意组合。还可预见到的是,脸部图像处理设备100能够支持任意类型的针对用户的接口(例如可穿戴设备)等。服务端设备可以是各种服务提供的服务器、大型计算设备等。服务器可以是一个或多个服务器。服务器也可以是实体服务器或虚拟服务器等。In a possible embodiment, the facial
在一种可能的应用场景中,请参照图2,表示一种应用场景示例,脸部图像处理设备100通过服务器220实现。用户通过终端设备210中客户端211确定需要处理的待处理脸部图像,客户端211生成补全请求,服务器220通过对待处理脸部图像进行上述处理,获得全脸图像,并将全脸图像返回给客户端211。客户端211泛指可以实现脸部补全的客户端211,客户端211例如拍照App、图像处理APP等,本申请不限制客户端211的具体类型。In a possible application scenario, please refer to FIG. 2 , which shows an example of an application scenario. The face
工作原理working principle
请参照图3,表示对脸部图像进行处理过程的原理示意图,图像处理过程主要包括三部分:预测全脸特征点集部分310、调整全脸特征点集部分320和对待处理脸部图像进行补全部分330。Please refer to FIG. 3 , which shows a schematic diagram of the principle of processing a face image. The image processing process mainly includes three parts: predicting the full-face feature point set
具体的,待处理脸部图像为I,该待处理脸部图像的未显示区域可以表示为M,因此待处理脸部图像可以表示为:Specifically, the face image to be processed is I, and the undisplayed area of the face image to be processed can be expressed as M, so the face image to be processed can be expressed as:
其中“。”表示矩阵的哈达玛乘积。where "." represents the Hadamard product of the matrix.
脸部图像处理设备100预测出全脸特征点集L,根据脸部特征调整信息对全脸特征点集L进行调整,获得L’,再将L’和待处理脸部图像I输入到图像补全模型,从而获得全脸图像最终获得的全脸图像可以表示如下:The facial
其中,表示对未显示区域的补全区域。in, Indicates the completion area for the undisplayed area.
下面对预测全脸特征点集部分310进行说明。Next, the prediction full-face feature point set
脸部图像处理设备100可以通过脸部特征点预测模型,获得待处理脸部图像的全脸特征点集。The facial
在一种可能的实施例中,请参照图4,脸部特征点预测模型410可以包括第一编码模块411、多个第二编码模块412和全连接模块413,其中:In a possible embodiment, please refer to FIG. 4 , the facial feature
第一编码模块411中包括多种不同尺度的卷积层,当图像依次经过第一编码模块411中的各个层之后,各个卷积层可以分别获得对应的特征图,从而获得第一特征图集,也就是说,第一特征图集包括多个特征图。应当说明的是,本申请中的特征图集在没有明确限定的情况下,可能包括一个特征图,也可能包括多个特征图。The
在获得第一特征图集之后,图4中是以三个第二编码模块412为例,实际上不限制其数量,每个第二编码模块412中包括一个或多个卷积层以及一个或多个池化层,不同第二编码模块412可以对第一特征图集进行不同卷积池化处理,每个第二编码模块412对应输出相应的特征值集,从而获得第二特征值集。卷积池化处理可以是先做卷积,再对卷积结果做平均池化处理,也可以是先做卷积,再对卷积结果进行最大池化处理等。After the first feature atlas is obtained, three
作为一种实施例,多个第二编码模型412中存在不同尺度的两个编码模块。As an embodiment, there are two encoding modules of different scales in the plurality of
本申请实施例中,通过多个第二编码模块412分别对第一组特征图进行卷积池化处理,不同尺度的处理过程可以保留第一组特征图不同的特征,使得后续的特征点预测更加准确。In this embodiment of the present application, a plurality of
通过全连接模块413对第二特征值集进行拼接处理,获得全脸特征点集。全脸特征点集包括用于表示脸部的关键点的坐标集。拼接处理可以理解为将第二特征值集中对应值按照预设顺序组合成坐标,从而获得对应的全脸特征点集。The second feature value set is spliced through the
下面对脸部特征点预测模型410的结构进行具体示例说明。一种脸部特征点预测模型410具体如下表1所示:The structure of the facial feature
表1Table 1
表1中c表示输出通道数,s表示卷积层的跨步(stride),t表示扩张因子(expansion factor),n表示对应层重复处理的次数。In Table 1, c represents the number of output channels, s represents the stride of the convolutional layer, t represents the expansion factor, and n represents the number of repetitions of the corresponding layer.
其中,为了便于理解瓶颈层(bottleneck),下面对表1涉及的瓶颈层的结构进行示例说明。表1中s=2的瓶颈层的结构为通道数为(tk的1x1)卷积-ReLU6-(通道数为tk,跨步为2,卷积核大小为3x3)深度卷积(每个卷积核仅对一张特征图进行卷积)-ReLU6-(通道数为k的1x1)卷积。对于s=1的瓶颈层,其结构为:(通道数为tk的1x1)卷积-ReLU6-(通道数为tk,跨步为2,卷积核大小为3x3)深度卷积-ReLU6-(通道数为k的1x1)卷积,该输出结果与瓶颈层的输入相加,实现残差连接。Among them, in order to facilitate the understanding of the bottleneck layer (bottleneck), the structure of the bottleneck layer involved in Table 1 is exemplified below. The structure of the bottleneck layer with s=2 in Table 1 is that the number of channels is (1x1 of tk) convolution-ReLU6- (the number of channels is tk, the stride is 2, the convolution kernel size is 3x3) deep convolution (each volume The product kernel only convolves one feature map)-ReLU6-(1x1 with k channels) convolution. For the bottleneck layer with s=1, its structure is: (1x1 with channel number tk) convolution-ReLU6- (channel number is tk, stride is 2, convolution kernel size is 3x3) deep convolution-ReLU6-( 1x1) convolution with the number of channels k, and the output result is added to the input of the bottleneck layer to realize the residual connection.
请参照表1所示,第一编码模块411包括一卷积层和多个瓶颈层(1x1卷积-ReLU6-跨步为2,3x3逐通道卷积(Depthwise Convolution)),获得第一特征图集C1,再将第一特征图集C1经过第二编码单元412,如表1所示,第二编码单元包括卷积核大小为1x1,通道数为1280的第一卷积层,和第一平均池化层,卷积核为1x1,通道数为128的第二卷积层,第二平均池化层,第三卷积层,以及第三平均池化层。将第一特征图集C1输入卷积核大小为1x1,通道数为1280的卷积层获得特征图集C2。对特征图集C2做全局平均池化,得到特征值集S1。在另一条分支中,使第一特征图集C1通过卷积核为1x1,通道数为128的卷积层并经过全局平均池化,得到特征值集S2。在第三条分支中,将特征图集C2通过卷积核为1x1,通道数为128的卷积层并做全局平均池化得到特征值集S3。Please refer to Table 1, the
将各个特征值集(S1、S2和S3)输入到全连接单元413(也就是表1中的全连接单元),最终将S1,S2,S3连接并经过全连接层,得到136个值,该136个值对应68个人脸特征点的x,y坐标,从而得到最终预测的全脸特征点坐标,也就是全脸特征点集。Input each feature value set (S1, S2 and S3) into the fully connected unit 413 (that is, the fully connected unit in Table 1), and finally connect S1, S2, S3 and pass through the fully connected layer to obtain 136 values. The 136 values correspond to the x and y coordinates of the 68 face feature points, so as to obtain the final predicted full-face feature point coordinates, that is, the full-face feature point set.
基于前文论述的脸部特征点预测模型410,下面对该脸部特征点预测模型410的训练过程进行介绍,包括获取第一样本数据集部分、基于第一样本数据集训练脸部特征点预测模型410部分,下面对两个部分分别进行介绍。Based on the facial feature
获取第一样本数据集:Get the first sample dataset:
具体的,第一样本数据集包括样本待处理脸部图像集,与每个样本待处理脸部图像对应的真值样本全脸特征点集,每个样本待处理脸部图像均包括未显示区域,真值样本全脸特征点集是指该样本待处理脸部图像对应的完整脸部图像所对应的真实的全脸特征点的集。真值样本全脸特征点集可以是人工标注生成的,也可以是采用网络资源上的数据,也可以是采用其它网络模型进行标注生成的,例如可以采用FAN用于标注样本待处理脸部图像对应的完整脸部图像所对应的真值样本全脸特征点集。Specifically, the first sample data set includes a sample face image set to be processed, a true-valued sample full-face feature point set corresponding to each sample face image to be processed, and each sample face image to be processed includes not shown The full-face feature point set of the true value sample refers to the set of real full-face feature points corresponding to the complete face image corresponding to the face image to be processed in the sample. The full face feature point set of the true value sample can be generated by manual annotation, or it can be generated by using data on network resources, or it can be generated by using other network models for annotation. For example, FAN can be used to label the face image of the sample to be processed. The ground-truth sample full-face feature point set corresponding to the corresponding full-face image.
作为一种实施例,可以将样本全脸图像集输入FAN网络,获得每个样本全脸图像对应的真值样本全脸特征点集,再对样本全脸图像集中部分或全部图像添加遮挡,以获得更多数据集。As an example, the sample full-face image set can be input into the FAN network to obtain the ground-truth sample full-face feature point set corresponding to each sample full-face image, and then add occlusion to some or all of the images in the sample full-face image set to Get more datasets.
具体的,添加遮挡的方式有多种,例如添加随机位置但遮挡区域大小相同的遮挡,或者添加随机掩码的遮挡,随机掩码的遮挡是指遮挡区域的位置和大小均不固定。其中,添加的遮挡的颜色可以是任意,本申请不限制遮挡区域的具体颜色。但是在一次训练过程中,添加的遮挡的颜色都是相同的,例如可以选择白色。对于不同颜色的遮挡,可以分别进行模型训练。Specifically, there are various ways to add occlusion, such as adding a occlusion with a random position but the same size of the occlusion area, or adding an occlusion with a random mask. The occlusion of a random mask means that the position and size of the occlusion area are not fixed. The color of the added occlusion may be arbitrary, and the application does not limit the specific color of the occlusion area. But in a training process, the color of the added occlusion is the same, for example, white can be selected. For occlusions of different colors, model training can be performed separately.
例如,请参照5,图5中(a)表示一种添加随机位置但遮挡区域大小相同的遮挡之后的样本待处理脸部图像,图5中(b)表示一种添加随机掩码的遮挡之后的样本待处理脸部图像。For example, please refer to 5, in Fig. 5 (a) represents a sample face image to be processed after occlusion with random positions but the same occlusion area size is added, and (b) in Fig. 5 represents an occlusion with random masks added A sample face image to be processed.
进一步的,为了扩充数据集,还可以对添加遮挡后的图像进行翻转、模糊以及改变光度处理。光度处理例如可以是将图像的所有像素乘以预设因子,预设因子的范围例如为0.7-1.3。Further, in order to expand the dataset, the occluded images can also be flipped, blurred, and photometric changed. The photometric processing may be, for example, multiplying all pixels of the image by a predetermined factor, and the predetermined factor is in the range of 0.7-1.3, for example.
基于第一样本数据集训练脸部特征点预测模型410:The facial
脸部特征点预测模型410的预测损失可以表示如下:The prediction loss of the facial
其中,Lgt表示真值特征点坐标,‖·‖2表示L2范数。Among them, L gt represents the ground-truth feature point coordinates, and ‖·‖ 2 represents the L2 norm.
将样本待处理脸部图像输入脸部特征点预测模型,获得样本待处理脸部图像对应的预测样本全脸特征点集。Input the sample face image to be processed into the face feature point prediction model, and obtain the predicted sample full face feature point set corresponding to the sample face image to be processed.
基于预测样本全脸特征点集和真值样本全脸特征点集,确定脸部特征点预测模型410的损失,例如可以根据公式(3)确定损失。根据损失不断地更新参数,例如可以采用Adam优化器更新参数,其中Adam优化器中参数初始值可以设为:β1=0,β2=0.9。脸部特征点预测模型410的初始学习率设置为10-4。The loss of the facial feature
当脸部特征点预测模型410的损失满足第一预设条件时,获得已训练的脸部特征点预测模型410。第一预设条件,例如脸部特征点预测模型410的损失小于或等于某个阈值,或者脸部特征点预测模型410的学习率达到预设值。When the loss of the facial feature
在一种可能的实施例中,脸部特征点预测模型410可以获得物种的全脸特征点集,但是由于不同物种的脸部特征点分布可能有差异,因此可以采用不同物种所对应的样本数据集依次经过上述的训练过程,获得各个物种对应的参数。脸部图像处理设备100可以预先存储各种物种与其对应的参数。In a possible embodiment, the facial feature
下面对调整全脸特征点集部分320进行说明。The adjustment full-face feature point set
在一种可能的实施例中,脸部图像处理设备100可以通过脸部调整模型420,基于脸部特征调整信息,对全脸全脸特征点集中相应的特征点进行调整,获得调整后的全脸特征点集。In a possible embodiment, the facial
下面对脸部调整模型420进行示例说明。The
A1:A1:
当脸部特征调整信息为脸部表情目标图像,脸部调整模型420采用前文论述的脸部特征点预测模型410,通过该脸部特征点预测模型获得该脸部表情目标图像所对应的目标全脸特征点集,基于该目标全脸特征点集各个特征点之间的相对位置去调整之前待处理脸部图像的全脸特征点集中各个特征点的坐标位置,从而获得调整后的全脸特征点集。调整方式例如对待处理脸部图像的全脸特征点集中各个特征点的坐标位置进行调整。When the facial feature adjustment information is the facial expression target image, the
本申请实施例中调整的方式,不仅可以调整脸部图像的表情,还可以调整脸部图像的姿态以及轮廓等。The adjustment method in the embodiment of the present application can not only adjust the expression of the face image, but also adjust the posture and outline of the face image.
例如,请参照图6,图6中A表示脸部表情目标图像对应的全脸特征点集,图6中B表示待处理脸部图像的全脸特征点集,根据脸部表情目标图像对应的全脸特征点集(例如图6中的a1、b1和c1)对待处理脸部图像的全脸特征点集(a2、b2和c1)的坐标进行调整,从而获得图6中C所示的全脸特征点集,图C相对于图B不仅在表情上有所变化,在脸部轮廓以及姿态上也对应发生变化。For example, please refer to FIG. 6. In FIG. 6, A represents the full-face feature point set corresponding to the facial expression target image, and B in FIG. 6 represents the full-face feature point set of the facial image to be processed. The coordinates of the full-face feature point set (for example, a1, b1, and c1 in Fig. 6) of the face image to be processed (a2, b2, and c1) are adjusted to obtain the full-face feature point set (a2, b2, and c1) of the face image to be processed. The facial feature point set, compared to the graph B, not only the expression has changed, but also the facial contour and posture have also changed correspondingly.
当脸部调整模型420采用前文论述的脸部特征点预测模型410时,关于该脸部调整模型420的训练过程可以参照前文论述的脸部特征点预测模型410的训练过程,此处不再赘述。When the
A2:A2:
通过将表情分类标签,以及全脸特征点集输入脸部调整模型420,获得调整后的全脸特征点集。By inputting the expression classification label and the full-face feature point set into the
具体的,脸部调整模型420可以根据表情分类标签或脸部表情图像对全脸特征点集中的特征点进行坐标调整,从而获得调整后的全脸特征点集。下面对脸部调整模型420的结构进行示例说明。表情分类标签可以是采用独热编码等方式进行表示。Specifically, the
脸部调整模型420可以包括多个全连接层和多个激活层,全连接层和激活层的数量相同,且间隔分布。全连接层和激活层通过多层运算,以实现对全脸特征点集中的特征点的坐标进行迁移。The
具体的,脸部调整模型420包括依次连接的第一全连接层、第一激活层、第二全连接层、第二激活层、第三全连接层和第三激活层。Specifically, the
下面对A2中涉及的脸部调整模型420的训练方法进行说明。The training method of the
请参照图7,获得样本脸部表情图像集,每个样本脸部表情图像标注有该图像对应的表情分类标签,表情分类标签例如微笑、大笑、哭等。Referring to FIG. 7 , a sample facial expression image set is obtained, and each sample facial expression image is marked with an expression classification label corresponding to the image, such as smiling, laughing, crying, and the like.
构建脸部调整模型420的损失,具体示例如下:Construct the loss of
其中,Lgt用于表示样本脸部表情图像对应的真值特征点集,为脸部调整模型预测的表情分类标签所对应的全脸特征点集,‖·‖2表示L2范数。Among them, L gt is used to represent the ground-truth feature point set corresponding to the sample facial expression image, The full-face feature point set corresponding to the facial expression classification labels predicted by the face adjustment model, ‖ · ‖2 represents the L2 norm.
直到该脸部调整模型420的损失满足预设条件时,获得已训练的脸部调整模型420。Until the loss of the
本申请实施例中,脸部调整模型420预先学习到各种表情分类标签所对应的全脸特征点集,在使用该模型时,可以选择对应的表情分类表标签,脸部调整模型420就能基于该表情分类标签,对输入的全脸特征点集中特征点的坐标进行调整,从而获得已训练的脸部调整模型420。由于提前训练了各种表情分类标签所对应的全脸特征点集,这样可以相对提高脸部调整模型420对全脸特征点集进行调整过程中的准确性。In the embodiment of the present application, the
A3:A3:
脸部图像处理设备100可以提取脸部特征调整信息对应的脸部轮廓特征,根据该脸部轮廓特征,对全脸特征点集中对应特征点的坐标进行调整,获得调整后的全脸特征点集。The facial
具体的,脸部特征调整信息可以是用户手动画出的简笔画,或者可以是具有表情的人脸图像,无论是哪一种,脸部图像处理设备100均可以提取得到该脸部特征调整信息中的脸部轮廓特征,脸部图像处理设备100也可以通过预训练的轮廓提取模型等提取得到脸部轮廓特征。该脸部轮廓特征用于表示脸部部分或全部关键点构成的轮廓。Specifically, the facial feature adjustment information may be a stick figure drawn by the user's hand, or may be a face image with expressions, no matter which type it is, the facial
在获得脸部轮廓特征之后,可以基于该脸部轮廓,对全脸特征点集中对应特征点的坐标进行偏移,获得调整后的全脸特征点集。After the facial contour feature is obtained, the coordinates of the corresponding feature points in the full-face feature point set may be offset based on the facial contour to obtain an adjusted full-face feature point set.
本申请实施例中,可以不需预先训练对应的模型,相对可以减少脸部图像处理设备100处理量,且,可以处理简笔画等,提高用户处理图像的准确性。In the embodiment of the present application, it is not necessary to pre-train the corresponding model, which can relatively reduce the processing amount of the facial
下面对待处理脸部图像进行补全部分330进行介绍。The complementing
可以通过图像补全模型,基于调整后的全脸特征点集,以及待处理脸部图像对待处理脸部图像进行补全,获得待处理脸部图像中脸部未显示区域进行补全处理的全脸图像。The image completion model can be used to complete the to-be-processed face image based on the adjusted full-face feature point set and the to-be-processed face image to obtain a complete image of the undisplayed face in the to-be-processed face image for completion processing. face image.
请继续参照图4,图像补全模型包括生成子模型430,生成子模型430包括第三编码模块431,空洞卷积模块432和解码模块433,将调整后的全脸特征点集以及待处理脸部图像输入至生成子模型430中。Please continue to refer to FIG. 4 , the image completion model includes a generating
具体的,先将调整后的全脸特征点集转换为脸部特征点图,该转换过程可以理解为将各个特征点以特征图形式进行表示,例如可以是将待处理脸部图像中所对应调整后的全脸特征点集对应的位置设置为1,其余设置为0,从而获得脸部特征点图。Specifically, the adjusted full-face feature point set is first converted into a facial feature point map. The conversion process can be understood as representing each feature point in the form of a feature map. The corresponding position of the adjusted full-face feature point set is set to 1, and the rest are set to 0, so as to obtain the facial feature point map.
第三编码模块431中可以包括依次连接的多个卷积层,多个卷积层分别对待处理脸部图像以及脸部特征点图进行不同尺度下卷积处理,获得各个卷积层输出的特征图,从而获得第三特征图集。第三特征图集包括第一中间特征图集、第二中间特征图集以及卷积处理后特征图集。第一中间特征图集是第三编码模块431的前部分卷积层处理得到的特征图,第二中间特征图集是第三编码模块431的中间部分卷积层处理得到的特征图,卷积处理后特征图是第三编码模块431的最后卷积层输出的特征图。The
通过空洞卷积模块432中的残差单元对卷积处理后特征图进行空洞卷积,获得第四特征图集,通过空洞卷积模块432中的注意力单元提取第四特征图集,以及卷积处理后特征图的局部特征,获得第五特征图集。The feature map after convolution processing is subjected to hole convolution by the residual unit in the
下面对注意力单元的处理机制进行介绍。The processing mechanism of the attention unit is introduced below.
具体的,注意力单元用于捕获长距离的空间上下文特征间的关联,其具体计算过程为:Specifically, the attention unit is used to capture the association between long-distance spatial context features, and its specific calculation process is as follows:
对于第四特征图集的特征fd,首先通过卷积核大小为1x1的卷积层获得Q(fd)。再计算fdi分量对j分量的内积sij,sij=[Q(fd)T]iQ(fd)j,再通过softmax函数进行归一化,获得fdi对fdj的注意力值之后获得fd其他分量对fdj的经过注意力加权后的特征和cdj,其计算方法为最终获得第四特征图集的特征部分结果为yd=γdcd+fd。其中γd为可训练的参数。For the feature f d of the fourth feature atlas, Q(f d ) is first obtained through a convolutional layer with a kernel size of 1x1. Then calculate the inner product s ij of the f d i component to the j component, s ij =[Q(f d ) T ] i Q(f d ) j , and then normalize it by the softmax function to obtain the f di to f dj attention value Then, the attention-weighted feature sum c dj of other components of f d on f dj is obtained, and the calculation method is as follows: Finally, the result of the feature part of the fourth feature atlas is obtained as y d =γ d c d +f d . where γd is a trainable parameter.
对于卷积处理后特征图的特征fe,其使用fd得出的注意力值对特征进行加权求和获得cej,cej=∑iβj,ifei。最终输出的卷积处理后特征图集的特征结果为ye=γe(1-M)ce+Mfe。其中γe为可训练的参数。For the feature f e of the feature map after convolution processing, it uses the attention value derived from f d to perform a weighted summation of the features to obtain c ej , c ej =∑ i β j,i f ei . The feature result of the final output feature map set after convolution processing is y e =γ e (1-M)c e + Mfe . where γ e is a trainable parameter.
将第五特征图集的特征结果和卷积处理后特征图集的特征结果进行连接操作即为第五特征图集。Connecting the feature results of the fifth feature atlas and the feature results of the feature atlas after convolution processing is the fifth feature atlas.
通过解码模块433对第五特征图集,以及第三特征图集进行上采样处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The
具体的,解码模块433可以对第五特征图集,以及第三特征图集中的所有特征图一起进行上采样,获得最后的全脸图像。Specifically, the
解码模块433也可以对第五特征图集进行上采样处理,获得第六特征图集进行上采样处理,获得第六特征图集。再对第二中间特征图集以及第六特征图集进行加权和上采样处理,获得第七特征图集。再对第七特征图以及第一特征图集进行加权,获得第八特征图集。再通过解码模块对第八特征图集合进行卷积处理,获得补全后的全脸图像。The
例如,一种生成子模型430具体如下表所示:For example, a
表2Table 2
其中,k、c、s和p分别表示卷积层或解卷积层的卷积核大小、输出通道数、跨步、填充(padding)。除表1中第一行中卷积层使用的是反射填充(Reflection Padding)外,其余使用的是零填充(Zero Padding)。其中IN表示实例归一化(Instance Normalization)。Among them, k, c, s, and p represent the convolution kernel size, the number of output channels, stride, and padding of the convolutional or deconvolutional layers, respectively. Except for the convolutional layer in the first row in Table 1, which uses Reflection Padding, the rest use Zero Padding. Where IN represents instance normalization (Instance Normalization).
下面对表1所示的生成子模型430的具体处理过程进行说明。The specific process of generating the sub-model 430 shown in Table 1 will be described below.
具体的,先将脸部特征点图和待处理脸部图像经过卷积核大小为7×7,通道数为3,填充为3的卷积层,获得第一中间特征图集E1。再将第一中间特征图集E1输入卷积核大小为4×4,通道数为128,跨步为2,填充为1的卷积层,获得第二中间特征图集E2。之后将E2通过卷积核大小为4x4,通道数为256,跨步为2,填充为1的卷积层获得卷积处理后特征图集E3。Specifically, the facial feature point map and the face image to be processed are first passed through a convolutional layer with a convolution kernel size of 7×7, a channel number of 3, and a filling of 3 to obtain a first intermediate feature map set E1. Then, input the first intermediate feature atlas E1 into a convolutional layer with a kernel size of 4 × 4, a number of channels of 128, a stride of 2, and a padding of 1 to obtain the second intermediate feature atlas E2. After that, E2 is passed through the convolutional layer with the convolution kernel size of 4x4, the number of channels is 256, the stride is 2, and the padding is 1 to obtain the feature atlas E3 after convolution processing.
将E3经过7个第一次卷积操作为空洞卷积的的残差块后得到第四特征图集合R7。将R7和E3共同输入到长短期注意力模块中得到第五特征图集合,并使第五特征图集合通过卷积核大小为4x4,通道数为128,跨步为2,填充为1的转置卷积层做上采样,得到第六特征图集D1。将E2和D1共同输入到通道数为256的1x1卷积层,获得经过加权后的特征图集。之后加权后的特征图集输入到卷积核大小为4x4,通道数为256,跨步为2,填充为1的转置卷积层做上采样得到第七特征图集合D2。将D2和E1共同输入128通道的1x1卷积层中进行得到加权的第八特征图集合。将该第八特征图集合输入卷积核大小为7,通道数为3,填充为3的卷积,最终经过tanh层获得输出的全脸图像。The fourth feature map set R7 is obtained after E3 undergoes seven first convolution operations as residual blocks of hole convolution. Input R7 and E3 together into the long-term and short-term attention module to obtain the fifth feature map set, and make the fifth feature map set pass through the convolution kernel size of 4x4, the number of channels is 128, the stride is 2, and the padding is 1. Set the convolutional layer for upsampling to obtain the sixth feature atlas D1. E2 and D1 are jointly input to a 1x1 convolutional layer with 256 channels to obtain a weighted feature atlas. After that, the weighted feature map set is input to the convolution kernel with a size of 4x4, the number of channels is 256, the stride is 2, and the transposed convolution layer filled with 1 is up-sampled to obtain the seventh feature map set D2. D2 and E1 are jointly input into a 128-channel 1x1 convolutional layer to obtain a weighted eighth feature map set. The eighth feature map set is input into a convolution kernel with a size of 7, a channel number of 3, and a convolution of 3 padding, and finally the output full-face image is obtained through the tanh layer.
本申请实施例中图像补全模型还包括判别子模型440,用于确定生成子模块430的生成结果是来源于真实来源还是生成子模型420,以及用于确定生成结果与调整后的真值全脸特征点集是否匹配。In this embodiment of the present application, the image completion model further includes a
判别子模型440可以采用简单的二分类模型,也可以采用Patch-GAN的鉴别器结构,例如70×70Patch-GAN,下面对判别子模型440的结构进行示例说明。The
表3table 3
其中,每行代表由列出的层组成的序列。K、c、s和p分别表示卷积层或解卷积层的卷积核大小、输出通道数、跨步、填充。SN代表谱归一化(Spectral Normalization),LReLU代表泄露修正线性单元(Leaky ReLU),斜率(slope)=0.2,relu表示x大于等于0输出x,小于等于0则输出slope乘以x。表1中的判别子模型440包括注意力层,用于自适应地处理相应的特征。where each row represents a sequence consisting of the listed layers. K, c, s, and p denote the convolution kernel size, number of output channels, stride, and padding of the convolutional or deconvolutional layers, respectively. SN stands for Spectral Normalization, LReLU stands for Leaky ReLU, slope=0.2, relu means that x is greater than or equal to 0 and output x, and less than or equal to 0, the output slope is multiplied by x. The
下面对图像补全模型的训练过程进行示例说明:The following is an example of the training process of the image completion model:
获得第二样本数据集,第二样本数据集包括样本待处理脸部图像集,每个样本待处理脸部图像对应的真值样本全脸特征点集,以及样本待处理脸部图所对应的样本全脸图像。真值样本全脸特征点集的理解可以参照前文论述的内容,此处不再赘述。Obtain a second sample data set, the second sample data set includes the sample face image set to be processed, the true value sample full face feature point set corresponding to each sample face image to be processed, and the sample face image corresponding to the processing. Sample full face image. For the understanding of the full-face feature point set of the true value sample, refer to the content discussed above, which will not be repeated here.
作为一种实施例,先获得大量的样本全脸图像,将样本全脸图像集中部分或全部样本全脸图像进行遮挡。遮挡方式可以参照前文论述的内容,此处不再赘述。As an embodiment, a large number of sample full-face images are obtained first, and part or all of the sample full-face images in the sample full-face image set are occluded. For the occlusion method, reference may be made to the content discussed above, which will not be repeated here.
根据第二样本数据集,训练图像补全模型,直到图像补全模型的损失满足第二预设条件,获得已训练的图像补全模型。According to the second sample data set, the image completion model is trained until the loss of the image completion model satisfies the second preset condition, and the trained image completion model is obtained.
图像补全模型的损失可以有多种表示方式,本申请实施例中图像补全模型的损失根据逐像素损失、感知损失、风格损失、全微分损失以及生成损失加权得到的。The loss of the image completion model can be represented in various manners. In this embodiment of the present application, the loss of the image completion model is weighted according to pixel-by-pixel loss, perceptual loss, style loss, full differential loss, and generative loss.
具体的,逐像素损失用于表示补全后的样本全脸图像和样本待处理脸部图像的像素值误差;感知损失用于表示补全后的样本全脸图像的特征图和样本待处理脸部图像的特征图之间的误差;风格损失用于表示补全后的样本全脸图像加遮挡区域后的图像,和样本待处理脸部图像加遮挡区域后的图像的特征图的各通道信息向量化后通道间的格雷姆矩阵差值之和;全微分损失用于表示补全后的样本全脸图像横向、纵向导数之和与样本待处理脸部图像包括的像素点的总数之间的比值;生成损失用于表示判别子模型对生成子模型的生成结果来源的判别结果与生成结果的真实来源的损失。Specifically, the pixel-by-pixel loss is used to represent the pixel value error of the sample full face image after completion and the sample face image to be processed; the perceptual loss is used to represent the feature map of the sample full face image after completion and the sample face to be processed. The error between the feature maps of the partial images; the style loss is used to represent each channel information of the feature map of the sample full face image after completion plus the occlusion area and the sample face image to be processed plus the occlusion area. The sum of the Gramm matrix differences between the vectorized channels; the total differential loss is used to represent the difference between the sum of the horizontal and vertical derivatives of the completed sample full face image and the total number of pixels included in the sample face image to be processed. Ratio; generation loss is used to represent the loss of the discriminative sub-model for the source of the generated results of the generated sub-model and the true source of the generated results.
下面对各个损失的具体公式进行示例说明。The specific formulas of each loss are illustrated below.
一种逐像素损失的计算公式如下:A formula for calculating pixel-wise loss is as follows:
其中,‖·‖1表示L1范数,Nm表示被遮挡的像素个数。Among them, ‖· ‖1 represents the L1 norm, and N m represents the number of occluded pixels.
一种感知损失的计算公式如下:A formula for calculating the perceptual loss is as follows:
其中,φp(·)表示从预训练的网络模型(例如VGG19)中提取的第p层的Np个尺寸为Hp×Wp的特征图,用于表示补全后的样本全脸图像的特征图,φp(I)用于表示样本待处理脸部图像的特征图。where φ p ( ) represents N p feature maps of size H p × W p of the p-th layer extracted from a pre-trained network model (such as VGG19), It is used to represent the feature map of the sample full face image after completion, and φ p (I) is used to represent the feature map of the sample face image to be processed.
一种风格损失的计算公式如下:A formula for calculating style loss is as follows:
其中,Gp(x)=φp(x)Tφp(x)表示关于φp(x)的格雷姆矩阵。表示补全后的样本全脸图像加遮挡区域后的图像,表示样本待处理脸部图像加遮挡区域后的图像。where G p (x)=φ p (x) T φ p (x) represents the Gramm matrix with respect to φ p (x). Represents the image after the completed sample full face image plus the occlusion area, Represents the image of the sample face image to be processed plus the occlusion area.
一种全微分损失的计算公式如下:A formula for calculating the total differential loss is as follows:
其中,其中NI表示I的像素总数,表示求一阶导,包括(水平方向)和(竖直方向)。where NI represents the total number of pixels of I , Represents the first derivative, including (horizontal direction) and (Vertically).
一种生成损失的计算公式如下:A formula for calculating the generation loss is as follows:
其中,G表示生成子模型430,D表示判别子模型440,生成损失Ladv为公式(9)和公式(10)之和。Among them, G represents the
图像补全模型的损失的计算公式表示如下:The calculation formula of the loss of the image completion model is expressed as follows:
Linp=Lpixel+λpercLperc+λstyleLstyle+λtvLtv+λadvLadv (11)L inp =L pixel +λ perc L perc +λ style L style +λ tv L tv +λ adv L adv (11)
采用第二样本数据集,基于每次训练结果调整参数,直到图像补全模型的损失满足第二预设条件,从而获得图像补全模型的参数。Using the second sample data set, the parameters are adjusted based on each training result until the loss of the image completion model satisfies the second preset condition, so as to obtain the parameters of the image completion model.
作为一种实施例,λperc=0.1,λstyle=250,λtv=0.1,λadv=0.01的超参数设置。As an example, hyperparameter settings of λ perc =0.1, λ style =250, λ tv =0.1, λ adv =0.01.
作为一种实施例,整个训练过程交替使用Linp优化生成器,使用优化判别子模型440直到模型收敛。As an example, the entire training process alternately uses Linp to optimize the generator, using The
作为一种实施例,可以使用Adam优化器调整参数,其中Adam优化器的参数值设置:β1=0,β2=0.9,生成子模型430的初始学习率为10-4,判别子模型440的初始学习率为10-5,批处理大小(batch size)设为4,批处理大小可以理解为训练一次所使用的样本数量。As an embodiment, the parameters can be adjusted using the Adam optimizer, wherein the parameter values of the Adam optimizer are set: β 1 =0, β 2 =0.9, the initial learning rate of the
示例过程Example process
基于图2论述的应用场景,下面对脸部图像处理方法进行介绍,请参照图8,该脸部图像处理方法包括:Based on the application scenario discussed in FIG. 2 , the following describes the facial image processing method, please refer to FIG. 8 , the facial image processing method includes:
S810,客户端211响应在脸部图像补全界面上的脸部图像补全输入操作,生成补全请求。S810, the
具体的,如前文论述的内容,客户端211支持脸部图像处理,用户在需要进行脸部图像进行补全的时候,可以打开客户端211,在脸部图像补全界面上进行输入操作,客户端211响应于该输入操作,生成补全请求。用户可以是自定义输入待处理脸部图像以及脸部特征调整信息,或者选择客户端211推荐的待处理脸部图像和脸部特征调整信息,例如客户端211从用户之前相册中确定出显示不完整的图像,以推荐给用户进行补全操作,用户在输入或者选择待处理脸部图像之后,客户端211相当于接收到用户进行的补全指令,从而生成补全请求。该补全请求中携带有待处理脸部图像和脸部特征调整信息,或者是待处理脸部图像对应的索引以及脸部特征调整信息的索引。Specifically, as discussed above, the
作为一种实施例,客户端211可以接收用户自定义的脸部特征调整信息,例如用户自定义的简笔画等。As an embodiment, the
例如,请参照图9,表示一种脸部图像补全界面的示意图,用户在选择待处理图像之后,客户端211可以推荐脸部特征调整信息,例如图9中的“笑”、“平常”和“不满”等,用户可以选择客户端211推荐的脸部特征调整信息。当用户选择点击操作控件930之后,相当于用户进行了输入操作。或者用户可以点击图9中所示的自定义操作控件910,自定义选择对应的脸部特征调整信息。当用户点击确定控件920之后,相当于确定输入脸部特征调整信息。For example, please refer to FIG. 9 , which shows a schematic diagram of a facial image completion interface. After the user selects an image to be processed, the
或者例如,请参照图10,表示一种用户添加遮挡的示意图,用户在选择待处理图像之后,客户端211显示图10中A所示的界面,用户也可以点击图10中的添加遮挡控件1001,输入自己定义的脸部特征调整信息,例如添加图10中B所示的涂鸦,用户点击该操作控件之后,相当于用户进行了输入操作。Or, for example, please refer to FIG. 10 , which shows a schematic diagram of a user adding occlusion. After the user selects an image to be processed, the
S820,客户端211向服务器220发送补全请求。S820, the
具体的,客户端211在生成补全请求之后,将补全请求发送给服务器220。Specifically, after generating the completion request, the
S830,服务器220获得待处理脸部图像。S830, the
具体的,服务器220在接收补全请求之后,通过补全请求中携带的信息,解析获得待处理脸部图像。同时,服务器220还可以获得脸部特征调整信息。Specifically, after receiving the completion request, the
S840,服务器220将待处理脸部图像输入到已训练的脸部特征点预测模型410,获得待处理脸部图像的全脸特征点集。S840, the
在一种可能的实施例中,脸部特征点预测模型410包括第一编码模块411、多个第二编码模块412和全连接模块413,具体获得全脸特征点集的具体过程示例如下:In a possible embodiment, the facial feature
通过第一编码模块411,对待处理脸部图像进行多种尺度下的特征提取,获得第一特征图集合;Through the
分别通过多个第二编码模块412中各个编码模块,对第一特征图集进行卷积池化处理,获得第二特征值集合;Perform convolution pooling processing on the first feature map set through each coding module in the plurality of
通过全连接模块413,对多个第二特征值集合进行拼接,获得全脸特征点集合。Through the
脸部特征点预测模型410、第一编码模块411、多个第二编码模块412和全连接模块413可以参照前文论述的内容,此处不再赘述。The facial feature
S850,根据脸部特征调整信息,对全脸特征点集中相应的特征点进行调整,获得调整后的全脸特征点集。S850: Adjust corresponding feature points in the full-face feature point set according to the face feature adjustment information, to obtain an adjusted full-face feature point set.
具体调整方式示例如下:Examples of specific adjustment methods are as follows:
方式一:method one:
将脸部特征调整信息输入脸部特征点预测模型410,获得与该脸部特征调整信息对应的全脸特征点集,再根据该脸部特征调整信息对应的全脸特征点集对待处理脸部图像的全脸特征点集进行调整,从而获得调整后的全脸特征点集。Input the facial feature adjustment information into the facial feature
该方式的处理原理可以参照前文论述的内容,此处不再赘述。该方式适用于脸部特征调整信息为图像的情况。For the processing principle of this manner, reference may be made to the content discussed above, which will not be repeated here. This method is suitable for the case where the facial feature adjustment information is an image.
方式二:Method two:
将脸部特征调整信息,以及全脸特征点集合输入脸部调整模型420,获得调整后的全脸特征点集合。The facial feature adjustment information and the full-face feature point set are input into the
具体的,脸部调整模型420可以参照前文论述的内容,此处不再赘述。该方式适用于脸部特征调整信息为表情分类标签的情况。Specifically, for the
方式三:Method three:
提取脸部特征调整信息对应的脸部轮廓特征;其中,脸部轮廓特征用于表示脸部关键点构成的轮廓;Extracting the facial contour feature corresponding to the facial feature adjustment information; wherein, the facial contour feature is used to represent the contour formed by the facial key points;
根据脸部轮廓特征,对全脸特征点集合中对应特征点的坐标进行调整,获得调整后的全脸特征点集合。According to the facial contour feature, the coordinates of the corresponding feature points in the full-face feature point set are adjusted to obtain the adjusted full-face feature point set.
S860,服务器220将调整后的全脸特征点集合集,以及待处理脸部图像输入图像补全模型,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。S860, the
具体的,图像补全模型可以参照前文论述的内容,此处不再赘述。图像补全模型包括生成子模型430,生成子模型430包括第三编码模块431,空洞卷积模块432和解码模块433,下面对通过生成子模型430获得全脸图像的方式进行说明。Specifically, for the image completion model, reference may be made to the content discussed above, which will not be repeated here. The image completion model includes a
将所述调整后的全脸特征点集合转换为脸部特征点图;Converting the adjusted full-face feature point set into a facial feature point map;
通过第三编码模块431,对脸部特征点图,以及待处理脸部图像进行不同尺度下的卷积处理,获得第三特征图集合;其中,第三特征图集包括卷积处理后特征图,卷积处理后特征图第三编码模块是对脸部特征点图,以及待处理脸部图像进行不同尺度下的卷积处理过程中,输出的最后卷积特征图;Through the
通过空洞卷积模块432中的残差单元,对卷积处理后特征图进行空洞卷积,获得第四特征图集合;Through the residual unit in the
通过空洞卷积模块432中的注意力单元,提取第四特征图集合,以及卷积处理后特征图的局部特征,获得第五特征图集合;Through the attention unit in the
通过解码模块433对第五特征图集合,以及第三特征图集合进行上采样处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The
在一种可能的实施例中,第三特征图集合还包括第一中间特征图和第二中间特征图,第一中间特征图是对脸部特征点图,以及待处理脸部图像依次进行预设次卷积处理获得的中间卷积结果,第二中间特征图是对第一中间特征图进行预设次卷积处理获得的中间卷积结果。In a possible embodiment, the third feature map set further includes a first intermediate feature map and a second intermediate feature map, and the first intermediate feature map is a sequence of pre-processing the facial feature point map and the facial image to be processed. It is assumed that the intermediate convolution result obtained by the sub-convolution process, and the second intermediate feature map is an intermediate convolution result obtained by performing a preset sub-convolution process on the first intermediate feature map.
下面对通过解码模块433对第五特征图集,以及第三特征图集进行上采样处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像进行示例说明。The following is an example description of performing up-sampling processing on the fifth feature atlas and the third feature atlas by the
通过解码模块433对第五特征图集进行上采样处理,获得第六特征图集;Perform upsampling processing on the fifth feature atlas by the
通过解码模块433对第二中间特征图,以及第六特征图集合进行加权上采样处理,获得第七特征图集;Perform weighted upsampling processing on the second intermediate feature map and the sixth feature map set by the
通过解码模块433对第七特征图集合,以及第一中间特征图进行加权,获得第八特征图集合;The seventh feature map set and the first intermediate feature map are weighted by the
通过解码模块433对第八特征图集合进行卷积处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The
生成子模型430,生成子模型430包括第三编码模块431,空洞卷积模块432和解码模块433的内容可以参照前文论述的内容,此处不再赘述。The
服务器220对待处理脸部图像进行处理之后,就可以获得全脸图像。After the
在一种可能的实施例中,服务器220存储有不同物种与不同模型(包括前文论述的脸部特征点预测模型、图像补全模型以及脸部调整模型)的参数之间的对应关系,服务器220在获得待处理脸部图像之后,先判断该待处理脸部图像的物种分类,再选取与该物种对应的参数,以提高脸部图像处理的准确性。In a possible embodiment, the
例如,请参照图11,图11中的A、B、C、D、E分别表示为真值全脸图像,待处理脸部图像、预测的人脸特征点集所对应的图像(图11中C中包括各个特征点)、生成子模型430直接根据全脸特征点集补全的人脸图像、根据全脸特征点集补全的人脸图像、待处理脸部图像拼接之后的全脸图像。For example, please refer to FIG. 11 , A, B, C, D, and E in FIG. 11 are respectively the true-valued full-face image, the face image to be processed, and the image corresponding to the predicted face feature point set (in FIG. 11 ). C includes each feature point), the
例如,请参照图12,图12中的A、B、C、D、E分别表示真值全脸图像、被遮挡的人脸、预测的人脸特征点集所对应的图像(图13中C中包括各个特征点)、生成子模型430直接根据全脸特征点集补全的人脸图像、根据全脸特征点集补全的人脸图像和待处理脸部图像拼接之后的全脸图像。For example, please refer to FIG. 12 , A, B, C, D, and E in FIG. 12 respectively represent the ground-truth full-face image, the occluded face, and the image corresponding to the predicted face feature point set (C in FIG. 13 ) (including each feature point), the sub-model 430 generates a face image that is directly completed according to the full-face feature point set, a face image that is completed according to the full-face feature point set, and a full-face image after splicing the face image to be processed.
例如,请参照图13,图13中的A、B、C、D分别表示遮挡的人脸图片,基于A和表情分类标签(平常)补全后的全脸图像、基于A和表情分类标签(不满)补全后的全脸图像、基于A和表情分类标签(笑)补全后的全脸图像。For example, please refer to FIG. 13 , A, B, C, and D in FIG. 13 respectively represent the occluded face pictures, the full-face image after completion based on A and the expression classification label (usually), based on A and the expression classification label ( Full-face image after completion of dissatisfaction), and full-face image after completion based on A and expression classification labels (laughs).
例如,请参照图14,图14中的A、B、C、D分别表示遮挡的人脸图片,基于A和表情分类标签(笑)补全后的全脸图像、基于A和表情分类标签(平常)补全后的全脸图像、基于A和表情分类标签(不满)补全后的全脸图像。For example, please refer to FIG. 14 , A, B, C, and D in FIG. 14 represent the occluded face pictures, respectively, based on the full-face image completed by A and the expression classification label (laugh), based on A and the expression classification label ( Normal) full-face image after completion, and full-face image after completion based on A and expression classification label (dissatisfaction).
例如,请参照图15,图15中的A、B、C、D、E分别表示真值原脸部图、用户手动添加的遮挡后的脸部图像,预测的人脸特征点集所对应的图像、根据全脸特征点集补全的人脸图像和待处理脸部图像拼接之后的全脸图像。For example, please refer to Fig. 15, A, B, C, D, and E in Fig. 15 respectively represent the original face image of the true value, the face image after occlusion added manually by the user, and the predicted facial feature point set corresponding to The image, the face image completed according to the full-face feature point set, and the full-face image after splicing the face image to be processed.
例如,请参照图16,图16中的A、B、C、D、E分别表示真值原脸部图、用户手动添加的遮挡后的脸部图像,预测的人脸特征点集所对应的图像、根据全脸特征点集补全的人脸图像和待处理脸部图像拼接之后的全脸图像。For example, please refer to FIG. 16 , A, B, C, D, and E in FIG. 16 respectively represent the original face image of the true value, the face image after occlusion added manually by the user, and the predicted facial feature point set corresponding to The image, the face image completed according to the full-face feature point set, and the full-face image after splicing the face image to be processed.
S870,服务器220将全脸图像发送给客户端211。S870 , the
S880,客户端211获取并显示全脸图像。S880, the
具体的,客户端211显示全脸图像,以供用户查看。客户端211还可以保存待处理脸部图像,用户可以点击取消补全,客户端211显示待处理脸部图像。在获得全脸图像之后,用户还可以重新添加遮挡,继续进行补全等操作。Specifically, the
例如,以用户选择图9中所示的待处理脸部图像,以及选择“笑”为例,服务器220根据图9所示的待处理脸部图像以及“笑”,获得如图17所示的全脸图像。For example, taking the user selecting the face image to be processed shown in FIG. 9 and selecting “smile” as an example, the
例如,以用户选择图10中所示的原脸部图像,并对该原脸部图像调整遮挡,以及选择“笑”为例,服务器220根据图10所示的待处理脸部图像以及“笑”,获得如图18所示的全脸图像。For example, taking the user selecting the original face image shown in ” to obtain a full-face image as shown in Figure 18.
在一种可能的实施例中,服务器220中的各个模型是其它设备训练得到的,服务器220直接将训练好的各个模型进行使用,以实现图8中的脸部图像处理方法。In a possible embodiment, each model in the
应当说明的是,图8中是以图像处理设备100为服务器220为例进行说明,实际上图像处理设备100可能有很多种,具体可以参照前文论述的内容,也就是说,任何一种图像处理设备100均可以实现图8中论述的内容。It should be noted that the
基于同一发明构思,本申请实施例提供一种图像处理装置,请参照图19,该图像处理装置1900相当于设置在前文论述的图像处理设备100中,包括收发模块1901和处理模块1902,其中:Based on the same inventive concept, an embodiment of the present application provides an image processing apparatus. Please refer to FIG. 19. The
在一种可能的实施例中,脸部特征点预测模型包括第一编码模块、多个第二编码模块和全连接模块,处理模块1902具体用于:In a possible embodiment, the facial feature point prediction model includes a first encoding module, a plurality of second encoding modules and a fully connected module, and the
通过第一编码模块,对待处理脸部图像进行多种尺度下的特征提取,获得第一特征图集;Through the first encoding module, the facial image to be processed is subjected to feature extraction under various scales to obtain a first feature atlas;
分别通过多个第二编码模块中各个编码模块,对第一特征图集进行卷积池化处理,获得第二特征值集;Perform convolution pooling processing on the first feature atlas through each encoding module in the plurality of second encoding modules to obtain a second feature value set;
通过全连接模块,对多个第二特征值集进行拼接,获得全脸特征点集。Through the full connection module, multiple second feature value sets are spliced to obtain a full face feature point set.
在一种可能的实施例中,脸部特征调整信息为表情分类标签,处理模块1902具体用于:In a possible embodiment, the facial feature adjustment information is an expression classification label, and the
将表情分类标签,以及全脸特征点集输入脸部调整模型,获得调整后的全脸特征点集;Input the expression classification label and the full-face feature point set into the face adjustment model to obtain the adjusted full-face feature point set;
其中,脸部调整模型是根据样本脸部表情图像集,样本脸部表情图像集中每个样本脸部表情图像标注对应的表情分类标签。The face adjustment model is based on a sample facial expression image set, and each sample facial expression image in the sample facial expression image set is marked with a corresponding expression classification label.
在一种可能的实施例中,处理模块1902具体用于:In a possible embodiment, the
提取脸部特征调整信息对应的脸部轮廓特征;其中,脸部轮廓特征用于表示脸部关键点构成的轮廓;Extracting the facial contour feature corresponding to the facial feature adjustment information; wherein, the facial contour feature is used to represent the contour formed by the facial key points;
根据脸部轮廓特征,对全脸特征点集中对应特征点的坐标进行调整,获得调整后的全脸特征点集。According to the facial contour features, the coordinates of the corresponding feature points in the full-face feature point set are adjusted to obtain the adjusted full-face feature point set.
在一种可能的实施例中,图像补全模型包括第三编码模块,空洞卷积模块和解码模块,处理模块1902具体用于:In a possible embodiment, the image completion model includes a third encoding module, a hole convolution module and a decoding module, and the
将调整后的全脸特征点集转换为脸部特征点图;Convert the adjusted full-face feature point set into a face feature point map;
通过第三编码模块,对脸部特征点图,以及待处理脸部图像进行不同尺度下的卷积处理,获得第三特征图集;其中,第三特征图集包括卷积处理后特征图集,卷积处理后特征图集第三编码模块是对脸部特征点图,以及待处理脸部图像进行不同尺度下的卷积处理过程中,输出的最后卷积特征图;Through the third encoding module, the facial feature point map and the face image to be processed are subjected to convolution processing at different scales to obtain a third feature atlas; wherein, the third feature atlas includes the feature atlas after convolution processing. , the third encoding module of the feature map set after convolution processing is the final convolution feature map output during the process of convolution processing at different scales on the facial feature point map and the face image to be processed;
通过空洞卷积模块中的残差单元,对卷积处理后特征图集进行空洞卷积,获得第四特征图集;Through the residual unit in the hole convolution module, the hole convolution is performed on the feature atlas after the convolution processing, and the fourth feature atlas is obtained;
通过空洞卷积模块中的注意力单元,提取第四特征图集,以及卷积处理后特征图集的局部特征,获得第五特征图集;Through the attention unit in the atrous convolution module, the fourth feature atlas is extracted, and the local features of the feature atlas after convolution processing are used to obtain the fifth feature atlas;
通过解码模块对第五特征图集,以及第三特征图集进行上采样处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。The decoding module performs up-sampling processing on the fifth feature atlas and the third feature atlas, so as to obtain a full-face image obtained by performing complement processing on the undisplayed area of the face in the face image to be processed.
在一种可能的实施例中,第三特征图集还包括第一中间特征图集和第二中间特征图集,第一中间特征图集是对脸部特征点图,以及待处理脸部图像依次进行预设次卷积处理获得的中间卷积结果,第二中间特征图集是对第一中间特征图集进行预设次卷积处理获得的中间卷积结果,处理模块1902具体用于:In a possible embodiment, the third feature atlas further includes a first intermediate feature atlas and a second intermediate feature atlas, and the first intermediate feature atlas is a facial feature point map and a face image to be processed The intermediate convolution results obtained by performing the preset sub-convolution processing in sequence, the second intermediate feature atlas is the intermediate convolution results obtained by performing the preset sub-convolution processing on the first intermediate feature atlas, and the
通过解码模块对第五特征图集进行上采样处理,获得第六特征图集;Perform upsampling processing on the fifth feature atlas by the decoding module to obtain the sixth feature atlas;
通过解码模块对第二中间特征图集,以及第六特征图集进行加权处理,获得第七特征图集;Perform weighting processing on the second intermediate feature atlas and the sixth feature atlas by the decoding module to obtain the seventh feature atlas;
通过解码模块对第七特征图集,以及第一中间特征图集进行加权和上采样处理,获得第八特征图集;Perform weighting and upsampling processing on the seventh feature atlas and the first intermediate feature atlas by the decoding module to obtain the eighth feature atlas;
通过解码模块对第八特征图集进行卷积处理,获得将待处理脸部图像中的脸部未显示区域进行补全处理的全脸图像。Convolution processing is performed on the eighth feature atlas by the decoding module to obtain a full-face image obtained by performing complement processing on the undisplayed area of the face in the face image to be processed.
在一种可能的实施例中,脸部特征点预测模型是通过如下步骤训练得到的:In a possible embodiment, the facial feature point prediction model is trained through the following steps:
获取第一样本数据集;其中,第一样本数据集中包括样本待处理脸部图像集,与每个样本待处理脸部图像对应的真值样本全脸特征点集;Acquiring a first sample data set; wherein, the first sample data set includes a sample face image set to be processed, and a true-value sample full-face feature point set corresponding to each sample face image to be processed;
基于第一样本数据集,训练脸部特征点预测模型;Based on the first sample data set, train a facial feature point prediction model;
直到脸部特征点预测模型的预测损失满足第一预设条件,获得已训练的脸部特征点预测模型;其中,预测损失用于表示预测样本全脸特征点集和真值样本全脸特征点集之间的损失。Until the prediction loss of the facial feature point prediction model satisfies the first preset condition, the trained facial feature point prediction model is obtained; wherein, the prediction loss is used to represent the full face feature point set of the predicted sample and the full face feature point of the true value sample loss between sets.
在一种可能的实施例中,图像补全模型包括生成子模型和判别子模型,图像补全模型的损失根据逐像素损失、感知损失、风格损失、全微分损失以及对抗损失加权得到的;In a possible embodiment, the image completion model includes a generation sub-model and a discriminant sub-model, and the loss of the image completion model is weighted according to pixel-by-pixel loss, perceptual loss, style loss, total differential loss and adversarial loss;
其中,逐像素损失用于表示补全后的样本全脸图像和样本待处理脸部图像的像素值误差;感知损失用于表示补全后的样本全脸图像的特征图和样本待处理脸部图像的特征图之间的误差;风格损失用于表示补全后的样本全脸图像加遮挡区域后的图像,和样本待处理脸部图像加遮挡区域后的图像的特征图的各通道信息向量化后通道间的格雷姆矩阵差值之和;全微分损失用于表示补全后的样本全脸图像横向、纵向导数之和与样本待处理脸部图像包括的像素点的总数之间的比值;生成损失用于表示判别子模型对生成子模型的生成结果来源的判别结果与生成结果的真实来源的损失。Among them, the pixel-by-pixel loss is used to represent the pixel value error of the completed sample full face image and the sample face image to be processed; the perceptual loss is used to represent the feature map of the completed sample full face image and the sample face to be processed. The error between the feature maps of the images; the style loss is used to represent each channel information vector of the feature map of the image after the completion of the sample full face image plus the occlusion area, and the sample face image to be processed plus the occlusion area. The sum of the Gramm matrix differences between the channels after the transformation; the total differential loss is used to represent the ratio between the sum of the horizontal and vertical derivatives of the sample full face image after completion and the total number of pixels included in the sample face image to be processed ;Generation loss is used to represent the loss of the discriminant sub-model to the source of the generated results of the generated sub-model and the real source of the generated results.
作为一种实施例,图19中的图像处理装置1900可以实现图8中服务器220的功能,或实现前文论述的任意一种脸部图像处理方法。As an embodiment, the
基于同一发明构思,本申请实施例提供一种终端设备,请参照图20,该终端设备210包括收发模块2001和显示模块2002,其中:Based on the same inventive concept, an embodiment of the present application provides a terminal device. Please refer to FIG. 20. The
收发模块2001,用于响应在脸部图像补全界面上的脸部图像补全输入操作,向服务器发送补全请求,以使服务器对根据如前文论述的脸部图像处理方法对待处理脸部图像和脸部特征调整信息进行处理,得到脸部图像补全后的全脸图像;其中,补全请求包括待处理脸部图像和脸部特征调整信息;以及获取服务器返回的全脸图像;The
显示模块2002,用于显示全脸图像。The
应当说明的是,终端设备210还包括一些其他部件,以辅助实现相应的功能,本申请不对其他部件进行列举。It should be noted that the
基于同一发明构思,本申请实施例提供一种脸部图像处理设备,请继续参照图1,该脸部图像处理设备100包括处理器102和存储器103,处理器102用于调用存储器103中的程序指令,以实现前文论述的任意一种脸部图像处理方法。Based on the same inventive concept, an embodiment of the present application provides a facial image processing device, please continue to refer to FIG. 1 , the facial
作为一种实施例,图1中的处理器102可以用于实现图19中的收发模块1901和处理模块1902的功能。As an embodiment, the
基于同一发明构思,本申请实施例提供一种终端设备,请继续参照图21,该终端设备210包括处理器2101和存储器2102,处理器2101用于调用存储器2102中的程序指令,以实现前文论述的任意一种脸部图像处理方法,或实现图8中客户端211的功能。Based on the same inventive concept, an embodiment of the present application provides a terminal device. Please continue to refer to FIG. 21 . The
作为一种实施例,图21中的处理器2101可以用于实现图20中的收发模块2001和显示模块2002的功能。As an embodiment, the
基于同一发明构思,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行前文论述的脸部图像处理方法。Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on a computer, the computer executes the facial image discussed above. Approach.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。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.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。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 (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911061482.0A CN110874575A (en) | 2019-11-01 | 2019-11-01 | A face image processing method and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911061482.0A CN110874575A (en) | 2019-11-01 | 2019-11-01 | A face image processing method and related equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110874575A true CN110874575A (en) | 2020-03-10 |
Family
ID=69717908
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911061482.0A Pending CN110874575A (en) | 2019-11-01 | 2019-11-01 | A face image processing method and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110874575A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111614974A (en) * | 2020-04-07 | 2020-09-01 | 上海推乐信息技术服务有限公司 | Video image restoration method and system |
CN111667400A (en) * | 2020-05-30 | 2020-09-15 | 温州大学大数据与信息技术研究院 | Human face contour feature stylization generation method based on unsupervised learning |
CN112766220A (en) * | 2021-02-01 | 2021-05-07 | 西南大学 | Dual-channel micro-expression recognition method and system, storage medium and computer equipment |
CN112967198A (en) * | 2021-03-05 | 2021-06-15 | 北京字跳网络技术有限公司 | Image processing method and device |
CN113158881A (en) * | 2021-04-19 | 2021-07-23 | 电子科技大学 | Cross-domain pedestrian re-identification method based on attention mechanism |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107909061A (en) * | 2017-12-07 | 2018-04-13 | 电子科技大学 | A kind of head pose tracks of device and method based on incomplete feature |
CN107909065A (en) * | 2017-12-29 | 2018-04-13 | 百度在线网络技术(北京)有限公司 | The method and device blocked for detecting face |
CN107924579A (en) * | 2015-08-14 | 2018-04-17 | 麦特尔有限公司 | The method for generating personalization 3D head models or 3D body models |
CN109145745A (en) * | 2018-07-20 | 2019-01-04 | 上海工程技术大学 | A kind of face identification method under circumstance of occlusion |
CN109598210A (en) * | 2018-11-16 | 2019-04-09 | 三星电子(中国)研发中心 | A kind of image processing method and device |
CN109785258A (en) * | 2019-01-10 | 2019-05-21 | 华南理工大学 | A kind of facial image restorative procedure generating confrontation network based on more arbiters |
-
2019
- 2019-11-01 CN CN201911061482.0A patent/CN110874575A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107924579A (en) * | 2015-08-14 | 2018-04-17 | 麦特尔有限公司 | The method for generating personalization 3D head models or 3D body models |
CN107909061A (en) * | 2017-12-07 | 2018-04-13 | 电子科技大学 | A kind of head pose tracks of device and method based on incomplete feature |
CN107909065A (en) * | 2017-12-29 | 2018-04-13 | 百度在线网络技术(北京)有限公司 | The method and device blocked for detecting face |
CN109145745A (en) * | 2018-07-20 | 2019-01-04 | 上海工程技术大学 | A kind of face identification method under circumstance of occlusion |
CN109598210A (en) * | 2018-11-16 | 2019-04-09 | 三星电子(中国)研发中心 | A kind of image processing method and device |
CN109785258A (en) * | 2019-01-10 | 2019-05-21 | 华南理工大学 | A kind of facial image restorative procedure generating confrontation network based on more arbiters |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111614974A (en) * | 2020-04-07 | 2020-09-01 | 上海推乐信息技术服务有限公司 | Video image restoration method and system |
CN111614974B (en) * | 2020-04-07 | 2021-11-30 | 上海推乐信息技术服务有限公司 | Video image restoration method and system |
CN111667400A (en) * | 2020-05-30 | 2020-09-15 | 温州大学大数据与信息技术研究院 | Human face contour feature stylization generation method based on unsupervised learning |
CN111667400B (en) * | 2020-05-30 | 2021-03-30 | 温州大学大数据与信息技术研究院 | Human face contour feature stylization generation method based on unsupervised learning |
CN112766220A (en) * | 2021-02-01 | 2021-05-07 | 西南大学 | Dual-channel micro-expression recognition method and system, storage medium and computer equipment |
CN112766220B (en) * | 2021-02-01 | 2023-02-24 | 西南大学 | Dual-channel micro-expression recognition method and system, storage medium and computer equipment |
CN112967198A (en) * | 2021-03-05 | 2021-06-15 | 北京字跳网络技术有限公司 | Image processing method and device |
CN113158881A (en) * | 2021-04-19 | 2021-07-23 | 电子科技大学 | Cross-domain pedestrian re-identification method based on attention mechanism |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11481869B2 (en) | Cross-domain image translation | |
Monroy et al. | Salnet360: Saliency maps for omni-directional images with cnn | |
CN116580257B (en) | Feature fusion model training and sample retrieval method, device and computer equipment | |
US12131436B2 (en) | Target image generation method and apparatus, server, and storage medium | |
CN110874575A (en) | A face image processing method and related equipment | |
CN106682632B (en) | Method and device for processing face image | |
WO2022052782A1 (en) | Image processing method and related device | |
CN110852940A (en) | Image processing method and related equipment | |
US20240169701A1 (en) | Affordance-based reposing of an object in a scene | |
CN111127309B (en) | Portrait style migration model training method, portrait style migration method and device | |
CN117252791A (en) | Image processing method, device, electronic equipment and storage medium | |
CN112381707A (en) | Image generation method, device, equipment and storage medium | |
CN108765549A (en) | A kind of product three-dimensional display method and device based on artificial intelligence | |
CN114693853A (en) | Object rendering method and device, electronic equipment and storage medium | |
JP2023545052A (en) | Image processing model training method and device, image processing method and device, electronic equipment, and computer program | |
CN114049290A (en) | Image processing method, device, device and storage medium | |
CN117237547B (en) | Image reconstruction method, reconstruction model processing method and device | |
EP4588019A1 (en) | User authentication based on three-dimensional face modeling using partial face images | |
CN114399424A (en) | Model training method and related equipment | |
CN113963397A (en) | Image processing method, server, and storage medium | |
WO2025152951A1 (en) | Image generation method and apparatus, image generation model training method and apparatus, and device, medium and program product | |
WO2023023162A1 (en) | 3d semantic plane detection and reconstruction from multi-view stereo (mvs) images | |
CN115239857A (en) | Image generation method and electronic device | |
CN117934654B (en) | Image generation model training, image generation method, device and computer equipment | |
CN115496989B (en) | Generator, generator training method and method for avoiding image coordinate adhesion |
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 |