A 2D sports field speaking portrait synthesis method and device
By using high-definition data sets and improved model structures, it solves the problems of clarity and resolution in speaking portrait synthesis technology, adapts to large-screen applications, improves the effect of portraits, solves the coupling problem between portraits and reference images, and achieves Higher quality lip style.
Patent Information
- Application Number
- CN202311713173.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-12-14
AI Technical Summary
In the existing speaking portrait synthesis technology, the clarity of the synthesized portrait is low, and the portrait resolution does not meet the needs of large-screen applications. At the same time, the synthesis effect is coupled with the reference image, especially the mouth-opening image, which has a greater impact and loses the diversity of lip shapes. style.
High-definition HDTF, MEAD data sets and mixed-quality AVSpeech data sets are used for model training, and a sports field talking portrait synthesis model including a face encoder and a face decoder is constructed through 9 convolution modules and 6 convolution modules. Feature encoding and decoding, and the introduction of new reference frame selection methods and perceptual loss functions to improve the resolution and effect of synthetic portraits.
Significantly improves the clarity and resolution of talking portraits, adapts to the needs of large-screen applications, enriches the lip style, and improves the synthesis effect.
Smart Images

Figure CN117745904B
Abstract
Description
Technical Field
[0001] The invention relates to a 2D sports field speaking portrait synthesis method and device, belonging to the technical field of speaking portrait synthesis. Background Art
[0002] Talking portrait synthesis involves multiple fields such as artificial intelligence, computer vision and speech processing. The research goal is to convert audio input into realistic face images and achieve facial expressions and lip movements that match the audio content, which has broad application prospects. In recent years, deep learning technology has made significant progress in the field of audio-driven talking portrait synthesis, from speech-generated constrained talking faces to speech-generated unconstrained explanatory faces, to precise speech-driven lip synchronization of general videos. By using technologies such as deep generative models and GAN, it is possible to achieve synthesis from audio to face images, and to capture facial expressions and lip movements related to the audio content.
[0003] However, the current synthesis technology still has the following problems: the clarity of the synthesized portrait is relatively low; the portrait resolution does not meet the application requirements on the large screen; the synthesized portrait effect is coupled with the reference image. If the reference is an open-mouth image, the impact will be greater. If the reference is a closed-mouth image, although the impact is smaller, the style of lip shape diversity will also be lost. Summary of the invention
[0004] The purpose of the present invention is to provide a 2D sports field speaking portrait synthesis method and device, which solves the problem of low clarity of the synthesized portrait; and adapts to the needs of large-screen applications and improves the effect of the synthesized portrait.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0006] The high-definition HDTF and MEAD datasets and the mixed-quality AVSpeech dataset are selected as the initial datasets, which are then divided into a test set and a training set after preprocessing.
[0007] A sports field speaking portrait synthesis model is constructed, comprising a face encoder and a face decoder, wherein the face encoder comprises 9 convolution modules connected in series to realize feature encoding of a mask face image and a reference face image; the face decoder comprises a face decoding module and a sound encoding module, wherein the sound encoding module comprises 6 convolution modules connected in series, and the face decoding module comprises 9 convolution modules connected in series;
[0008] Use the training set to train the sports field speaking portrait synthesis model to obtain the model with the best performance;
[0009] The test set data is input into the trained sports field speaking portrait synthesis model, and the synthesized speaking portrait result is output.
[0010] Preferably, the preprocessing method is as follows: the video frame rate in the initial data set is converted to 25fps, the audio bit rate is converted to 16000hz, and the audio and video are segmented, each audio and video segment is less than 5s long, and the audio and video with unsynchronized sound and lip shape are filtered using a synchronous network, and the audio is processed into a Mel-spectrogram sequence ; Perform face detection on the remaining videos, extract the face ROI and save it as an image.
[0011] Preferably, the first convolution module and the ninth convolution module in the face decoder include one convolution layer, the second convolution module, the seventh convolution module and the eighth convolution module include two convolution layers, the third convolution module, the fifth convolution module and the sixth convolution module include three convolution layers, and the fourth convolution module includes four convolution layers.
[0012] Preferably, the face decoder feature processing method is as follows:
[0013] The preprocessed dataset After the first convolution module, the feature map is obtained as follows: , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is , after the seventh convolution module, the feature map is obtained as , after the eighth convolution module, the feature map is obtained as , after the ninth convolution module, the feature map is obtained as .
[0014] Preferably, the first convolution module, the second convolution module, and the third convolution module in the sound encoding module include three convolution layers, the fourth convolution module includes two convolution layers, and the fifth convolution module and the sixth convolution module include one convolution layer.
[0015] Preferably, the first convolution module of the face decoding module includes a convolution layer, the second convolution module includes an upsampling layer and a convolution layer connected in sequence, and the third convolution module, the fourth convolution module, the fifth convolution module, the sixth convolution module, the seventh convolution module, the eighth convolution module, and the ninth convolution module all include an upsampling layer and two convolution layers connected in series.
[0016] Preferably, the face decoder feature processing method is as follows:
[0017] The sound encoding module inputs a Mel-spectrogram sequence , after the first convolution module, the feature map is obtained as , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is ;
[0018] The sound encoding module inputs a Mel-spectrogram sequence , after the first convolution module, the feature map is obtained as , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is ;
[0019] The face decoding module inputs the latent feature image , after the first upsampling convolution module, the feature map is obtained ,
[0020] Feature Spectrum Fusion feature map After the second upsampling convolution module, the feature map is obtained ,
[0021] Feature Spectrum Fusion feature map After the third upsampling convolution module, the feature map is obtained as follows: ,
[0022] Feature Spectrum Fusion feature map After the fourth upsampling convolution module, the feature map is obtained as follows: ,
[0023] Feature Spectrum Fusion feature map After the fifth upsampling convolution module, the feature map is obtained as follows: ,
[0024] Feature Spectrum Fusion feature map After the sixth upsampling convolution module, the feature map is obtained as follows: ,
[0025] Feature Spectrum Fusion feature map After the seventh upsampling convolution module, the feature map is obtained as follows: ,
[0026] Feature Spectrum Fusion feature map After the eighth upsampling convolution module, the feature map is obtained as follows: ,
[0027] Feature Spectrum After the ninth upsampling convolution module, the feature map is obtained as follows: .
[0028] Preferably, the reference frame selection method is as follows: 10 groups of reference frame image sequences with fixed postures are pre-set, and a group of image sequences are randomly selected from the sequence as reference frames in each round of training or inference. The TPSMM algorithm is introduced to obtain reference frames of corresponding identities with reference to the fixed 10 groups of sequence frames.
[0029] Preferably, the model training loss function is perceptual loss.
[0030] The advantages of the present invention are as follows: the present invention uses a high-definition and high-quality data set for model training, which essentially improves the quality of synthetic speaking portraits. The resolution of the face encoding and decoding network structure is improved, and higher-resolution speaking portraits are produced, which enables application on large screens. The introduction of two supervision strategies enriches the lip shape style and improves the effect of synthetic speaking portraits. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0032] Figure 1 It is a schematic diagram of the process structure of the present invention.
[0033] Figure 2 Schematic diagram of the face encoder structure of the present invention.
[0034] Figure 3 This is a schematic diagram of the face decoder structure of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] A 2D motion field speaking portrait synthesis method is implemented by the following technical solutions:
[0037] S1: Select high-definition HDTF, MEAD datasets and mixed-quality AVSpeech datasets as initial datasets, and divide the initial datasets into test sets and training sets after preprocessing; the preprocessing method is as follows: convert the video frame rate in the initial dataset to 25fps, the audio bit rate to 16000hz, and segment the audio and video, each audio and video duration is less than 5s, and use a synchronous network to filter the audio and video with unsynchronized sound and lip shape, and process the audio into a Mel-spectrogram sequence ; Perform face detection on the remaining videos, extract the face ROI and save it as an image.
[0038] S2: constructing a sports field speaking portrait synthesis model, including a face encoder and a face decoder, wherein the face encoder includes 9 convolution modules connected in series to realize feature encoding of a mask face image and a reference face image; the face decoder includes a face decoding module and a sound encoding module, wherein the sound encoding module includes 6 convolution modules connected in series, and the face decoding module includes 9 convolution modules connected in series;
[0039] S201: The first convolution module and the ninth convolution module in the face decoder include one convolution layer, the second convolution module, the seventh convolution module and the eighth convolution module include two convolution layers, the third convolution module, the fifth convolution module and the sixth convolution module include three convolution layers, and the fourth convolution module includes four convolution layers.
[0040] The face decoder feature processing method is as follows:
[0041] The preprocessed dataset After the first convolution module, the feature map is obtained as follows: , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is , after the seventh convolution module, the feature map is obtained as , after the eighth convolution module, the feature map is obtained as , after the ninth convolution module, the feature map is obtained as .in, Indicates Batch data.
[0042] S202: The first convolution module, the second convolution module, and the third convolution module in the sound encoding module include three convolution layers, the fourth convolution module includes two convolution layers, and the fifth convolution module and the sixth convolution module include one convolution layer.
[0043] The first convolution module of the face decoding module includes a convolution layer, the second convolution module includes an upsampling layer and a convolution layer connected in sequence, and the third convolution module, the fourth convolution module, the fifth convolution module, the sixth convolution module, the seventh convolution module, the eighth convolution module, and the ninth convolution module all include an upsampling layer and two convolution layers connected in series.
[0044] The face decoder feature processing method is as follows:
[0045] The sound encoding module inputs a Mel-spectrogram sequence , after the first convolution module, the feature map is obtained as , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is ;
[0046] The face decoding module inputs the latent feature image , after the first upsampling convolution module, the feature map is obtained , feature map Fusion feature map After the second upsampling convolution module, the feature map is obtained , feature map Fusion feature map After the third upsampling convolution module, the feature map is obtained as follows: , feature map Fusion feature map After the fourth upsampling convolution module, the feature map is obtained as follows: , feature map Fusion feature map After the fifth upsampling convolution module, the feature map is obtained as follows: , feature map Fusion feature map After the sixth upsampling convolution module, the feature map is obtained as follows: , feature map Fusion feature map After the seventh upsampling convolution module, the feature map is obtained as follows: , feature map Fusion feature map After the eighth upsampling convolution module, the feature map is obtained as follows: , feature map After the ninth upsampling convolution module, the feature map is obtained as follows: .
[0047] S3: Train the sports field speaking portrait synthesis model using the training set to obtain the model with the best performance;
[0048] S4: Input the test set data into the trained sports field speaking portrait synthesis model, and output the synthesized speaking portrait result.
[0049] Supervision strategy:
[0050] Reference frame selection method: The reference image can provide lip style information, i.e. lip thickness, lip color, teeth and other information. 10 sets of reference frame image sequences with fixed postures are pre-set, and a set of image sequences are randomly selected from the sequence as reference frames in each round of training or inference. Considering that the change of the target identity makes it impossible to obtain a stable sequence with highly similar facial expressions and head postures, the TPSMM algorithm is introduced to obtain the reference frame of the corresponding identity with a fixed set of 10 sequence frames as a reference.
[0051] Loss function: The loss function of standard Wav2Lip includes synchronization loss, reconstruction loss, adversarial loss, and quality loss. Relying solely on binary cross entropy loss as the evaluation of quality loss will not converge well. The loss constraint of perceptual loss is introduced to better improve the effect of synthesizing speaking portraits.
[0052] The present invention provides a more excellent 2D motion field speaking portrait synthesis technology by improving the Wav2lip technology. Specifically, the improvements are made in the following three aspects: first, in terms of data set construction, high-definition and high-quality training data is replaced to solve the problem of low clarity of synthesized portraits; second, in terms of model structure, the face codec network structure is modified to increase the resolution of the driving image to 288*288 to meet the needs of large-screen applications; third, in terms of supervision strategy, a new reference frame selection method and a new loss function are innovatively proposed to improve the effect of synthesized portraits.
[0053] The embodiment of the present disclosure also provides a 2D sports field speaking portrait synthesis device, including a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the 2D sports field speaking portrait synthesis method of the above embodiment.
[0054] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0055] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the function application and data processing by running the program instructions / modules stored in the memory, that is, the 2D motion field speaking portrait synthesis method in the above embodiment is implemented.
[0056] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.
[0057] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A 2D motion field speaking portrait synthesis method, characterized in that: include: The high-definition HDTF and MEAD datasets and the mixed-quality AVSpeech dataset are selected as the initial datasets, which are divided into test sets and training sets after preprocessing; Constructing a sports field speaking portrait synthesis model, including a face encoder and a face decoder, wherein the face encoder includes 9 convolution modules connected in series to realize feature encoding of a mask face image and a reference face image; the face decoder includes a face decoding module and a sound encoding module, wherein the sound encoding module includes 6 convolution modules connected in series, and the face decoding module includes 9 upsampling convolution modules connected in series; Train the sports field speaking portrait synthesis model using the training set to obtain the model with the best performance; Input the test set data into the trained sports field speaking portrait synthesis model, and output the synthesized speaking portrait result; The preprocessing method is as follows: the video frame rate in the initial data set is converted to 25fps, the audio bit rate is converted to 16000hz, and the audio and video are segmented, each audio and video is less than 5s long, and the audio and video with unsynchronized sound and lip shape are filtered using a synchronous network, and the audio is processed into a Mel-spectrogram sequence ; Perform face detection on the remaining videos, extract face ROI and save it as an image; The first convolution module and the ninth convolution module in the face decoder include one convolution layer, the second convolution module, the seventh convolution module and the eighth convolution module include two convolution layers, the third convolution module, the fifth convolution module and the sixth convolution module include three convolution layers, and the fourth convolution module includes four convolution layers; The first convolution module, the second convolution module, and the third convolution module in the sound encoding module include three convolution layers, the fourth convolution module includes two convolution layers, and the fifth convolution module and the sixth convolution module include one convolution layer; The first upsampling convolution module of the face decoding module includes a convolution layer, the second upsampling convolution module includes an upsampling layer and a convolution layer connected in sequence, and the third upsampling convolution module, the fourth upsampling convolution module, the fifth upsampling convolution module, the sixth upsampling convolution module, the seventh upsampling convolution module, the eighth upsampling convolution module, and the ninth upsampling convolution module all include an upsampling layer connected in sequence and two convolution layers connected in series.
2. The 2D motion field speaking portrait synthesis method according to claim 1, characterized in that: The face decoder feature processing method is as follows: The preprocessed dataset After the first convolution module, the feature map is obtained as follows: , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is , after the seventh convolution module, the feature map is obtained as , after the eighth convolution module, the feature map is obtained as , after the ninth convolution module, the feature map is obtained as .
3. The 2D motion field speaking portrait synthesis method according to claim 2, characterized in that: The face decoder feature processing method is as follows: The sound encoding module inputs a Mel-spectrogram sequence , after the first convolution module, the feature map is obtained as , after the second convolution module, the feature map is obtained as , after the third convolution module, the feature map is obtained as , after the fourth convolution module, the feature map is obtained as , after the fifth convolution module, the feature map is , after the sixth convolution module, the feature map is ; The face decoding module inputs the latent feature image , after the first upsampling convolution module, the feature map is obtained , Feature Spectrum Fusion feature map After the second upsampling convolution module, the feature map is obtained , Feature Spectrum Fusion feature map After the third upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum Fusion feature map After the fourth upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum Fusion feature map After the fifth upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum Fusion feature map After the sixth upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum Fusion feature map After the seventh upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum Fusion feature map After the eighth upsampling convolution module, the feature map is obtained as follows: , Feature Spectrum After the ninth upsampling convolution module, the feature map is obtained as follows: .
4. The 2D motion field speaking portrait synthesis method according to any one of claims 1 to 3, characterized in that: The specific reference frame selection method is as follows: 10 groups of reference frame image sequences with fixed postures are set in advance, and a group of image sequences are randomly selected from the sequence as reference frames in each round of training or inference. The TPSMM algorithm is introduced to obtain the reference frames of the corresponding identities with the fixed 10 groups of sequence frames as references.
5. The 2D motion field speaking portrait synthesis method according to claim 4, characterized in that: The model training loss function is perceptual loss.
6. A 2D sports field speaking portrait synthesis device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the 2D motion field speaking portrait synthesis method according to any one of claims 1 to 5 when running the program instructions.
