CN115953512A - Expression generation method, neural network training method, device, equipment and medium - Google Patents

Expression generation method, neural network training method, device, equipment and medium Download PDF

Info

Publication number
CN115953512A
CN115953512A CN202211716908.3A CN202211716908A CN115953512A CN 115953512 A CN115953512 A CN 115953512A CN 202211716908 A CN202211716908 A CN 202211716908A CN 115953512 A CN115953512 A CN 115953512A
Authority
CN
China
Prior art keywords
face
template
features
image data
face image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211716908.3A
Other languages
Chinese (zh)
Inventor
范锡睿
赵亚飞
张世昌
陈毅
杜宗财
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211716908.3A priority Critical patent/CN115953512A/en
Publication of CN115953512A publication Critical patent/CN115953512A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The disclosure provides an expression generation method, a neural network training method, an expression generation device, a neural network training device and a neural network training medium, and relates to the technical fields of virtual digital people, augmented reality, virtual reality, mixed reality, augmented reality, meta universe and the like. The expression generation method comprises the following steps: acquiring face image data; carrying out feature extraction on the face image data to obtain face features to be matched; determining a target face feature matched with the face feature to be matched in a plurality of predetermined template face features; determining face driving parameters based on the target face features; and according to the face driving parameters, driving and generating the face expression corresponding to the face image data.

Description

