Cartoon face driving method and device
Patent Information
- Application Number
- CN202210507937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-05-10
AI Technical Summary
[0004]本申请提供一种卡通人脸驱动方法及装置,以解决相关技术中为每个待驱动对象制作一组定义好的表情基时,造成每个需要驱动的三维或二维卡通人脸定制表情基浪费大量时间的同时,增加了驱动成本,而且直接采用针对真人脸的表情基生成方法时,个别表情基表达的精确度较低等问题
[0019] This application's embodiments can drive the current cartoon face with a preset expression base when the actual category is detected as a 3D cartoon face. When the actual category is detected as a 2D cartoon face, the current cartoon face can be reconstructed into a target 3D cartoon face. The driven 3D cartoon face is obtained using a method for driving 3D cartoon faces. Then, through a foreground and background fusion method guided by facial semantic information, the driven target cartoon face is rendered back to the current cartoon face, thereby realizing the driving of 2D cartoon faces, reducing driving costs, and improving the accuracy of expression base expression. This solves the problems in related technologies where creating a set of defined expression bases for each object to be driven wastes a lot of time and increases driving costs, and when directly using expression base generation methods for real faces, the accuracy of individual expression base expressions is low.
Smart Images

Figure CN115205427B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer graphics technology, and in particular to a method and apparatus for driving cartoon faces. Background Technology
[0002] In related technologies, cartoon face driving can directly adopt the expression base generation method for real faces. Based on the 3D face model, a set of expression bases for the target object is generated, and a set of predefined expression bases is made for each object to be driven, thereby realizing the driving of 3D cartoon faces or 2D cartoon faces.
[0003] However, the driving methods in related technologies require the creation of a set of predefined expression bases (often dozens or even hundreds) for each object to be driven. This results in a significant waste of time for each customized expression base for a 3D or 2D cartoon face that needs to be driven, while also increasing the driving cost. Furthermore, when directly using expression base generation methods for real faces, the accuracy of individual expression bases is low, which cannot meet the driving requirements of cartoon faces and urgently needs to be addressed. Summary of the Invention
[0004] This application provides a cartoon face driving method and apparatus to solve the problems in related technologies, such as the waste of a lot of time and increased driving cost when creating a set of defined expression bases for each object to be driven, and the low accuracy of individual expression bases when directly using expression base generation methods for real faces.
[0005] The first aspect of this application provides a cartoon face driving method, including the following steps: detecting the actual category of the current cartoon face; when the actual category is detected to be a three-dimensional cartoon face, driving the current cartoon face with a preset expression base; when the actual category is detected to be a two-dimensional cartoon face, reconstructing the current cartoon face into a target cartoon face of the three-dimensional cartoon face, driving the target cartoon face with the preset expression base, and rendering the driven target cartoon face back to the current cartoon face.
[0006] Optionally, in one embodiment of this application, driving the current cartoon face with a preset expression base includes: performing deformation transfer using the preset expression base to obtain the expression base of the current cartoon face; correcting the expression base of the current cartoon face using a preset deformation strategy; and driving the current cartoon face using a preset expression driving formula.
[0007] Optionally, in one embodiment of this application, the preset expression-driven formula is:
[0008]
[0009] Where M is the driving result, M mean For a specific 3D cartoon face with a neutral expression as input, K i Given the motion coefficients of the i-th expression, B i For M mcan The expression base of the i-th expression (obtained in step 2).
[0010] Optionally, in one embodiment of this application, rendering the driven target cartoon face back to the current cartoon face includes: guiding the foreground and background of the driven target cartoon face to be merged based on preset facial semantic information, so as to render back to the current cartoon face.
[0011] A second aspect of this application provides a cartoon face driving device, comprising: a detection module for detecting the actual category of a current cartoon face; a first driving module for driving the current cartoon face with a preset expression base when the actual category is detected to be a three-dimensional cartoon face; and a second driving module for reconstructing the current cartoon face into a target cartoon face of the three-dimensional cartoon face when the actual category is detected to be a two-dimensional cartoon face, driving the target cartoon face with the preset expression base, and rendering the driven target cartoon face back to the current cartoon face.
[0012] Optionally, in one embodiment of this application, the first driving module includes: a processing unit, configured to perform deformation transfer using the preset expression base to obtain the expression base of the current cartoon face; and a driving unit, configured to modify the expression base of the current cartoon face using a preset deformation strategy and drive the current cartoon face using a preset expression driving formula.
[0013] Optionally, in one embodiment of this application, the preset expression-driven formula is:
[0014]
[0015] Where M is the driving result, M mean For a specific 3D cartoon face with a neutral expression as input, K i Given the motion coefficients of the i-th expression, B i For M mean The expression base of the i-th expression (obtained in step 2).
[0016] Optionally, in one embodiment of this application, the second driving module includes: a rendering unit, used to guide the target cartoon face foreground and background after driving to merge based on preset facial semantic information, so as to render back the current cartoon face.
[0017] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the cartoon face driving method as described in the above embodiments.
[0018] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the cartoon face driving method as described in the above embodiments.
[0019] This application's embodiments can drive the current cartoon face with a preset expression base when the actual category is detected as a 3D cartoon face. When the actual category is detected as a 2D cartoon face, the current cartoon face can be reconstructed into a target 3D cartoon face. The driven 3D cartoon face is obtained using a method for driving 3D cartoon faces. Then, through a foreground and background fusion method guided by facial semantic information, the driven target cartoon face is rendered back to the current cartoon face, thereby realizing the driving of 2D cartoon faces, reducing driving costs, and improving the accuracy of expression base expression. This solves the problems in related technologies where creating a set of defined expression bases for each object to be driven wastes a lot of time and increases driving costs, and when directly using expression base generation methods for real faces, the accuracy of individual expression base expressions is low.
[0020] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0021] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0022] Figure 1 This is a flowchart of a cartoon face driving method provided according to an embodiment of this application;
[0023] Figure 2 A flowchart of a cartoon face driving method provided in a specific embodiment of this application;
[0024] Figure 3 This is a schematic diagram illustrating the effect of driving a 3D cartoon face according to an embodiment of this application;
[0025] Figure 4 This is a schematic diagram illustrating the effect of driving a two-dimensional cartoon face according to an embodiment of this application;
[0026] Figure 5This is a schematic diagram of the structure of a cartoon face driving device according to an embodiment of this application;
[0027] Figure 6 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0029] The following describes a cartoon face driving method and apparatus according to embodiments of this application with reference to the accompanying drawings. Addressing the issues raised in the background section regarding the related technologies where creating a set of predefined expression bases for each object to be driven results in significant time wastage and increased driving costs for each 3D or 2D cartoon face requiring driving, and the low accuracy of individual expression bases when directly using expression base generation methods for real faces, this application provides a cartoon face driving method. In this method, when the actual category is detected as a 3D cartoon face, the current cartoon face can be driven using a preset expression base. When the actual category is detected as a 2D cartoon face, the current cartoon face can be reconstructed into a target 3D cartoon face. The driven 3D cartoon face is then obtained using the 3D cartoon face driving method. Finally, through a foreground and background fusion method guided by facial semantic information, the driven target cartoon face is rendered back to the current cartoon face, thereby achieving the driving of 2D cartoon faces, reducing driving costs, and improving the accuracy of expression base expression. This solves the problems in related technologies, such as the waste of a lot of time and increased driving costs when creating a set of predefined expression bases for each object to be driven, and the low accuracy of individual expression bases when directly using expression base generation methods for real faces.
[0030] Specifically, Figure 1 This is a flowchart illustrating a cartoon face-driven method provided in an embodiment of this application.
[0031] like Figure 1 As shown, the cartoon face driving method includes the following steps:
[0032] In step S101, the actual category of the current cartoon face is detected.
[0033] It is understood that the embodiments of this application can detect the actual category of the current cartoon face, including a three-dimensional cartoon face mesh model and a two-dimensional cartoon face image, thereby driving the three-dimensional cartoon face and the two-dimensional cartoon face with neutral expressions.
[0034] In step S102, when the actual category is detected as a 3D cartoon face, the current cartoon face is driven by a preset expression base.
[0035] It is understood that the embodiments of this application can detect the actual category of the current cartoon face. When the actual category is detected to be a 3D cartoon face, the current cartoon face is driven by a preset expression base, that is, a predefined expression base for average cartoon faces. That is, for a 3D cartoon face with a neutral expression, the embodiments of this application can pre-define a complete expression base for a specific 3D cartoon face, thereby realizing the driving of the 3D cartoon face. Through this automated method of cartoon face driving, a set of preset face motion sequence parameters can be conveniently used to drive the desired action effect, thereby saving driving time and cost.
[0036] Furthermore, in one embodiment of this application, driving the current cartoon face with a preset expression base includes: performing deformation transfer using the preset expression base to obtain the expression base of the current cartoon face; correcting the expression base of the current cartoon face using a preset deformation strategy; and driving the current cartoon face using a preset expression driving formula.
[0037] Specifically, the embodiments of this application can use a preset expression base for deformation transfer to obtain a preliminary expression base for a specific 3D current cartoon face, thereby saving the time of creating a set of expression bases for each object to be driven. Due to the limitations of the deformation transfer method itself, there are problems with incomplete eye closing and opening. Therefore, the expression base of the current cartoon face is corrected by using a preset deformation strategy, and the current cartoon face is driven by a preset expression driving formula, thereby realizing the driving of the 3D cartoon face mesh model and effectively improving the accuracy of the expression base.
[0038] In one embodiment of this application, the preset expression-driven formula is:
[0039]
[0040] Where M is the driving result, M mean For a specific 3D cartoon face with a neutral expression as input, K i Given the motion coefficients of the i-th expression, B i For M mean The expression base of the i-th expression (obtained in step 2).
[0041] In step S103, when the actual category is detected as a two-dimensional cartoon face, the current cartoon face is reconstructed into a target cartoon face that is a three-dimensional cartoon face, and the target cartoon face is driven by a preset expression base, and the driven target cartoon face is rendered back to the current cartoon face.
[0042] It is understood that the embodiments of this application can reconstruct the current cartoon face into a target cartoon face of a three-dimensional cartoon face. After reconstruction, the corresponding three-dimensional cartoon face mesh model can be obtained, and the target cartoon face is driven by the preset expression base of the three-dimensional cartoon face, thereby obtaining the three-dimensional driving result. Then, the driven target cartoon face is rendered back to the current cartoon face, which effectively reduces the driving cost and improves the versatility of the cartoon face driving method.
[0043] Furthermore, in one embodiment of this application, rendering the driven target cartoon face back to the current cartoon face includes: based on preset facial semantic information, guiding the foreground and background of the driven target cartoon face to be merged in order to render back to the current cartoon face.
[0044] Specifically, the embodiments of this application can reconstruct a target cartoon face from a neutral-expression 2D cartoon face into a 3D cartoon face, and then use a 3D cartoon face driving method to obtain the driven 3D cartoon face. By pre-setting facial semantic information, the foreground and background fusion mode of the driven target cartoon face is guided, and the driven 3D cartoon face is rendered back to the current cartoon face, thereby realizing the driving of 2D cartoon faces. This effectively reduces the driving cost and improves the versatility of the cartoon face driving method. Therefore, the methods for driving 3D and 2D cartoon faces with neutral expressions have achieved good results.
[0045] like Figure 2 As shown, the working principle of the method of the present application embodiment will be described in detail with reference to a specific embodiment.
[0046] Among them, the driving of 3D cartoon faces only involves the dotted dashed box module, while the driving of 2D cartoon faces involves all modules.
[0047] Step S1: Driving the 3D cartoon face.
[0048] Step S1.1: Perform deformation transfer on the 3D cartoon face with a neutral expression. Use "Sumner RW, The deformation transfer method described in "J. Deformation transfer for triangle meshes[J]. ACM Transactions on graphics(TOG),2004,23(3):399-405" requires inputs of a specific 3D cartoon face mesh model A as the target and a set of predefined expression bases for average cartoon faces. The predefined expression bases for average cartoon faces are handcrafted by animators and consist of 51 elements, including common expressions such as closed eyes, open eyes, open mouth, puffed-out lips, and furrowed brows.
[0049] Using the above deformation transfer method, preliminary expression bases for specific 3D cartoon faces can be obtained. Among them, eye movement expression bases such as closing and opening eyes have incomplete eye closing and opening due to the limitations of the deformation transfer method itself.
[0050] Step S1.2: For the poorly executed facial expressions such as closed and open eyes in Step S1.1, corrections are made using a Laplacian coordinate-based deformation method. The Laplacian deformation method is referenced from "Sorkine O, Cohen-Or D, Lipman Y, et al. Laplacian surface editing[C] / / Proceedings of the 2004Eurographics / ACMSIGGRAPH symposium on Geometry processing.2004:175-184.". By constraining the coordinates of the key points corresponding to the upper and lower eyelids in the deformed mesh model to be as close as possible, the upper and lower eyelids are completely "pulled together".
[0051] Step S1.3: Complete the driving process. Based on a set of given facial expression parameters and head motion poses, and according to the facial expression basis of the specific cartoon face model A obtained in step S1.2, the driving of the 3D cartoon face mesh model can be realized.
[0052] Step S1.4: The preset expression-driven formula is:
[0053]
[0054] Where M is the driving result, M mean For a specific 3D cartoon face with a neutral expression as input, K i Given the motion coefficients of the i-th expression, B i For M mean The expression base of the i-th expression (obtained in step 2).
[0055] Step S2: Driving the 2D cartoon face.
[0056] Step S2.1: Perform 3D reconstruction on the 2D cartoon face. After reconstruction, a corresponding 3D cartoon face mesh model can be obtained. The method is referenced from "Wu Q, Zhang J, Lai YK, et al. Alive caricature from 2d to 3d[C] / / Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:7336-7345.".
[0057] Step S2.2: Use the above-described 3D cartoon face driving method to drive the result in step S2.1 to obtain the 3D driving result.
[0058] Step S2.3: Use a semantic segmentation network for real faces to delineate the foreground and background regions for a 2D cartoon face. This part of the method adopts "Lee CH, Liu Z, Wu L, et al. Maskgan: Towards diverse and interactive facial image manipulation[C] / / Proceedings of the IEEE / CVFConference on Computer Vision and Pattern Recognition.2020:5549-5558."
[0059] Step S2.4: The background area obtained in step S2.3 and the rendering result of the 3D driving result obtained in step S2.2 are fused together. The fusion method is Poisson fusion, which can achieve smooth processing of the fusion edge and render the driven 3D cartoon face back to the original image, thereby realizing the driving of the 2D cartoon face.
[0060] like Figure 3 As shown, this application embodiment can drive a 3D cartoon face mesh model. When the actual category is detected as a 3D cartoon face, the current cartoon face is driven by a predefined expression base for average cartoon faces. A complete expression base can be pre-defined for a specific 3D cartoon face, thereby achieving the driving of the 3D cartoon face. This can be achieved using a preset expression base with "Sumner RW". The deformation transfer method described in "J. Deformation transfer for triangle meshes[J]. ACM Transactions on graphics(TOG),2004,23(3):399-405" can obtain a preliminary expression base for a specific 3D cartoon face, thus saving the time of creating a set of expression bases for each object to be driven. Due to the limitations of the deformation transfer method itself, there are problems with incomplete eye closing and opening. The expression base of the current cartoon face can be corrected by using a deformation method based on Laplacian coordinates and a preset deformation strategy. The current cartoon face can then be driven by a preset expression driving formula, thereby realizing the driving of the 3D cartoon face mesh model and effectively improving the accuracy of the expression base.
[0061] like Figure 4 As shown, this application embodiment can drive two-dimensional cartoon face images, reconstructing the current cartoon face into a target cartoon face that is a three-dimensional cartoon face. After reconstruction, a mesh model of the corresponding three-dimensional cartoon face can be obtained. The target cartoon face is then driven using a preset expression base of the three-dimensional cartoon face, thereby obtaining a three-dimensional driving result. The method of “Lee CH, Liu Z, Wu L, et al. Maskgan: Towards diverse and interactive facial image manipulation[C] / / Proceedings of the IEEE / CVF Conference on ComputerVision and Pattern Recognition.2020:5549-5558.” is used to define the foreground and background regions of the two-dimensional cartoon face using a semantic segmentation network for real faces, thereby guiding the foreground and background fusion mode of the driven target cartoon face. The driven three-dimensional cartoon face is then rendered back to the current cartoon face, thus realizing the driving of two-dimensional cartoon faces. This effectively reduces the driving cost and improves the versatility of the cartoon face driving method.
[0062] According to the cartoon face driving method proposed in the embodiments of this application, when the actual category is detected as a 3D cartoon face, the current cartoon face can be driven with a preset expression base. When the actual category is detected as a 2D cartoon face, the current cartoon face can be reconstructed into a target 3D cartoon face. The driven 3D cartoon face is obtained by using the method of driving the 3D cartoon face. Then, through the foreground and background fusion method guided by the semantic information of the face, the driven target cartoon face is rendered back to the current cartoon face, thereby realizing the driving of 2D cartoon faces, reducing the driving cost and improving the accuracy of expression base expression.
[0063] Next, the cartoon face driving device according to the embodiments of this application is described with reference to the accompanying drawings.
[0064] Figure 5 This is a block diagram of a cartoon face driving device according to an embodiment of this application.
[0065] like Figure 5 As shown, the cartoon face driving device 10 includes: a detection module 100, a first driving module 200, and a second driving module 300.
[0066] Specifically, the detection module 100 is used to detect the actual category of the current cartoon face.
[0067] The first driving module 200 is used to drive the current cartoon face with a preset expression base when the actual category is detected as a three-dimensional cartoon face.
[0068] The second driving module 300 is used to reconstruct the current cartoon face into a target cartoon face that is a three-dimensional cartoon face when the actual category is detected as a two-dimensional cartoon face, drive the target cartoon face with a preset expression base, and render the driven target cartoon face back to the current cartoon face.
[0069] Optionally, in one embodiment of this application, the first driving module 200 includes a processing unit and a driving unit.
[0070] The processing unit is used to perform deformation and transfer using a preset expression base to obtain the expression base of the current cartoon face.
[0071] The driving unit is used to correct the expression base of the current cartoon face using a preset deformation strategy and to drive the current cartoon face using a preset expression driving formula.
[0072] Optionally, in one embodiment of this application, the preset expression-driven formula is:
[0073]
[0074] Where M is the driving result, M mean For a specific 3D cartoon face with a neutral expression as input, K i Given the motion coefficients of the i-th expression, B i For M mean The expression base of the i-th expression (obtained in step 2).
[0075] Optionally, in one embodiment of this application, the second driving module 300 includes a rendering unit.
[0076] The rendering unit is used to guide the fusion of the target cartoon face foreground and background based on preset facial semantic information, so as to render back the current cartoon face.
[0077] It should be noted that the foregoing explanation of the cartoon face driving method embodiment also applies to the cartoon face driving device of this embodiment, and will not be repeated here.
[0078] According to the cartoon face driving device proposed in the embodiments of this application, when the actual category is detected as a three-dimensional cartoon face, the current cartoon face can be driven with a preset expression base. When the actual category is detected as a two-dimensional cartoon face, the current cartoon face can be reconstructed into a target cartoon face of a three-dimensional cartoon face. The driven three-dimensional cartoon face is obtained by using the method of driving the three-dimensional cartoon face. Then, through the foreground and background fusion method guided by the semantic information of the face, the driven target cartoon face is rendered back to the current cartoon face, thereby realizing the driving of two-dimensional cartoon faces, reducing the driving cost and improving the accuracy of expression base expression.
[0079] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0080] The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0081] When the processor 602 executes the program, it implements the cartoon face driving method provided in the above embodiments.
[0082] Furthermore, electronic devices also include:
[0083] Communication interface 603 is used for communication between memory 601 and processor 602.
[0084] The memory 601 is used to store computer programs that can run on the processor 602.
[0085] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0086] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0087] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0088] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0089] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described cartoon face driving method.
[0090] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0092] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0094] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0095] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0097] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A cartoon face driving method, characterized in that, Includes the following steps: Detect the actual category of the current cartoon face; When the actual category is detected as a 3D cartoon face, the current cartoon face is driven by a preset expression base; as well as When the actual category is detected as a two-dimensional cartoon face, the current cartoon face is reconstructed into the target cartoon face of the three-dimensional cartoon face, and the target cartoon face is driven by the preset expression base, and the driven target cartoon face is rendered back to the current cartoon face. The method of driving the current cartoon face with a preset expression base includes: The expression base of the current cartoon face is obtained by performing deformation and transfer using the preset expression base; The expression base of the current cartoon face is corrected using a preset deformation strategy, and the current cartoon face is driven using a preset expression driving formula; The preset expression-driving formula is: Where M is the driving result, For inputting a specific 3D cartoon face with a neutral expression, Given the motion coefficients of the i-th expression, for The expression base of the i-th expression.
2. The method according to claim 1, characterized in that, The step of rendering the driven target cartoon face back to the current cartoon face includes: Based on preset facial semantic information, the target cartoon face foreground and background are fused together after the driving process to render back the current cartoon face.
3. A cartoon face driving device, characterized in that, include: The detection module is used to detect the actual category of the current cartoon face; The first driving module is used to drive the current cartoon face with a preset expression base when the actual category is detected to be a three-dimensional cartoon face; as well as The second driving module is used to reconstruct the current cartoon face into the target cartoon face of the three-dimensional cartoon face when the actual category is detected to be a two-dimensional cartoon face, and drive the target cartoon face with the preset expression base, and render the driven target cartoon face back to the current cartoon face. The first driving module includes: The processing unit is used to perform deformation and transfer using the preset expression base to obtain the expression base of the current cartoon face; The driving unit is used to correct the expression base of the current cartoon face using a preset deformation strategy, and to drive the current cartoon face using a preset expression driving formula; The preset expression-driving formula is: Where M is the driving result, For inputting a specific 3D cartoon face with a neutral expression, Given the motion coefficients of the i-th expression, for The expression base of the i-th expression.
4. The apparatus according to claim 3, characterized in that, The second drive module includes: The rendering unit is used to guide the target cartoon face foreground and background to be merged based on preset facial semantic information, so as to render back the current cartoon face.
5. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the cartoon face driving method as described in any one of claims 1-2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the cartoon face driving method as described in any one of claims 1-2.
Citation Information
Patent Citations
Action-capture-data-driving-based two-dimensional cartoon expression animation production method
CN102509333A
Three-dimensional cartoon face generation method and device, electronic equipment and storage medium
CN112085835A