Facial model generation method, interaction method and related device
By obtaining and adjusting the bone changes of the three-dimensional face virtual model, the problems of low accuracy of expression changes and cumbersome operation in the existing technology are solved, and the effect of quickly generating personalized face models is achieved.
Patent Information
- Application Number
- CN202110891920.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-04
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2041-08-04
Smart Images

Figure CN113610981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual modeling, and in particular to a facial model generation method, an interaction method and related devices. Background Art
[0002] With the rapid development of technology, virtual models are widely used in many fields, such as animation, games, live broadcast, etc. In order to enhance the interactivity with users, a personalized three-dimensional face virtual model can be established for users.
[0003] In the related art, the expression change of the three-dimensional human face virtual model can usually be realized by an expression base, which has the problem of low precision. Alternatively, there is a method of using professionals to make adjustments, but the operation is cumbersome and inefficient. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a face model generation method, an interaction method and related devices.
[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for generating a face model, the method comprising:
[0007] Acquire a basic face model and a standard face model; the basic face model includes an initial skeleton and an initial mesh that constitute an initial expression; the initial skeleton and the initial mesh have a binding relationship; the standard face model includes a standard mesh that constitutes a standard expression;
[0008] Determining a bone change amount according to the initial mesh, the standard mesh and the binding relationship;
[0009] A target facial model is obtained according to the initial skeleton and the skeleton variation; the target facial model includes a target expression matching the standard expression.
[0010] In an optional embodiment, the initial skeleton includes a plurality of basic skeletons; the initial mesh includes a plurality of basic vertices; each of the basic vertices corresponds to a standard vertex in the standard mesh; each of the basic vertices has an initial coordinate; each of the standard vertices has a standard coordinate;
[0011] The step of determining the amount of bone change according to the initial mesh, the standard mesh and the binding relationship comprises:
[0012] According to the binding relationship, all initial coordinates and all standard coordinates, the transformation amount of each basic bone is determined; the total transformation amount is the bone change amount; all initial coordinates and all standard coordinates meet preset conditions.
[0013] In an optional implementation, the conversion amount includes a rotation component and a translation component; the preset condition is:
[0014]
[0015] Wherein, B represents the total number of the basic bones; V represents the total number of the basic vertices; represents standard coordinates; v i represents the initial coordinates; R j represents the rotation component of the jth bone; T j represents the translation component of the jth bone; w ij Represents the control weight of the jth bone on the ith base vertex.
[0016] In an optional implementation, the conversion amount includes a rotation component and a translation component; and the step of obtaining a target face model according to the initial skeleton and the skeleton change amount includes:
[0017] Obtaining a rotation angle of each of the basic bones according to the rotation component in the transformation amount of each of the basic bones;
[0018] Each of the basic bones in the basic facial model is adjusted according to the rotation angle and the translation component of each of the basic bones to obtain the target facial model.
[0019] In a second aspect, the present invention provides an interaction method, the method comprising:
[0020] In response to the user's interactive operation on the acquisition interface, a standard face model of the user is obtained; the standard face model includes a standard grid constituting a standard expression;
[0021] According to the standard face model and the basic face model, a target face model of the user is obtained; the basic face model includes an initial skeleton and an initial mesh constituting an initial expression; the initial skeleton and the initial mesh have a binding relationship;
[0022] The target facial model of the user is displayed on a display interface; the target facial model includes a target expression matching the standard expression.
[0023] In an optional implementation, the step of obtaining the target facial model of the user according to the standard facial model and the basic facial model comprises:
[0024] Determining a bone change amount according to the initial mesh, the standard mesh and the binding relationship;
[0025] A target face model is obtained according to the initial skeleton and the skeleton variation.
[0026] In a third aspect, the present invention provides a facial model generation device, the device comprising:
[0027] An acquisition module is used to acquire a basic face model and a standard face model; the basic face model includes an initial skeleton and an initial mesh that constitute an initial expression; the initial skeleton and the initial mesh have a binding relationship; the standard face model includes a standard mesh that constitutes a standard expression;
[0028] A processing module, used for determining a bone change amount according to the initial mesh, the standard mesh and the binding relationship;
[0029] The adjustment module is used to obtain a target facial model according to the initial skeleton and the skeleton change amount; the target facial model includes a target expression matching the standard expression.
[0030] In a fourth aspect, the present invention provides an interactive device, comprising:
[0031] A response module, used for responding to the user's interactive operation on the acquisition interface, and obtaining a standard facial model of the user; the standard facial model includes a standard grid constituting a standard expression;
[0032] A generating module, configured to obtain a target face model of the user according to the standard face model and a basic face model; the basic face model includes an initial skeleton and an initial mesh constituting an initial expression; the initial skeleton and the initial mesh have a binding relationship;
[0033] A display module is used to display the target facial model of the user on a display interface; the target facial model includes a target expression that matches the standard expression.
[0034] In a fifth aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the aforementioned embodiments is implemented.
[0035] In a sixth aspect, the present invention provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in any one of the aforementioned embodiments is implemented.
[0036] The face model generation method, interaction method and related device provided by the embodiment of the present invention obtain a basic face model including an initial expression and a standard face model including a standard expression, wherein the basic face model includes an initial skeleton and an initial grid, the initial skeleton and the initial grid have a binding relationship, and the standard face model includes a standard grid; then, according to the initial grid, the standard grid and the binding relationship, the skeleton variation is obtained; and according to the initial skeleton and the skeleton variation, a target face model is obtained, and the target face model includes a target expression matching the standard expression. By converting the change of the grid into the change of the skeleton, the expression binding of the face model can be realized, and the face model can be generated quickly and in batches, thereby shortening the production time, and realizing the customization of a personalized face model for the anchor.
[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention 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 creative work.
[0039] Figure 1 A schematic block diagram of an electronic device provided by an embodiment of the present invention is shown;
[0040] Figure 2 A schematic diagram of a process of generating a face model provided by an embodiment of the present invention is shown;
[0041] Figure 3 Another schematic diagram of a process of generating a face model according to an embodiment of the present invention is shown;
[0042] Figure 4 An example diagram of a face model generation method provided by an embodiment of the present invention is shown;
[0043] Figure 5 Another schematic diagram of a process of generating a face model according to an embodiment of the present invention is shown;
[0044] Figure 6 A schematic diagram of a flow chart of an interaction method provided by an embodiment of the present invention is shown;
[0045] Figure 7 An example diagram of an interaction method provided by an embodiment of the present invention is shown;
[0046] Figure 8A functional module diagram of a face model generating device provided by an embodiment of the present invention is shown;
[0047] Fig. 9 A functional module diagram of an interactive device provided by an embodiment of the present invention is shown.
[0048] Icons: 100 - electronic device; 110 - bus; 120 - processor; 130 - memory; 170 - communication interface; 300 - face model generating device; 310 - acquisition module; 330 - processing module; 350 - adjustment module; 400 - interaction device; 410 - response module; 430 - generating module; 450 - display module. DETAILED DESCRIPTION
[0049] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0050] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0051] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0052] In the field of live broadcasting, virtual images can be used to assist the anchor in live broadcasting. The three-dimensional virtual image has the characteristics of three-dimensionality and vividness. It can build a three-dimensional face virtual model of the anchor to interact with the audience to improve the entertainment and fun in the live broadcast room.
[0053] In the related art, there are usually two ways to realize the expression changes of three-dimensional human face virtual models. One is expression base binding, which is to set some basic expressions and linearly combine the basic expressions to obtain a complete expression. However, this method is limited by the number of expression bases, so the expression accuracy obtained is low and the expression expression ability is weak. The other is professional operation binding, which is based on a set of facial bones, and adapts to different expressions by adjusting the size and position of the bones. The operation process is cumbersome, the production cycle is long, and the generation efficiency is low. Furthermore, an embodiment of the present invention proposes a facial model generation method, which will be introduced below.
[0054] Please refer to Figure 1 , is a block diagram of an electronic device 100 provided by an embodiment of the present invention. The electronic device 100 includes a bus 110 , a processor 120 , a memory 130 , and a communication interface 170 .
[0055] The bus 110 may be a circuit that connects the above elements to each other and transfers communications (eg, control messages) between the above elements.
[0056] The processor 120 may receive commands from the other elements described above (eg, the memory 130 , the communication interface 170 , etc.) through the bus 110 , may interpret the received commands, and may perform calculations or data processing according to the interpreted commands.
[0057] The processor 120 may be an integrated circuit chip with signal processing capabilities. The processor 120 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0058] The memory 130 may store commands or data received from the processor 120 or other elements (eg, the communication interface 170 , etc.) or commands or data generated by the processor 120 or other elements.
[0059] The memory 130 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0060] The communication interface 170 may be used to communicate signaling or data with other node devices.
[0061] Understandably, Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0062] The above-mentioned electronic device 100 will be used as an execution subject to execute each step in each method provided in the embodiment of the present invention and achieve corresponding technical effects.
[0063] See also Figure 2 , Figure 2 The figure is a flow chart of a facial model generation method provided by an embodiment of the present invention.
[0064] Step S202, obtaining a basic face model and a standard face model;
[0065] It is understood that the face model refers to the model of the face or head in a three-dimensional virtual character. The face model usually includes bones and meshes. The bones are used to build a skeleton to support the three-dimensional virtual character. The mesh is also called a skin mesh, which is a polygonal mesh bound between various bones.
[0066] The basic face model includes a skeleton and a mesh, and has an initial expression. The initial expression is composed of an initial skeleton and an initial mesh, and the initial skeleton and the initial mesh have a binding relationship.
[0067] The standard face model consists only of a mesh with a standard expression consisting of a standard mesh.
[0068] Optionally, a basic face model may be obtained by linear blending skinning (LBS skinning).
[0069] A standard facial model can be established based on multiple facial images. These multiple facial images are facial images of the same person obtained from multiple perspectives. Based on the multiple facial images, a three-dimensional virtual facial model matching the person can be reconstructed using a three-dimensional multi-perspective stereoscopic vision algorithm (MVS algorithm). Then, the three-dimensional virtual facial model is uniformly topologically adjusted to obtain a standard facial model.
[0070] Step S204, determining the amount of bone change according to the initial mesh, the standard mesh and the binding relationship;
[0071] It is understandable that the expression change of the face model is the expression change presented by the transformation of its mesh. According to the standard mesh of the standard face model, the initial mesh can be changed to make the expression of the basic face model consistent with the expression of the standard face model.
[0072] Optionally, the change of the mesh in the basic face model can be determined according to the difference between the initial mesh and the standard mesh, and then the change of the bones in the basic face model, that is, the bone change amount, can be obtained according to the binding relationship between the initial mesh and the initial bones.
[0073] Step S206, obtaining a target face model according to the initial skeleton and the skeleton variation;
[0074] Optionally, the bones in the basic facial model may be adjusted according to the initial bones and the bone variation, so that the mesh is transformed to obtain a target facial model, the expression of which is the target expression, and the target expression matches the standard expression.
[0075] It can be seen that based on the above design, by obtaining a basic facial model containing an initial expression and a standard facial model containing a standard expression, the basic facial model includes an initial skeleton and an initial mesh, the initial skeleton and the initial mesh have a binding relationship, and the standard facial model includes a standard mesh; then, according to the initial mesh, the standard mesh and the binding relationship, the bone change amount is obtained; and then according to the initial skeleton and the bone change amount, the target facial model is obtained, and the target facial model includes a target expression that matches the standard expression. By converting the change of the mesh into the change of the skeleton, the expression binding of the facial model can be realized, and the facial model can be generated quickly and in batches, thereby shortening the production time and realizing the customization of personalized facial models for anchors.
[0076] For the above step S204, the embodiment of the present invention provides a possible implementation method. Figure 3 Wherein, step S204 may include the following steps:
[0077] Step S204A, determining the transformation amount of each basic skeleton according to the binding relationship, all initial coordinates and all standard coordinates;
[0078] It is understandable that a mesh may be composed of a plurality of mesh vertices, and the spatial positions of the plurality of mesh vertices may reflect the expression of the facial model.
[0079] The basic face model includes a plurality of basic vertices, each of which has a coordinate, namely the basic coordinate. The standard face model includes a plurality of standard vertices, each of which has a coordinate, namely the standard coordinate.
[0080] In order to make the generated face model more effective, a standard face model with the same topological structure as the basic face model can be used. The same topological structure means that the total number of mesh vertices of the basic face model is the same as the total number of mesh vertices of the standard face model. That is, each basic vertex has a corresponding standard vertex.
[0081] The basic face model includes multiple basic bones, each of which has a binding relationship with at least one basic vertex, that is, when the position of the basic bone changes, the basic vertex it is bound to will be displaced. The position change of the basic bone can be represented by the rotation component R and the translation component T.
[0082] A base bone may be bound to multiple base vertices, and a base vertex may be controlled by multiple base bones. The influence of the position change of each base bone on the displacement of the base vertex can be expressed by the control weight w, which can also be called skin weight.
[0083] In order to better understand the present invention, please refer to Figure 4 , is an example diagram provided by an embodiment of the present invention, which will be introduced below in conjunction with this diagram.
[0084] Among them, (a1) represents the basic face model, whose initial expression is the default facial features, and (b1) represents the standard face model, whose standard expression is the expression of the left eye in a squinting state.
[0085] It is understandable that the basic face model includes an initial skeleton and an initial mesh. For ease of understanding, the embodiment of the present invention provides a basic face model that has not yet been bound to the initial skeleton, that is, the initial face model shown in (a0), which only includes an initial mesh. Based on (a0) and (b1), the expression of the basic face model is different from that of the standard face model.
[0086] Optionally, each basic vertex in the basic face model has a basic coordinate, and each standard vertex in the standard face model has a standard coordinate. A condition may be preset, and the preset condition is used to constrain all basic coordinates and all standard coordinates.
[0087] This preset condition represents the relationship between the position change of each basic bone and the displacement of each basic vertex. That is, when the position of each basic bone changes, the basic coordinates of each basic vertex are changed to its corresponding standard vertex. Under this preset condition, the basic facial model can have the same expression as the standard expression.
[0088] Furthermore, the embodiment of the present invention provides a preset condition, which is:
[0089]
[0090] Where B represents the total number of basic bones in the basic face model, V represents the total number of basic vertices in the basic face model; v i Represents the initial coordinates of the i-th base vertex; represents the standard coordinates of the i-th standard vertex; R j represents the rotation component of the jth bone; T j represents the translation component of the jth bone; w ij Represents the control weight of the j-th bone on the ith base vertex; this control weight is preset.
[0091] Optionally, the initial coordinates can be represented by a 3*1 vector; the standard coordinates can be represented by a 3*1 vector; the translation component can be represented by a 3*1 vector; and the rotation component can be represented by a 3*3 matrix.
[0092] According to the preset conditions, a solution is obtained. Based on the optimal solution, the position change of each bone, i.e., the transformation amount, can be obtained. Based on all the transformation amounts, the position of the bones in the basic face model is adjusted to obtain the target face model, such as Figure 4 As shown in (a3), the expression of the target face model matches the standard expression.
[0093] Based on the above steps, by presetting conditions, when all the initial coordinates and all the standard coordinates meet the preset conditions, the transformation amount of each basic bone can be determined based on the binding relationship, all the initial coordinates and all the standard coordinates, and the basic facial model is adjusted based on all the transformation amounts, and the target facial model obtained has a target expression that matches the standard expression. Based on the preset conditions, the position change of each bone is obtained, so that the mesh vertices are driven to change in displacement through the position change of the bones, so that the expression of the facial model changes, which can improve the change accuracy of the expression and improve the matching degree between the target expression and the standard expression.
[0094] For the above step S206, the embodiment of the present invention provides a possible implementation method. Figure 5 Wherein, step S206 may include the following steps:
[0095] Step S206A-1, obtaining the rotation angle of each basic bone according to the rotation component in the transformation amount of each basic bone;
[0096] Step S206A-3, adjusting each basic bone in the basic face model according to the rotation angle and translation component of each basic bone to obtain a target face model;
[0097] It can be understood that the face model is a three-dimensional model, and the rotation component of each bone is a 3*3 rotation matrix. Based on the orthogonal property of the rotation matrix, the rotation component can be converted into three 3*1 vectors, each vector representing a rotation angle in one dimension, and three rotation angles are obtained.
[0098] Optionally, each bone in the basic facial model is adjusted according to the rotation angle and translation component of each bone to change its spatial position, thereby driving the displacement change of the mesh vertex corresponding to the bone to obtain the target facial model.
[0099] In the above embodiment, it is mentioned that based on the above face model generation method, a three-dimensional face virtual model can be established for the anchor to interact with the audience. Furthermore, the embodiment of the present invention provides a possible implementation method of interaction. Please refer to Figure 6 , is a flowchart of an interactive method provided by an embodiment of the present invention.
[0100] Step S212, responding to the user's interactive operation on the acquisition interface, obtaining the user's standard face model;
[0101] Among them, the standard face model includes a standard mesh that constitutes a standard expression.
[0102] Step S214, obtaining a target facial model of the user according to the standard facial model and the basic facial model; wherein the basic facial model includes an initial skeleton and an initial mesh constituting an initial expression; and the initial skeleton and the initial mesh have a binding relationship.
[0103] Step S216, displaying the user's target face model on the display interface;
[0104] The target facial model includes a target expression that matches the standard expression.
[0105] To better understand the above steps, please refer to Figure 7, is an example diagram provided by an embodiment of the present invention. (d1) represents an acquisition interface, which includes a prompt area, an information acquisition area and a confirmation area. The prompt area is used to display information such as the operation steps of the interactive function to the user.
[0106] When a user's interactive operation in the information acquisition area is detected, respond to the interactive operation, such as calling the local storage album of the electronic device to obtain multiple images containing faces; or calling the shooting function of the electronic device to obtain videos containing faces, or multiple images containing faces.
[0107] Then, when an interactive operation is detected in the confirmation area, a standard face model of the user is obtained by using a face model reconstruction algorithm based on the image or video obtained in the information acquisition area. The target face model of the user can be obtained based on the standard face model and the set basic face model.
[0108] Optionally, the bone variation can be determined based on the initial network, the representation network and the binding relationship, and then the target face model can be obtained based on the initial bones and the bone variation. That is, step S202, step S204 or S204A, step S206 or steps S206A-1 and S206A-3 in the above example can be executed to obtain the target face model.
[0109] Then display Figure 7 (d2) in the figure represents a display interface, which includes an image display area and a selection area. After the target facial model is obtained, the target facial model is displayed in the image display area. The user can operate in the selection area to choose whether to store the target facial model generated this time. When the user's confirmation operation on the "Save" button is detected, the target facial model is stored; when the user's confirmation operation on the "Cancel" button is detected, the target facial model is not stored, and the interface of (d1) can be displayed so that the user can operate again.
[0110] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a facial model generation device is provided below. Figure 8 , Figure 8 This is a functional module diagram of a facial model generation device 300 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the facial model generation device 300 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The facial model generation device 300 includes:
[0111] The acquisition module 310 is used to acquire a basic face model and a standard face model; the basic face model includes an initial skeleton and an initial mesh that constitute an initial expression; the initial skeleton and the initial mesh have a binding relationship; the standard face model includes a standard mesh that constitutes a standard expression;
[0112] The processing module 330 is used to determine the amount of bone change according to the initial mesh, the standard mesh and the binding relationship;
[0113] The adjustment module 350 is used to obtain a target facial model according to the initial skeleton and the amount of skeleton change; the target facial model includes a target expression that matches the standard expression.
[0114] Optionally, the processing module 330 is also used to: determine the transformation amount of each basic bone according to the binding relationship, all initial coordinates and all standard coordinates; all transformation amounts are bone changes; all initial coordinates and all standard coordinates meet preset conditions.
[0115] Optionally, the adjustment module 350 is further used to: obtain the rotation angle of each basic bone according to the rotation component in the transformation amount of each basic bone;
[0116] According to the rotation angle and translation component of each basic bone, each basic bone in the basic facial model is adjusted to obtain the target facial model.
[0117] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a facial model generation device is provided below. Fig. 9 , Fig. 9 This is a functional module diagram of an interactive device 400 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the interactive device 400 provided in this embodiment are the same as those of the above embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. The interactive device 400 includes:
[0118] The response module 410 is used to respond to the user's interactive operation on the acquisition interface and obtain the user's standard face model; the standard face model includes a standard grid that constitutes a standard expression;
[0119] The generating module 430 is used to obtain the target face model of the user according to the standard face model and the basic face model; the basic face model includes an initial skeleton and an initial mesh constituting an initial expression; the initial skeleton and the initial mesh have a binding relationship;
[0120] The display module 450 is used to display the user's target facial model on the display interface; the target facial model includes a target expression that matches the standard expression.
[0121] An embodiment of the present invention further provides an electronic device, including a processor 120 and a memory 130, wherein the memory 130 stores a computer program, and when the processor executes the computer program, the facial model generation method and the interaction method disclosed in the above embodiment are implemented.
[0122] The embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by the processor 120, the face model generation method and the interaction method disclosed in the embodiment of the present invention are implemented.
[0123] In summary, the embodiments of the present invention provide a facial model generation method, an interaction method and related devices. By obtaining a basic facial model including an initial expression and a standard facial model including a standard expression, the basic facial model includes an initial skeleton and an initial mesh, the initial skeleton and the initial mesh have a binding relationship, and the standard facial model includes a standard mesh; then, according to the initial mesh, the standard mesh and the binding relationship, the bone change amount is obtained; then, according to the initial skeleton and the bone change amount, a target facial model is obtained, and the target facial model includes a target expression that matches the standard expression. By converting the change of the mesh into the change of the skeleton, the expression binding of the facial model can be realized, and the facial model can be generated quickly and in batches, thereby shortening the production time, and can be realized to customize a personalized facial model for the anchor.
[0124] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0126] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions for enabling 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A facial model generation method, characterized in that: The method comprises: Acquire a basic face model and a standard face model; the basic face model includes an initial skeleton and an initial mesh that constitute an initial expression; the initial skeleton and the initial mesh have a binding relationship; the standard face model includes a standard mesh that constitutes a standard expression; Determining the amount of bone change according to the initial mesh, the standard mesh and the binding relationship comprises the steps of: determining the amount of change of the initial mesh according to the difference between the initial mesh and the standard mesh, and determining the amount of change of the initial bone in combination with the binding relationship between the initial mesh and the initial bone, thereby obtaining the amount of bone change; A target facial model is obtained according to the initial skeleton and the skeleton variation; the target facial model includes a target expression matching the standard expression.
2. The method according to claim 1, characterized in that The initial skeleton includes a plurality of basic skeletons; the initial mesh includes a plurality of basic vertices; each of the basic vertices corresponds to a standard vertex in the standard mesh; each of the basic vertices has an initial coordinate; Each of the standard vertices has standard coordinates; The step of determining the amount of bone change according to the initial mesh, the standard mesh and the binding relationship comprises: According to the binding relationship, all initial coordinates and all standard coordinates, the transformation amount of each basic bone is determined; the total transformation amount is the bone change amount; all initial coordinates and all standard coordinates meet preset conditions.
3. The method according to claim 2, characterized in that The conversion amount includes a rotation component and a translation component; the preset condition is: Wherein, B represents the total number of the basic bones; V represents the total number of the basic vertices; represents standard coordinates; v i represents the initial coordinates; R j represents the rotation component of the jth bone; T j represents the translation component of the jth bone; w ij Represents the control weight of the jth bone on the ith base vertex.
4. The method according to claim 2, characterized in that: The conversion amount includes a rotation component and a translation component; The step of obtaining a target face model according to the initial skeleton and the skeleton variation comprises: Obtaining a rotation angle of each of the basic bones according to the rotation component in the transformation amount of each of the basic bones; Each of the basic bones in the basic facial model is adjusted according to the rotation angle and the translation component of each of the basic bones to obtain the target facial model.
5. An interactive method, characterized in that: The method comprises: In response to the user's interactive operation on the acquisition interface, a standard face model of the user is obtained; the standard face model includes a standard grid constituting a standard expression; According to the standard face model and the basic face model, a target face model of the user is obtained; the basic face model includes an initial skeleton and an initial mesh constituting an initial expression; the initial skeleton and the initial mesh have a binding relationship; Displaying a target facial model of the user on a display interface; the target facial model includes a target expression matching the standard expression; The step of obtaining the target face model of the user according to the standard face model and the basic face model comprises: Determine the change amount of the initial mesh according to the difference between the initial mesh and the standard mesh, and determine the change amount of the initial skeleton in combination with the binding relationship between the initial mesh and the initial skeleton to obtain the skeleton change amount; A target face model is obtained according to the initial skeleton and the skeleton variation.
6. A facial model generation device, characterized in that: The device comprises: An acquisition module is used to acquire a basic face model and a standard face model; the basic face model includes an initial skeleton and an initial mesh that constitute an initial expression; the initial skeleton and the initial mesh have a binding relationship; the standard face model includes a standard mesh that constitutes a standard expression; A processing module, used for determining a bone change amount according to the initial mesh, the standard mesh and the binding relationship; An adjustment module, configured to obtain a target facial model according to the initial skeleton and the skeleton variation; the target facial model includes a target expression matching the standard expression; The processing module is also used to: determine the change amount of the initial mesh according to the difference between the initial mesh and the standard mesh, and determine the change amount of the initial skeleton in combination with the binding relationship between the initial mesh and the initial skeleton to obtain the skeleton change amount.
7. An interactive device, characterized in that: The device comprises: A response module, used for responding to the user's interactive operation on the acquisition interface, and obtaining a standard facial model of the user; the standard facial model includes a standard grid constituting a standard expression; A generating module, configured to obtain a target face model of the user according to the standard face model and a basic face model; the basic face model includes an initial skeleton and an initial mesh constituting an initial expression; the initial skeleton and the initial mesh have a binding relationship; A display module, configured to display a target facial model of the user on a display interface; the target facial model includes a target expression matching the standard expression; The generation module is also used to: determine the change amount of the initial mesh according to the difference between the initial mesh and the standard mesh, and determine the change amount of the initial skeleton in combination with the binding relationship between the initial mesh and the initial skeleton to obtain the skeleton change amount; and obtain the target facial model according to the initial skeleton and the skeleton change amount.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
9. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Skeleton displacement information acquisition method, device and equipment and storage medium
CN111292427A