Expression generation method, neural network training method, device, equipment and medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to the technical fields of virtual digital people, augmented reality, virtual reality, mixed reality, augmented reality, and meta universe, and in particular, to an expression generation method, a neural network training method, an expression generation apparatus, a neural network training apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
Facial expression driving is a key technology in digital human application, and how to accurately and naturally drive facial expressions is a technical problem. Currently, the mainstream facial expression driving is usually based on an optical scheme, that is, a monocular/monocular camera is used to extract facial features from a facial image, and a virtual face is driven based on the extracted features.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The present disclosure provides an expression generation method, a neural network training method, an expression generation apparatus, a neural network training apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to an aspect of the present disclosure, an expression generation method is provided. The method comprises the following steps: acquiring face image data; carrying out feature extraction on the face image data to obtain face features to be matched; determining a target face feature matched with the face feature to be matched in a plurality of predetermined template face features; determining face driving parameters based on the target face features; and according to the face driving parameters, driving and generating the face expression corresponding to the face image data.
According to an aspect of the present disclosure, a method of training a neural network is provided. The method comprises the following steps: acquiring a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data; carrying out feature extraction on the plurality of template face image data to obtain a plurality of template face features; inputting each template face feature of the plurality of template face features into an initial parameter to generate a neural network so as to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face image data; and adjusting parameters of the initial parameter generation neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained parameter generation neural network.
According to another aspect of the present disclosure, an expression generating apparatus is provided. The device comprises: a first acquisition unit configured to acquire face image data; the first feature extraction unit is configured to perform feature extraction on the face image data to obtain face features to be matched; the matching unit is configured to determine a target face feature matched with the face feature to be matched from a plurality of template face features determined in advance; a determination unit configured to determine a face driving parameter based on the target face feature; and a driving unit configured to drive generation of a facial expression corresponding to the face image data according to the face driving parameter.
According to another aspect of the present disclosure, a training apparatus of a neural network is provided. The device comprises: a second acquisition unit configured to acquire a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data; a second feature extraction unit configured to perform feature extraction on the plurality of template face image data to obtain a plurality of template face features; a parameter generating unit configured to input each of the plurality of template face features into an initial parameter generating neural network, respectively, to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face images; and a first parameter adjusting unit configured to adjust parameters of the initial parameter generating neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained parameter generating neural network.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method described above.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above method.
According to another aspect of the disclosure, a computer program product is provided, comprising a computer program, wherein the computer program realizes the above method when executed by a processor.
According to one or more embodiments of the present disclosure, by matching the facial features to be matched extracted from the facial image data with a plurality of template facial features determined in advance, a target facial feature similar to the facial features to be matched but more standard, easier to identify and more beautiful can be obtained, and then a facial driving parameter can be determined based on the target facial feature, so as to obtain a more accurate, natural and beautiful facial expression.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to an embodiment of the present disclosure;
FIG. 2 shows a flow diagram of an expression generation method according to an example embodiment of the present disclosure;
FIG. 3 illustrates a flow diagram for feature extraction of face image data according to an exemplary embodiment of the present disclosure;
fig. 4 shows a flowchart of an expression generation method according to an exemplary embodiment of the present disclosure;
FIG. 5 shows a flow chart of a method of training a neural network according to an exemplary embodiment of the present disclosure;
fig. 6 shows a block diagram of an expression generation apparatus according to an exemplary embodiment of the present disclosure;
fig. 7 shows a block diagram of a training apparatus of a neural network according to an exemplary embodiment of the present disclosure; and
FIG. 8 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, it will be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to define a positional relationship, a temporal relationship, or an importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
In the three-dimensional facial expression driving method in the related art, because the facial expression difference of different driving persons is large, the size distribution of the facial form/five sense organs cannot be completely consistent, and therefore a series of unnatural expressions can be generated during actual driving.
In order to solve the problems, the face features to be matched extracted from the face image data are matched with the face features of the plurality of templates which are determined in advance, so that the target face features which are similar to the face features to be matched but are more standard, easier to identify and more attractive can be obtained, and further the face driving parameters can be determined based on the target face features, so that the more accurate, natural and attractive face expression can be obtained.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the disclosure, the server 120 may run one or more services or software applications that enable the expression generation methods to be performed.
In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In certain embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) network.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
A user may use client devices 101, 102, 103, 104, 105, and/or 106 for human-computer interaction. The client device may provide an interface that enables a user of the client device to interact with the client device, e.g., a camera in the client device may capture images of the user in real-time. The client device may also output information to the user via the interface, for example, the client may output a facial expression output by an expression generation method running on the server to the user. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablets, personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 can also run any of a variety of additional server applications and/or mid-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The database 130 may reside in various locations. For example, the data store used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The database 130 may be of different types. In certain embodiments, the database used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the databases in response to the commands.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or conventional stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
According to an aspect of the present disclosure, there is provided an expression generation method. As shown in fig. 2, the expression generation method includes: step S201, acquiring face image data; step S202, extracting the features of the face image data to obtain the features of the face to be matched; step S203, determining target face features matched with the face features to be matched from a plurality of predetermined template face features; step S204, determining face driving parameters based on the target face features; and step S205, according to the face driving parameters, driving to generate the face expression corresponding to the face image data.
Therefore, the human face features to be matched extracted from the human face image data are matched with the plurality of template human face features which are determined in advance, the target human face features which are similar to the human face features to be matched but are more standard, easier to identify and more attractive can be obtained, and then the human face driving parameters can be determined based on the target human face features so as to obtain more accurate, natural and attractive human face expressions.
In step S201, the face image data may be, for example, face image data acquired by a monocular camera or a monocular camera, or image data including a face acquired by other methods, which is not limited herein.
In step S202, feature extraction may be performed on the face image data in various ways to obtain a face feature. In some embodiments, feature extraction may be performed by using a conventional feature extraction method (e.g., a face key point detection method) without deep learning, or by using a deep learning neural network (e.g., a deep convolutional network DCNN). The face features to be matched can be face key point features or feature images.
In some embodiments, if feature extraction and 3D face driving are performed on facial image data frame by frame, the continuous relationship between previous and next frames is not considered, so that the expression is shaken or jumped, thereby affecting the user experience. Based on this, the present disclosure proposes a method for face driving based on face motion characteristics.
According to some embodiments, the face image data may include a plurality of face image frames which are continuously acquired, and the face features to be matched may characterize the motion of the face in the face image data between the plurality of face image frames. The face features to be matched can include, for example, motion features such as rotation and displacement of face key points in the face image data between a plurality of face image frames. Therefore, the finally generated facial expression is more coherent and natural by acquiring the face images of continuous multiple frames and extracting the face features representing the motion information of the face from the face images.
According to some embodiments, as shown in fig. 3, the step S202 of performing feature extraction on the face image data to obtain the face features to be matched may include: step S301, extracting the features of each face image frame in a plurality of face image frames to obtain a plurality of static face features corresponding to the plurality of face image frames; and step S302, determining the face features to be matched based on the plurality of static face features. By extracting the static features of each frame and further extracting the face features representing the motion information of the face based on the static features, the face features which are more precise and can reflect the change of the face motion between frames can be obtained, and the quality of the finally generated face expression is improved.
According to some embodiments, the plurality of face image frames may be acquired within a preset time interval, and each of the plurality of static face features may include a preset number of key point sequences. Step S302, determining the face features to be matched based on the plurality of static face features may include: and inputting a plurality of static human face features into the trained motion feature extraction neural network to obtain the human face features to be matched. The face features to be matched may include feature vectors of preset dimensions. By the method, more effective facial features to be matched can be obtained, and the quality of the finally generated facial expression is improved.
In one exemplary embodiment, the motion feature extraction neural network may employ a sequence model, such as a Long Short-Term Memory network (LSTM). The preset time interval may be 200ms, the preset number of key point sequences may be face 68 key point sequences, and the output face feature to be matched may be a 256-dimensional low-dimensional motion feature. It is understood that the above-mentioned arrangements are only exemplary, and can be adjusted according to actual requirements when implementing the method of the present disclosure, and are not limited herein.
In some embodiments, in step S202, a plurality of face image frames may also be directly processed to obtain a face feature to be matched, which represents motion information of a face. For example, a plurality of human face image frames can be directly input into a trained neural network to obtain feature vectors output by the neural network.
Before the expression generation method is executed, a facial motion feature library including a plurality of template facial features may be constructed in advance. According to some embodiments, the plurality of template face features may be determined by feature extraction of a plurality of template face image data. As described above, since the human image shapes of different drivers are different, the distribution of the facial shapes/facial features may not be completely consistent, and the amplitudes and details of facial movements of different drivers are not completely consistent when the drivers make the same expression, the facial expression may be unnatural if the corresponding facial driving parameters are obtained by directly using image features extracted from image data of the drivers. In addition, the image data of the driver and the corresponding image features may be "new" to a downstream unit or model generating the face driving parameters, and therefore, the parameter generating unit/model may not accurately capture expression information or details of the driver, so that the generated face driving parameters may not accurately represent the expression of the driver.
The method comprises the steps of acquiring template face image data of a large number of standard facial expression actions made by a model, extracting features of the image data to obtain a plurality of corresponding template face features, matching the facial expression actions of a user with the large number of standard facial expression actions of the model when generating face driving parameters, and acquiring the face driving parameters by using the template face features of the matched standard facial expression actions, so that a face driving parameter generating unit/model can better know the expression which a driver wants to embody, and the generated facial expression is more standard, more beautiful and more natural.
It can be understood that the extraction mode of the template face features may be consistent with the extraction mode of the face features to be matched. In one exemplary embodiment, the template face features may be 256-dimensional motion features obtained by processing the key point sequence of the face 68 of each of a plurality of model face image frames acquired within 200ms using an LSTM network.
In some embodiments, image data may be collected of the model as it makes different facial movements or expressions. Exemplary facial actions or expressions may include: medial eyebrow lift, lateral eyebrow lift, eyebrow droop, cheek lift, lip corner stretch, chin lift, closed eyes, blinking, and the like. In some embodiments, such label information may not be needed when using template facial features corresponding to such facial actions or expressions. In step S203, the target face features may be directly matched with the face features to be matched extracted from the face image data of the driver to determine the target face features; in step S204, the corresponding face driving parameters may be determined directly using the target face features, as will be described below.
According to some embodiments, the step S203 of determining the target face features matched with the face features to be matched from the plurality of template face features determined in advance may include: and performing similarity matching on the plurality of template face features and the face features to be matched so as to determine target face features in the plurality of template face features. By using similarity matching, the template face features closest to the face features to be matched can be obtained.
In some embodiments, a cosine distance may be used as a measure of similarity. In some embodiments, a kd-Tree or the like may be used to speed up the matching process.
According to some embodiments, the step S204 of determining the face driving parameters based on the target face features may include: and inputting the target face features into the trained parameters to generate a neural network so as to obtain face driving parameters.
Because neural networks are sensitive to input, poor quality input data (or training data) can result in the neural networks failing to output accurate results. Therefore, the face driving parameters capable of generating more accurate, natural and beautiful facial expressions can be obtained by using more standard, more easily recognized and more beautiful target face features.
In some embodiments, the parameter generating neural network may be trained using template facial features. In practical application, the input of the parameter generation neural network is the predetermined template face features and does not include the face features of different drivers, so that the neural network has no generalization requirement, and the template face features can be used for training the neural network. In addition, the neural network is used for modeling the mapping relations between the template face features and the face driving parameters, so that the mapping relations can be prevented from being directly stored, and the storage resources of the system are greatly saved.
According to some embodiments, the face driving parameters may include at least one of hybrid deformation weights and face bone parameters. It is understood that the face driving parameters may also include other parameters, and are not limited herein. In some embodiments, the face being driven may be a two-dimensional face or a three-dimensional face, and the face drive parameters may accordingly comprise two-dimensional face drive parameters or three-dimensional face drive parameters.
In some embodiments, as shown in fig. 4, the expression generation method may include the following steps.
And a front step S400, collecting a human face action feature library. In the pre-step, template facial image data of a large number of standard facial expression actions made by the model can be collected in advance, and the image data is input into a motion feature extraction neural network to obtain a plurality of corresponding template facial features (namely, a facial action feature library). It will be appreciated that the pre-step may be performed before the expression generation method is performed, and need not be performed each time the expression generation method is performed.
And S401, acquiring an image of the monocular/monocular camera. The face image data of the current frame may be acquired using a monocular or monocular camera.
And step S402, extracting the face features. Facial features may be extracted from the facial image data collected in step S401.
And step S403, caching the human face features. The facial features within a preset time (e.g., 200 ms) may be buffered.
And S404, extracting the motion characteristics. The human face features in the preset time can be input into the motion feature extraction neural network for motion feature extraction.
And step S405, matching the motion characteristics. The motion features obtained in step S404 may be input into the face motion feature library collected in the preceding step S400 for matching, so as to obtain the closest template face features.
And step S406, acquiring the face driving parameters. The template face features matched in step S405 may be input into a parameter generation neural network, so as to obtain the face driving parameters.
Step S407, facial expression driving. The face driving parameters obtained in step S406 may be input to the face model to generate a facial expression of the virtual digital person.
Therefore, the problems of shaking and jumping caused by single-frame input and single-frame output can be solved by caching the human face characteristics and matching the motion characteristics, and the human face expression of the generated virtual digital human can be more natural by the acquisition and matching scheme of the human face action characteristic library.
According to another aspect of the present disclosure, a method of training a neural network is provided. As shown in fig. 5, the method includes: step S501, acquiring a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data; step S502, extracting the characteristics of the face image data of a plurality of templates to obtain the face characteristics of the plurality of templates; step S503, inputting each template face feature of the plurality of template face features into an initial parameter to generate a neural network so as to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face image data; and step S504, based on the plurality of real face driving parameters and the plurality of predicted face driving parameters, adjusting parameters of the initial parameter generation neural network to obtain a trained parameter generation neural network. It is understood that, part of operations in step S501-step S503 in fig. 5 have been described above and are not described herein again.
In some embodiments, a plurality of real face driving parameters corresponding to a plurality of template face image data may be determined by way of annotation.
According to some embodiments, each of the plurality of template face image data may comprise a consecutive plurality of template face image frames. The template face features may characterize the motion of a face in the corresponding template face image data between a plurality of template face image frames included in the template face image data. The template face features may include, for example, motion features such as rotation, displacement, etc. of face key points in the template face image data between a plurality of template face image frames.
According to some embodiments, performing feature extraction on the plurality of template face image data to obtain a plurality of template face features may include: aiming at each template face image data in a plurality of template face image data, extracting the characteristics of each template face image frame in a plurality of template face image frames contained in the template face image data to obtain a plurality of static template characteristics corresponding to the plurality of template face image frames; and determining template face features corresponding to the template face image data based on the plurality of static template features.
According to some embodiments, each of the plurality of static template face features may include a preset number of keypoint sequences. Determining, based on the plurality of static template features, a template face feature corresponding to the template face image data may include: and inputting a plurality of static template features into the initial motion feature extraction neural network to obtain template face features corresponding to the template face image data. It is understood that, the feature extraction of the template face image data may refer to step S202 in fig. 2, which is not described herein again.
In some embodiments, the training method may further comprise: and adjusting parameters of the initial motion feature extraction neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained motion feature extraction neural network.
In some embodiments, a loss function for evaluating a difference between the real face driving parameters and the predicted face driving parameters may be determined, and loss values with respect to the real face driving parameters and the predicted face driving parameters may be calculated based on the loss function, and then parameters of the initial parameter generation neural network (and optionally, parameters of the initial motion feature extraction neural network) may be adjusted based on the loss values. It is understood that the parameters of the neural network may be adjusted in other ways by those skilled in the art, and are not limited herein.
In some embodiments, the initial parameter generation neural network (and optionally the initial motion feature extraction neural network) may be obtained by random initialization or may be obtained through prior training, and is not limited herein.
According to another aspect of the present disclosure, an expression generating apparatus is provided. As shown in fig. 6, the apparatus 600 includes: a first acquisition unit 610 configured to acquire face image data; a first feature extraction unit 620, configured to perform feature extraction on the face image data to obtain a face feature to be matched; a matching unit 630 configured to determine a target face feature matched with the face feature to be matched from a plurality of template face features determined in advance; a determination unit 640 configured to determine face driving parameters based on the target face features; and a driving unit 650 configured to drive generation of a facial expression corresponding to the face image data according to the face driving parameters. It is understood that the operations of the units 610-650 in the apparatus 600 are similar to the operations of the steps S201-S205 in fig. 2, and are not described herein again.
According to some embodiments, the plurality of template face features may be determined by feature extraction of a plurality of template face image data.
According to some embodiments, the determining unit may comprise: and the parameter generation neural network is configured to receive the target face features to obtain the face driving parameters.
According to some embodiments, the matching unit may be configured to perform similarity matching on the plurality of template face features and the face feature to be matched to determine the target face feature among the plurality of template face features.
According to some embodiments, the face image data may include a plurality of consecutive face image frames, and the face features to be matched may characterize the motion of the face in the face image data between the plurality of face image frames.
According to some embodiments, the feature extraction unit may include: a first static feature extraction subunit, configured to perform feature extraction on each of the plurality of face image frames to obtain a plurality of static face features corresponding to the plurality of face image frames; and a first motion feature extraction subunit configured to determine a face feature to be matched based on the plurality of static face features.
According to some embodiments, the plurality of face image frames may be acquired within a preset time interval, and each of the plurality of static face features may include a preset number of key point sequences. The motion feature extraction subunit may include: and the motion feature extraction neural network is configured to receive a plurality of static face features so as to obtain the face features to be matched. The face features to be matched may include feature vectors of preset dimensions.
According to some embodiments, the three-dimensional face driving parameters may include at least one of hybrid deformation weights and face skeleton parameters.
According to another aspect of the present disclosure, an expression generating apparatus is provided. As shown in fig. 7, the apparatus 700 includes: a second obtaining unit 710 configured to obtain a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data; a second feature extraction unit 720, configured to perform feature extraction on the plurality of template face image data to obtain a plurality of template face features; a parameter generating unit 730 configured to input each of the plurality of template face features into an initial parameter generating neural network, respectively, to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face features; and a first parameter adjusting unit 740 configured to adjust parameters of the initial parameter generating neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained parameter generating neural network. It is understood that the operations of the units 710 to 740 in the apparatus 700 are similar to the operations of the steps S501 to S504 in fig. 5, respectively, and are not described in detail herein.
According to some embodiments, each of the plurality of template face image data may comprise a plurality of template face image frames in succession, and the template face features may characterize motion of a face in the corresponding template face image data between the plurality of template face image frames comprised in the template face image data.
According to some embodiments, the second feature extraction unit may include: a second static feature extraction subunit, configured to, for each template face image data of the plurality of template face image data, perform feature extraction on each template face image frame of a plurality of template face image frames included in the template face image data to obtain a plurality of static template features corresponding to the plurality of template face image frames; and a second motion feature extraction subunit configured to determine, based on a plurality of static template features, a template face feature corresponding to the template face image data.
According to some embodiments, each of the plurality of static template face features may include a preset number of keypoint sequences. The second motion feature extraction subunit may be configured to input a plurality of static template features into the initial motion feature extraction neural network to obtain template face features corresponding to the template face image data. The training apparatus may further comprise: and a second parameter adjusting unit (not shown in the figure) configured to adjust parameters of the initial motion feature extraction neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained motion feature extraction neural network.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
According to an embodiment of the present disclosure, there is also provided an electronic device, a readable storage medium, and a computer program product.
Referring to fig. 8, a block diagram of a structure of an electronic device 800, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the device 800, and the input unit 806 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote control. Output unit 807 can be any type of device capable of presenting information and can include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 808 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and/or a chipset, e.g., bluetooth TM Devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning network algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 801 executes the respective methods and processes described above, such as the expression generation method. For example, in some embodiments, the expression generation method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When the computer program is loaded into the RAM803 and executed by the computing unit 801, one or more steps of the expression generation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the expression generation method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
While embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely illustrative embodiments or examples and that the scope of the invention is not to be limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (27)

