Method and apparatus for generating video
By obtaining text features and generating key points of the target person's face, it solves the computational complexity and naturalness problems in the application of virtual human technology, achieves efficient conversion from text to video, is suitable for multi-modal scenes, and improves Naturalness and efficiency of human-computer interaction.
Patent Information
- Application Number
- CN202011270760.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-13
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-11-13
AI Technical Summary
The application of existing virtual human technology in scenarios such as online education and webcasting is still immature. The computational complexity and time cost are high, making it difficult to achieve natural human-computer interaction.
By obtaining text features, the target person's face key points for the text are determined, and a video of the target person is generated based on these key points, achieving convenient conversion from a given text to a video of the target person, reducing computational complexity and time costs.
It improves the naturalness and efficiency of virtual human technology in human-computer interaction, is suitable for multi-modal conversion scenarios, and simplifies the video production process.
Smart Images

Figure CN112381926B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a method and device for generating a video. Background Art
[0002] As artificial intelligence technologies such as speech recognition, natural language processing, and computer vision become increasingly mature and are gradually being applied to many practical scenarios, how to further realize the widespread application of artificial intelligence technologies and how to further develop artificial intelligence technologies are among the issues that many researchers are currently thinking about and exploring.
[0003] Under this kind of thinking and exploration, multimodal intelligence has gradually become one of the key research directions in the field of artificial intelligence. For example, many scholars are studying the synthesis technology and application of multimodal virtual humans to achieve more natural and convenient human-computer interaction.
[0004] In recent years, with the rapid development of online education, online learning, and online live broadcasting, scenarios such as virtual human teaching, virtual human live broadcasting, and virtual human commentary have emerged. However, the application of virtual human technology in these scenarios is still immature and there are many areas for improvement. However, it is conceivable that virtual human technology has broad application space and application prospects in these industries. Summary of the invention
[0005] Embodiments of the present disclosure provide a method and apparatus for generating a video.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating a video, the method comprising: obtaining text features extracted from a text; determining features of a target person based on the text features, wherein the features of the target person include facial key points of the target person with respect to the text; and generating a video of the target person based on the facial key points.
[0007] In a second aspect, an embodiment of the present disclosure provides a device for generating a video, the device comprising: an acquisition unit, configured to acquire text features extracted from a text; a determination unit, configured to determine features of a target person based on the text features, wherein the features of the target person include facial key points of the target person with respect to the text; and a generation unit, configured to generate a video of the target person based on the facial key points.
[0008] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0010] The method and device for generating a video provided by the embodiments of the present disclosure, for any given text, uses the text features of the text to generate features of the target person, such as key points on the face of the target person when reading the text, and then uses the features of the target person to produce a video of the target person, thereby achieving a convenient conversion from a given text to a video of the target person, and can be applied to many given texts to generate a video of the target person reading the text. Moreover, compared with the existing video production method based on three-dimensional face modeling, it reduces the computational complexity and time cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0012] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0013] Figure 2 is a flow chart of one embodiment of a method for generating a video according to the present disclosure;
[0014] Figure 3 is a flowchart of another embodiment of a method for generating a video according to the present disclosure;
[0015] Figure 4 is a schematic diagram of an application scenario of a method for generating a video according to an embodiment of the present disclosure;
[0016] Figure 5 is a structural schematic diagram of an embodiment of an apparatus for generating a video according to the present disclosure;
[0017] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0019] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a method for generating a video or an apparatus for generating a video of the present disclosure can be applied.
[0021] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0022] The terminal devices 101, 102, 103 interact with the server 105 through the network 104 to receive or send messages, etc. Various client applications may be installed on the terminal devices 101, 102, 103. For example, browser applications, search applications, social platform software, instant messaging tools, educational applications, live broadcast applications, information flow applications, etc.
[0023] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0024] The server 105 may be a server that provides various services, such as a server that provides backend support for client applications installed on the terminal devices 101, 102, and 103. The server 105 may obtain text from the terminal devices 101, 102, and 103 and extract text features, and then use the text features to generate facial key points of the target person for the above text, and then generate a video of the target person based on the facial key points. Furthermore, the server 105 may also feed back the generated video of the target person to the terminal devices 101, 102, and 103 for display.
[0025] It should be noted that the above text can also be directly stored locally on the server 105. The server 105 can directly extract the locally stored text and extract text features for processing. In this case, the terminal devices 101, 102, 103 and the network 104 may not exist.
[0026] It should be noted that the method for generating a video provided in the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for generating a video is generally disposed in the server 105 .
[0027] It should also be noted that the terminal devices 101, 102, and 103 can also use text features to generate facial key points of the target person for the above text, and then generate a video of the target person based on the facial key points. In this case, the method for generating a video can also be executed by the terminal devices 101, 102, and 103, and accordingly, the device for generating a video can also be set in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may not have the server 105 and the network 104.
[0028] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0029] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0030] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for generating a video according to the present disclosure. The method for generating a video comprises the following steps:
[0031] Step 201: Obtain text features extracted from text.
[0032] In this embodiment, the text can be any text. The text can be pre-specified by the technician according to the actual application requirements, or can be determined according to the actual application scenario. For example, the text can be a terminal device (such as Figure 1 The text entered by the user of the terminal devices 101, 102, 103, etc. shown in the figure is inputted in the terminal device.
[0033] The features specifically indicated by the text features of the text can be set by the technicians according to the actual application requirements and application scenarios. For example, the text features of the text can include rhythm features, phoneme features, tone features, pitch features, etc.
[0034] For any text, various existing methods for extracting text features (such as a signal processing method based on Fourier transform, a feature extraction method based on neural network, etc.) can be used to extract text features of the text.
[0035] In this embodiment, the execution subject of the method for generating a video (such as Figure 1 The server 105 shown may obtain text features extracted from text from a local or other storage device.
[0036] It should be noted that the process of extracting text features from text can be performed by the above-mentioned execution subject and the text features can be stored locally. In this case, the above-mentioned execution subject can directly obtain the text features from the local. The process of extracting text features from text can also be performed by other electronic devices (such as Figure 1 The terminal devices 101, 102, 103 or other servers shown in the figure) are executed and stored. At this time, the above-mentioned execution subject can obtain text features from other electronic devices.
[0037] Step 202, determining the characteristics of the target person according to the text characteristics, the characteristics of the target person including the facial key points of the target person with respect to the text.
[0038] In this embodiment, the target person may be a person pre-specified by a technician or a user according to actual application requirements. The target person's facial key points for the text may indicate the key points of the target person's face when reading the text.
[0039] Since a person's face changes differently when reading different texts, the target person's facial key points may be different for different texts. The facial key points may be represented by the position coordinates of the key points on the face.
[0040] After obtaining the text features of the text, various methods can be used to determine the features of the target person based on the text features. For example, a video of the target person reading a large amount of text can be collected in advance, and then various existing key point extraction methods can be used to extract the key points of the target person's face presented in the recorded video, and at the same time extract the text features of each text. Afterwards, the mapping relationship between the text features and the key points of the target person's face can be statistically calculated based on methods such as curve fitting, so that the key points of the target person's face corresponding to the text features can be determined based on the text features of any text.
[0041] Step 203, generating a video of the target person based on the facial key points.
[0042] In this embodiment, the target person's video may refer to a video showing the target person's face. After obtaining the target person's facial key points, the target person's video may be generated by using various existing image processing methods and video processing methods in combination with actual application requirements.
[0043] For example, an image of the target person can be obtained from a local device or another connected device, and then the key points of the face of the target person shown in the image can be determined, and then the key points in the image can be adjusted to the determined facial key points, thereby obtaining an adjusted image of the target person. Then, the adjusted image of the target person can be used to create a video of the target person.
[0044] In some optional implementations of this embodiment, the target person's features may also include the target person's acoustic features for the text. Among them, the acoustic features may refer to the acoustic information of the audio corresponding to the text. The acoustic information indicated by the acoustic features may be pre-set by a technician according to actual application requirements. For example, the acoustic features may include fundamental frequency features, resonance peak features, and the like.
[0045] While using the text features of the text to generate the target person's facial key points, jointly generating the target person's acoustic features for the text can improve the consistency between the face shape formed by the facial key points and the target person's audio for the text, thereby helping to improve the naturalness of the produced video.
[0046] In some optional implementations of this embodiment, after obtaining the acoustic features of the target person for the text, various existing speech synthesis methods (such as using a pre-trained vocoder, etc.) can be used to synthesize the audio corresponding to the text according to the acoustic features.
[0047] Afterwards, audio can be added to the generated video of the target person to obtain a video with audio. Specifically, audio can be added to the generated video of the target person using various existing methods for merging audio and video.
[0048] It should be noted that since the determined acoustic features are the acoustic features of the audio produced when the target person reads the text, the obtained acoustic features may contain the acoustic information of the target person. At this time, the audio synthesized using the obtained acoustic features has the vocal features of the target person (such as the timbre, accent, etc. of the target person).
[0049] By adding audio with the target person's vocal characteristics to the generated video of the target person, the generated information type is further enriched, thereby achieving convenient multimodal conversion from a given text to the target person's audio and video for the text.
[0050] Optionally, the generated audio may include at least one of the following: speech data of the target person, singing data of the target person, wherein the singing data may refer to data generated by various forms of singing.
[0051] Thus, while generating a video of the target person, audio consisting of the target person's speaking data for a given text and / or audio consisting of the target person's singing data for a given text can also be generated, thereby further enriching the type of generated information.
[0052] In some optional implementations of this embodiment, after obtaining the text features of the text, a pre-trained feature determination model corresponding to the target person may be used to determine the features of the target person based on the text features.
[0053] The target person's corresponding feature determination model can represent the correspondence between the text features of the text and the target person's features (such as key points on the target person's face when reading the text, acoustic features of the audio generated by the target person reading the text, etc.). The target person's corresponding feature determination model can be trained using pre-collected target person data.
[0054] Taking the target person's features including the key points of the target person's face when reading the text and the acoustic features of the audio generated by the target person reading the text as an example, training data can be obtained first, and then the training data can be used to train a feature determination model corresponding to the target person.
[0055] Specifically, a video and audio of a target person for a large amount of text can be pre-recorded, and then the key points of the target person's face presented in the recorded video are extracted, and the acoustic features of the target person are extracted from the recorded audio, and the text features of each text are extracted at the same time. Afterwards, the extracted text features and the corresponding key points and acoustic features can be used as training data.
[0056] Then, various types of untrained or trained artificial neural networks can be obtained as the initial feature determination model, the text features in the training data can be used as the input of the initial feature determination model, and the key points and acoustic features corresponding to the input text features can be used as the expected output of the initial feature determination model. Algorithms such as gradient descent and back propagation are used to continuously adjust the parameters of the initial feature determination model according to the value of the loss function until the preset training stop condition is reached (such as the value of the loss function meets certain conditions, etc.). At this time, the trained initial feature determination model can be used as the feature determination model corresponding to the above-mentioned target person.
[0057] The text features of the text are used to jointly supervise the learning of the target person's facial key points and the target person's acoustic features for the text. While ensuring the consistency between the face shape formed by the facial key points and the target person's audio for the text to improve the naturalness of the produced video, by realizing the end-to-end conversion process between the text features of the text and the target person's features for the text, the speed and complexity of converting from text features to the target person's features for the text can be reduced, thereby improving the efficiency of producing the target person's video.
[0058] In some optional implementations of the present embodiment, the facial key points of the target person determined by the feature determination model corresponding to the target person may specifically include at least one group of facial key points, and each group of facial key points can represent a frame of facial image, that is, each group of facial key points can be used to generate a frame of facial image of the target person.
[0059] Each group of facial key points may include a target number of key points to respectively represent different facial parts. Specifically, the target number may be set by a technician according to actual application requirements.
[0060] At this time, after obtaining at least one group of facial key points of the target person, facial images corresponding to each group of facial key points can be generated to obtain a facial image set, and then a video of the target person is generated using the facial image set.
[0061] For example, an image of the target person is obtained in advance, and then for each group of facial key points, the facial key points displayed in the image of the target person are adjusted to the group of facial key points to obtain a facial image corresponding to the group of facial key points. Then, a video of the target person is produced using the obtained multiple facial images.
[0062] Generating multiple facial images of the target person in frames, and then using the multiple facial images to produce a video of the target person can further enhance the flexibility and naturalness of video production, and also help ensure the smoothness of the video.
[0063] The method provided by the above-mentioned embodiments of the present disclosure generates, for any given text, key points of the target person's face when reading the text and acoustic features of the target person's audio when reading the text based on the text features of the text, and uses the obtained key points to produce a video of the target person, while using the obtained acoustic features to produce the target person's audio for the text, and then merges the obtained audio and video to achieve multimodal conversion from the given text to the target person's audio and video for the text.
[0064] Further references Figure 3 , which shows a process 300 of another embodiment of a method for generating a video. The process 300 of the method for generating a video includes the following steps:
[0065] Step 301: Obtain text features extracted from text.
[0066] Step 302, using a pre-trained feature determination model corresponding to the target person, based on the text features, determines the target person's acoustic features for the text and at least one set of facial key points.
[0067] Step 303: synthesize the target person's audio for the text using the acoustic features.
[0068] Step 304: for each group of facial key points in at least one group of facial key points, generate a facial image corresponding to the group of facial key points based on the group of facial key points using a pre-trained image generation model corresponding to the target person.
[0069] In this embodiment, the image generation model can represent the correspondence between a group of facial key points and a frame of facial image. The image generation model corresponding to the target person can be trained using pre-collected data of the target person.
[0070] As an example, training data may be obtained first, and then the image generation model corresponding to the target person may be trained using the training data. Specifically, a video of the target person facing a large amount of text may be pre-recorded, and then each frame image may be extracted from the video, and the facial key point group corresponding to each frame image may be determined. Afterwards, the extracted frame images and the corresponding key point groups may be used as training data.
[0071] Then, various types of untrained or trained artificial neural networks can be obtained as the initial image generation model, the key point group in the training data can be used as the input of the initial image generation model, and the image corresponding to the input key point group can be used as the expected output of the initial image generation model. Algorithms such as gradient descent and back propagation are used to continuously adjust the parameters of the initial image generation model according to the value of the loss function until the preset training stop condition is reached (such as the value of the loss function meets certain conditions, etc.). At this time, the trained initial image generation model can be used as the image generation model corresponding to the above-mentioned target person.
[0072] Step 305: Generate a video of the target person using the facial images corresponding to each group of facial key points.
[0073] Step 306: Add the target person's audio for the text to the generated video of the target person.
[0074] The specific execution process of the contents not described in detail in the above steps 301-306 can be referred to Figure 2 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0075] Continue to see Figure 4 , Figure 4 FIG. 4 is an exemplary application scenario 400 of the method for generating a video according to this embodiment. Figure 4 In the application scenario of , the user can specify the text and the target person in the terminal 401 used by the user. For example, the user can select a text as the input text, and then specify a favorite star as the target person.
[0076] Then, the text features 402 of the input text may be input into the target person feature determination model 403 to obtain the target person's acoustic features 404 for the input text and a plurality of face key point groups 405 for the target person for the input text.
[0077] Next, the audio 408 corresponding to the acoustic feature 404 can be synthesized using a vocoder 406, that is, the audio of the target person reading the text selected by the user can be obtained. At the same time, an image generation model 407 is used to generate an image 409 of the target person corresponding to each group of facial key points, and a video 410 of the target person is produced based on the obtained multiple images of the target person.
[0078] Afterwards, the audio 408 and video 410 of the target person may be combined to obtain audio and video 411, and the audio and video 411 may be sent to the terminal 401 for the user to watch the video of his favorite star reading his designated text.
[0079] The process of the method for generating a video in this embodiment highlights the process of using a pre-trained image generation model corresponding to the target person to generate a facial image of the target person according to the facial key points of the target person, that is, to achieve end-to-end facial image generation. Compared with many existing algorithms that generate faces based on complex calculations of facial key points, it can reduce the amount of calculation, increase the speed of facial image generation, and thus improve the production efficiency of the target person's video.
[0080] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for generating a video. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0081] like Figure 5 As shown, the apparatus 500 for generating a video provided by this embodiment includes an acquisition unit 501, a determination unit 502, and a generation unit 503. The acquisition unit 501 is configured to acquire text features extracted from text; the determination unit 502 is configured to determine the features of a target person according to the text features, wherein the features of the target person include the facial key points of the target person with respect to the text; and the generation unit 503 is configured to generate a video of the target person according to the facial key points.
[0082] In the apparatus 500 for generating a video in this embodiment, the specific processing of the acquisition unit 501, the determination unit 502 and the generation unit 503 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.
[0083] The above-mentioned embodiments of the present disclosure provide a device for generating a video, which obtains text features extracted from a text through an acquisition unit; a determination unit determines features of a target person based on the text features, wherein the features of the target person include facial key points of the target person with respect to the text; and a generation unit generates a video of the target person based on the facial key points, thereby realizing a multimodal conversion from a given text to the audio and video of the target person with respect to the text.
[0084] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server in (a) 600. Figure 6 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0085] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0086] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0087] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0088] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0089] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a video, the method comprising: obtaining text features extracted from text; determining features of a target person based on the text features, wherein the features of the target person include facial key points of the target person with respect to the text; and generating a video of the target person based on the facial key points.
[0092] According to one or more embodiments of the present disclosure, the target person's characteristics further include the target person's acoustic characteristics with respect to the text.
[0093] According to one or more embodiments of the present disclosure, the method further includes: synthesizing the target person's audio for the text using acoustic features; and adding audio to the video.
[0094] According to one or more embodiments of the present disclosure, determining the characteristics of a target person according to text characteristics includes: using a pre-trained characteristic determination model corresponding to the target person to determine the characteristics of the target person according to the text characteristics.
[0095] According to one or more embodiments of the present disclosure, the above-mentioned facial key points include at least one group of facial key points, and each group of facial key points is used to represent a frame of facial image.
[0096] According to one or more embodiments of the present disclosure, a video of a target person is generated based on facial key points, including: generating facial images corresponding to each group of facial key points in at least one group of facial key points to obtain a facial image set; and generating a video of the target person using the facial image set.
[0097] According to one or more embodiments of the present disclosure, facial images corresponding to each group of facial key points in at least one group of facial key points are generated, including: for each group of facial key points in the at least one group of facial key points, a pre-trained image generation model corresponding to a target person is used to generate a facial image corresponding to the group of facial key points based on the group of facial key points.
[0098] According to one or more embodiments of the present disclosure, the audio includes at least one of the following: speaking data, singing data.
[0099] According to one or more embodiments of the present disclosure, the present disclosure provides a device for generating a video, the device comprising: an acquisition unit, configured to acquire text features extracted from text; a determination unit, configured to determine features of a target person based on the text features, wherein the features of the target person include facial key points of the target person with respect to the text; and a generation unit, configured to generate a video of the target person based on the facial key points.
[0100] According to one or more embodiments of the present disclosure, the target person's characteristics further include the target person's acoustic characteristics with respect to the text.
[0101] According to one or more embodiments of the present disclosure, the device further includes: a synthesis unit configured to synthesize the audio of the target person for the text using acoustic features; and an adding unit configured to add audio to the video.
[0102] According to one or more embodiments of the present disclosure, the above-mentioned determination unit is further configured to determine the characteristics of the target person according to text features using a pre-trained feature determination model corresponding to the target person.
[0103] According to one or more embodiments of the present disclosure, the above-mentioned facial key points include at least one group of facial key points, and each group of facial key points is used to represent a frame of facial image.
[0104] According to one or more embodiments of the present disclosure, the generation unit is further configured to: generate facial images corresponding to each group of facial key points in at least one group of facial key points to obtain a facial image set; and generate a video of the target person using the facial image set.
[0105] According to one or more embodiments of the present disclosure, the above-mentioned generation unit is further configured to: for each group of facial key points in at least one group of facial key points, generate a facial image corresponding to the group of facial key points based on the group of facial key points using a pre-trained image generation model corresponding to the target person.
[0106] According to one or more embodiments of the present disclosure, the audio includes at least one of the following: speaking data, singing data.
[0107] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes an acquisition unit, a determination unit, and a generation unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring text features extracted from text".
[0108] As another aspect, the present disclosure also provides a computer-readable medium. The computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains text features extracted from the text; determines the features of the target person based on the text features, wherein the features of the target person include the facial key points of the target person with respect to the text; and generates a video of the target person based on the facial key points.
[0109] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned disclosure concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A method for generating a video, include: Obtaining text features extracted from the text; Determine the target person's features according to the text features, wherein the target person's features include the target person's facial key points with respect to the text and the target person's acoustic features with respect to the text; Generate a video of the target person based on the facial key points. The method further includes: synthesizing the target person's audio for the text using the acoustic features; adding the audio to the video, the audio including at least one of the following: speaking data, singing data; Determining the characteristics of the target person according to the text characteristics includes: using a pre-trained characteristic determination model corresponding to the target person to determine the characteristics of the target person according to the text characteristics; The feature determination model is determined in the following manner: Obtain training data and initial feature determination model; The text features in the training data are used as the input of the initial feature determination model, and the key points and acoustic features corresponding to the input text features are used as the expected output of the initial feature determination model. The parameters of the initial feature determination model are adjusted according to the value of the loss function until a preset training stop condition is reached.
2. The method according to claim 1, in, The facial key points include at least one group of facial key points, and each group of facial key points is used to represent a frame of facial image.
3. The method according to claim 2, in, The step of generating a video of the target person according to the key points of the face includes: Generate facial images corresponding to each group of facial key points in the at least one group of facial key points to obtain a facial image set; The video of the target person is generated using the face image set.
4. The method according to claim 3, in, The generating of the facial images corresponding to the respective groups of facial key points in the at least one group of facial key points comprises: For each group of facial key points in the at least one group of facial key points, a pre-trained image generation model corresponding to the target person is used to generate a facial image corresponding to the group of facial key points based on the group of facial key points.
5. A device for generating a video, include: An acquisition unit configured to acquire text features extracted from the text; A determination unit is configured to determine the characteristics of a target person according to the text characteristics, wherein the characteristics of the target person include facial key points of the target person with respect to the text and acoustic characteristics of the target person with respect to the text; A generating unit, configured to generate a video of the target person according to the key points of the face; The device also includes: An adding module is configured to synthesize the audio of the target person for the text by using the acoustic features; add the audio to the video, the audio including at least one of the following: speaking data, singing data; Determining the characteristics of the target person according to the text characteristics includes: using a pre-trained characteristic determination model corresponding to the target person to determine the characteristics of the target person according to the text characteristics; The feature determination model is determined in the following manner: Obtain training data and initial feature determination model; The text features in the training data are used as the input of the initial feature determination model, and the key points and acoustic features corresponding to the input text features are used as the expected output of the initial feature determination model. The parameters of the initial feature determination model are adjusted according to the value of the loss function until a preset training stop condition is reached.
6. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
