Facial expression generation method, device and equipment based on expression parameter control

Through a method based on expression parameter control, using generative adversarial networks and expression discrimination models, the problems of discontinuity and poor realism in facial expression generation in the existing technology are solved, achieving high realism and continuity of facial expression generation, ensuring Preservation of personal identity information.

CN118644589APending Publication Date: 2024-09-13INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310246538.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

The expressions generated by the existing facial expression generation model based on discrete expression tags are not continuous, have poor transition effects, and are not realistic. Moreover, the quality and effect of the pictures generated by the sketch editing method are greatly affected by the sketch, and it is difficult to preserve the identity information of the person.

Method used

Using a method based on expression parameter control, by obtaining the AU vector of the image and the target expression, using a generative adversarial network to generate a model, combined with the expression discrimination model, a facial expression image with continuity and high realism is generated, and the identity information of the person is saved.

Benefits of technology

It improves the realism and continuity of the generated images, ensures the preservation of character identity information, and improves the expression transition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644589A
    Figure CN118644589A
Patent Text Reader

Abstract

The invention provides a facial expression generation method, device and equipment based on expression parameter control. The method comprises the following steps: acquiring a first image and a first target expression facial action unit AU vector; inputting the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image; the first target expression AU vector is determined based on the AU vector corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image; the facial expression generation model is obtained based on training of a sample image, a sample expression AU vector and an expression discrimination model, the facial expression generation model and the expression discrimination model form a generative adversarial network, and the expression discrimination model is used for distinguishing virtual expressions and real expressions, so that while the character identity information is stored, the expression recognition efficiency is improved. And the sense of reality of the generated image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a facial expression generation method, device and equipment based on expression parameter control. Background Art

[0002] At present, the models that use Generative Adversarial Network (GAN) to realize facial expression control are often trained with several types of facial expression pictures with discrete expression labels. Although smiling faces can be generated from a single picture, most methods based on discrete labels are limited by labels. Their common shortcomings are that the generated expressions are not continuous, the transition effect between expressions is poor, and the generated pictures are not realistic. In addition to the facial expression control methods using labels, there are also some GAN models based on sketch editing, which use masks, colored strokes and sketches as input to generate images. Although this sketch-based editing method has greater freedom for users in facial expression control, the quality and effect of the generated pictures are greatly affected by the sketch. If the sketch is not drawn reasonably or does not match the facial features of the source picture, the realism of the generated image will be low and the identity information of the person will be difficult to preserve. Summary of the invention

[0003] In view of the problems existing in the prior art, the present invention provides a facial expression generation method, device and equipment based on expression parameter control.

[0004] In a first aspect, the present invention provides a facial expression generation method based on expression parameter control, comprising:

[0005] Obtaining a first image and a first target expression facial action unit AU vector;

[0006] Inputting the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image;

[0007] The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image;

[0008] The facial expression generation model is obtained based on sample images, sample expression AU vectors, and expression discrimination model training. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

[0009] Optionally, determining the first target expression AU vector based on the AU vector corresponding to each image in the target expression image set includes:

[0010] Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set;

[0011] Based on the second target expression AU vector, the first target expression AU vector is determined.

[0012] Optionally, determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes:

[0013] Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image;

[0014] Based on the second target expression AU vector, the first target expression AU vector is determined.

[0015] Optionally, the determining the second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image includes:

[0016] The AU unit related to the target expression in the AU vector corresponding to the second target expression image is used to replace the AU unit at the corresponding position in the AU vector corresponding to the first image, so as to obtain the second target expression AU vector.

[0017] Optionally, the determining the first target expression AU vector based on the second target expression AU vector includes:

[0018] Determine the second target expression AU vector as the first target expression AU vector; or,

[0019] Linear interpolation is performed on the AU vector corresponding to the first image and the second target expression AU vector to obtain the first target expression AU vector.

[0020] In a second aspect, the present invention further provides a facial expression generating device based on expression parameter control, comprising:

[0021] An acquisition module, used for acquiring a first image and a first target expression AU vector;

[0022] A determination module, configured to input the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image;

[0023] The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image;

[0024] The facial expression generation model is obtained based on sample images, sample expression AU vectors, and expression discrimination model training. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