1. An expression generation method, comprising:
acquiring face image data;
extracting the features of the face image data to obtain the face features to be matched;
determining a target face feature matched with the face feature to be matched from a plurality of predetermined template face features;
determining face driving parameters based on the target face features; and
and according to the face driving parameters, driving to generate a face expression corresponding to the face image data.
2. The method of claim 1, wherein the plurality of template facial features are determined by feature extraction of a plurality of template facial image data.
3. The method of claim 1 or 2, wherein determining face driving parameters based on the target face features comprises:
and inputting the target face features into the trained parameters to generate a neural network so as to obtain the face driving parameters.
4. The method of claim 1, wherein determining a target face feature matching the face feature to be matched from a plurality of predetermined template face features comprises:
and performing similarity matching on the plurality of template face features and the face features to be matched so as to determine the target face features in the plurality of template face features.
5. The method of claim 1, wherein the face image data comprises a plurality of consecutive face image frames, and the face features to be matched characterize the motion of the face in the face image data among the plurality of face image frames.
6. The method of claim 5, wherein the extracting the features of the face image data to obtain the features of the face to be matched comprises:
extracting features of each face image frame in the plurality of face image frames to obtain a plurality of static face features corresponding to the plurality of face image frames; and
and determining the face features to be matched based on the plurality of static face features.
7. The method of claim 6, wherein each static face feature of the plurality of static face features comprises a preset number of keypoint sequences,
wherein determining the face features to be matched based on the plurality of static face features comprises:
and inputting the plurality of static face features into the trained motion feature extraction neural network to obtain the face features to be matched.
8. The method of claim 1 or 2, wherein the face driving parameters comprise at least one of hybrid deformation weights and face bone parameters.
9. A method of training a neural network, comprising:
acquiring a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data;
carrying out feature extraction on the plurality of template face image data to obtain a plurality of template face features;
inputting each template face feature of the plurality of template face features into an initial parameter to generate a neural network so as to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face image data; and
adjusting parameters of the initial parameter-generating neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained parameter-generating neural network.
10. The method of claim 9, wherein each of the plurality of template face image data comprises a plurality of template face image frames in succession, the template face features characterizing movement of a face in the corresponding template face image data between the plurality of template face image frames comprised in the template face image data.
11. The method of claim 10, wherein feature extracting the plurality of template face image data to obtain a plurality of template face features comprises:
for each template face image data in the template face image data, extracting the characteristics of each template face image frame in a plurality of template face image frames included in the template face image data to obtain a plurality of static template characteristics corresponding to the template face image frames; and
and determining the template face features corresponding to the template face image data based on the plurality of static template features.
12. The method of claim 11, wherein each of the plurality of static template face features comprises a preset number of keypoint sequences,
wherein determining, based on the plurality of static template features, a template face feature corresponding to the template face image data comprises:
inputting the plurality of static template features into an initial motion feature extraction neural network to obtain template face features corresponding to the template face image data,
wherein the method further comprises:
adjusting parameters of the initial motion feature extraction neural network based on the plurality of real face drive parameters and the plurality of predicted face drive parameters to obtain a trained motion feature extraction neural network.
13. An expression generation apparatus comprising:
a first acquisition unit configured to acquire face image data;
the first feature extraction unit is configured to perform feature extraction on the face image data to obtain a face feature to be matched;
the matching unit is configured to determine a target face feature matched with the face feature to be matched in a plurality of template face features determined in advance;
a determination unit configured to determine a face driving parameter based on the target face feature; and
and the driving unit is configured to drive and generate a facial expression corresponding to the facial image data according to the facial driving parameters.
14. The apparatus of claim 13, wherein the plurality of template facial features are determined by feature extraction from a plurality of template facial image data.
15. The apparatus of claim 13 or 14, wherein the determining unit comprises:
a parameter generating neural network configured to receive the target face features to derive the face driving parameters.
16. The apparatus of claim 13, wherein the matching unit is configured to similarity match the plurality of template face features and the face feature to be matched to determine the target face feature among the plurality of template face features.
17. The apparatus of claim 13, wherein the face image data comprises a plurality of consecutive face image frames, and the to-be-matched face features characterize motion of a face in the face image data between the plurality of face image frames.
18. The apparatus of claim 17, wherein the feature extraction unit comprises:
a first static feature extraction subunit configured to perform feature extraction on each of the plurality of face image frames to obtain a plurality of static face features corresponding to the plurality of face image frames; and
a first motion feature extraction subunit configured to determine the face features to be matched based on the plurality of static face features.
19. The apparatus of claim 18, wherein each static face feature of the plurality of static face features comprises a preset number of keypoint sequences,
wherein the motion feature extraction subunit includes:
and the motion feature extraction neural network is configured to receive the plurality of static human face features so as to obtain the human face features to be matched.
20. The apparatus of claim 13 or 14, wherein the face driving parameters comprise at least one of hybrid deformation weights and face bone parameters.
21. An apparatus for training a neural network, comprising:
a second acquisition unit configured to acquire a plurality of template face image data and a plurality of real face driving parameters corresponding to the plurality of template face image data;
a second feature extraction unit, configured to perform feature extraction on the plurality of template face image data to obtain a plurality of template face features;
a parameter generating unit configured to input each of the plurality of template face features into an initial parameter generating neural network, respectively, to obtain a plurality of predicted face driving parameters corresponding to the plurality of template face image data; and
a first parameter adjusting unit configured to adjust parameters of the initial parameter generating neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained parameter generating neural network.
22. The apparatus of claim 21, wherein each of the plurality of template face image data comprises a plurality of template face image frames in succession, the template face features characterizing movement of a face in the corresponding template face image data between the plurality of template face image frames included in the template face image data.
23. The apparatus of claim 22, wherein the second feature extraction unit comprises:
a second static feature extraction subunit, configured to, for each template face image data in the plurality of template face image data, perform feature extraction on each template face image frame in a plurality of template face image frames included in the template face image data to obtain a plurality of static template features corresponding to the plurality of template face image frames; and
and the second motion characteristic extraction subunit is configured to determine a template human face characteristic corresponding to the template human face image data based on the plurality of static template characteristics.
24. The apparatus of claim 23, wherein each of the plurality of static template face features comprises a preset number of keypoint sequences,
wherein the second motion feature extraction subunit is configured to input the plurality of static template features into an initial motion feature extraction neural network to obtain template face features corresponding to the template face image data,
wherein the apparatus further comprises:
a second parameter adjusting unit configured to adjust parameters of the initial motion feature extraction neural network based on the plurality of real face driving parameters and the plurality of predicted face driving parameters to obtain a trained motion feature extraction neural network.
25. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
26. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-12.
27. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-12 when executed by a processor.
CN202211716908.3A 2022-12-29 2022-12-29 Expression generation method, neural network training method, device, equipment and medium Pending CN115953512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211716908.3A CN115953512A (en) 2022-12-29 2022-12-29 Expression generation method, neural network training method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211716908.3A CN115953512A (en) 2022-12-29 2022-12-29 Expression generation method, neural network training method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115953512A true CN115953512A (en) 2023-04-11

