Virtual digital human driving method and device, electronic device and storage medium
By converting the weights in the first expression-based system into the weights in the second expression-based system based on audio data, the problem of unnatural facial expressions of the virtual digital human is solved and higher accuracy and naturalness are achieved.
Patent Information
- Application Number
- CN202410760577.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-13
AI Technical Summary
In the existing technology, the facial expression details of virtual digital humans are not rich enough and natural enough, giving people a stiff feeling, making it difficult to achieve high-accuracy facial driving.
By obtaining the audio data and performing conversion based on multiple expression base weights in the first expression base system, the weights in the second expression base system are obtained, and these weights are used to drive the virtual digital human. The second expression base system is the ARKit expression base system. The number of expression bases in the first expression base system is greater than the number of the second expression base system.
Improved the accuracy of virtual digital human face driving, making facial expressions more natural and detailed.
Smart Images

Figure CN118331431B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual digital humans, and in particular to a virtual digital human driving method and device, electronic equipment and storage medium. Background Art
[0002] Currently, for realistic virtual digital humans, the 52 expression bases defined by ARKit (Apple's AR development platform) can be used to drive the virtual digital humans and make corresponding facial expressions. However, the facial expressions displayed by the virtual digital humans under this solution are not detailed enough and natural enough, giving people a stiff feeling.
[0003] Therefore, how to provide a virtual digital human driving solution to improve the accuracy of virtual digital human facial driving and make facial expressions more natural has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the technical problems existing in the prior art, the embodiments of the present application provide a virtual digital human driving method and device, an electronic device and a storage medium.
[0005] In a first aspect, an embodiment of the present application provides a method for driving a virtual digital human, comprising:
[0006] Acquire audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data;
[0007] Based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the multiple first expression bases, the weights of the multiple second expression bases in the second expression base system are obtained, and the weights of the multiple second expression bases are used to drive the virtual digital human, wherein the second expression base system is the ARKit expression base system, and the number of first expression bases in the first expression base system is greater than the number of second expression bases in the second expression base system.
[0008] In a second aspect, the embodiment of the present application further provides a virtual digital human driving device, comprising:
[0009] a calculation unit, configured to obtain audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data;
[0010] A driving unit is used to obtain weights of multiple second expression bases in the second expression base system based on a mapping relationship between a first expression base in the first expression base system and a second expression base in the second expression base system, and the weights of the multiple first expression bases, and drive a virtual digital human using the weights of the multiple second expression bases, wherein the second expression base system is an ARKit expression base system, and the number of first expression bases in the first expression base system is greater than the number of second expression bases in the second expression base system.
[0011] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the virtual digital human driving method described in the first aspect are executed.
[0012] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual digital human driving method as described in the first aspect.
[0013] In the above scheme, since the weights of multiple first expression bases in the first expression base system are first obtained based on the audio data, and then the weights of multiple first expression bases in the first expression base system are converted into weights of multiple second expression bases in the second expression base system, rather than directly obtaining the weights of all second expression bases in the second expression base system based on the audio data, the accuracy of the obtained weights of the second expression bases can be improved, thereby improving the accuracy of the facial drive of the virtual digital human and making the facial expressions more natural. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of a method for driving a virtual digital human according to an embodiment of the present application;
[0015] Figure 2 is a mapping relationship between a first expression base in the first expression base system and a second expression base in the second expression base system;
[0016] Figure 3 A structural schematic diagram of an embodiment of a virtual digital human driving device provided in an embodiment of the present application;
[0017] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0019] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0020] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0021] Reference Figure 1 FIG. 1 is a flow chart of a method for driving a virtual digital human provided in an embodiment of the present application. The method for driving a virtual digital human includes:
[0022] S10, acquiring audio data, and obtaining weights of a plurality of first expression bases in a first expression base system based on the audio data;
[0023] In this embodiment, it should be noted that the audio data can be original audio data, or audio data converted from text. The first expression base system is another expression base system different from the second expression base system (i.e., the ARKit expression base system), which includes multiple first expression bases, and the number of first expression bases included is greater than 52 (i.e., the number of ARKit expression bases). In other words, compared with the ARKit expression base system, the first expression base system divides facial expressions more finely. Figure 262 first expression bases of the first expression base system are shown in . When the weights of multiple first expression bases in the first expression base system are obtained based on audio data, the weights of multiple first expression bases in the first expression base system can be obtained based on the audio data, or the weights of a part of the first expression bases in the first expression base system can be obtained based on the audio data, and then the weights of another part of the first expression bases in the first expression base system are deduced based on the weights of a part of the first expression bases in the first expression base system, wherein the weights of multiple first expression bases in the first expression base system, the weights of a part of the first expression bases in the first expression base system and the weights of another part of the first expression bases in the first expression base system can all be generated by a pre-trained prediction model. For example, Figure 2 The 37 first expression bases of the winning bid can be part of the aforementioned first expression bases, Figure 2 The 25 first expression bases not marked with ** can be the aforementioned other part of the first expression bases. After calculating the weights of the 37 first expression bases marked with **, the weights of the 25 first expression bases not marked with ** can be calculated based on the weights of the 37 first expression bases marked with **, and the weights of the 37 first expression bases marked with ** can be recalculated, or not.
[0024] S11. Based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the multiple first expression bases, obtain the weights of the multiple second expression bases in the second expression base system, and use the weights of the multiple second expression bases to drive the virtual digital human, wherein the second expression base system is the ARKit expression base system, and the number of first expression bases in the first expression base system is greater than the number of second expression bases in the second expression base system.
[0025] Figure 2In the last row, the ARKit expression base tongueOut (sticking out tongue) does not have a corresponding first expression base, so there is no need to calculate the weight of tongueOut, and the weight of tongueOut can be set to 0. Except for the last row, each row of data represents the mapping relationship between at least one first expression base and an ARKit expression base. After calculating the weights of multiple first expression bases, it is necessary to calculate the weights of multiple ARKit expression bases based on the mapping relationship, and finally use the weights of multiple ARKit expression bases to drive the virtual digital human. For example, the four first expression bases: mouth_funnel_dl (upper left lip down), mouth_funnel_dr (upper right lip down), mouth_funnel_ul (lower left lip up), and mouth_funnel_ur (lower right lip up) are mapped to the ARKit expression base mouthFunnel (open mouth slightly and open lips). The weight of mouthFunnel needs to be calculated based on the weights of mouth_funnel_dl, mouth_funnel_dr, mouth_funnel_ul, and mouth_funnel_ur. Finally, we can get Figure 2 The weights of all ARKit expression bases in the , and the weights of all ARKit expression bases are used to drive the virtual digital human.
[0026] The virtual digital human driving method provided in the embodiment of the present application first obtains the weights of multiple first expression bases in the first expression base system based on audio data, and then converts the weights of multiple first expression bases in the first expression base system into weights of multiple second expression bases in the second expression base system, rather than directly obtaining the weights of all second expression bases in the second expression base system based on audio data. This can improve the accuracy of the obtained weights of the second expression bases, thereby improving the accuracy of the virtual digital human facial driving and making the facial expressions more natural.
[0027] Based on the foregoing method embodiment, the step of obtaining the weights of the plurality of second expression bases in the second expression base system based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the plurality of first expression bases, may include:
[0028] Calculate the weight γ_Q of the second expression base Q, the calculation formula is: γ_Q = ∑ (ai × γ_Pi);
[0029] Among them, ∑(ai×γ_Pi) represents the summation of ai×γ_Pi, the subscript of ∑ in ∑(ai×γ_Pi) is i=1, and the superscript is N, N represents the number of first expression bases mapped to the second expression base Q, γ_Pi represents the weight of the i-th first expression base Pi mapped to the second expression base Q, ai represents the weight coefficient corresponding to γ_Pi, and ai is determined according to the weight of the first expression base mapped to the second expression base Q.
[0030] Based on the above method embodiment, the calculation formula of ai can be: ai=λi / (∑λi);
[0031] Where ∑λi represents the sum of λi, the subscript of ∑ in ∑λi is i=1, the superscript is N, λi=(1 / ((2π) 0.5 ×δ))×exp(-(γ_Pi-μ) 2 / (2×δ)), μ is the mean of the weights of the first expression base mapped to the second expression base Q, and δ is the variance of the weights of the first expression base mapped to the second expression base Q.
[0032] Based on the aforementioned method embodiment, the step of driving the virtual digital human using the weights of the plurality of second expression bases may include:
[0033] The weight γ_Q of the second expression base Q is optimized, and the optimization formula is γ_QQ=1 / (1+exp(-5×γ_Q))-0.5;
[0034] Among them, γ_QQ is the weight of the optimized second expression base Q;
[0035] The virtual digital human is driven by using the optimized weight of the second expression base Q.
[0036] Reference Figure 3 FIG. 1 is a schematic diagram of a virtual digital human driving device provided in an embodiment of the present application, and the device includes:
[0037] A calculation unit 30, configured to obtain audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data;
[0038] The driving unit 31 is used to obtain the weights of multiple second expression bases in the second expression base system based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the multiple first expression bases, and use the weights of the multiple second expression bases to drive the virtual digital human, wherein the second expression base system is an ARKit expression base system, and the number of first expression bases in the first expression base system is greater than the number of second expression bases in the second expression base system.
[0039] The virtual digital human driving device provided in the embodiment of the present application first obtains the weights of multiple first expression bases in the first expression base system based on audio data, and then converts the weights of multiple first expression bases in the first expression base system into weights of multiple second expression bases in the second expression base system, rather than directly obtaining the weights of all second expression bases in the second expression base system based on audio data. This can improve the accuracy of the obtained weights of the second expression bases, thereby improving the accuracy of the virtual digital human facial driving and making the facial expressions more natural.
[0040] Based on the above device embodiment, the driving unit can be specifically used for:
[0041] Calculate the weight γ_Q of the second expression base Q, the calculation formula is: γ_Q = ∑ (ai × γ_Pi);
[0042] Among them, ∑(ai×γ_Pi) represents the summation of ai×γ_Pi, the subscript of ∑ in ∑(ai×γ_Pi) is i=1, and the superscript is N, N represents the number of first expression bases mapped to the second expression base Q, γ_Pi represents the weight of the i-th first expression base Pi mapped to the second expression base Q, ai represents the weight coefficient corresponding to γ_Pi, and ai is determined according to the weight of the first expression base mapped to the second expression base Q.
[0043] Based on the above device embodiment, the calculation formula of ai can be: ai=λi / (∑λi);
[0044] Where ∑λi represents the sum of λi, the subscript of ∑ in ∑λi is i=1, the superscript is N, λi=(1 / ((2π) 0.5 ×δ))×exp(-(γ_Pi-μ) 2 / (2×δ)), μ is the mean of the weights of the first expression base mapped to the second expression base Q, and δ is the variance of the weights of the first expression base mapped to the second expression base Q.
[0045] The implementation process of the virtual digital human driving device provided in the embodiment of the present application is consistent with the virtual digital human driving method provided in the embodiment of the present application, and the effect that can be achieved is also the same as the virtual digital human driving method provided in the embodiment of the present application, which will not be repeated here.
[0046] like Figure 4 As shown, an electronic device provided by an embodiment of the present application includes: a processor 40, a memory 41 and a bus 42, wherein the memory 41 stores machine-readable instructions executable by the processor 40, and when the electronic device is running, the processor 40 communicates with the memory 41 through the bus 42, and the processor 40 executes the machine-readable instructions to perform the steps of the virtual digital human driving method as described above.
[0047] Specifically, the above-mentioned memory 41 and processor 40 can be general-purpose memories and processors, which are not specifically limited here. When the processor 40 runs the computer program stored in the memory 41, the above-mentioned virtual digital human driving method can be executed.
[0048] Corresponding to the above-mentioned virtual digital human driving method, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned virtual digital human driving method are executed.
[0049] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for driving a virtual digital human, characterized in that: include: Acquire audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data; Based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the plurality of first expression bases, the weights of the plurality of second expression bases in the second expression base system are obtained, and the weights of the plurality of second expression bases are used to drive the virtual digital human, wherein the second expression base system is an ARKit expression base system, and the number of the first expression bases in the first expression base system is greater than the number of the second expression bases in the second expression base system; The step of obtaining the weights of the plurality of second expression bases in the second expression base system based on the mapping relationship between the first expression base in the first expression base system and the second expression base in the second expression base system, and the weights of the plurality of first expression bases, comprises: Calculate the weight γ_Q of the second expression base Q, the calculation formula is: γ_Q = ∑ (ai × γ_Pi); Among them, ∑(ai×γ_Pi) represents the summation of ai×γ_Pi, the subscript of ∑ in ∑(ai×γ_Pi) is i=1, and the superscript is N, N represents the number of first expression bases mapped to the second expression base Q, γ_Pi represents the weight of the i-th first expression base Pi mapped to the second expression base Q, ai represents the weight coefficient corresponding to γ_Pi, and ai is determined according to the weight of the first expression base mapped to the second expression base Q.
2. The method according to claim 1, characterized in that The calculation formula of ai is: ai=λi / (∑λi); Where ∑λi represents the sum of λi, the subscript of ∑ in ∑λi is i=1, the superscript is N, λi=(1 / ((2π) 0.5 ×δ))×exp(-(γ_Pi-μ) 2 / (2×δ)), μ is the mean of the weights of the first expression base mapped to the second expression base Q, and δ is the variance of the weights of the first expression base mapped to the second expression base Q.
3. The method according to claim 1 or 2, characterized in that The method of driving the virtual digital human using the weights of the plurality of second expression bases comprises: The weight γ_Q of the second expression base Q is optimized, and the optimization formula is γ_QQ=1 / (1+exp(-5×γ_Q))-0.5; Among them, γ_QQ is the weight of the optimized second expression base Q; The virtual digital human is driven by using the optimized weight of the second expression base Q.
4. The method according to claim 1, characterized in that The acquiring of audio data and obtaining weights of a plurality of first expression bases in the first expression base system based on the audio data include: Acquire audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data; The weight of at least one first expression base other than the plurality of first expression bases in the first expression base system is obtained based on the weights of the plurality of first expression bases.
5. A virtual digital human driving device, characterized in that: include: a calculation unit, configured to obtain audio data, and obtain weights of a plurality of first expression bases in a first expression base system based on the audio data; A driving unit, configured to obtain weights of a plurality of second expression bases in the second expression base system based on a mapping relationship between a first expression base in the first expression base system and a second expression base in the second expression base system, and weights of the plurality of first expression bases, and drive a virtual digital human using the weights of the plurality of second expression bases, wherein the second expression base system is an ARKit expression base system, and the number of first expression bases in the first expression base system is greater than the number of second expression bases in the second expression base system; The drive unit is used for: Calculate the weight γ_Q of the second expression base Q, the calculation formula is: γ_Q = ∑ (ai × γ_Pi); Among them, ∑(ai×γ_Pi) represents the summation of ai×γ_Pi, the subscript of ∑ in ∑(ai×γ_Pi) is i=1, and the superscript is N, N represents the number of first expression bases mapped to the second expression base Q, γ_Pi represents the weight of the i-th first expression base Pi mapped to the second expression base Q, ai represents the weight coefficient corresponding to γ_Pi, and ai is determined according to the weight of the first expression base mapped to the second expression base Q.
6. The device according to claim 5, characterized in that The calculation formula of ai is: ai=λi / (∑λi); Where ∑λi represents the sum of λi, the subscript of ∑ in ∑λi is i=1, the superscript is N, λi=(1 / ((2π) 0.5 ×δ))×exp(-(γ_Pi-μ) 2 / (2×δ)), μ is the mean of the weights of the first expression base mapped to the second expression base Q, and δ is the variance of the weights of the first expression base mapped to the second expression base Q.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the virtual digital human driving method according to any one of claims 1 to 4 are executed.
8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual digital human driving method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for generating virtual animation expressions
CN110874869A
Virtual character expression control method and device, electronic equipment and medium
CN113633983A
Facial expression generation method and device
CN115512193A
Facial expression capturing method and system, electronic equipment and medium
CN116612518A
Expression base acquisition method and device, equipment and storage medium
CN117011431A
