A facial parameter recognition method, device, electronic device and storage medium
By directly inputting the target face image into the facial parameter recognition model, the key point recognition step of the face is omitted, which solves the problem of insufficient real-time and speed of the facial capture system in the existing technology, achieves efficient facial parameter recognition, and is suitable for virtual reality. Anchors and virtual social scenes.
Patent Information
- Application Number
- CN202110071434.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-19
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-01-19
AI Technical Summary
Existing facial capture systems have shortcomings in real-time performance and capture speed. In particular, they require facial parameter recognition through depth cameras and cumbersome optical wearable devices or obtaining key points in images in advance, which makes it difficult to meet the needs of facial capture.
By directly inputting the target face image into the facial parameter recognition model, the sequentially connected image processing network, feature extraction network and output network are used to obtain facial expression parameters, shape parameters and posture parameters, eliminating the step of facial key point recognition. , to achieve real-time facial parameter recognition.
It improves the recognition speed and real-time performance of facial parameters, reduces equipment costs and computing delays, and is suitable for virtual anchors and virtual social scenes.
Smart Images

Figure CN112818772B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a facial parameter recognition method, device, electronic device and storage medium. Background Art
[0002] The facial capture system can identify the user's facial parameters, and then apply the identified facial parameters to the 3D face model, thereby driving the 3D face model to display the same facial expressions.
[0003] Existing facial capture systems can be divided into two categories. One is to use special optical wearable devices, combined with some basic correction and calibration to capture human faces, which requires a depth camera to capture facial information; the other is to obtain the facial key points of the image in advance, and then calculate the facial parameters through relevant algorithms to obtain facial parameters. However, the first method is more cumbersome to use and the equipment is more expensive; the second method requires identifying the key points of the corresponding face, and it takes a certain amount of time to identify the key points of the face from the face image, so there are obvious deficiencies in real-time and capture speed, and it is difficult to meet the needs of facial capture. Summary of the invention
[0004] In view of this, the embodiments of the present application at least provide a facial parameter recognition method, device, electronic device and storage medium, which can ensure the real-time recognition of facial parameters and improve the recognition speed of facial parameters.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, an embodiment of the present application provides a method for identifying facial parameters, the method comprising:
[0007] Obtain a target face image to be identified; the target face image is an RGB three-channel image;
[0008] Inputting the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image;
[0009] Wherein, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters.
[0010] In a possible implementation, the facial parameter recognition model is composed of an image processing network, a feature extraction network, and an output network connected in sequence; the step of inputting the target facial image into the facial parameter recognition model to obtain the target facial parameters corresponding to the target facial image includes:
[0011] Inputting the target face image into the image processing network to obtain a face feature image;
[0012] Inputting the facial feature image into the feature extraction network to obtain a first feature parameter in the facial feature image;
[0013] Based on the first feature parameters and the output network, target facial parameters corresponding to the target facial image are obtained.
[0014] In a possible implementation, obtaining target facial parameters corresponding to the target facial image based on the first feature parameters and the output network includes:
[0015] Inputting the first feature parameter into the output network to obtain the face posture parameter and the second feature parameter;
[0016] The face shape parameter and the face expression parameter are obtained based on the first feature parameter and the second feature parameter.
[0017] In a possible implementation, the feature extraction network is composed of at least two sub-extraction layers connected sequentially; and the step of inputting the facial feature image into the feature extraction network to obtain the first feature parameter in the facial feature image includes:
[0018] Inputting the facial feature image into the first sub-extraction layer to obtain current feature parameters;
[0019] The current feature parameter is input into the next sub-extraction layer to obtain an intermediate feature parameter; if there is a next sub-extraction layer, the intermediate feature parameter is used as the current feature parameter, and the step is re-executed to input the current feature parameter into the next sub-extraction layer to obtain an intermediate feature parameter; if there is no next sub-extraction layer, the intermediate feature parameter obtained for the last time is output as the first feature parameter.
[0020] In a possible implementation, the facial parameter recognition model is trained according to the following steps:
[0021] Obtaining a plurality of first sample face images, coordinates of real face key points corresponding to each sample face image, and real face parameters;
[0022] Inputting each first sample face image into the initial deep network learning model to obtain predicted face parameters corresponding to the first sample face image; and obtaining the coordinates of predicted face key points corresponding to the first sample face image based on the predicted face parameters corresponding to each first sample face image;
[0023] Obtaining a loss value by comparing the coordinates of the real face key points of each first sample face image with the coordinates of the predicted face key points, and by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters;
[0024] When the loss value is less than or equal to a preset threshold, the training of the initial deep network learning model is stopped to obtain a trained facial parameter recognition model.
[0025] In a possible implementation, the first sample face image is obtained according to the following steps:
[0026] Acquire a second sample face image, and identify facial key points from the second sample face image;
[0027] Based on the coordinates of the facial key points in the second sample facial image, obtaining sample facial parameters corresponding to the second sample facial image;
[0028] Adjusting the sample facial parameters corresponding to the second sample facial image to obtain adjusted facial parameters, and determining, based on the adjusted facial parameters, an extended sample facial image corresponding to the adjusted facial parameters;
[0029] The extended sample face image and the second sample face image are both used as the first sample face image.
[0030] In a possible implementation manner, adjusting the sample facial parameters corresponding to the second sample facial image to obtain the adjusted facial parameters includes:
[0031] The facial posture parameters and / or facial expression parameters in the sample facial parameters corresponding to the second sample facial image are adjusted to obtain adjusted facial parameters.
[0032] In one possible implementation, the loss value is calculated according to the following formula:
[0033]
[0034] Where a is the number of face keys extracted from the first sample face image, is the weight corresponding to each facial key point, is the coordinate of the predicted facial key points corresponding to the first sample face image, is the coordinate of the real face key points corresponding to the first sample face image, u is the weight coefficient corresponding to the facial parameters, b is the parameter dimension of the face shape parameters, is the weight coefficient corresponding to each dimension parameter, is the predicted face shape parameter corresponding to the first sample face image, is the real face shape parameter corresponding to the first sample face image, c is the parameter dimension of the facial expression parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted facial expression parameter corresponding to the first sample face image, is the real facial expression parameter corresponding to the first sample face image, d is the parameter dimension of the facial posture parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted face pose parameter corresponding to the first sample face image, is the real face posture parameter corresponding to the first sample face image.
[0035] In a possible implementation manner, after obtaining the target facial parameters corresponding to the target facial image, the recognition method further includes:
[0036] Based on the target facial parameters corresponding to the target facial image, a three-dimensional facial model corresponding to the target facial image is obtained.
[0037] In a possible implementation, the identification method is applied to at least one of the following usage scenarios:
[0038] Virtual anchor scene; virtual social scene.
[0039] In a second aspect, an embodiment of the present application further provides a facial parameter recognition device, the recognition device comprising:
[0040] An acquisition module is used to acquire a target face image to be identified; the target face image is an RGB three-channel image;
[0041] A determination module, used for inputting the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image;
[0042] Wherein, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters.
[0043] In a possible implementation, the facial parameter recognition model is composed of an image processing network, a feature extraction network and an output network connected in sequence; the first determination module includes:
[0044] A first determining unit, configured to input the target face image into the image processing network to obtain a face feature image;
[0045] A second determining unit, configured to input the facial feature image into the feature extraction network to obtain a first feature parameter in the facial feature image;
[0046] The third determination unit is used to obtain target facial parameters corresponding to the target facial image based on the first feature parameters and the output network.
[0047] In a possible implementation manner, the third determining unit is configured to determine the target facial parameters corresponding to the target facial image according to the following steps:
[0048] Inputting the first feature parameter into the output network to obtain the face posture parameter and the second feature parameter;
[0049] The face shape parameter and the face expression parameter are obtained based on the first feature parameter and the second feature parameter.
[0050] In a possible implementation manner, the feature extraction network is composed of at least two sub-extraction layers connected sequentially; and the second determination unit is used to determine the first feature parameter in the face feature image according to the following steps:
[0051] Inputting the facial feature image into the first sub-extraction layer to obtain current feature parameters;
[0052] The current feature parameter is input into the next sub-extraction layer to obtain an intermediate feature parameter; if there is a next sub-extraction layer, the intermediate feature parameter is used as the current feature parameter, and the step is re-executed to input the current feature parameter into the next sub-extraction layer to obtain an intermediate feature parameter; if there is no next sub-extraction layer, the intermediate feature parameter obtained for the last time is output as the first feature parameter.
[0053] In a possible implementation, the recognition device further includes a training module; the training module is used to train the facial parameter recognition model according to the following steps:
[0054] Obtaining a plurality of first sample face images, coordinates of real face key points corresponding to each sample face image, and real face parameters;
[0055] Inputting each first sample face image into the initial deep network learning model to obtain predicted face parameters corresponding to the first sample face image; and obtaining the coordinates of predicted face key points corresponding to the first sample face image based on the predicted face parameters corresponding to each first sample face image;
[0056] Obtaining a loss value by comparing the coordinates of the real face key points of each first sample face image with the coordinates of the predicted face key points, and by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters;
[0057] When the loss value is less than or equal to a preset threshold, the training of the initial deep network learning model is stopped to obtain a trained facial parameter recognition model.
[0058] In a possible implementation, the training module includes:
[0059] An acquisition unit, used to acquire a second sample face image and identify facial key points from the second sample face image;
[0060] a fourth determining unit, configured to obtain sample facial parameters corresponding to the second sample facial image based on the coordinates of facial key points in the second sample facial image;
[0061] an expansion unit, configured to adjust the sample facial parameters corresponding to the second sample facial image to obtain adjusted facial parameters, and determine, based on the adjusted facial parameters, an expanded sample facial image corresponding to the adjusted facial parameters;
[0062] A fifth determining unit is configured to use both the extended sample face image and the second sample face image as the first sample face image.
[0063] In a possible implementation manner, the expansion unit is used to obtain the adjusted facial parameters according to the following steps:
[0064] The facial posture parameters and / or facial expression parameters in the sample facial parameters corresponding to the second sample facial image are adjusted to obtain adjusted facial parameters.
[0065] In a possible implementation, the training module is used to calculate the loss value according to the following formula:
[0066]
[0067] Where a is the number of face keys extracted from the first sample face image, is the weight corresponding to each facial key point, is the coordinate of the predicted facial key points corresponding to the first sample face image, is the coordinate of the real face key points corresponding to the first sample face image, u is the weight coefficient corresponding to the facial parameters, b is the parameter dimension of the face shape parameters, is the weight coefficient corresponding to each dimension parameter, is the predicted face shape parameter corresponding to the first sample face image, is the real face shape parameter corresponding to the first sample face image, c is the parameter dimension of the facial expression parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted facial expression parameter corresponding to the first sample face image, is the real facial expression parameter corresponding to the first sample face image, d is the parameter dimension of the facial posture parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted face pose parameter corresponding to the first sample face image, is the real face posture parameter corresponding to the first sample face image.
[0068] In a possible implementation manner, the identification device further includes a second determination module;
[0069] The second determination module is used to obtain a three-dimensional face model corresponding to the target face image based on the target facial parameters corresponding to the target face image.
[0070] In a possible implementation, the identification device is applied to at least one of the following usage scenarios:
[0071] Virtual anchor scene; virtual social scene.
[0072] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the facial parameter recognition method described in the first aspect or any possible implementation manner of the first aspect.
[0073] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the facial parameter recognition method described in the first aspect or any possible implementation scheme of the first aspect are executed.
[0074] The facial parameter recognition method, device, electronic device and storage medium provided in the embodiments of the present application can obtain the target facial parameters corresponding to the target facial image in real time by directly inputting the acquired target facial image to be recognized into the facial parameter recognition model without identifying the facial key points. Compared with the prior art that uses special optical wearable devices in combination with some basic corrections and calibrations to capture facial information, and needs to use a depth camera to capture facial information, which is cumbersome to use and the equipment is relatively expensive, or first obtains the facial key points of the image in advance, and then calculates the facial parameters through relevant algorithms to obtain the facial parameters, it takes a certain amount of time to identify the facial key points from the facial image, so there are obvious deficiencies in both real-time and capture speed, and it is difficult to meet the needs of facial capture. Compared with this, the present application can save the time spent on identifying facial key points from the target facial image, on the one hand, it can ensure the real-time nature of identifying facial parameters, and on the other hand, it can improve the recognition speed of facial parameters.
[0075] Furthermore, the facial parameter recognition method provided in the embodiment of the present application can also adjust the sample facial parameters corresponding to the second sample facial image to obtain adjusted facial parameters, and based on the adjusted facial parameters, determine the extended sample facial image corresponding to the adjusted facial parameters, and use both the extended sample facial image and the second sample facial image as the first sample facial image. In this way, sample facial images of the same person containing various facial postures, facial shapes and facial expressions can be obtained, that is, sample facial images of more postures are obtained, which can improve the accuracy of the facial parameter recognition model in recognizing target facial images of various postures.
[0076] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0078] Figure 1 A flowchart of a facial parameter recognition method provided by an embodiment of the present application is shown;
[0079] Figure 2 A schematic diagram of the structure of a facial parameter recognition model is shown;
[0080] Figure 3One of the functional module diagrams of a facial parameter recognition device provided in an embodiment of the present application is shown;
[0081] Figure 4 Shows Figure 3 A functional module diagram of the first determining module in;
[0082] Figure 5 A second functional module diagram of a facial parameter recognition device provided in an embodiment of the present application is shown;
[0083] Figure 6 Shows Figure 5 Functional module diagram of the training module in ;
[0084] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0085] Description of main component symbols:
[0086] In the figure: 300-facial parameter recognition device; 310-acquisition module; 320-first determination module; 321-first determination unit; 322-second determination unit; 323-third determination unit; 330-training module; 331-acquisition unit; 332-fourth determination unit; 333-expansion unit; 334-fifth determination unit; 340-second determination module; 700-electronic device; 710-processor; 720-memory; 730-bus. DETAILED DESCRIPTION
[0087] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0088] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0089] In order to enable those skilled in the art to use the contents of this application, the following implementation is given in combination with the specific application scenario "facial capture". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0090] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario requiring facial capture. The embodiments of the present application are not limited to specific application scenarios. Any solution of the facial parameter recognition method and device provided by the embodiments of the present application is within the protection scope of the present application.
[0091] It is worth noting that before this application was filed, the relevant facial capture systems can be mainly divided into two categories. One is to capture the face through special optical wearable devices, combined with some basic corrections and calibrations, and needs to use a depth camera to capture facial information; the other is to first obtain the facial key points of the image in advance, and then calculate the facial parameters through relevant algorithms to obtain the facial parameters. However, the first method is more cumbersome to use and the equipment is more expensive; the second method requires the identification of the key points of the corresponding face, and it takes a certain amount of time to identify the facial key points from the face image, so there are obvious deficiencies in real-time and capture speed, and it is difficult to meet the needs of facial capture.
[0092] In view of the above problems, the embodiment of the present application directly inputs the acquired target face image to be identified into the facial parameter recognition model without identifying the key points of the face, so that the target facial parameters corresponding to the target face image can be obtained in real time, wherein the target face image is an RGB three-channel image, and the target facial parameters include facial expression parameters, facial shape parameters, and facial posture parameters. In this way, the time spent on identifying the key points of the face from the target face image can be saved, which can ensure the real-time nature of identifying the facial parameters on the one hand, and improve the recognition speed of the facial parameters on the other hand.
[0093] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0094] Figure 1 A flow chart of a facial parameter recognition method provided by an embodiment of the present application. Figure 1 As shown, the facial parameter recognition method provided in the embodiment of the present application includes the following steps:
[0095] S101: Acquire a target face image to be identified; the target face image is an RGB three-channel image.
[0096] In a specific implementation, in order to identify the facial parameters corresponding to a face image, it is necessary to first obtain the target face image to be identified. Here, the target face image obtained in this application is an RGB three-channel image. Then, the obtained RGB three-channel image can be directly input into the facial parameter recognition model.
[0097] It should be noted that an RGB three-channel image is also called a full-color image. The image has three channels. RGB represents the colors of the three channels: red, green, and blue. An RGB image is an M*N*3 color pixel array, where each color pixel is a three-value group. These three values correspond to the red, green, and blue components of the RGB image at a specific spatial position, respectively. M*N is the size of each pixel.
[0098] S102: Input the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image.
[0099] In a specific implementation, after obtaining the target face image to be identified, the target face image can be directly input into the facial parameter recognition model. The target facial parameters corresponding to the target face image can be directly obtained without identifying the facial key points from the target face image. In this way, the time spent on identifying the facial key points from the target face image is saved, the recognition speed of the facial parameters can be accelerated, and then, the real-time nature of obtaining the facial parameters from the target face image is guaranteed, avoiding calculation delays.
[0100] It should be noted that in the related technology, it is first necessary to identify the facial key points from the acquired facial image, and then determine the facial parameters corresponding to the facial image based on the facial key points. However, this method requires extra time to obtain the facial key points, increases the calculation workload, and increases the calculation time, resulting in a slower calculation speed for facial parameters.
[0101] Wherein, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters.
[0102] Here, facial parameters include but are not limited to facial expression parameters, facial shape parameters and facial posture parameters; wherein, facial expression parameters are used to characterize human facial expressions, and facial expressions include but are not limited to anger, fear, happiness, sadness, disgust, surprise, and contempt; facial shape parameters are used to characterize human facial shapes, and facial shapes include but are not limited to round face shape, oval face shape, ovate face shape, inverted oval face shape, square face shape, rectangular face shape, trapezoidal face shape, inverted trapezoidal face shape, diamond face shape, and pentagonal face shape; facial posture parameters are used to characterize human head posture, and in terms of posture, the human head is restricted to 3 degrees of freedom, namely pitch, bank and yaw angle.
[0103] It should be noted that the subject that executes the facial parameter recognition method provided by the present application can be a terminal device or a server that interacts with the terminal device. Here, if the subject that executes the facial parameter recognition method provided by the present application is a terminal device, the facial parameter recognition model is required to be a small model, that is, the scale of the facial parameter recognition model is smaller, so that it is convenient to deploy the facial parameter recognition model on the terminal device. Since the facial parameter recognition method in the present application does not need to obtain the key points of the face, the present application is more prominent in terms of process convenience and running speed. Based on the Openvino forward framework, it is measured on the Intel i7-8700K CPU that the single run time only takes less than 1 millisecond, so that the real-time recognition of facial parameters and the recognition speed can be well guaranteed.
[0104] Further, after obtaining the target facial parameters corresponding to the target facial image in S102, the method further includes the following steps:
[0105] Based on the target facial parameters corresponding to the target facial image, a three-dimensional facial model corresponding to the target facial image is obtained.
[0106] In specific implementation, in some usage scenarios, it is necessary to establish a 3D face model that is consistent with the user's facial expression, so that the same facial expression as the user can be displayed on the terminal device through the 3D face model. Specifically, the user's facial image can be collected in real time, and the facial parameters corresponding to each facial image can be obtained in real time, and each facial parameter is applied to the 3D face model in chronological order, so that the same facial expression as the user can be displayed in real time on the terminal device through the 3D face model.
[0107] Here, the facial parameter recognition method provided by the present application can be applied to virtual anchor scenes and virtual social scenes. For virtual anchor scenes, during live broadcast, the anchor's facial image can be obtained in real time, the facial parameters corresponding to each facial image can be determined, and a cartoon image consistent with the anchor's expression can be displayed in real time in the form of a 3D facial model; for virtual social scenes, when users interact with each other, the facial images of each user can be obtained in real time, the facial parameters corresponding to each facial image can be determined, and a cartoon image consistent with the expression of each user can be displayed in real time in the form of a 3D facial model.
[0108] Further, the internal structure and working principle of the facial parameter identification model are described below. Figure 2 As shown, Figure 2 A schematic diagram of the structure of a facial parameter recognition model is shown, wherein the facial parameter recognition model is composed of an image processing network, a feature extraction network and an output network connected in sequence; in step S102, the target face image is input into the facial parameter recognition model to obtain the target facial parameters corresponding to the target face image, including the following steps:
[0109] Step a1: input the target face image into the image processing network to obtain a face feature image.
[0110] In a specific implementation, the target face image is first input into the image processing network in the facial parameter recognition model to obtain a facial feature image with facial features.
[0111] Here, the image processing network is a convolutional network, which extracts facial features from the target face image through convolution to obtain a facial feature image.
[0112] Step a2: inputting the facial feature image into the feature extraction network to obtain the first feature parameter in the facial feature image.
[0113] In a specific implementation, after obtaining the facial feature image, the facial feature image is used as the input of the feature extraction network in the facial parameter recognition model, and the first feature parameter in the facial feature image is used as the output. Here, the first feature parameter is a parameter that characterizes the facial feature.
[0114] It should be noted that the feature extraction network is a convolutional block network, which is used to extract feature parameters representing facial structure from facial feature images.
[0115] Furthermore, the feature extraction network is composed of at least two sub-extraction layers connected in sequence. In step a2, the face feature image is input into the feature extraction network to obtain the first feature parameter in the face feature image, which includes the following steps:
[0116] Input the facial feature image into the first sub-extraction layer to obtain current feature parameters; input the current feature parameters into the next sub-extraction layer to obtain intermediate feature parameters; if there is a next sub-extraction layer, use the intermediate feature parameters as the current feature parameters, and re-execute the step of inputting the current feature parameters into the next sub-extraction layer to obtain intermediate feature parameters; if there is no next sub-extraction layer, output the intermediate feature parameters obtained for the last time as the first feature parameters.
[0117] In a specific implementation, the feature extraction network is composed of a plurality of sequentially connected sub-extraction layers. The facial feature image output by the image processing network is first input into the first sub-extraction layer for feature extraction to obtain intermediate feature parameters. Then, the intermediate feature parameters are input into the next sub-extraction layer. The above process of inputting the intermediate feature parameters into the sub-extraction layer is repeated until there is no next sub-extraction layer, and the intermediate feature parameters obtained for the last time are output as the first feature parameters. The first feature parameters are the output of the feature extraction network.
[0118] Step a3: Based on the first feature parameters and the output network, obtain the target facial parameters corresponding to the target facial image.
[0119] In a specific implementation, the first feature parameter output by the feature extraction network is input into the output network, and the target facial parameters corresponding to the target face image can be finally obtained. Here, the recognition of the target facial parameters depends on the first feature parameter output by the feature extraction network and the content output by the output network.
[0120] It should be noted that the output network is a convolutional network, which is used to perform further feature extraction on the first feature parameter to obtain the target facial parameters corresponding to the target face image.
[0121] Here, the process of jointly obtaining the target facial parameters corresponding to the target facial image by the feature extraction network and the output network is described, that is, in step a3, obtaining the target facial parameters corresponding to the target facial image based on the first feature parameters and the output network includes the following steps:
[0122] The first feature parameter is input into the output network to obtain the face posture parameter and the second feature parameter; based on the first feature parameter and the second feature parameter, the face shape parameter and the face expression parameter are obtained.
[0123] In a specific implementation, the first feature parameter output by the feature extraction network is input into the output network to obtain the face posture parameter and the second feature parameter, the first feature parameter and the second feature parameter are merged and connected to obtain the face shape parameter and the face expression parameter, and then the target facial parameter corresponding to the target face image is obtained.
[0124] It should be noted that the facial parameter recognition model provided in this application is a deep neural network model. The model structure of the facial parameter recognition model is similar to the model structure of the mobile network model (MobileNetV3). The difference is that the facial parameter recognition model in this application has a merged connection structure, while MobileNetV3 does not have this structure. The facial parameter recognition model outputs facial parameters, and the MobileNetV3 model outputs categories.
[0125] Here, the strides of each sub-extraction layer in the feature extraction network can be different, the dimensions of the intermediate feature parameters input to each extraction layer can be different, and the target face image is an RGB three-channel image, for example, a 3*112*112 face image.
[0126] Furthermore, the facial parameter recognition model is a model obtained by training multiple sample facial images and sample facial parameters associated with each sample facial image, that is, the facial parameter model is a model obtained by learning the relationship between each sample facial image and the sample facial parameters corresponding to the sample facial image, wherein the facial parameter recognition model is a deep neural network learning model. The training process of the facial parameter recognition model is described below, that is, the facial parameter recognition model is trained according to the following steps:
[0127] Step b1: obtaining a plurality of first sample face images, coordinates of real face key points corresponding to each sample face image, and real facial parameters.
[0128] In a specific implementation, a large number of first sample face images, the coordinates of the real face key points corresponding to each sample face image, and the real facial parameters corresponding to each sample face image are first obtained. Here, the real face key points of each first sample face image can reflect the real position of the face key points in the first sample face image. Further, the process of obtaining the first sample face images is described below. The process of obtaining the first sample face images includes:
[0129] Acquire a second sample facial image, and identify facial key points from the second sample facial image; obtain sample facial parameters corresponding to the second sample facial image based on the coordinates of the facial key points in the second sample facial image; adjust the sample facial parameters corresponding to the second sample facial image to obtain adjusted facial parameters, and determine an extended sample facial image corresponding to the adjusted facial parameters based on the adjusted facial parameters; and use both the extended sample facial image and the second sample facial image as the first sample facial image.
[0130] In a specific implementation, a large number of second sample facial images are obtained, where the second sample facial images may be facial images obtained from the Internet. Facial key points may be first identified from the second sample facial images, and then the coordinates of the facial key points in the second sample facial images and a traditional facial parameter recognition algorithm may be used to obtain sample facial parameters corresponding to each second sample facial image. For each second sample facial image, the sample facial parameters corresponding to each second sample facial image are adjusted to obtain adjusted facial parameters. Here, the sample facial parameters of each second sample facial image may be adjusted in a variety of ways, and a plurality of adjusted facial parameters corresponding to each second sample facial image may be obtained, each adjusted facial parameter corresponding to an extended sample facial image. In this way, a plurality of extended sample facial images may be obtained through a second sample facial image, where the second sample facial image and the corresponding extended sample facial image are facial images of the same person, but the facial parameters in the images are different. Furthermore, all the extended sample face images and the second sample face images can be used as the first sample face images. In this way, the sample face images participating in the model training can include images of the same person with different postures, shapes and expressions. That is, the collected sample face image set is expanded with postures, expressions and shapes. Thus, the accuracy of the facial parameter recognition model in recognizing target face images in various postures can be improved.
[0131] Here, after obtaining the second sample face image, the traditional key point recognition method can be used to identify the real face key points from the second sample face image, and then the real facial parameters can be obtained based on the real face key points; after adjusting the real facial parameters of each second sample face image, the extended sample face image corresponding to the adjusted facial parameters can be obtained, and the second sample face image and the extended sample face image together constitute the first sample face image, so in the process of training the facial parameter recognition model, the first sample face image, as well as the real face key points and real facial parameters of each first sample face image can be directly obtained. Among them, the real face key points here are the face key points of the two-dimensional image.
[0132] In addition, after obtaining the real facial parameters of the second sample face image, a three-dimensional face mesh model (3D Mesh) can be established based on the real facial parameters of each second sample face image, and the real face key points can be directly extracted from the three-dimensional face mesh model, where the real face key points are the face key points of the three-dimensional image.
[0133] Here, the facial posture parameters and / or facial expression parameters in the sample facial parameters corresponding to the second sample facial image may be adjusted to obtain adjusted facial parameters.
[0134] In a specific implementation, since the face shape is relatively fixed, when adjusting the sample facial parameters of the second sample facial image, only the facial posture parameters and / or facial expression parameters may be adjusted to obtain multiple adjusted facial parameters of the second sample facial image.
[0135] It should be noted that the facial parameters can be adjusted by using the High-Fidelity Pose and Expression Normalization for Face Recognition (HPEN) algorithm.
[0136] Step b2: Input each first sample face image into the initial deep network learning model to obtain the predicted facial parameters corresponding to the first sample face image; and, based on the predicted facial parameters corresponding to each first sample face image, obtain the coordinates of the predicted facial key points corresponding to the first sample face image.
[0137] In a specific implementation, each first sample face image is input into an initial deep network learning model to obtain predicted facial parameters corresponding to the first sample face image, and a three-dimensional face mesh model is established based on the predicted facial parameters corresponding to each first sample face image. Then, the coordinates of the predicted facial key points corresponding to the first sample face image are extracted from the three-dimensional face mesh model.
[0138] Step b3: Obtain a loss value by comparing the coordinates of the real face key points of each first sample face image with the coordinates of the predicted face key points, and by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters.
[0139] In a specific implementation, for each first sample face image, the coordinates of the real face key points of the first sample face image can be compared with the coordinates of the predicted face key points to obtain the first loss of the first sample face image, and the second loss can be obtained by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters, and then, the loss value of the first sample face image can be obtained based on the first loss and the second loss.
[0140] Here, the loss value is calculated according to the following formula:
[0141]
[0142] Where a is the number of face keys extracted from the first sample face image, is the weight corresponding to each facial key point, is the coordinate of the predicted facial key points corresponding to the first sample face image, is the coordinate of the real face key points corresponding to the first sample face image, u is the weight coefficient corresponding to the facial parameters, b is the parameter dimension of the face shape parameters, is the weight coefficient corresponding to each dimension parameter, is the predicted face shape parameter corresponding to the first sample face image, is the real face shape parameter corresponding to the first sample face image, c is the parameter dimension of the facial expression parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted facial expression parameter corresponding to the first sample face image, is the real facial expression parameter corresponding to the first sample face image, d is the parameter dimension of the facial posture parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted face pose parameter corresponding to the first sample face image, is the real face posture parameter corresponding to the first sample face image.
[0143] Here, a is preferably 68, that is, 68 facial key points are preferably involved in the calculation; b is preferably 50, that is, 50-dimensional facial shape parameters are preferably used; c is preferably 51, that is, 51-dimensional facial expression parameters are preferably used; d is preferably 12, that is, 12-dimensional facial posture parameters are preferably used.
[0144] Step b5: When the loss value is less than or equal to a preset threshold, stop training the initial deep network learning model to obtain a trained facial parameter recognition model.
[0145] In a specific implementation, during the training of the facial parameter recognition model, each first sample face image participates in the training in turn, and each first sample face image corresponds to a loss value. During the training process, as time goes by, the loss value will gradually decrease. When the loss value corresponding to a first sample face image is less than or equal to a preset threshold, the training of the initial deep network learning model is stopped to obtain a trained facial parameter recognition model.
[0146] It should be noted that the process of training the initial deep network learning model to obtain the facial parameter recognition model is to first obtain a large number of sample face images, and the annotated facial key points and annotated sample facial parameters corresponding to each sample face image, and use the corresponding algorithm to predict the facial key points and the predicted sample facial parameters from the sample face images, and then, by comparing the coordinates of the annotated facial key points of each sample face image with the coordinates of the predicted facial key points, and by comparing the annotated sample facial parameters of the sample face image with the predicted sample facial parameters, the loss value of the sample face image is obtained. During the training process, when the loss value is less than or equal to the preset threshold, the training of the initial deep network learning model is stopped to obtain the trained facial parameter recognition model.
[0147] It should be noted that, the second sample face image is first collected, and the facial key points in the second sample face image can be obtained by using the traditional key point recognition method. Then, the face prior model (AMorphable Model ForThe Synthesis Of 3D Faces, 3DMM) and the identified facial key points are used to directly extract the sample facial parameters. Here, the sample facial parameters are real facial parameters, and each second sample face image and the sample facial parameters of the second sample face image constitute a sample pair as training data for the facial parameter recognition model.
[0148] In the embodiment of the present application, by directly inputting the acquired target face image to be identified into the facial parameter recognition model without identifying the key points of the face, the target facial parameters corresponding to the target face image can be obtained in real time, wherein the target face image is an RGB three-channel image, and the target facial parameters include facial expression parameters, facial shape parameters, and facial posture parameters. In this way, the time spent on identifying the key points of the face from the target face image can be saved, which can ensure the real-time nature of identifying the facial parameters on the one hand, and improve the recognition speed of the facial parameters on the other hand.
[0149] Based on the same application concept, the embodiments of the present application also provide a facial parameter recognition device corresponding to the facial parameter recognition method provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the facial parameter recognition method in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0150] Figure 3 One of the functional module diagrams of a facial parameter recognition device 300 provided in an embodiment of the present application is shown; Figure 4 Shows Figure 3 Functional module diagram of the first determination module 320 in FIG. Figure 5The second functional module diagram of a facial parameter recognition device 300 provided in an embodiment of the present application is shown; Figure 6 Shows Figure 5 Functional module diagram of the training module 330 in FIG.
[0151] In one possible implementation, Figure 3 As shown, the facial parameter recognition device 300 includes:
[0152] The acquisition module 310 is used to acquire a target face image to be identified; the target face image is an RGB three-channel image;
[0153] A first determination module 320, configured to input the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image;
[0154] Wherein, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters.
[0155] In one possible implementation, Figure 4 As shown, the facial parameter recognition model is composed of an image processing network, a feature extraction network and an output network connected in sequence; the first determination module 320 includes:
[0156] The first determining unit 321 is used to input the target face image into the image processing network to obtain a face feature image;
[0157] A second determining unit 322 is used to input the facial feature image into the feature extraction network to obtain a first feature parameter in the facial feature image;
[0158] The third determining unit 323 is used to obtain the target facial parameters corresponding to the target facial image based on the first feature parameters and the output network.
[0159] In one possible implementation, Figure 4 As shown, the third determining unit 323 is used to determine the target facial parameters corresponding to the target facial image according to the following steps:
[0160] Inputting the first feature parameter into the output network to obtain the face posture parameter and the second feature parameter;
[0161] The face shape parameter and the face expression parameter are obtained based on the first feature parameter and the second feature parameter.
[0162] In one possible implementation, Figure 4As shown, the feature extraction network is composed of at least two sub-extraction layers connected in sequence; the second determination unit 322 is used to determine the first feature parameter in the face feature image according to the following steps:
[0163] Inputting the facial feature image into the first sub-extraction layer to obtain current feature parameters;
[0164] The current feature parameter is input into the next sub-extraction layer to obtain an intermediate feature parameter; if there is a next sub-extraction layer, the intermediate feature parameter is used as the current feature parameter, and the step is re-executed to input the current feature parameter into the next sub-extraction layer to obtain an intermediate feature parameter; if there is no next sub-extraction layer, the intermediate feature parameter obtained for the last time is output as the first feature parameter.
[0165] In one possible implementation, Figure 5 As shown, the facial parameter recognition device 300 further includes a training module 330; the training module 330 is used to train the facial parameter recognition model according to the following steps:
[0166] Obtaining a plurality of first sample face images, coordinates of real face key points corresponding to each sample face image, and real face parameters;
[0167] Inputting each first sample face image into the initial deep network learning model to obtain predicted face parameters corresponding to the first sample face image; and obtaining the coordinates of predicted face key points corresponding to the first sample face image based on the predicted face parameters corresponding to each first sample face image;
[0168] Obtaining a loss value by comparing the coordinates of the real face key points of each first sample face image with the coordinates of the predicted face key points, and by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters;
[0169] When the loss value is less than or equal to a preset threshold, the training of the initial deep network learning model is stopped to obtain a trained facial parameter recognition model.
[0170] In one possible implementation, Figure 6 As shown, the training module 330 includes:
[0171] An acquisition unit 331 is used to acquire a second sample face image and identify facial key points from the second sample face image;
[0172] A fourth determining unit 332, configured to obtain sample facial parameters corresponding to the second sample facial image based on the coordinates of facial key points in the second sample facial image;
[0173] The expansion unit 333 is used to adjust the sample facial parameters corresponding to the second sample facial image to obtain the adjusted facial parameters, and determine the expanded sample facial image corresponding to the adjusted facial parameters based on the adjusted facial parameters;
[0174] The fifth determining unit 334 is configured to use both the extended sample face image and the second sample face image as the first sample face image.
[0175] In one possible implementation, Figure 6 As shown, the expansion unit 333 is used to adjust the facial parameters according to the following steps:
[0176] The facial posture parameters and / or facial expression parameters in the sample facial parameters corresponding to the second sample facial image are adjusted to obtain adjusted facial parameters.
[0177] In one possible implementation, Figure 6 As shown, the training module 330 is used to calculate the loss value according to the following formula:
[0178]
[0179] Where a is the number of face keys extracted from the first sample face image, is the weight corresponding to each facial key point, is the coordinate of the predicted facial key points corresponding to the first sample face image, is the coordinate of the real face key points corresponding to the first sample face image, u is the weight coefficient corresponding to the facial parameters, b is the parameter dimension of the face shape parameters, is the weight coefficient corresponding to each dimension parameter, is the predicted face shape parameter corresponding to the first sample face image, is the real face shape parameter corresponding to the first sample face image, c is the parameter dimension of the facial expression parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted facial expression parameter corresponding to the first sample face image, is the real facial expression parameter corresponding to the first sample face image, d is the parameter dimension of the facial posture parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted face pose parameter corresponding to the first sample face image, is the real face posture parameter corresponding to the first sample face image.
[0180] In one possible implementation, Figure 5As shown, the facial parameter recognition device 300 further includes a second determination module 340;
[0181] The second determination module 340 is used to obtain a three-dimensional face model corresponding to the target face image based on the target facial parameters corresponding to the target face image.
[0182] In one possible implementation, Figure 5 As shown, the facial parameter recognition device 300 is applied to at least one of the following usage scenarios:
[0183] Virtual anchor scene; virtual social scene.
[0184] In the implementation of this application, by directly inputting the acquired target face image to be identified into the facial parameter recognition model without identifying the key points of the face, the target facial parameters corresponding to the target face image can be obtained in real time, wherein the target face image is an RGB three-channel image, and the target facial parameters include facial expression parameters, facial shape parameters, and facial posture parameters. In this way, the time spent on identifying the key points of the face from the target face image can be saved, which can ensure the real-time nature of identifying the facial parameters on the one hand, and improve the recognition speed of the facial parameters on the other hand.
[0185] Based on the same application concept, see Figure 7 As shown, it is a structural diagram of an electronic device 700 provided in an embodiment of the present application, including: a processor 710, a memory 720 and a bus 730, wherein the memory 720 stores machine-readable instructions executable by the processor 710, and when the electronic device 700 is running, the processor 710 communicates with the memory 720 through the bus 730, and the machine-readable instructions are executed by the processor 710 when running to perform the steps of the facial parameter recognition method as described in any of the above embodiments.
[0186] Specifically, when the machine-readable instruction is executed by the processor 710, the following processing may be performed:
[0187] Obtain a target face image to be identified; the target face image is an RGB three-channel image;
[0188] Inputting the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image;
[0189] Wherein, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters.
[0190] In the embodiment of the present application, by directly inputting the acquired target face image to be identified into the facial parameter recognition model without identifying the key points of the face, the target facial parameters corresponding to the target face image can be obtained in real time, wherein the target face image is an RGB three-channel image, and the target facial parameters include facial expression parameters, facial shape parameters, and facial posture parameters. In this way, the time spent on identifying the key points of the face from the target face image can be saved, which can ensure the real-time nature of identifying the facial parameters on the one hand, and improve the recognition speed of the facial parameters on the other hand.
[0191] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the facial parameter recognition method provided in the above embodiment are executed.
[0192] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned facial parameter recognition method can be executed. By directly inputting the acquired target face image to be recognized into the facial parameter recognition model without the need to recognize facial key points, the target facial parameters corresponding to the target face image can be obtained in real time, which can ensure the real-time recognition of facial parameters and improve the recognition speed of facial parameters.
[0193] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0194] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0196] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, 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 to enable 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 application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0197] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for recognizing facial parameters, characterized in that: The identification method comprises: Obtain a target face image to be identified; the target face image is an RGB three-channel image; Inputting the target face image into an image processing network in a facial parameter recognition model to obtain a face feature image; Inputting the facial feature image into a feature extraction network in the facial parameter recognition model to obtain a first feature parameter in the facial feature image; Obtaining target facial parameters corresponding to the target facial image based on the first feature parameters and an output network in the facial parameter recognition model; Among them, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters; the facial parameter recognition model is a model obtained by training multiple sample facial images and sample facial parameters associated with each sample facial image, and the sample facial parameters associated with any of the sample facial images are obtained based on the coordinates of facial key points in the sample facial image; the facial parameter recognition model does not need to identify facial key points of the target facial image.
2. The identification method according to claim 1, characterized in that: The step of obtaining target facial parameters corresponding to the target facial image based on the first feature parameters and the output network includes: Inputting the first feature parameter into the output network to obtain the face posture parameter and the second feature parameter; The face shape parameter and the face expression parameter are obtained based on the first feature parameter and the second feature parameter.
3. The identification method according to claim 1, characterized in that: The feature extraction network is composed of at least two sub-extraction layers connected in sequence; the step of inputting the face feature image into the feature extraction network to obtain a first feature parameter in the face feature image comprises: Inputting the facial feature image into the first sub-extraction layer to obtain current feature parameters; The current feature parameter is input into the next sub-extraction layer to obtain an intermediate feature parameter; if there is a next sub-extraction layer, the intermediate feature parameter is used as the current feature parameter, and the step is re-executed to input the current feature parameter into the next sub-extraction layer to obtain an intermediate feature parameter; if there is no next sub-extraction layer, the intermediate feature parameter obtained for the last time is output as the first feature parameter.
4. The identification method according to claim 1, characterized in that: The facial parameter recognition model is trained according to the following steps: Obtaining a plurality of first sample face images, coordinates of real face key points corresponding to each sample face image, and real face parameters; Inputting each first sample face image into the initial deep network learning model to obtain predicted face parameters corresponding to the first sample face image; and obtaining the coordinates of predicted face key points corresponding to the first sample face image based on the predicted face parameters corresponding to each first sample face image; Obtaining a loss value by comparing the coordinates of the real face key points of each first sample face image with the coordinates of the predicted face key points, and by comparing the real sample facial parameters of the first sample face image with the predicted sample facial parameters; When the loss value is less than or equal to a preset threshold, the training of the initial deep network learning model is stopped to obtain a trained facial parameter recognition model.
5. The identification method according to claim 4, characterized in that: The first sample face image is obtained according to the following steps: Acquire a second sample face image, and identify facial key points from the second sample face image; Based on the coordinates of the facial key points in the second sample facial image, obtaining sample facial parameters corresponding to the second sample facial image; Adjusting the sample facial parameters corresponding to the second sample facial image to obtain adjusted facial parameters, and determining, based on the adjusted facial parameters, an extended sample facial image corresponding to the adjusted facial parameters; The extended sample face image and the second sample face image are both used as the first sample face image.
6. The identification method according to claim 5, characterized in that: The step of adjusting the sample facial parameters corresponding to the second sample facial image to obtain the adjusted facial parameters includes: The facial posture parameters and / or facial expression parameters in the sample facial parameters corresponding to the second sample facial image are adjusted to obtain adjusted facial parameters.
7. The identification method according to claim 4, characterized in that: The loss value is calculated according to the following formula: Where a is the number of face keys extracted from the first sample face image, is the weight corresponding to each facial key point, is the coordinate of the predicted facial key points corresponding to the first sample face image, is the coordinate of the real face key points corresponding to the first sample face image, u is the weight coefficient corresponding to the facial parameters, b is the parameter dimension of the face shape parameters, is the weight coefficient corresponding to each dimension parameter, is the predicted face shape parameter corresponding to the first sample face image, is the real face shape parameter corresponding to the first sample face image, c is the parameter dimension of the facial expression parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted facial expression parameter corresponding to the first sample face image, is the real facial expression parameter corresponding to the first sample face image, d is the parameter dimension of the facial posture parameter, is the weight coefficient corresponding to each dimension parameter, is the predicted face pose parameter corresponding to the first sample face image, is the real face posture parameter corresponding to the first sample face image.
8. The identification method according to claim 1, characterized in that: After obtaining the target facial parameters corresponding to the target facial image, the recognition method further includes: Based on the target facial parameters corresponding to the target facial image, a three-dimensional facial model corresponding to the target facial image is obtained.
9. The identification method according to claim 1, characterized in that: The identification method is applied to at least one of the following usage scenarios: Virtual anchor scene; virtual social scene.
10. A facial parameter recognition device, characterized in that: The identification device comprises: An acquisition module is used to acquire a target face image to be identified; the target face image is an RGB three-channel image; A first determination module is used to input the target face image into a facial parameter recognition model to obtain target facial parameters corresponding to the target face image; The first determining module comprises: A first determining unit, configured to input the target face image into an image processing network in the facial parameter recognition model to obtain a face feature image; A second determining unit, configured to input the facial feature image into a feature extraction network in the facial parameter recognition model to obtain a first feature parameter in the facial feature image; A third determining unit, configured to obtain target facial parameters corresponding to the target facial image based on the first feature parameters and an output network in the facial parameter recognition model; Among them, the target facial parameters include facial expression parameters, facial shape parameters and facial posture parameters; the facial parameter recognition model is a model obtained by training multiple sample facial images and sample facial parameters associated with each sample facial image, and the sample facial parameters associated with any of the sample facial images are obtained based on the coordinates of facial key points in the sample facial image; the facial parameter recognition model does not need to identify facial key points of the target facial image.
11. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the facial parameter recognition method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the facial parameter recognition method according to any one of claims 1 to 9 are executed.