[0025] Optionally, determining the first target expression AU vector based on the AU vector corresponding to each image in the target expression image set includes:

[0026] Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set;

[0027] Based on the second target expression AU vector, the first target expression AU vector is determined.

[0028] Optionally, determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes:

[0029] Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image;

[0030] Based on the second target expression AU vector, the first target expression AU vector is determined.

[0031] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the facial expression generation method based on expression parameter control as described in the first aspect above is implemented.

[0032] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the facial expression generation method based on expression parameter control as described in the first aspect above.

[0033] The facial expression generation method, device and equipment based on expression parameter control provided by the present invention determine a first target expression AU vector based on AU vectors corresponding to each image in a target expression image set, or based on an AU vector corresponding to a first image and an AU vector corresponding to a second target expression image, input the first image and the first target expression AU vector into a facial expression generation model, and obtain a first target expression image corresponding to the first image, thereby improving the realism of the generated image while preserving the character identity information. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is one of the flow charts of the facial expression generation method based on expression parameter control provided by the present invention;

[0036] Figure 2 This is the second flow chart of the facial expression generation method based on expression parameter control provided by the present invention;

[0037] Figure 3 It is a structural schematic diagram of a facial expression generation device based on expression parameter control provided by the present invention;

[0038] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] With the further development of digital media technology represented by virtual reality, the control and synthesis methods of human facial expressions have attracted everyone's attention in recent years. Facial expression control technology has a wide range of applications including digital entertainment and data enhancement. Traditional facial expression control methods are basically processing at the pixel level of images, such as expression gradient technology and expression mapping technology. With the development of computer hardware and the birth of large-scale face data sets, deep learning methods have already had performance advantages over traditional methods in human facial expression control. Since the introduction of GAN in 2014, the method of using GAN to synthesize facial images of people has become mainstream. GAN is a generative modeling method based on game theory scenarios. The network trains the generator and the discriminator at the same time, where the generator is used to capture the distribution of data and the discriminator is used to determine whether a given sample comes from the real data distribution or the generator. By introducing adversarial loss, the generator and the discriminator are continuously optimized and iterated in the adversarial game. After training, the model can make the generated data have the same distribution as the real data.

[0041] At present, the models that use GAN to realize facial expression control are often trained with several types of facial expression pictures with discrete expression labels. Although expressions can be generated from a single picture, most methods based on discrete labels are limited by labels. Their common shortcomings are that the generated expressions are not continuous, the transition effect between expressions is poor, and the generated pictures are not realistic. In addition to the facial expression control methods using labels, there are also some GAN models based on sketch editing, which use masks, colored strokes and sketches as input to generate images. Although this sketch-based editing method has greater freedom for users in facial expression control, the quality and effect of the generated pictures are greatly affected by the sketch. If the sketch is not drawn reasonably or does not match the facial features of the person in the source picture, the realism of the generated image will be low and the identity information of the person will be difficult to preserve.

[0042] To this end, the present invention proposes a facial expression generation method based on expression parameter control, which improves the realism of the generated image on the basis of preserving the identity information of the person.

[0043] Figure 1 One of the flow charts of the facial expression generation method based on expression parameter control provided by the present invention is as follows: Figure 1 As shown, the method comprises the following steps:

[0044] Step 100: Obtain a first image and a first target expression facial action unit AU vector.

[0045] Step 101: input a first image and a first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image.

[0046] The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image;

[0047] The facial expression generation model is trained based on sample images, sample expression AU vectors, and expression discrimination models. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

[0048] Specifically, the first image may be any image including a human portrait, and the human portrait in the first image may be used as an object controlled by the expression parameter. The first target expression facial action unit (AU) vector includes an AU vector that can represent a target expression, and the target expression may be a smiling face, a crying face, or other expressions, which are not specifically limited here.

[0049] After obtaining the first image and the first target expression AU vector, the first image and the first target expression AU vector can be input into a facial expression generation model. After being processed by the facial expression generation model, a first target expression image corresponding to the first image is generated. The identity information of the portrait in the first target expression image is the same as that of the first image, and the facial expression of the portrait is consistent with the target expression.

[0050] The first target expression AU vector may be determined based on AU vectors corresponding to each image in a target expression image set, where the target expression image set includes multiple images containing the target expression.

[0051] Alternatively, the first target expression AU vector may also be determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image, and the second target expression image may be any image that is different from the first target expression image and includes the target expression.

[0052] The facial expression generation model can be obtained based on sample images and sample expression AU vectors, as well as the expression discrimination model training. The facial expression generation model and the expression discrimination model can together constitute a GAN. The facial expression generation model can be understood as the generator of GAN (also called the generation network), and the expression discrimination model can be understood as the discriminator of GAN (also called the discriminant network). The expression discrimination model can be used to distinguish whether the expression image generated by the facial expression generation model is a virtual expression or a real expression. In GAN, the generator is responsible for generating simulated data, and the discriminator is responsible for judging whether the input data is real or generated. The generator continuously optimizes the generated data to make the discriminator judge that the data it generates is real, and the discriminator also continuously optimizes itself to make the judgment more accurate. The relationship between the two forms an adversarial relationship, so it is called a generative adversarial network.

[0053] The GAN used in the present invention may be a GANimation or other GAN instances.

[0054] The AU vector in the present invention may be an AU vector defined by the Facial Action Coding System (FACS), or may be an AU vector defined by other AU databases.

[0055] In the present invention, the AU vector of the image can be extracted by using the facial action analysis toolbox OpenFace2.0, or by using other methods.

[0056] The facial expression generation method based on expression parameter control provided by the present invention determines a first target expression AU vector based on AU vectors corresponding to each image in a target expression image set, or based on an AU vector corresponding to a first image and an AU vector corresponding to a second target expression image, inputs the first image and the first target expression AU vector into a facial expression generation model, and obtains a first target expression image corresponding to the first image, thereby improving the realism of the generated image while preserving the character identity information.

[0057] Optionally, determining a first target expression AU vector based on AU vectors corresponding to each image in the target expression image set includes:

[0058] Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set;

[0059] Based on the second target expression AU vector, a first target expression AU vector is determined.

[0060] Specifically, when determining the first target expression AU vector based on the AU vectors corresponding to each image in the target expression image set, the second target expression AU vector can be first determined based on the average value of the AU vectors corresponding to each image in the target expression image set, and then the first target expression AU vector can be determined based on the second target expression AU vector.

[0061] In one implementation, the average value of the AU vectors corresponding to the images in the target expression image set may be used as the second target expression AU vector.

[0062] In one implementation, an algebraic operation (eg, multiplication by a coefficient) may be performed on the average value of the AU vectors corresponding to each image in the target expression image set, and the obtained result may be used as the second target expression AU vector.

[0063] Optionally, the second target expression AU vector is determined based on an average value of AU vectors corresponding to each image in the target expression image set, and the second target expression AU vector may be determined based on the following formula:

[0064]

[0065] Among them, arg_AU represents the second target expression AU vector, represents the AU vector corresponding to the i-th image in the target expression image set, and M is the number of images in the target expression image set.

[0066] In one implementation, the target expression image set includes 50 images, and the average value of the AU vectors corresponding to the 50 images can be used as the second target expression AU vector.

[0067] Optionally, determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes:

[0068] Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image;

[0069] Based on the second target expression AU vector, a first target expression AU vector is determined.

[0070] Specifically, when determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image, the second target expression AU vector can be first determined based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image, and then the first target expression AU vector can be determined based on the second target expression AU vector.

[0071] In one implementation, the AU unit related to the target expression in the AU vector corresponding to the second target expression image may be used to replace the AU unit at the corresponding position in the AU vector corresponding to the first image to obtain the second target expression AU vector.

[0072] In one implementation, the AU units related to the target expression in the AU vector corresponding to the second target expression image may be linearly interpolated with the AU units at corresponding positions in the AU vector corresponding to the first image, and the obtained results may be used to replace the AU units at corresponding positions in the AU vector corresponding to the first image to obtain the second target expression AU vector.

[0073] Optionally, based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image, the second target expression AU vector is determined. The second target expression AU vector can be obtained by replacing the AU unit at the corresponding position in the AU vector corresponding to the first image with the AU unit related to the target expression in the AU vector corresponding to the second target expression image.

[0074] In one implementation, the AU vector may include multiple AU units, wherein each AU unit is associated with at least one facial expression.

[0075] For example, OpenFace2.0 can extract 17 AU units in FACS from an image containing a portrait to form an AU vector to represent facial expressions. These 17 AU units are AU1, AU2, AU4, AU5, AU6, AU7, AU9, AU10, AU12, AU14, AU15, AU17, AU20, AU23, AU25, AU26, and AU45. Among them, the AU units related to smiling expressions are AU6, AU7, AU10, AU12, AU14, and AU25.

[0076] Optionally, the AU unit related to the target expression in the AU vector corresponding to the second target expression image is used to replace the AU unit at the corresponding position in the AU vector corresponding to the first image to obtain the second target expression AU vector. The second target expression AU vector may be determined based on the following formula:

[0077] relative_AU=Ky t +(IK)y o

[0078] Where relative_AU represents the second target expression AU vector, K is an N*N matrix, [K] ii =1, i∈E, E represents the index set of AU units related to the target expression in the AU vector, and the values ​​of other elements in K are 0. t Represents the AU vector corresponding to the second target expression image, y o represents the AU vector corresponding to the first image, I is the N*N unit matrix, and N is the number of AU units in the AU vector.

[0079] For example, using OpenFace2.0 to extract the AU vector of an image, the target expression is a smiling face, and the index set of the AU units related to the target expression is {5, 6, 8, 9, 10, 15}. The formula for determining the second target expression AU vector can also be expressed as:

[0080] relative_AU=Ky t+(IK)y o

[0081] Where relative_AU represents the second target expression AU vector, K is a 17*17 matrix, [K] ii =1, i∈{5, 6, 8, 9, 10, 15}, the values ​​of other elements in K are 0, y t Represents the AU vector corresponding to the second target expression image, y o represents the AU vector corresponding to the first image, and I is a 17*17 unit matrix.

[0082] Optionally, determining the first target expression AU vector based on the second target expression AU vector includes:

[0083] Determine the second target expression AU vector as the first target expression AU vector; or,

[0084] Linear interpolation is performed on the AU vector corresponding to the first image and the second target expression AU vector to obtain the first target expression AU vector.

[0085] Specifically, the first target expression AU vector is determined based on the second target expression AU vector, and the second target expression AU vector may be directly determined as the first target expression AU vector. Alternatively, the AU vector corresponding to the first image and the second target expression AU vector may be linearly interpolated to obtain the first target expression AU vector.

[0086] In one implementation, linear interpolation may be performed based on the following formula to obtain the first target expression AU vector:

[0087] y′ f =αy f +(1-α)y o , α=0.2, 0.4, 0.6, 0.8, 1

[0088] Among them, y′ f represents the first target expression AU vector, α is the coefficient of linear interpolation, y f represents the second target expression AU vector, y o Indicates the AU vector corresponding to the first image.

[0089] The implementation process of the facial expression generation method based on expression parameter control provided by the present invention is described below through specific embodiments.

[0090] Figure 2 The second flow chart of the facial expression generation method based on expression parameter control provided by the present invention is as follows: Figure 2 As shown, the method comprises the following steps:

[0091] 1. Input image. Extract the facial action unit vector values ​​of the source image and the target image respectively.

[0092] 2. Expression parameter manipulation: The facial action unit vector value of the target image obtained in step 1 is modified using the idea of ​​average AU value or relative AU value as the target AU vector.

[0093] 3. GANimation generates output. The source image and target AU vector are used as input to the generator to generate the final facial expression image.

[0094] In step 1, the facial action unit vector values ​​of the source and target images are extracted using the OpenFace2.0 toolbox. The emergence of FACS provides a new approach to the study of facial expressions and movements. With the development of deep learning technologies such as object detection, many models and tools for analyzing facial component recognition and extracting facial action units have emerged. Therefore, the facial action unit vector values ​​of the source and target images here are extracted using the open source, highly accurate facial action analysis toolbox OpenFace 2.0 to extract the AU values ​​of the images.

[0095] In step 2, the expression parameter manipulation part uses the average AU value and the relative AU value to modify the AU value of the target image. The average AU value is selected based on a large number of smiling face images. The extracted smiling face expression AU values ​​are averaged to obtain a smiling face expression AU value vector with broad representativeness. The relative AU value is selected based on the facial action units related to smiling face expressions in FACS, such as AU6, AU7, AU10, AU12, AU14 and AU25. By combining the AU values ​​related to smiling face expressions in the target image with the values ​​of other AUs in the source image, a target AU vector with smiling face expression features and retaining the facial features of the characters in the source image can be obtained.

[0096] In step 3, the GANimation pre-trained model is used to input the source image and the target AU vector into the generator. The generator contains two convolutions with a stride of 2, 6 residual blocks, and two convolutions with a stride of 1 / 2. Finally, two parallel convolution layers are connected, one for regressing the color mask C and the other for defining the attention mask A. The two are fused to generate a facial image with the target expression.

[0097] The facial expression generation method based on expression parameter control provided by the present invention is divided into three stages, among which the core is step 2, the expression parameter manipulation stage. In the expression parameter manipulation stage, the target AU value is modified and manipulated by using the average AU value and the relative AU value, which helps to further reduce the artifacts in the generated image and retain the identity information of the person in the source image. The user evaluation results show that the expression parameter manipulation module improves the visual effect of the generated image. Compared with the original model, the generated image has a stronger sense of reality and a higher degree of expression realization.

[0098] The present invention is based on classic models and systems such as the generative adversarial network model, the facial action coding system, and the facial action analysis toolbox OpenFace2.0. From the perspective of facial expression parameter control, the average AU value and relative AU value methods are designed as core technologies. Finally, a facial expression generation model based on parameter control is constructed, and it is tested on a self-made smiley face expression dataset. A user evaluation method is designed, and the performance is evaluated from two aspects: the quality of the generated image and the degree of expression realization. The questionnaire, Euclidean distance (also known as L2 distance) and Frechet Inception Distance (FID) value are used as evaluation indicators, and the experimental results are statistically analyzed.

[0099] The present invention comprises three stages: inputting pictures, manipulating expression parameters and generating outputs.

[0100] 1. Extract the facial action unit vector values ​​of the source image and the target image respectively;

[0101] 2. Use the idea of ​​average AU value or relative AU value to modify the facial action unit vector value of the target image obtained in step 1 as the target AU vector.

[0102] 3. Use the source image and target AU vector as input to the generator to generate the final facial expression image.

[0103] In step 1, the OpenFace2.0 toolbox first locates the face of the person in the image and crops it to 128*128 size, then extracts the AU value of the cropped image to obtain the amplitude of 17 facial action units, using y o With y t Represents the AU vector of the source image and the target image respectively, and its form is: o =(o1, o2…o N ) T ,y t =(t1, t2…t N ) T , where N=17.

[0104] In step 2, the average AU value extracts the AU vector from the pictures in the self-made smiley face dataset. By calculating the average value of the AU vectors of different characters' smiley expressions, a more representative and generally applicable AU vector for controlling the characters' smiley expressions can be obtained. Suppose there are M pictures in the smiley face dataset, and the extracted AU vector value is y d =(d1, d2…d N ) T , then the average AU value can be expressed as

[0105] In step 2, the relative AU value modifies the AU value of the facial action unit corresponding to the smiling expression based on the AU value of the neutral expression of the character. From an intuitive analysis, the muscle movements of a person when producing a smiling expression correspond to AU6, AU7, AU10, AU12, AU14 and AU25 in the facial coding system. The control of a person's smiling expression can be achieved by rationally controlling this series of facial action units. Therefore, the relative AU value idea adopted in the present invention is: after extracting the AU value of the target expression, only the values ​​of the 6 AU units related to the smiling face are used, and the other AU units still keep the AU value of the source image unchanged. The relative AU value can be expressed as relative_AU=Ky t +(IK)y o , where K is an N*N matrix, [K] ii =1, i∈{5, 6, 8, 9, 10, 15}, the values ​​of other elements in K are 0, and I is the N*N identity matrix.

[0106] In step 3, the goal of the GANimation model is to learn the mapping M, given the source image Convert to y f The output image of the condition That is, estimate the mapping M: where y o With y f Represent the AU vector of the source image and the target AU vector respectively. The generator G adopts the idea of ​​cycle consistency and applies the generator G twice. The first time maps the input image The second use of G restores it to By calculating the source image and its reconstructed image The difference between (cycle consistency loss) improves the generator's ability to preserve the attributes of the person in the source image, and achieves a good mapping of the generator G without paired image training. In addition, the attention mechanism is introduced into the generator to maximize the realism of the generated image and reduce the interference of lighting and background on the facial expression control process. The input of the generator G is The output is two masks: color mask C and attention mask A. Mask A represents the output image for each pixel of mask C. The contribution of the final output image It can be expressed as: in The discriminator D outputs the true and false results D judged by the discriminator respectively I and the estimated AU activation D y The loss function of the GANimation model uses adversarial loss, attention loss, identity loss, and conditional expression loss. During the training phase, the generator and discriminator are continuously iteratively optimized, and finally the optimal generator G for generating images can be obtained. * .

[0107] In step 3, in order to generate a series of smiling face expression pictures from a single neutral expression picture of a person, the source picture AU vector and the target AU vector are used for linear interpolation to obtain a series of smiling face expression AU vectors as the input target AU. The formula for linear interpolation is: αy f +(1-α)y o , where α = 0.2, 0.4, 0.6, 0.8, 1.

[0108] Table 1 shows the results of the questionnaire survey on the quality of pictures generated by the present invention. The image quality of the model fine-tuned on the self-made data set has the best overall performance, and the images generated by it are more in line with people's intuitive "good" feelings compared to the other three groups of test results. The test group of the present invention that uses the average AU value as the target AU value also performed well in the survey. However, the results shown in this questionnaire for pictures generated using relative AU values ​​do not have an advantage. The reason for this may be that the pictures generated using the average AU value and the relative AU value can retain the original facial features of the characters to a certain extent, improve the similarity between the characters in the generated picture and the characters in the source picture, and reduce the similarity between the characters in the generated picture and the characters in the target picture. Therefore, when the two groups of test results using the average AU value and the relative AU value appear in the same question, the two are more similar in visual effect, and the selection tendency of the subjects may be difficult to predict.

[0109] Table 1: Results of the generated image quality questionnaire

[0110]

[0111] Table 2 shows the L2 distance between the AU value of the generated image and the AU value of the smiling face expression. The present invention uses the L2 distance to reflect the degree of expression realization of the image generated by the present invention. The smaller the L2 distance, the higher the degree of expression realization of the generated image. The average realization degree of the target expression on the randomly selected test image using the average AU value is the best, and the expression can be controlled as expected under low deviation to generate a more typical smiling face expression. The minimum value of the L2 distance obtained by the relative AU value method is also low, which shows that the expression parameter control method proposed by the present invention can achieve a smiling face expression with a higher degree of reality.

[0112] Table 2: L2 distance between the AU value of the generated image and the AU value of the smiling face expression

[0113]

[0114]

[0115] Table 3 shows the FID values ​​of the generated images and the smiling face expression images. The present invention uses the calculation results of the FID value to measure the similarity between the generated smiling face images and the real smiling face images. Compared with the method without using the facial expression parameter control method, the FID values ​​between the smiling face images generated by the average AU value and the relative AU value and the real smiling face images are smaller, indicating that the expression of the image generated by the facial expression parameter control method proposed in the present invention is closer to the real expression.

[0116] Table 3: FID values ​​of generated images and smiley expression images

[0117]

[0118] The facial expression generation device based on expression parameter control provided by the present invention is described below. The facial expression generation device based on expression parameter control described below and the facial expression generation method based on expression parameter control described above can correspond to each other.

[0119] Figure 3 The schematic diagram of the structure of the facial expression generation device based on expression parameter control provided by the present invention is as follows: Figure 3 As shown, the device comprises:

[0120] An acquisition module 300 is used to acquire a first image and a first target expression AU vector;

[0121] A determination module 310 is used to input the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image;

[0122] The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image;

[0123] The facial expression generation model is trained based on sample images, sample expression AU vectors, and expression discrimination models. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

[0124] Optionally, determining a first target expression AU vector based on AU vectors corresponding to each image in the target expression image set includes:

[0125] Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set;

[0126] Based on the second target expression AU vector, a first target expression AU vector is determined.

[0127] Optionally, determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes:

[0128] Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image;

[0129] Based on the second target expression AU vector, a first target expression AU vector is determined.

[0130] Optionally, determining the second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image includes:

[0131] The AU unit related to the target expression in the AU vector corresponding to the second target expression image is used to replace the AU unit at the corresponding position in the AU vector corresponding to the first image, so as to obtain the second target expression AU vector.

[0132] Optionally, determining the first target expression AU vector based on the second target expression AU vector includes:

[0133] Determine the second target expression AU vector as the first target expression AU vector; or,

[0134] Linear interpolation is performed on the AU vector corresponding to the first image and the second target expression AU vector to obtain the first target expression AU vector.

[0135] It should be noted here that the above-mentioned device provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.

[0136] Figure 4 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute any of the facial expression generation methods based on expression parameter control provided in the above embodiments.

[0137] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0138] It should be noted here that the electronic device provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0139] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute any of the facial expression generation methods based on expression parameter control provided in the above embodiments.

[0140] It should be noted here that the non-transitory computer-readable storage medium provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.

[0141] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A facial expression generation method based on expression parameter control, characterized in that: include: Obtaining a first image and a first target expression facial action unit AU vector; Inputting the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image; The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image; The facial expression generation model is obtained based on sample images, sample expression AU vectors, and expression discrimination model training. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

2. The facial expression generation method based on expression parameter control according to claim 1, characterized in that: Determining the first target expression AU vector based on the AU vectors corresponding to each image in the target expression image set includes: Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set; Based on the second target expression AU vector, the first target expression AU vector is determined.

3. The facial expression generation method based on expression parameter control according to claim 1, characterized in that: Determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes: Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image; Based on the second target expression AU vector, the first target expression AU vector is determined.

4. The facial expression generation method based on expression parameter control according to claim 3, characterized in that: The determining the second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image includes: The AU unit related to the target expression in the AU vector corresponding to the second target expression image is used to replace the AU unit at the corresponding position in the AU vector corresponding to the first image, so as to obtain the second target expression AU vector.

5. The facial expression generation method based on expression parameter control according to claim 2 or 3, characterized in that: The determining the first target expression AU vector based on the second target expression AU vector includes: Determine the second target expression AU vector as the first target expression AU vector; or, Linear interpolation is performed on the AU vector corresponding to the first image and the second target expression AU vector to obtain the first target expression AU vector.

6. A facial expression generation device based on expression parameter control, characterized in that: include: An acquisition module, used for acquiring a first image and a first target expression AU vector; A determination module, configured to input the first image and the first target expression AU vector into a facial expression generation model to obtain a first target expression image corresponding to the first image; The first target expression AU vector is determined based on the AU vectors corresponding to each image in the target expression image set, or is determined based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image; The facial expression generation model is obtained based on sample images, sample expression AU vectors, and expression discrimination model training. The facial expression generation model and the expression discrimination model constitute a generative adversarial network. The expression discrimination model is used to distinguish between virtual expressions and real expressions.

7. The facial expression generating device based on expression parameter control according to claim 6, characterized in that: Determining the first target expression AU vector based on the AU vectors corresponding to each image in the target expression image set includes: Determine a second target expression AU vector based on an average value of AU vectors corresponding to each image in the target expression image set; Based on the second target expression AU vector, the first target expression AU vector is determined.

8. The facial expression generating device based on expression parameter control according to claim 6, characterized in that: Determining the first target expression AU vector based on the AU vector corresponding to the first image and the AU vector corresponding to the second target expression image includes: Determine a second target expression AU vector based on at least one AU unit related to the target expression in the AU vector corresponding to the second target expression image and the AU vector corresponding to the first image; Based on the second target expression AU vector, the first target expression AU vector is determined.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the facial expression generation method based on expression parameter control as described in any one of claims 1 to 5 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the facial expression generation method based on expression parameter control as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Facial expression synthesis method and system based on AU control diffusion model

    CN120107057A