A multi-task facial expression recognition method based on monocular RGB images
Combining self-supervision and supervised learning through the FasterOne network, the end-to-end regression of the three-dimensional deformable model and pupil key points is realized, which solves the problem of being unable to identify the pupil position in the existing technology and improves the accuracy and system simplicity of expression recognition. .
Patent Information
- Application Number
- CN202311690769.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-12-08
AI Technical Summary
The existing technology cannot accurately identify the pupil position information in the facial expressions of 3D virtual characters, resulting in poor expression driving effects.
Design a multi-task facial expression recognition method based on monocular RGB images, realize end-to-end regression of three-dimensional deformable model parameters and pupil key points through FasterOne network, combine self-supervision and supervised learning, reduce the amount of model parameters, and achieve real-time Reasoning and accurate expression recognition.
It achieves accurate identification of three-dimensional facial model parameters and pupil key points, improves the accuracy of expression recognition and simplifies system design, and reduces data annotation costs.
Smart Images

Figure CN117542102B
Abstract
Description
Technical Field
[0001] The invention belongs to the fields of computer vision and computer graphics, and in particular relates to a multi-task facial expression recognition method based on monocular RGB images. Background Art
[0002] In recent years, with the rapid development of computer vision and artificial intelligence, human-computer interaction technology has attracted increasing attention. Facial expression-driven technology is one of the important directions, which aims to transfer the facial movements (i.e., facial expressions and head postures) of real people from monocular RGB images to 3D virtual targets. It is a key technology for many applications, such as virtual actors in movies and games, and avatars in virtual reality and games. Unlike the facial reenactment task that transfers facial movements from 2D images to 2D images, the facial motion redirection task aims to transfer facial movements from 2D images to 3D characters. This task is very challenging because it requires capturing accurate facial expressions from only 2D images.
[0003] The current mainstream facial expression driven algorithm uses a set of parameters (identity parameters, texture parameters, expression parameters) to represent a three-dimensional deformable model. The identity parameters represent the overall shape of the face, the expression parameters control the changes in expression, and the texture parameters describe the color and texture of the skin. The facial expression driven algorithm captures accurate three-dimensional deformable model identity parameters, texture parameters, expression parameters, and head posture parameters from 2D images. This solution heavily relies on the expressive power of the three-dimensional deformable model. The current mainstream three-dimensional deformable models of the face include Base Face Model, FaceWareHouse Model, and 3D Menpo Model. The current mainstream three-dimensional deformable models of the face lack modeling of the human eye pupil, so the facial expression driven algorithm based on the three-dimensional deformable model of the face cannot accurately express the pupil position information in the facial expression. Summary of the invention
[0004] The purpose of the present invention is to design a multi-task facial expression recognition method based on monocular RGB images, realize network parameter sharing, reduce the number of model parameters, and realize real-time reasoning. At the same time, the multi-task network combines the three-dimensional deformable model parameter regression and the pupil key point regression into an end-to-end model, which simplifies the design and deployment process of the system. The model can automatically learn the correlation between tasks from the original data without the need to manually design a feature extractor.
[0005] In order to achieve the above object, the present invention provides a multi-task facial expression recognition method based on monocular RGB image, the method comprising:
[0006] S1, obtaining an image to be identified;
[0007] S2, input the image into a lightweight convolutional neural network with FasterOne network as a lightweight backbone network for training to obtain an output value;
[0008] In S2, the feature map is taken as input, first passes through the FasterOne network and the average pooling layer, and then passes through 5 FC layers respectively, and outputs 5 parameters;
[0009] Wherein, the FC layer includes FC1, FC2, FC3, FC4 and FC5;
[0010] The FC1 outputs the three-dimensional deformable identity parameters of the face, expressed as α; the FC2 outputs the three-dimensional deformable expression parameters of the face, expressed as β; the FC3 outputs the three-dimensional deformable texture parameters of the face, expressed as γ; the FC4 outputs the posture parameters of the head, expressed as pose, and the FC5 outputs the coordinate parameters of the pupil key points;
[0011] The output values include three-dimensional deformable identity parameters of the face, three-dimensional deformable expression parameters of the face, three-dimensional deformable texture parameters of the face, posture parameters of the head and pupil key point coordinate parameters;
[0012] S3, calculating the eye movement expression coefficient according to the pupil key point coordinate parameters;
[0013] S4. Calculate expression parameters based on the facial three-dimensional deformable identity parameters, facial three-dimensional deformable expression parameters, facial three-dimensional deformable texture parameters, head posture parameters and eye movement expression coefficients to obtain expression recognition content.
[0014] Furthermore, the FasterOne network includes two convolutional layers, three FasterOneBlock layers and one maximum pooling layer.
[0015] Furthermore, the two convolutional layers include a convolutional layer conv1 and a convolutional layer conv5; the convolutional layer conv1 passes through 24 groups of 3x3 convolution kernels with a step size of 2; the convolutional layer conv5 passes through 1024 groups of 1x1 convolution kernels with a step size of 1; the maximum pooling layer is the pooling layer Maxpool1, and the size of the pooling layer Maxpool1 is 3x3 with a step size of 2.
[0016] Further, the three FasterOneBlock layers include FasterOneStage1, FasterOneStage2 and FasterOneStage3;
[0017] The FasterOneStage1 continuously passes through one FasterOneBlock_1 and three FasterOneBlock_2;
[0018] The FasterOneStage2 passes through 1 FasterOneBlock_1 and 7 FasterOneBlock_2 continuously;
[0019] The FasterOneStage3 continuously passes through 1 FasterOneBlock_1 and 3 FasterOneBlock_2;
[0020] Wherein, the FasterOneBlock_1 specifically includes:
[0021] The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch does not perform any operation, and the right branch is composed of continuous 1x1Point-Wise Convolution, 3x3Partial Convolution and 1x1Point-WiseConvolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output;
[0022] The FasterOneBlock_2 specifically includes:
[0023] The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch is composed of continuous 3x3PartialConvolution and 1x1 Point-Wise Convolution, and the right branch is composed of continuous 1x1Point-Wise Convolution, 3x3PartialConvolution and 1x1Point-Wise Convolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output.
[0024] Further, the S2 includes:
[0025] In the FasterOne network, the image to be recognized is sequentially input into the convolutional layer conv1, the maximum pooling layer, and FasterOneStage1, FasterOneStage2, FasterOneStage3, and the convolutional layer conv5.
[0026] Furthermore, the three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face are calculated as follows:
[0027]
[0028] Where S is the three-dimensional face shape, is the average 3D face shape, T is the 3D face texture, is the average 3D face texture, A id and A tex are the PCA basis of identity and texture, respectively, A exp is the expression base, α, β, and γ represent the three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face, respectively.
[0029] Furthermore, the loss function of the training of the lightweight convolutional neural network includes a key point loss function, an image loss function and a loss function of human pupil coordinate regression;
[0030] Wherein, the key point loss function and the image loss function are subjected to self-supervisory training;
[0031] The loss function for regression of the pupil coordinates of the human eye is used for supervised training.
[0032] Furthermore, the self-supervised training is specifically to convert 3D supervision into 2D supervision, and the self-supervised training is performed using the 2D points reprojected after 3D reconstruction of the face and the facial key point annotation information of the 2D image, wherein the loss function of the self-supervised training includes a key point loss function and an image loss function, which are specifically expressed as follows:
[0033] The key point loss function L landmark It is expressed as:
[0034]
[0035] Among them, w i represents the weight of each key point of the face; L and L' represent the key points of the face in the original image and the key points of the projection respectively; ||·|| 2 represents the mean square error. i represents the key point index;
[0036] The image loss function L image It is expressed as:
[0037]
[0038] Where M represents the mask of each region, and the mask part is obtained by segmenting the face of the original image; I and I′ represent the original image and the rendered image respectively; ||·||2 represents the root mean square error; i represents the pixel index.
[0039] Furthermore, the supervised training function is the loss function L of the pupil coordinates of the human eye landmark_pupil , which is expressed as follows:
[0040]
[0041] Among them, Pup and Pup′ are the coordinates of the key points of the human pupil marked in the original image and the coordinates of the key points of the human pupil predicted by the network respectively; ||·|| 2 represents the mean square error; i represents the key point index of the pupil.
[0042] Furthermore, the final facial expression recognition model is obtained after training the loss function, specifically:
[0043] The total loss function L of the facial expression recognition model is total as follows:
[0044] L total =w landmark L landmark +w image L image
[0045] +(1-w landmark -w image )L landmark_pupil
[0046] where w landmark and w image They are the weight coefficients of the loss of the pupil coordinates of the human eye and the image loss function in the overall loss. By changing the values of α and β and adjusting the weights of different loss functions, the model is trained to obtain the final facial expression recognition model.
[0047] The beneficial technical effects of the present invention are at least as follows:
[0048] (1) The present invention realizes network parameter sharing and reduces the number of model parameters by designing a multi-task network model structure of three-dimensional deformable model parameter regression and pupil key point regression, which can realize real-time reasoning. The multi-task network combines three-dimensional deformable model parameter regression and pupil key point regression into an end-to-end model, simplifying the system design and deployment process. The model can automatically learn the correlation between tasks from the original data without the need to manually design a feature extractor.
[0049] (2) The problem that the current mainstream solution cannot accurately identify the expression coefficients related to the pupil position in facial expressions is solved. The multi-task algorithm model designed by the present invention can simultaneously identify the various parameters of the three-dimensional facial model and the accurate key point coordinates of the human pupil. While using the expression base coefficients of the three-dimensional facial model to achieve accurate facial expression recognition, it uses the accurate key point coordinates of the human pupil to achieve more accurate pupil-related expression recognition.
[0050] (3) The present invention integrates self-supervised learning and supervised learning in the training process. It realizes the regression of identity parameters, texture parameters, and expression parameters of the three-dimensional face model using self-supervised learning to reduce the cost of data annotation. The coordinate regression of the human eye pupil uses supervised learning to improve the coordinate accuracy of the human eye pupil. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0052] Figure 1 This is a flow chart of a multi-task facial expression recognition method based on monocular RGB images of the present invention.
[0053] Figure 2 This is a structural diagram of a multi-task facial expression recognition network based on monocular RGB images in the present invention.
[0054] Figure 3 This is the network structure diagram of FasterOneBlock_1 of the present invention.
[0055] Figure 4 This is the network structure diagram of FasterOneBlock_2 of the present invention.
[0056] Figure 5 This is the network structure diagram of FasterOneStage1 of the present invention.
[0057] Figure 6 This is the network structure diagram of FasterOneStage2 of the present invention.
[0058] Figure 7 This is the network structure diagram of FasterOneStage3 of the present invention.
[0059] Figure 8 Schematic diagram of 51 expression parameters of the present invention. DETAILED DESCRIPTION
[0060] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0061] In one or more embodiments, Figure 1-7 As shown, the present invention discloses a multi-task facial expression recognition method based on a monocular RGB image, the method comprising:
[0062] S1. Obtain a picture to be identified.
[0063] S2. Input the image into a lightweight convolutional neural network with the FasterOne network as the lightweight backbone network for training to obtain the output value.
[0064] In the entire lightweight convolutional neural network, the feature map is first taken as input, passes through the FasterOne network and the average pooling layer, and then passes through 5 FC layers respectively, and outputs 5 parameters;
[0065] Wherein, the FC layer includes FC1, FC2, FC3, FC4 and FC5;
[0066] The FC1 outputs the three-dimensional deformable identity parameters of the face, expressed as α; the FC2 outputs the three-dimensional deformable expression parameters of the face, expressed as β; the FC3 outputs the three-dimensional deformable texture parameters of the face, expressed as γ; the FC4 outputs the posture parameters of the head, expressed as pose, and the FC5 outputs the coordinate parameters of the pupil key points;
[0067] The output values include three-dimensional deformable identity parameters of the face, three-dimensional deformable expression parameters of the face, three-dimensional deformable texture parameters of the face, posture parameters of the head and pupil key point coordinate parameters.
[0068] The three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face are calculated as follows:
[0069]
[0070] Where S is the three-dimensional face shape, is the average 3D face shape, T is the 3D face texture, is the average 3D face texture, A id and A tex are the PCA basis of identity and texture, respectively, A expis the expression base, α, β, and γ represent the three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face, respectively.
[0071] Specifically, the FasterOne network includes two convolutional layers, three FasterOneBlock layers and a maximum pooling layer. The two convolutional layers include the convolutional layer conv1 and the convolutional layer conv5; the convolutional layer conv1 passes through 24 groups of 3x3 convolution kernels with a step size of 2; the convolutional layer conv5 passes through 1024 groups of 1x1 convolution kernels with a step size of 1; the maximum pooling layer is the pooling layer Maxpool1, and the size of the pooling layer Maxpool1 is 3x3 with a step size of 2.
[0072] The three FasterOneBlock layers include FasterOneStage1, FasterOneStage2 and FasterOneStage3;
[0073] The FasterOneStage1 continuously passes through one FasterOneBlock_1 and three FasterOneBlock_2;
[0074] The FasterOneStage2 passes through 1 FasterOneBlock_1 and 7 FasterOneBlock_2 continuously;
[0075] The FasterOneStage3 continuously passes through 1 FasterOneBlock_1 and 3 FasterOneBlock_2;
[0076] Wherein, the FasterOneBlock_1 specifically includes:
[0077] The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch does not perform any operation, and the right branch is composed of continuous 1x1Point-Wise Convolution, 3x3Partial Convolution and 1x1Point-WiseConvolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output;
[0078] The FasterOneBlock_2 specifically includes:
[0079] The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch is composed of continuous 3x3PartialConvolution and 1x1 Point-Wise Convolution, and the right branch is composed of continuous 1x1Point-Wise Convolution, 3x3PartialConvolution and 1x1Point-Wise Convolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output.
[0080] Figure 3 The structure mainly extracts features from the input feature map and does not involve image downsampling operations. Figure 4 Network structure and Figure 3 The structure is basically the same, except that the left branch is modified to consist of a continuous 3x3 Partial Convolution and a 1x1 Point-Wise Convolution. PConv in the figure stands for Partial Convolution. Compared with traditional convolution operations, this convolution operation reduces both memory access and computational redundancy, thereby reducing the network model inference time. Figure 4 The structure can extract features from feature maps while downsampling them.
[0081] In the FasterOne network, the image to be recognized is sequentially input into the convolutional layer conv1, the maximum pooling layer, and FasterOneStage1, FasterOneStage2, FasterOneStage3, and the convolutional layer conv5.
[0082] The loss function of the lightweight convolutional neural network training includes a key point loss function, an image loss function and a loss function of human pupil coordinate regression;
[0083] Specifically, the overall network training loss function consists of three parts: the key point loss and image loss of self-supervised learning and the loss function of pupil coordinate regression of supervised learning. The three loss functions are combined into the multi-task loss function of the entire network. The final model is obtained after training through the algorithm network model and loss function.
[0084] It is difficult to annotate the true values of the facial 3D deformable model parameters output by the algorithm model. In real usage scenarios, manually annotating a large amount of such data requires time and money. Therefore, the invention uses a self-supervised learning training strategy to train and optimize the facial 3D deformable model parameters. The self-supervised training scheme converts 3D supervision into 2D supervision, and uses the 2D points reprojected after 3D facial reconstruction and the facial key point annotation information of the 2D image for self-supervised training, so that the algorithm network can learn better without spending a lot of money to annotate the image.
[0085] The loss functions of self-supervised training mainly include key point loss and image loss. The key point loss of self-supervised learning requires that the projection points of the key points of the 3D facial model and the facial key points of the original image should be as close as possible, and the image loss requires that the image after rasterization rendering of the 3DMM model should be as close as possible to the real image.
[0086] The key point loss function L landmark It is expressed as:
[0087]
[0088] Among them, w i represents the weight of each key point of the face; L and L' represent the key points of the face in the original image and the key points of the projection respectively; ||·|| 2 = represents mean square error. i represents key point index. Considering the different weights of non-contour points and contour points in facial expressions, the weight of facial contour points is 1 and the weight of non-contour points is 8 in the present invention.
[0089] The image loss function L image It is expressed as:
[0090]
[0091] Where M represents the mask of each region, and the mask part is obtained by segmenting the face of the original image; I and I' represent the original image and the rendered image respectively; ||·||2 represents the root mean square error; i represents the pixel index.
[0092] Areas include skin, eyebrows, and lips areas.
[0093] For the human pupil key point coordinate information output by the algorithm model, its true value label can be manually annotated from the 2D image, and the supervised training function is the loss function L of the human pupil coordinates. landmark_pupil , which is expressed as follows:
[0094]
[0095] Among them, Pup and Pup' are the coordinates of the key points of the human pupil marked in the original image and the coordinates of the key points of the human pupil predicted by the network respectively; ||·|| 2 represents the mean square error; i represents the key point index of the pupil.
[0096] After training the loss function, the final facial expression recognition model is obtained, which is specifically:
[0097] The total loss function L of the facial expression recognition model is total as follows:
[0098] L total =αL lanomark +βL image +(1-α-β)L landmark_pupil
[0099] By changing the values of α and β and adjusting the weights of different loss functions, the model is trained to obtain the final facial expression recognition model.
[0100] S3. Calculate the eye movement expression coefficient according to the pupil key point coordinate parameters.
[0101] The 2D pupil is marked according to the pupil key point coordinate parameters outputted in step S2, and the coordinates of the 7 key points of each eye are obtained. Finally, the eye movement expression coefficient of the pupil is calculated using the coordinates of the 7 key points of the eye, which is expressed as follows:
[0102] Right eye movement expression coefficient L exp_right_pupil , which is expressed as follows:
[0103]
[0104] Where p7 represents the pixel coordinates of the right eye pupil center in the 2D image,
[0105] p2 represents the pixel coordinates of the inner corner of the right eye in the 2D image
[0106] p1 represents the pixel coordinates of the outer corner of the right eye in the 2D image,
[0107] Left eye movement expression coefficient L exp_left_pupil , which is expressed as follows:
[0108]
[0109] where p 14 Represents the pixel coordinates of the left eye pupil center in the 2D image,
[0110] p8 represents the pixel coordinates of the inner corner of the left eye in the 2D image
[0111] p9 represents the pixel coordinates of the outer corner of the left eye in the 2D image.
[0112] S4. Calculate expression parameters based on the facial three-dimensional deformable identity parameters, facial three-dimensional deformable expression parameters, facial three-dimensional deformable texture parameters, head posture parameters and eye movement expression coefficients to obtain expression recognition content.
[0113] The facial 3D deformable expression parameters consist of 51 expressions based on the Facial Expression Coding System (FACS), and the algorithm network directly regresses the output. Figure 8 Shown are the first 15 expressions among the 51 expression parameters.
[0114] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] Although embodiments of the present invention have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0116] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.
[0117] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.
[0118] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0119] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A multi-task facial expression recognition method based on monocular RGB images, characterized in that: The method comprises: S1, obtaining an image to be identified; S2, input the image into a lightweight convolutional neural network with FasterOne network as a lightweight backbone network for training to obtain an output value; In S2, the feature map is taken as input, first passes through the FasterOne network and the average pooling layer, and then passes through 5 FC layers respectively, and outputs 5 parameters; Wherein, the FC layer includes FC1, FC2, FC3, FC4 and FC5; The FC1 outputs the three-dimensional deformable identity parameters of the face, expressed as α; the FC2 outputs the three-dimensional deformable expression parameters of the face, expressed as β; the FC3 outputs the three-dimensional deformable texture parameters of the face, expressed as γ; the FC4 outputs the posture parameters of the head, expressed as pose, and the FC5 outputs the coordinate parameters of the pupil key points; The output values include three-dimensional deformable identity parameters of the face, three-dimensional deformable expression parameters of the face, three-dimensional deformable texture parameters of the face, posture parameters of the head and pupil key point coordinate parameters; S3, calculating the eye movement expression coefficient according to the pupil key point coordinate parameters; S4, calculating expression parameters according to the three-dimensional deformable identity parameters of the face, the three-dimensional deformable expression parameters of the face, the three-dimensional deformable texture parameters of the face, the posture parameters of the head and the eye movement expression coefficient to obtain expression recognition content; The loss function of the lightweight convolutional neural network training includes a key point loss function, an image loss function and a loss function of human pupil coordinate regression; Wherein, the key point loss function and the image loss function are subjected to self-supervisory training; Wherein, the loss function of the human eye pupil coordinate regression is supervised training; The self-supervised training is specifically to convert 3D supervision into 2D supervision, and the self-supervised training is performed using the 2D points reprojected after 3D reconstruction of the face and the facial key point annotation information of the 2D image, wherein the loss function of the self-supervised training includes a key point loss function and an image loss function, which are specifically expressed as follows: The key point loss function L landmark It is expressed as: Among them, w i represents the weight of each key point of the face; L and L' represent the key points of the face in the original image and the key points of the projection respectively; ||·|| 2 represents the mean square error, i represents the key point index; The image loss function L image It is expressed as: Where M represents the mask of each region, and the mask part is obtained by segmenting the face of the original image; I and I' represent the original image and the rendered image respectively; ||·||2 represents the root mean square error; i represents the pixel index; The supervised training function is the loss function L of the pupil coordinates of the human eye landmark_pupil , which is expressed as follows: Among them, Pup and Pup' are the coordinates of the key points of the human pupil marked in the original image and the coordinates of the key points of the human pupil predicted by the network respectively; ||·|| 2 represents the mean square error; i represents the key point index of the pupil; After training the loss function, the final facial expression recognition model is obtained, which is specifically: The total loss function L of the facial expression recognition model is total as follows: L total =w landmark L landmark +w image L image +(1-w landmark -w image )L landmark_pupil where w landmark and w image are the weight coefficients of the loss of pupil coordinates of the human eye and the image loss function in the overall loss. By changing the values of α and β to adjust the weights of different loss functions, the model is trained to obtain the final facial expression recognition model. Wherein, the S3 specifically includes: The 2D pupil is marked according to the pupil key point coordinate parameters outputted in step S2, and the coordinates of the 7 key points of each eye are obtained. The eye movement expression coefficient of the pupil is calculated using the coordinates of the 7 key points of the eye, which is expressed as follows: Right eye movement expression coefficient L exp_right_pupil , which is expressed as follows: Where p7 represents the pixel coordinates of the right eye pupil center in the 2D image, p2 represents the pixel coordinates of the inner corner of the right eye in the 2D image p1 represents the pixel coordinates of the outer corner of the right eye in the 2D image, Left eye movement expression coefficient L exp_left_pupil , which is expressed as follows: where p 14 Represents the pixel coordinates of the left eye pupil center in the 2D image, p8 represents the pixel coordinates of the inner corner of the left eye in the 2D image p9 represents the pixel coordinates of the outer corner of the left eye in the 2D image.
2. The multi-task facial expression recognition method based on monocular RGB image according to claim 1, characterized in that: The FasterOne network includes two convolutional layers, three FasterOneBlock layers and one maximum pooling layer.
3. The multi-task facial expression recognition method based on monocular RGB image according to claim 2, characterized in that: The two convolutional layers include a convolutional layer conv1 and a convolutional layer conv5; the convolutional layer conv1 passes through 24 groups of 3x3 convolution kernels with a step size of 2; the convolutional layer conv5 passes through 1024 groups of 1x1 convolution kernels with a step size of 1; the maximum pooling layer is the pooling layer Maxpool1, and the size of the pooling layer Maxpool1 is 3x3 with a step size of 2.
4. The multi-task facial expression recognition method based on monocular RGB image according to claim 2, characterized in that: The three FasterOneBlock layers include FasterOneStage1, FasterOneStage2 and FasterOneStage3; The FasterOneStage1 continuously passes through one FasterOneBlock_1 and three FasterOneBlock_2; The FasterOneStage2 passes through 1 FasterOneBlock_1 and 7 FasterOneBlock_2 continuously; The FasterOneStage3 continuously passes through 1 FasterOneBlock_1 and 3 FasterOneBlock_2; Wherein, the FasterOneBlock_1 specifically includes: The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch does not perform any operation, and the right branch is composed of continuous 1x1 Point-Wise Convolution, 3x3 Partial Convolution and 1x1Point-WiseConvolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output; The FasterOneBlock_2 specifically includes: The feature map calculated by the convolution layer conv1 is divided into two branches. The left branch is composed of continuous 3x3PartialConvolution and 1x1 Point-Wise Convolution, and the right branch is composed of continuous 1x1Point-Wise Convolution, 3x3PartialConvolution and 1x1Point-Wise Convolution. The two branches are merged by the concat operation, followed by channel shuffle, and then the preprocessed feature map is output.
5. The multi-task facial expression recognition method based on monocular RGB image according to claim 4, characterized in that: The S2 includes: In the FasterOne network, the image to be recognized is sequentially input into the convolutional layer conv1, the maximum pooling layer, and FasterOneStage1, FasterOneStage2, FasterOneStage3, and the convolutional layer conv5.
6. The multi-task facial expression recognition method based on monocular RGB image according to claim 1, characterized in that: The three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face are calculated as follows: Where S is the three-dimensional face shape, is the average 3D face shape, T is the 3D face texture, is the average 3D face texture, A id and A tex are the PCA basis of identity and texture, respectively, A exp is the expression base, α, β, and γ represent the three-dimensional deformable identity parameter of the face, the three-dimensional deformable expression parameter of the face, and the three-dimensional deformable texture parameter of the face, respectively.