Family

ID=87282243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211716908.3A Pending CN115953512A (en) 2022-12-29 2022-12-29 Expression generation method, neural network training method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115953512A (en)

Similar Documents

Publication Publication Date Title
CN114511758A (en) Image recognition method and device, electronic device and medium
CN112749758A (en) Image processing method, neural network training method, device, equipment and medium
CN114972958B (en) Key point detection method, neural network training method, device and equipment
CN114119935B (en) Image processing method and device
CN114723949A (en) Three-dimensional scene segmentation method and method for training segmentation model
CN112967356A (en) Image filling method and device, electronic device and medium
CN115511779A (en) Image detection method, device, electronic equipment and storage medium
CN115601555A (en) Image processing method and apparatus, device and medium
CN115661375B (en) Three-dimensional hair style generation method and device, electronic equipment and storage medium
CN115761855B (en) Face key point information generation, neural network training and three-dimensional face reconstruction method
CN114120448B (en) Image processing method and device
CN114120412B (en) Image processing method and device
CN115393514A (en) Training method of three-dimensional reconstruction model, three-dimensional reconstruction method, device and equipment
CN115578501A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114494797A (en) Method and apparatus for training image detection model
CN115345969A (en) Control method, device, equipment and medium of virtual image
CN114998963A (en) Image detection method and method for training image detection model
CN114550269A (en) Mask wearing detection method, device and medium
CN115953512A (en) Expression generation method, neural network training method, device, equipment and medium
CN114140547A (en) Image generation method and device
CN117218297B (en) Human body reconstruction parameter generation method, device, equipment and medium
CN115345981B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115578451B (en) Image processing method, training method and device of image processing model
CN115797455B (en) Target detection method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination