A server, a display device and an image processing method
By combining the segmentation decoder and the matting decoder with the guided flow structure module, high-precision matting without the need for manual assistance is achieved, solving the problems of image quality differences and inconsistent backgrounds in portrait videos, and improving the image processing effect of digital human image customization.
Patent Information
- Application Number
- CN202311269116.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-09-27
AI Technical Summary
In virtual digital human avatar customization projects, the image quality of human portrait videos varies and the background is not fixed. Existing deep learning-based image matting algorithms require manual assistance, resulting in insufficient accuracy of the matting model and failing to meet the stability requirements of image and video-driven methods.
By obtaining a segmentation mask through a segmentation decoder, and combining it with a shared encoder and a matting decoder, the features are refined using a guided flow structure module, achieving high-precision matting without the need for manual assistance, thus improving the edge segmentation effect of portraits.
It improves the accuracy and quality of image matting results, and generates more precise standard data, making it suitable for digital human voice-driven applications in TV voice assistant scenarios.
Smart Images

Figure CN117809026B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image preprocessing technology, and in particular to a server, a display device, and an image processing method. Background Technology
[0002] In the virtual digital human avatar customization project, the portrait videos are recorded and uploaded by users using their terminals. The video content and the appearance of the person are uncertain, the background is not fixed, and the image quality varies. Data preprocessing is required to convert the portrait videos into standard data needed for customized voice-driven image generation. This is essential to achieve better voice-driven effects for the digital human and better application in television voice assistant scenarios. The standard data includes high-quality portrait image data against a standard background, portrait mask data to represent the precise location of the person, and high-precision coordinate data of facial key points.
[0003] Image preprocessing includes portrait matting, and matting algorithms are mainly based on deep learning, using various convolutional neural networks to achieve matting. However, deep learning methods rely on a certain amount of human-aided information, such as trimaps, scribble, background images, and coarse initial segmentation. Considering the driving effect and stability of image and video streams, the accuracy of portrait matting models obtained by deep learning-based matting algorithms cannot meet the requirements. Summary of the Invention
[0004] Some embodiments of this application provide a server, a display device, and an image processing method. First, a segmentation mask is obtained through a segmentation decoder. The segmentation mask provides semantic information obtained from the segmentation to the matting decoder, thereby making the matting result obtained by the matting decoder more accurate and the human image edge segmentation cleaner. This helps to improve the quality and accuracy of standard data, and no manual assistance is required.
[0005] Firstly, some embodiments of this application provide a server configured as follows:
[0006] Receive facial image data;
[0007] The face image data is input into a shared encoder to obtain first depth-coded features;
[0008] The first depth-coded features are input into the segmentation decoder to obtain the segmentation mask;
[0009] The segmentation mask and the first depth-encoded feature are input into the flow guidance structure module to obtain refined features;
[0010] The first depth-encoded feature and the thinning feature are input into the matting decoder to obtain the matted face image;
[0011] The cut-out face image is then subjected to image quality enhancement processing to obtain an enhanced face image;
[0012] Determine the facial key point data in the face enhancement image;
[0013] Generate standard data, which includes face enhancement images and facial landmark data.
[0014] In some embodiments, the face image data includes face video data, and the server performs an operation of inputting the face image data into a shared encoder to obtain first depth-coded features, which is further configured to:
[0015] Select a target image frame from the face video data. The head of the person in the target image frame is located in the middle of the image. The eyes of the person in the target image frame are open. The facial contour and features of the person in the target image frame are complete.
[0016] The target image frame is input into a shared encoder to obtain the first depth-coded features.
[0017] In some embodiments, the server performs image quality enhancement processing on the cut-out face image to obtain an enhanced face image, which is further configured to:
[0018] The background of the cut-out face image is replaced to obtain the face image with the background replaced;
[0019] The image quality of the face image after background replacement is enhanced to obtain an enhanced face image.
[0020] In some embodiments, the server performs image quality enhancement processing on the cut-out face image to obtain an enhanced face image, which is further configured to:
[0021] The cut-out face image is input into a convolutional neural network encoder to obtain the second deep coding features;
[0022] The second deep encoded feature is input into the trained generative adversarial network prior model to obtain the face enhancement image.
[0023] In some embodiments, the server performs the operation of inputting the second deep-encoded features into a trained generative adversarial network prior model to obtain a face enhancement image, which is further configured to:
[0024] Obtain the first hidden feature of the second deep encoded feature in the latent space;
[0025] The first hidden feature is transformed into the target space through a nonlinear mapping to obtain the second hidden feature;
[0026] The second hidden feature, noise, and the output of the previous layer's generative adversarial network block are input into the current layer's generative adversarial network block to obtain the output of the current layer's generative adversarial network block.
[0027] The image output by the last layer of the generative adversarial network block is determined to be a face enhancement image.
[0028] In some embodiments, the server performs the input of the segmentation mask and the depth-encoded features into a bootstrap structure module to obtain refined features, and is further configured to:
[0029] After concatenating the segmentation mask with the depth-encoded features, the refined features are obtained by passing the convolutional layers with activation functions and a channel attention layer.
[0030] In some embodiments, after generating standard data, the server is configured to:
[0031] Receive voice data input by the user from the display device;
[0032] Generate broadcast text based on the voice data;
[0033] Digital human data is generated based on the broadcast text and the standard data:
[0034] The digital human data is sent to the display device so that the display device can play digital human images and voice based on the digital human data.
[0035] In some embodiments, the digital human data includes digital human image data and spoken audio, and the server performs the generation of digital human data based on the spoken text and the standard data, which is further configured to:
[0036] The broadcast speech is synthesized based on the broadcast text;
[0037] Determine the key point sequence based on the broadcast voice and the facial key point data;
[0038] Digital human image data is synthesized based on the key point sequence and the face enhancement image.
[0039] Secondly, some embodiments of this application provide a display device, including:
[0040] The monitor is configured to display the user interface;
[0041] The communicator is configured to communicate data with the server;
[0042] The controller is configured as follows:
[0043] Receive voice data input by the user;
[0044] The voice data is sent to the server via the communicator;
[0045] Receive digital human data sent by the server based on the voice data;
[0046] Based on the digital human data, the images and voice of the digital human are played.
[0047] Thirdly, some embodiments of this application provide an image processing method applied to a server, including:
[0048] Receive facial image data;
[0049] The face image data is input into a shared encoder to obtain first depth-coded features;
[0050] The depth-encoded features are input into the segmentation decoder to obtain a segmentation mask;
[0051] The segmentation mask and the depth-encoded features are input into the flow-guided structure module to obtain refined features;
[0052] The depth-encoded features and the thinning features are input into the matting decoder to obtain the matted face image;
[0053] The cut-out face image is then subjected to image quality enhancement processing to obtain an enhanced face image;
[0054] Determine the facial key point data in the face enhancement image;
[0055] Generate standard data, which includes face enhancement images and facial landmark data.
[0056] Some embodiments of this application provide a server, a display device, and an image processing method. The method includes: receiving face image data; inputting the face image data into a shared encoder to obtain a first depth-coded feature; inputting the first depth-coded feature into a segmentation decoder to obtain a segmentation mask; inputting the segmentation mask and the depth-coded feature into a flow-guided structure module to obtain a thinning feature; inputting the depth-coded feature and the thinning feature into a matting decoder to obtain a matted face image; performing image quality enhancement processing on the matted face image to obtain a face-enhanced image; determining facial key point data in the face-enhanced image; and generating standard data, the standard data including the face-enhanced image and the facial key point data. In this application embodiment, the segmentation mask is first obtained through the segmentation decoder. The segmentation mask provides semantic information obtained from segmentation to the matting decoder, thereby resulting in higher accuracy of the matting result obtained by the matting decoder, cleaner image edge segmentation, and improved quality and accuracy of the standard data, without requiring manual assistance. Attached Figure Description
[0057] Figure 1 An operational scenario between a display device and a control device according to some embodiments is illustrated;
[0058] Figure 2 A hardware configuration block diagram of a control device according to some embodiments is shown;
[0059] Figure 3 A hardware configuration block diagram of a display device according to some embodiments is shown;
[0060] Figure 4A A software configuration diagram of a display device according to some embodiments is shown;
[0061] Figure 4B Another software configuration diagram in a display device according to some embodiments is shown;
[0062] Figure 5 A flowchart of an image processing method provided according to some embodiments is shown;
[0063] Figure 6 A schematic diagram of a digital human entry interface provided according to some embodiments is shown;
[0064] Figure 7 A schematic diagram of a digital human selection interface provided according to some embodiments is shown;
[0065] Figure 8 A flowchart illustrating a display of a digital human interface according to some embodiments is shown;
[0066] Figure 9A flowchart illustrating an example of adding a digital human interface according to some embodiments is shown;
[0067] Figure 10 A schematic diagram of a video recording preparation interface provided according to some embodiments is shown;
[0068] Figure 11 A schematic diagram of a portrait matting network structure provided according to some embodiments is shown;
[0069] Figure 12 A schematic diagram of a graphical display interface provided according to some embodiments is shown;
[0070] Figure 13 A schematic diagram of a human face enhancement network structure provided according to some embodiments is shown;
[0071] Figure 14 A flowchart of another image processing method provided according to some embodiments is shown;
[0072] Figure 15 A technical architecture diagram is shown according to some embodiments;
[0073] Figure 16 A schematic diagram of a digital human display interface provided according to some embodiments is shown;
[0074] Figure 17 A schematic diagram of another digital human display interface provided according to some embodiments is shown;
[0075] Figure 18 A flowchart of yet another image processing method provided according to some embodiments is shown;
[0076] Figure 19 A schematic diagram of a tone setting interface provided according to some embodiments is shown;
[0077] Figure 20 A schematic diagram of an audio recording preparation interface provided according to some embodiments is shown;
[0078] Figure 21 A schematic diagram of a digital human naming interface provided according to some embodiments is shown;
[0079] Figure 22 A schematic diagram of another digital human selection interface provided according to some embodiments is shown;
[0080] Figure 23 A flowchart illustrating a digital human customization according to some embodiments is shown;
[0081] Figure 24A flowchart of a first type of digital human interaction provided according to some embodiments is shown;
[0082] Figure 25 A schematic diagram of a live data streaming process according to some embodiments is shown;
[0083] Figure 26 A schematic diagram of a user interface provided according to some embodiments is shown;
[0084] Figure 27 Another digital human interaction timing diagram is shown according to some embodiments. Detailed Implementation
[0085] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0086] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0087] The terms "first" and "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0088] The term “comprising” and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0089] The display device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is one specific embodiment of the display device of this application.
[0090] Figure 1 This is a schematic diagram illustrating the operational scenario between the display device and the control unit according to the embodiment. Figure 1As shown, the user can operate the display device 200 through the terminal 300 or the control device 100.
[0091] In some embodiments, the control device 100 may be a remote control. Communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, and other short-range communication methods, controlling the display device 200 wirelessly or via wired means. Users can control the display device 200 by inputting user commands through buttons on the remote control, voice input, control panel input, etc.
[0092] In some embodiments, a terminal 300 (such as a mobile terminal, tablet computer, computer, laptop computer, etc.) may be used to control the display device 200. For example, an application running on the terminal 300 may be used to control the display device 200.
[0093] In some embodiments, the display device may receive instructions not through the terminal 300 or control device 100 described above, but through touch or gestures.
[0094] In some embodiments, the display device 200 can also be controlled in ways other than the control device 100 and the terminal 300. For example, it can be controlled by directly receiving the user's voice commands through a module configured inside the display device 200 for acquiring voice commands, or it can be controlled by receiving the user's voice commands through a voice control device set outside the display device 200.
[0095] In some embodiments, the display device 200 also communicates with the server 400. The display device 200 may communicate via a local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactive features to the display device 200. The server 400 may be a cluster or multiple clusters, and may include one or more types of servers.
[0096] Figure 2 An exemplary block diagram of the configuration of the control device 100 according to an exemplary embodiment is shown. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input operation commands and convert the operation commands into commands that the display device 200 can recognize and respond to, thus acting as an intermediary for interaction between the user and the display device 200.
[0097] like Figure 3The display device 200 includes at least one of the following: a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0098] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.
[0099] The display 260 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.
[0100] The display 260 can be an LCD display, an OLED display, or a projection display, and can also be a projection device and a projection screen.
[0101] The display 260 also includes a touch screen, which is used to receive input control commands from the user's fingers by sliding or clicking on the touch screen.
[0102] The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The display device 200 can establish the transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
[0103] The user interface can be used to receive control signals from the control device 100 (such as an infrared remote control).
[0104] Detector 230 is used to collect signals from the external environment or to interact with the external environment. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0105] The external device interface 240 may include, but is not limited to, one or more of the following: High Definition Multimedia Interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.
[0106] The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
[0107] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0108] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command to select a UI object to display on the monitor 260, the controller 250 can execute operations related to the object selected by the user command.
[0109] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a RAM (Random Access Memory), a ROM (Read-Only Memory), a first to an nth interface for input / output, a communication bus, etc.
[0110] Users can input commands through a graphical user interface (GUI) displayed on the monitor 260, and the user input interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0111] A "user interface" is the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form that the user can accept. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0112] like Figure 4A As shown, the display device system is divided into three layers, from top to bottom: the application layer, the middleware layer, and the hardware layer.
[0113] The application layer mainly includes commonly used applications on TVs, as well as the application framework. The commonly used applications are mainly browser-based applications, such as HTML5 apps, and native apps.
[0114] An application framework is a complete program model that has all the basic functions required by standard application software, such as file access, data exchange, etc., as well as the user interface for these functions (toolbar, status bar, menu, dialog box).
[0115] Native apps can support online or offline access, push notifications, or access to local resources.
[0116] The middleware layer includes various television protocols, multimedia protocols, and system components. Middleware can use the basic services (functions) provided by system software to connect different parts of application systems or different applications on the network, achieving resource sharing and function sharing.
[0117] The hardware layer mainly includes the HAL interface, hardware, and drivers. The HAL interface is a unified interface for all TV chips, with the specific logic implemented by each chip. The drivers mainly include: audio drivers, display drivers, Bluetooth drivers, camera drivers, Wi-Fi drivers, USB drivers, HDMI drivers, sensor drivers (such as fingerprint sensors, temperature sensors, pressure sensors, etc.), and power drivers.
[0118] See Figure 4B In some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the Android runtime and system library layer (referred to as the "System Runtime Layer"), and the kernel layer.
[0119] In some embodiments, at least one application runs in the application layer. These applications may be Windows programs, system settings programs, or clock programs that come with the operating system; they may also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0120] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.
[0121] like Figure 4B As shown, the application framework layer in this embodiment includes managers, content providers, etc., wherein the managers include at least one of the following modules: ActivityManager, which interacts with all activities running in the system; LocationManager, which provides access to system location services for system services or applications; PackageManager, which retrieves various information related to application packages currently installed on the device; NotificationManager, which controls the display and clearing of notification messages; and WindowManager, which manages icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0122] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling display window changes (e.g., shrinking the display window, shaking the display, distorting the display, etc.).
[0123] In some embodiments, the system runtime library layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer to implement the functions that the framework layer needs to perform.
[0124] In some embodiments, the kernel layer is a layer between hardware and software. For example... Figure 4B As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver.
[0125] In the virtual digital human avatar customization project, the portrait videos are recorded and uploaded by users using their terminals. The video content and the appearance of the person are uncertain, the background is not fixed, and the image quality varies. Image preprocessing is required to convert the portrait videos into standard data needed for customized voice-driven image generation. This is essential to achieve better voice-driven effects for the digital human and better application in television voice assistant scenarios. The standard data includes high-quality portrait image data against a standard background, portrait mask data to represent the precise location of the person, and high-precision coordinate data of facial key points.
[0126] Image preprocessing is the process of separating each image and handing it over to the recognition module. In image analysis, it refers to the processing performed on the input image before feature extraction, segmentation, and matching. The main purpose of image preprocessing is to remove irrelevant information from the image, recover useful and accurate information, enhance the detectability of relevant information, and simplify the data to the maximum extent possible, thereby improving the reliability of feature extraction, image segmentation, matching, and recognition.
[0127] Image preprocessing is a broad field, and there is no unified standard for preprocessing methods and workflows. The appropriate data preprocessing method must be selected based on the specific business scenario and input data. Different tasks also have different definitions of data preprocessing. Sometimes, in more complex tasks, multiple steps and methods are needed to form a complete image preprocessing workflow. For example, the digital human image customization scenario described in this paper requires multiple methods to form a complete workflow, outputting the effective data needed for the customized image after various processing steps.
[0128] Image preprocessing includes portrait matting. From a computer's recognition perspective, an image consists of a foreground and a background. In portrait matting, the region of interest is the foreground (i.e., the human figure). The goal is to separate the foreground from the background, which can be expressed by the following formula:
[0129] I i =α i F i +(1-α i B i ;
[0130] Where: i represents the pixel index, F represents the foreground, B represents the background, and α represents the probability that the pixel belongs to the foreground, with a value range of 0-1.
[0131] Image matting algorithms are primarily based on deep learning, employing various convolutional neural networks to achieve matting. However, deep learning methods rely on a certain amount of human-aided information, such as trimaps, scribble, background images, and coarse initial segmentation.
[0132] Trimaps are the most commonly used prior knowledge. As the name suggests, a trimap is a ternary graph where each pixel takes a value of {0, 128, 255}, representing the foreground, unknown, and background, respectively. Algorithms that use trimaps as auxiliary information include DIM, AlphaGAN, and MatteFormer.
[0133] To enable rapid application of image matting in industrial scenarios, fully automatic matting has been proposed. This method can directly predict the final result from the image without any additional human assistance. Based on the network structure design, this method can be broadly categorized into three types: 1) Single-stage networks using side-branch global modules to guide high-level semantic information of the image, such as HATT and MODNet; 2) Two-stage networks that first predict auxiliary information, then design a second-stage network based on that information, such as HIM and MGMatting; 3) Using a shared encoding network to acquire image information at different levels, using a multi-branch decoding network to predict high-level semantics and low-level details respectively, and obtaining the final result through hard fusion. Because fully automatic matting methods lack any additional guidance, they are highly susceptible to the influence of the training dataset. Therefore, most methods are limited to certain specific matting targets, such as portraits, animals, and transparent objects.
[0134] Image preprocessing includes portrait enhancement. Portrait enhancement improves the visual quality of people in an image, making blurry images clearer or highlighting certain details. In the field of computer vision, the portrait enhancement function required by this solution can be categorized under the sub-field of Blind Face Restoration, which restores low-quality faces with unknown degradation to high-quality faces. Generally, the degradation model can be described as:
[0135] I lq =D(I hq ;n δ );
[0136] Where I lq It is a low-quality face image, D is a degradation function that is independent of noise, and n δ It is additive Gaussian noise. Different degradation functions D correspond to different degradation models. Therefore, the face restoration task can be viewed as the inverse process of solving the above degradation model, which can be expressed as:
[0137] I hq =D -1 (I lq ;n δ ).
[0138] Deep learning-based face reconstruction methods fall into two categories: prior-based methods and non-prior-based methods. Prior-based methods are further divided into geometric priors, reference priors, and generative priors. Geometric priors primarily utilize the unique geometric shape and spatial distribution information of faces in images to help the model gradually reconstruct high-quality faces. This includes facial landmarks, heatmaps, and facial resolution maps; representative methods include MTUN, SuperFAN, and PSFR-GAN. Reference priors use additional high-quality face images to obtain facial structure or facial component dictionaries as face reference priors to guide the model in efficient face reconstruction; representative methods include GFRNet, GWAInet, and DFDNet. Generative priors-based methods utilize GAN generative priors to assist the model in face reconstruction.
[0139] In addition, there are non-prior-based restoration methods. These methods aim to design an end-to-end network model to directly learn the mapping function between low-quality and high-quality face images without introducing additional prior information. Representative methods include HiFaceGAN, BCCNN, and RestoreFormer.
[0140] This application embodiment further improves some functions of server 400. Server 400 performs the following steps, such as... Figure 5 As shown.
[0141] Step S501: Receive face image data;
[0142] Server 400 receives facial image data uploaded by terminal 300 or display device 200.
[0143] Before the server 400 receives the face image data uploaded by the terminal 300, the terminal 300 establishes an association with the display device 200 through the server 400;
[0144] In some embodiments, the server 400 establishes connection relationships with the display device 200 and the terminal 300 respectively, so that the display device 200 and the terminal 300 establish an association relationship.
[0145] The steps for server 400 to establish a connection with display device 200 include:
[0146] Server 400 establishes a long connection with display device 200;
[0147] The purpose of establishing a long connection between server 400 and display device 200 is that server 400 can push the customized status of the digital human to display device 200 in real time.
[0148] A persistent connection allows multiple data packets to be sent continuously over a single connection. During the connection maintenance period, if no data packets are sent, both parties need to send link detection packets. Persistent connections only require establishing a connection once for multiple communications, thus saving network overhead; they only require a single handshake and authentication to maintain the communication state, thus improving communication efficiency; and they enable bidirectional data transmission, allowing the server to proactively send customized digital human data to the display device, achieving real-time communication.
[0149] In some embodiments, after receiving a power-on message from the display device 200, the server 400 establishes a long connection with the display device 200.
[0150] In some embodiments, after receiving a message from the display device 200 that the voice digital human service has been enabled, the server 400 establishes a long connection with the display device 200.
[0151] In some embodiments, after receiving an instruction from the display device 200 to add a digital human, the server 400 establishes a long connection with the display device 200.
[0152] Server 400 receives request data sent by display device 200, wherein the request data includes the device identifier of display device 200.
[0153] After receiving the request data, the server 400 determines whether there is an identification code corresponding to the device identifier in the database. The identification code is used to represent the device information of the display device 200. The identification code can be several random numbers or letters, or it can be a barcode or a QR code.
[0154] If an identification code corresponding to the device identifier exists in the database, the identification code is sent to the display device 200 so that the display device 200 displays the identification code on the Add Digital Human interface.
[0155] If the identification code corresponding to the device identifier does not exist in the database, an identification code corresponding to the device identifier is created, the device identifier and the identification code are saved in the database, and the identification code is sent to the display device 200 so that the display device 200 displays the identification code on the Add Digital Human interface.
[0156] To clarify the interaction process of establishing a connection between server 400 and display device 200, the following embodiments are disclosed:
[0157] After receiving a user's instruction to open the digital human entry interface, the display device 200 controls the display 260 to display the digital human entry interface, which includes a voice-activated digital human control.
[0158] For example, such as Figure 6As shown, the digital human entry interface includes a voice digital human control 61, a natural dialogue control 62, a wake-word-free control control 63, and a focus 64.
[0159] It should be noted that controls refer to visual objects displayed in various display areas of the user interface in the display device 200 to represent corresponding content such as icons, thumbnails, video clips, links, etc. These controls can provide users with various traditional program content received through data broadcasting, as well as various application and service content set by content manufacturers.
[0160] The presentation of controls can be diverse. For example, a control may include text content and / or an image used to display a thumbnail related to the text content, or a video clip related to the text. Alternatively, a control may be text and / or an icon for the application.
[0161] The focus point is used to indicate that any control has been selected. On one hand, the control can be selected or controlled by the user controlling the movement of the focus object displayed on the display device 200 according to input from the control device 100. For example, the user can use the up arrow keys on the control device 100 to control the movement of the focus object between controls to select and control the control. On the other hand, the focus object can be selected or controlled by the user controlling the movement of each control displayed on the display device 200 according to input from the control device 100. For example, the user can use the up arrow keys on the control device 100 to control all controls to move left and right simultaneously, so that the focus object is selected and controlled while maintaining its position.
[0162] The way a focus object is identified can vary. For example, it can be identified by zooming in on the item, by setting the background color of the item, or by changing the border, size, color, transparency, outline, and / or font of the text or image of the focused item.
[0163] After receiving a user's instruction to select a voice-activated digital human control, the display device 200 controls the display 260 to display a digital human selection interface. The digital human selection interface includes at least one digital human control and an add control. The digital human control is displayed with a digital human image and a name corresponding to the digital human image. The add control is used to add a new digital human image, voice, and name.
[0164] For example, in Figure 6 In the middle, after receiving a user's instruction to select the voice digital human control 61, the display device 200 displays the digital human selection interface. For example... Figure 7As shown, the digital human selection interface includes a default avatar control 71, a penis control 72, a bottle control 73, an add control 74, and a focus point 75. Users can select the desired digital human to respond to voice commands by moving the focus point 75.
[0165] In some embodiments, the process of displaying a digital human interface on the display device 200 is as follows: Figure 8 As shown. After receiving a user's instruction to open the digital human entry interface (homepage), the digital human application on display device 200 requests data from the voice zone. The voice zone obtains homepage configuration information (homepage data) from the operator and sends the homepage data to the digital human application, enabling the digital human application to control display 260 to display the digital human homepage. The digital human application can also directly send a digital human account request. Upon receiving the virtual digital human account request, the voice zone obtains preset data from the operator, such as default digital human account information, and simultaneously obtains cloud-stored digital human account data from the algorithm service of server 400. If there are default supplementary parameters, the voice zone sends the preset data, cloud-stored digital human account data, and supplementary parameters together to the digital human application, enabling the digital human application to control display 260 to display the digital human selection interface after receiving the instruction to display the digital human selection interface. After displaying the digital human homepage, the digital human application can also send a virtual digital human account request after receiving a user's instruction to display the digital human selection interface, and directly display the digital human selection interface after receiving the preset data, cloud-stored digital human account data, and supplementary parameters.
[0166] The voice zone, targeting server 400 and based on the operation support platform, enables configurable management of default data items and configuration items in the backend, and facilitates the protocol-based distribution of data required by display device 200. The voice zone connects the algorithm service interaction between display device 200 and server 400, acquiring data parameters reported by display device 200, parsing instructions, and completing the algorithm backend interaction transfer. It then parses and distributes the data to the backend storage, ultimately achieving a complete data integration process.
[0167] After receiving the user's instruction to select and add a control, the display device 200 sends request data carrying the device identifier of the display device 200 to the customized central control service of the server 400.
[0168] The customized central control service calls the target application's interface to determine if a corresponding identification code exists in the database. If the database contains such a code, it sends the code to the display device 200. If the database does not contain such a code, it creates the code and sends it to the display device 200. The target application refers to an application with identification code recognition functionality.
[0169] Display device 200 receives the identification code sent by server 400 and displays it on the Add Digital Human interface.
[0170] For example, in Figure 7 In the process, upon receiving the user's instruction to select and add control 74, display device 200 displays the "Add Digital Human" interface. For example... Figure 9 As shown, the interface for adding a digital human includes QR code 91.
[0171] The steps for server 400 to establish a connection with terminal 300 include:
[0172] Server 400 receives the identification code uploaded by terminal 300;
[0173] Determine whether a display device 200 corresponding to the identification code exists;
[0174] If a display device 200 corresponding to the identification code exists, an association is established between the terminal 300 and the display device 200 so that the data uploaded by the terminal 300 is processed by the server 400 and sent to the display device 200.
[0175] To clarify the interaction process of establishing a connection between server 400 and terminal 300, the following embodiments are disclosed:
[0176] After receiving a user's instruction to open the target application, terminal 300 launches the target application and displays its corresponding homepage interface. The homepage interface includes a scan control.
[0177] After receiving the user's instruction to select the scan control, the terminal 300 displays the scanning interface.
[0178] After scanning the identification code, such as a QR code, displayed on the display device 200, the terminal 300 uploads the identification code to the server 400. Users can point the camera of the terminal 300 at the identification code displayed on the digital human interface of the display device 200.
[0179] If the identification code is in the form of numbers or letters, the homepage interface includes an identification code control. After receiving the user's instruction to select the identification code control, the identification code input interface is displayed, and the numbers or letters displayed on the display device 200 are entered into the identification code input interface to upload the identification code to the server 400.
[0180] Server 400 determines whether a display device corresponding to the identification code exists. If a display device 200 corresponding to the identification code exists, an association is established between terminal 300 and display device 200, so that data uploaded by terminal 300 is processed by server 400 and sent to display device 200. If no display device 200 corresponding to the identification code exists, a recognition failure message is sent to terminal 300 so that terminal 300 displays an error message.
[0181] Once the server 400 confirms the existence of a display device 200 corresponding to the identification code, it sends a successful identification message to the terminal 300. The terminal 300 then displays a startup page, which initiates the digital human customization process.
[0182] In some embodiments, the launch page includes a digital human avatar selection interface. The digital human avatar selection interface includes at least one default avatar control and a custom avatar control. After receiving a user's instruction to select a custom avatar control, the terminal 300 displays a video recording preparation interface, which includes recording controls. For example, as shown... Figure 10 As shown, the video recording preparation interface includes video recording precautions 101 and a start recording control 102.
[0183] In some embodiments, the startup page may also be a video recording preparation interface.
[0184] In some embodiments, the step of establishing an association between the terminal 300 and the display device 200 through the server 400 includes:
[0185] Server 400 receives the user account and password uploaded by terminal 300 and, after verifying that the user account and password are correct, sends a login success message so that terminal 300 can obtain the data corresponding to the user account.
[0186] Server 400 receives the user account and password uploaded by display device 200. After verifying the user account and password are correct, it sends a login success message, enabling display device 200 to access the data corresponding to that user account. Terminal 300 uses the same user account as display device 200. Terminal 300 and display device 200 establish a connection by logging in with the same user account, allowing data updated on terminal 300 to be synchronized to display device 200. For example, customized digital human-related data on terminal 300 can be synchronized to display device 200.
[0187] Terminal 300 uploads facial image data to server 400;
[0188] The facial image data includes videos or pictures taken by the user, videos or pictures selected by the user in the album, and videos or pictures downloaded from a website.
[0189] In some embodiments, the terminal 300 will receive videos or pictures taken by the user and upload them to the server 400.
[0190] For example, in Figure 10 In the process, after receiving the user's instruction to select the start recording control 102, video is recorded using the media component video on the terminal 300. To avoid multiple recordings due to failed face detection, the recording interface displays suggested face positions, and the terminal 300 can perform preliminary face position detection. The recorded video can be previewed repeatedly after recording ends. After receiving the user's instruction to confirm upload, the user-recorded video is sent to the server 400.
[0191] In some embodiments, the terminal 300 can send the captured user photos to the server.
[0192] In some embodiments, terminal 300 may select a user photo or user video from the album and upload the user photo or user video to server 400.
[0193] Server 400 receives facial image data uploaded by the terminal;
[0194] Detect whether the facial landmarks in the facial image data are qualified;
[0195] After receiving the facial image data uploaded by the terminal, the customized central control service calls the algorithm service to verify the facial location.
[0196] If the face points in the face image data are found to be qualified, an image detection qualified message is sent to terminal 300.
[0197] If the face points in the face image data are found to be unqualified, an image detection failure message is sent to terminal 300 so that terminal 300 prompts the user to re-upload.
[0198] Among them, face detection can use algorithms to detect whether the key points of a face are all within a specified area.
[0199] After receiving the image detection pass message, terminal 300 displays the online effects page.
[0200] On the online effects page, users can upload their original videos or photos to server 400 to use them as their digital avatars. Alternatively, they can choose their preferred effect style, drag or click on the effect intensity, and apply the effect to their video or photo before uploading it to server 400. During the effect creation process, users can touch the lower right corner of the effect image to compare it with the original image at any time. The effects creation process utilizes image preloading, monitors image resource loading progress, and sets image layer relationships.
[0201] Step S502: Input the face image data into the shared encoder to obtain the first depth-coded features;
[0202] After receiving the face image data, the face image data is input into the shared encoder to obtain the first depth-coded features.
[0203] In this embodiment, the segmentation and matting tasks share the same encoder, i.e., a shared encoder. For example... Figure 11 As shown, the shared encoder uses a ResNet50 network as its backbone to perform feature image extraction. Following the ResNet50 network is an ASPP (Atrous Spatial Pyramid Pooling) module. Quarter-scale face image data is input into the shared encoder to extract first-depth encoded features at different scales for the segmentation decoder and matting decoder. Different scales can be understood as different resolutions, and the scale can be a multiple of the resolution. For example, the resolution of the face image data is 1000×1000, the resolution of the quarter-scale face image data is 500×500, and the resolution of the eighth-scale face image data is 250×250.
[0204] If the face image data is a face picture, the face picture can be directly input into the shared encoder to obtain the first depth-coded features.
[0205] If the face image data is face video data, select the target image frame from the face video data. In the target image frame, the head of the person is located in the middle of the image, the eyes of the person are open, and the facial contours and features of the person are complete.
[0206] This method uses an interface in OpenCV to select the most representative frame from all image frames in a face video dataset. OpenCV is a cross-platform computer vision library based on an open-source license. This library provides a large number of image and video processing functions, making computer vision research and applications easier and more efficient.
[0207] To clarify the steps for selecting target image frames from face video data, the following embodiments are disclosed:
[0208] Traverse the image frames in the face video data;
[0209] Sequentially determine whether the deviation distance between the center of the human head and the center of the image frame is less than a threshold.
[0210] If the deviation distance between the center of the human head and the center of the image is not less than the threshold, then continue to determine whether the deviation distance between the center of the human head and the center of the image in the next frame is less than the threshold.
[0211] If the deviation between the center of the person's head and the center of the image is less than a threshold, then it is determined whether the person's eyes in the image frame are open; this process filters out image frames in which blinking occurs during the recording process.
[0212] If the human face's eyes are not open, then continue to determine whether the deviation distance between the center of the human face's head and the center of the image in the next frame is less than a threshold.
[0213] If the eyes of the person are open, determine whether the overall facial contour and features are complete; this process filters out image frames in which the overall facial contour and features are obscured during the recording process.
[0214] If the overall facial contour and features are incomplete, continue to determine whether the deviation distance between the center of the portrait head and the center of the image in the next frame is less than the threshold.
[0215] If the overall facial contour and features are complete, the image frame is determined as the target image frame, and the process of traversing image frames in the face video data is stopped.
[0216] It should be noted that there are no restrictions on the position of the head, the degree of eye opening, and the order of judgment of the overall facial contours and features.
[0217] The target image frame is input into the shared encoder to obtain the first depth-coded features.
[0218] Step S503: Input the first depth-coded features into the segmentation decoder to obtain the segmentation mask;
[0219] The segmentation decoder is a lightweight and efficient module consisting of four convolutional layers and four upsampling layers. Each convolutional layer can be defined by the following formula:
[0220] X i =Conv(Concat(Upsample(X) i+1 ),F i ), i = 3, 2, 1, 0;
[0221] Where F i X is the first depth-coded feature output by the shared encoder. i These are the output features of the convolutional layers. The first depth-encoded features at different scales are the input to the segmentation decoder. After each convolutional layer except the last one, a batch normalization layer and a ReLU (Linear Rectification Function) layer are appended. The output of the segmentation decoder is the segmented mask.
[0222] Step S504: Input the segmentation mask and the first depth-encoded features into the guide flow structure module to obtain refined features;
[0223] The segmentation mask can be used as input to the GFA (Guided Flow Architecture) module to provide semantic information obtained from the segmentation to the matting decoder.
[0224] The steps of inputting the segmentation mask and the first depth-encoded features into the guide flow structure module to obtain refined features include:
[0225] After concatenating the segmentation mask with the first depth-encoded features, the refined features are obtained by passing the convolutional layers with activation functions and a channel attention layer.
[0226] The structure of the GFA module is as follows: Figure 11 As shown in the lower left corner, the first deep encoded features generated by segmentation masks of different scales and a shared encoder are used as input. The segmentation mask and the first deep encoded features are concatenated, and then passed through a convolutional layer with ReLU and Sigmoid activation functions and an ECA (Efficient Channel Attention) channel attention layer to output the refined features after guidance.
[0227] Step S505: Input the first depth-encoded features and the thinning features into the matting decoder to obtain the matted face image;
[0228] It should be noted that the training process is divided into two stages. The first stage uses a common segmentation dataset to train the segmentation network (segmentation decoder and GFA module). During this stage, the parameters of the GFA module corresponding to the segmentation decoder and matting decoder are updated synchronously. After training, the segmentation network can extract strong semantic features, providing semantic information for the subsequent matting task. The second stage fixes the shared encoder and segmentation decoder, and trains the GFA module and matting decoder. The segmentation mask output from the segmentation decoder and the first depth-coded features from the shared encoder are used as input to the matting decoder.
[0229] In some embodiments, before performing image quality enhancement processing on the cut-out face image, the background of the cut-out face image can be replaced to obtain a face image with background replacement; the face image with background replacement can then undergo image quality enhancement processing to obtain an enhanced face image.
[0230] In some embodiments, after obtaining the face enhancement image, the background of the face enhancement image can be replaced to obtain a face enhancement image with background replacement.
[0231] It should be noted that the face-enhanced image or the face-enhanced image after background replacement is a digital human image.
[0232] In some embodiments, the background to be replaced can be selected by the user.
[0233] In some embodiments, after a user uploads facial image data, the terminal 300 may display a background image selection interface, which includes at least one background control. Upon receiving a user's instruction to select a background control, the terminal 300 sends a background identifier corresponding to the background control to the server 400, so that the server 400 replaces the background of the enhanced facial image with the background image corresponding to the background identifier.
[0234] In some embodiments, after acquiring the enhanced face image, the server 400 sends the enhanced face image to the terminal 300. For example... Figure 12 As shown, terminal 300 displays an enhanced face image 121 on the image display interface. The image display interface also includes at least one background control corresponding to background selection, such as a first background control 122 and a second background control 123. After receiving a user input to select the first background control 122, the background identifier corresponding to the background control is sent to server 400, so that server 400 replaces the background of the enhanced face image with the background image corresponding to the background identifier, and sends the enhanced face image with the replaced background to terminal 300 for display.
[0235] In some embodiments, the background library includes at least one background image. When it is necessary to replace the background, a background image in the background library may be randomly or by default selected for replacement.
[0236] The portrait matting method in this application is mainly used to remove the background of uploaded portraits, separate the background from the foreground, generate a portrait mask, and perform customized background replacement by pre-setting different portrait backgrounds, thereby meeting the needs of use in different scenes of television. In the embodiments of this application, the portrait matting algorithm introduces a semantic segmentation part to guide the portrait matting, and does not require auxiliary information such as Trimap. The portrait matting model has high accuracy and clean portrait edge segmentation, which helps to improve the driving effect and stability of subsequent image and video streams.
[0237] Step S506: Perform image quality enhancement processing on the cut-out face image to obtain an enhanced face image;
[0238] The portrait image quality enhancement method in this application embodiment generally follows a U-Net-shaped encoder-decoder architecture, such as... Figure 13 As shown. The step of performing image quality enhancement processing on the cut-out face image to obtain an enhanced face image includes:
[0239] The cut-out face image is input into a CNN (Convolutional Neural Networks) encoder to obtain second-depth encoded features. The CNN encoding includes multiple CNN blocks and a fully connected layer (FC).
[0240] The process involves inputting the cut-out face image into a convolutional neural network encoder, then passing it through multiple convolutional neural networks and a fully connected layer to obtain the second deep encoding feature.
[0241] The second deep encoded features are input into the trained GAN (Generative Adversarial Networks) prior model to obtain face enhancement images.
[0242] In this model, the generative adversarial network prior model is used as a decoder for high-definition face image restoration, and the generated output image is judged by a discriminator.
[0243] In this embodiment, the GAN prior model is the core component of the portrait image enhancement method. Inspired by the classic image generation model StyleGAN, the network input hidden features Z and Noise are generated from the deep and shallow features of the encoder, respectively, controlling the reconstruction of the overall facial structure, local details, and the background of the facial image. The step of inputting the second deep encoded features into the trained generative adversarial network prior model to obtain the enhanced face image includes:
[0244] Obtain the first hidden feature of the second deep coding feature in the latent space, that is, the first hidden feature is the representation of the second deep coding feature Z in the latent space.
[0245] The first hidden feature is transformed into the target space through a nonlinear mapping to obtain the second hidden feature. That is, the first hidden feature Z is transformed into the W space through a nonlinear mapping to obtain the second hidden feature.
[0246] The second hidden feature, noise, and the output of the previous layer's generative adversarial network block are input into the current layer's generative adversarial network block to obtain the output of the current layer's generative adversarial network block.
[0247] The structure of a Generative Adversarial Network (GAN) Block is as follows: Figure 13 As shown in the upper right corner, Mod represents weight modulated operation, and Demod represents weight demodulated operation. The output is obtained through operations such as convolution and the concat function. The generative adversarial network block normalizes the second hidden feature of the input.
[0248] The image output by the last layer of the generative adversarial network block is determined to be a face enhancement image.
[0249] It should be noted that the number of layers in the generative adversarial network block is the same as the number of skip connection layers in the U-shaped encoder. Skip connections are the connection operations between the encoder and decoder in the U-Net structure, which fuse feature maps from the downsampling process during upsampling.
[0250] The generative adversarial network prior model is pre-trained with data and embedded into a U-shaped structure as a decoder. Then, the overall encoder-decoder network is fine-tuned to obtain a complete face image quality enhancement model.
[0251] This application embodiment enhances the image quality of facial images, eliminating significant image blur and improving data quality. This improves the detail and realism of the digital human portrait. Since the background removal method already removes complex background and other interfering information, and the image data uploaded by the user only contains one face image, the image quality enhancement method primarily targets a single face. In the absence of interfering information, the image quality enhancement effect on faces is better.
[0252] In some embodiments, after acquiring the enhanced face image (digital human avatar), the server 400 sends the enhanced face image to the terminal 300 and the display device 200. The terminal 300 displays the enhanced face image for the user to confirm or re-upload image data to change the digital human avatar. The display device 200 displays the enhanced face image to show the progress of the digital human customization.
[0253] Step S507: Determine the facial key point data in the face enhancement image;
[0254] The facial landmark detection uses the landmark detection method in MediaPipe. A total of 478 landmarks can be detected in the facial image data, and the coordinates of 153 landmarks representing the facial contour and facial features are selected.
[0255] MediaPipe is a framework for building and learning pipelines for processing time-series data such as video and audio. MediaPipe can be used for facial landmark detection, hand recognition, and more.
[0256] Step S508: Generate standard data, which includes face enhancement images and face key point data.
[0257] Standard data generation mainly involves storing the generated NumPy format face enhancement images and key point coordinate data, for example, using base64 encoding.
[0258] This application proposes a data preprocessing flow for digital human image customization, capable of outputting standard data required for digital human image customization image generation and voice-driven processing. In this application, a portrait matting method is used to separate the human figure from the background in the digital human image customization process, outputting portrait mask data to achieve customized digital human portrait background. In this application, a portrait image quality enhancement method is used to enhance the image quality of blurry face images input by the user in the digital human image customization process, improving facial clarity, eliminating image artifacts and noise, and outputting a higher-quality human image.
[0259] Digital avatars can be created in a realistic style, an artistic style such as a cartoon, or both realistic and artistic styles.
[0260] When server 400 receives image data (without detected face points) uploaded by terminal 300, it can notify the system to train the user's realistic or artistic digital avatar. In other words, training the realistic or artistic digital avatar and face point detection occur simultaneously. If face point detection fails, training of the realistic or artistic digital avatar is terminated. If face point detection is successful, the waiting time for digital avatar training can be shortened.
[0261] In some embodiments, the server 400 sends a realistic or artistic digital human image to the terminal 300 so that the terminal 300 can display the digital human image and allow the user to choose and use it.
[0262] In some embodiments, after receiving and displaying the trained real-life image, the terminal 300 can provide users with operations such as beautifying the real-life image and adding special effects, as well as options such as creating cartoon images and re-recording videos, so that users can obtain the digital human image they want.
[0263] This application embodiment further improves some functions of server 400. Server 400 performs the following steps, such as... Figure 14 As shown.
[0264] Step S1401: Receive face image data;
[0265] Step S1402: Perform face segmentation preprocessing on the face image data to obtain internal intermediate style coding features corresponding to multiple parts, wherein the internal intermediate style coding features are coding features of natural face style;
[0266] In some embodiments, if the face image data is an image, face segmentation preprocessing can be performed directly on the face image data sent by the terminal.
[0267] In some embodiments, if the face image data is an image, the face image sent by the terminal can be processed by portrait matting to obtain a matted face image; the matted face image can be processed by image quality enhancement to obtain an enhanced face image; and the enhanced face image can be processed by face segmentation preprocessing. The methods for portrait matting and image quality enhancement have been described in detail above and will not be repeated here.
[0268] In some embodiments, if the face image data is video, the most standard frame is selected from all image frames of the video. The selection method has been described in detail above and will not be repeated here. Face segmentation preprocessing is then performed on the most standard frame.
[0269] In some embodiments, if the face image data is video, the most standard frame is selected from all image frames of the video. Portrait matting is performed on the most standard frame to obtain the matted face image; image quality enhancement processing is performed on the matted face image to obtain an enhanced face image; and face segmentation preprocessing is performed on the enhanced face image.
[0270] In some embodiments, before performing face segmentation preprocessing on the face image data, facial key points in the face image data are detected to determine the facial key point data in the face image data.
[0271] Determine whether the positions of facial landmarks are normal based on facial landmark data;
[0272] If the facial landmarks are in normal positions, the facial image data is preprocessed for facial segmentation based on the facial landmark data and the segmentation model to obtain internal intermediate style coding features corresponding to multiple parts.
[0273] If the facial landmarks are not positioned correctly, then correct the facial landmarks.
[0274] Incorrect facial landmark positioning refers to an incorrect facial angle in facial image data, such as the user's head being tilted to one side.
[0275] Correcting facial landmarks is achieved by aligning the facial landmarks.
[0276] Face alignment can be achieved through affine transformation. The core of the transformation is the affine transformation matrix, which describes the specific parameters of the transformation process. The affine transformation matrix is obtained by comparing the positional differences of specific pixels in an image before and after the transformation. For a face, the distribution of facial features is a natural reference factor. By detecting the positions of facial features in the original image and then specifying where the features should appear in the target image, the transformation matrix can be derived. Face alignment can then be achieved based on this transformation matrix.
[0277] Based on the corrected facial key point data and segmentation model, face image data is preprocessed for face segmentation to obtain internal intermediate style coding features corresponding to multiple parts.
[0278] It should be noted that after receiving the face image data uploaded by the terminal 300, the server 400 detects the face landmarks, primarily checking whether all facial key points are within the image. If not, it sends an image detection failure message to the terminal 300, prompting the user to re-upload. This detection of facial key points involves checking if the face angle is normal. If the face angle is incorrect, the facial key points are first corrected to ensure their positions are within the normal range. Based on the corrected facial key point data and the segmentation model, face segmentation preprocessing is performed on the face image data.
[0279] In some embodiments, before performing portrait matting on the face image data, facial key points in the face image data are detected. If the facial key points are not in the correct position, the facial key points are corrected, and then portrait matting and other operations are performed on the corrected face image data.
[0280] The segmentation model is essentially an encoder. It takes facial key point data (n, 2) or corrected facial key point data (n, 2) as input to the encoder to extract internal intermediate style coding features corresponding to multiple parts, where n is the number of key points.
[0281] The facial image data includes 18 parts, each of which corresponds to 18 internal intermediate style coding features.
[0282] The facial image data includes the following parts: skin, left brow, right brow, left eye, right eye, eye g (glasses), left ear, right ear, ear r (earring), nose, mouth, upper lip, lower lip, neck, neck l (necklace), clothing, hair, and hat.
[0283] The facial features include the left brow, right brow, left eye, right eye, left ear, right ear, nose, mouth, upper lip, lower lip, and hair. The non-facial features include the skin, glasses, earrings, neck, necklace, clothing, and hat.
[0284] Step S1403: Obtain external intermediate style coding features, wherein the external intermediate style coding features are the coding features of the target style;
[0285] The steps for obtaining external intermediate style coding features include:
[0286] Input at least one style image into an external style encoder and a mapping network to obtain external intermediate style encoding features for multiple parts;
[0287] The process involves inputting the style image into an external style encoder to obtain external style coding features; then, the external style coding features are passed through a mapping network to obtain external intermediate style coding features for multiple parts.
[0288] Store the external intermediate style coding features of multiple parts to a preset address;
[0289] Obtain external intermediate style coding features for multiple parts from the preset address.
[0290] The style image consists of 18 parts, each of which corresponds to 18 external intermediate style coding features.
[0291] In some embodiments, the style image is a cartoon-style image, and the external intermediate style coding features of multiple parts corresponding to the cartoon-style image are saved to a preset address. If 100 cartoon images are input into the external style encoder and mapping network, 100 sets of external intermediate style coding features can be obtained, and these 100 sets of external intermediate style coding features are saved to a preset address.
[0292] In some embodiments, the style image includes a Japanese anime style image, a Disney style image, and a dark style image, and the external intermediate style encoding features of multiple parts corresponding to the Japanese anime style image, the Disney style image, and the dark style image are saved to different preset addresses respectively.
[0293] Step S1404: Input the internal intermediate style encoding features and the external intermediate style encoding features into the trained style adversarial generative network model to generate target stylized face image data.
[0294] The step of inputting internal intermediate style encoding features and external intermediate style encoding features into a trained style adversarial generative network model to generate target stylized face image data includes:
[0295] The external intermediate style coding features of the first target location in the face are encoded by a linear layer to obtain the external structural style coding features; where the first target location refers to the first 7 external intermediate style coding features.
[0296] The external structural style encoding features are convolved and upsampled to obtain external convolutional features;
[0297] The external convolutional features are input into the residual module (ModRes module) to obtain the residual features;
[0298] Calculate the product of the residual feature and the preset weights; where the preset weights are the default weights.
[0299] The facial structure features are determined to be the sum of the product and the inner convolution features, wherein the inner convolution features are obtained by convolution and upsampling the inner structure style encoding features;
[0300] The external intermediate style coding features of the second target location in the non-face area are encoded by a linear layer Tc to obtain the external color style coding features; where the second target location refers to the last 11 external intermediate style coding features.
[0301] The color features are obtained by weighting the external color style coding features and the internal intermediate style coding features;
[0302] Adjust facial image data based on facial structure and color features to generate target stylized facial image data.
[0303] Among them, facial structure features are used to adjust the facial structure, and color features are used to control the color style.
[0304] It should be noted that the external intermediate style encoding features of the second target location in the facial region remain unchanged. The external intermediate style encoding features of the first target location in non-facial regions remain unchanged.
[0305] Technical architecture diagram as follows Figure 15As shown, the entire model includes an internal control module, an external control module, and a style adversarial generative network model. The digital human image passes through a keypoint detection module to obtain keypoint data, which is then sent to an internal encoder to obtain internal intermediate style encoding features. The internal encoder consists of four fully connected layers. The style image also passes through a keypoint detection module to obtain keypoint data, which is then sent to an external encoder to obtain external intermediate style encoding features. The external encoder consists of two fully connected layers. The first seven external intermediate style encoding features for the face are encoded into external structural style encoding features through linear layers. These external structural style encoding features are then convolved and upsampled before being input into a residual module to obtain residual features. The style adjustment module multiplies the residual features by weights and adds them to the convolved and upsampled internal intermediate style encoding features. The last eleven external intermediate style encoding features for non-face areas are encoded into external color style encoding features through a linear Tc layer. The style adjustment module controls the color style by weighting the result of convolving and upsampling the external color style encoding features with the result of convolving and upsampling the internal intermediate style encoding features.
[0306] It should be noted that the training data includes the FFHQ dataset and cartoon-style images. The training process for the style adversarial generative network model is as follows:
[0307] A pre-trained model of the style adversarial generative network (GCN) was trained based on the FFHQ dataset. Faces and keypoints were detected using data from the FFHQ dataset, and faces were rotated and corrected based on the keypoints. The keypoint bounding boxes were expanded by a fixed ratio, and the face region was cropped. This face region was then input into the GCN model for training.
[0308] Adding an external style control module directly alters the generative space of the pre-trained style adversarial generative network model, making it impossible to directly apply fine-tuning strategies using transfer learning. This application proposes a progressive fine-tuning strategy to enable the pre-trained model to achieve more stable domain transfer.
[0309] The gradual fine-tuning strategy involves three steps:
[0310] 1) Initialization of the external style control module: Initialize the convolution kernels of the residual module's convolutional layers to be close to 0, and make the parameter matrix of the linear layer Tc an identity matrix. This initialization makes the residual feature values close to 0, and the external intermediate style encoding remains unchanged after passing through Tc, thus keeping the structure almost unchanged. This allows the style adversarial generative network model with the added external style control module to still maintain its original generative space.
[0311] 2) Style transfer within face data: This stage aims to fine-tune the natural face domain so that the external style coding can capture intermediate-level styles, such as facial features like makeup.
[0312] Two style codes, z1 (real face) and z2 (style face), are randomly sampled, and a style-fused image is obtained through style exchange. The fine-tuning process reconstructs this fused image based on the internal style code z1 and the external style code E(g(z2)), where E and g are the encoder and StyleGAN, respectively. The purpose of this step is to enable the model to learn the intermediate style of the style map; intermediate style refers to internal transfer without introducing external style, i.e., the mutual fusion learning of two real faces.
[0313] GminDmaxλadvLadv+λperc Lperc(G(z1,z2,1),g(zl+))
[0314] Where z1 and z2 are style codes for style images in the dataset, g is an FFHQ pre-trained model, zl+ is a hybrid encoding of z1 and z2, λadv is the consistency loss in stylegan, and perc is the perceptual loss. λadv is a weight parameter used to balance the importance of adversarial loss and perceptual loss. It controls the contribution of adversarial loss to the total loss. λadv is the adversarial loss, used to measure the difference between the generator-generated sample and the real sample. It is usually calculated using the binary cross-entropy loss function. λperc is another weight parameter used to balance the importance of perceptual loss in the total loss. λperc is the perceptual loss, used to measure the perceptual difference between the generator-generated sample and the real sample. It is usually calculated using a pre-trained perceptual model to calculate the feature differences between the generated sample and the real sample. G(z1,z2,1) is the output of the generator, which takes input vector z1, vector z2, and conditional vector l, and generates a sample. g(z1,z2,1) +l ) represents a real sample, where z is the feature vector of the real sample and l is the label of the real sample.
[0315] By minimizing this loss function, the generator can learn to generate samples similar to real samples, thereby improving the quality of the generated samples. Simultaneously, by balancing adversarial and perceptual losses, the generated samples can be made visually more realistic and lifelike.
[0316] By adjusting the value of 1, the goal of the formula is to minimize the generator G and maximize the discriminator D, thereby deceiving the generator as much as possible.
[0317] 3) Style transfer between face and style data: To enable the network to learn the style of each image, destylated training data is used to construct pairs of training data as supervision to train a dual-path style generation network to achieve face stylization. This includes constrained training with reconstruction loss, adversarial loss, style consistency loss, and content consistency loss.
[0318] Lstyle = λCX LCX(G(z,ze,1),S) + λFM LFM(G(z,z+e,1),S), where Style loss is equal to the sum of contextual loss and feature matching loss.
[0319] Lcontent = λID LID(G(z,ze,1),g(z)) + λreg||W||2. Content loss is the sum of identity loss and ModRes regularization.
[0320] The overall fine-tuning training objectives are as follows:
[0321] minG maxDλadv Ladv+λpercLperc+Lsty+Lcon.
[0322] In the embodiments of this application, in the original style adversarial generative network model, Figure 15 The input to the right side of the network is random noise, used to generate more subtle feature changes in the generated face, making the generated face more realistic and diverse. This embodiment adds an external style path on the right side to the style adversarial generative network model. The noise input module is replaced with a style control module for the artistic face style domain. Artistic portraits are generated based on the internal style encoding describing facial features and the external style encoding describing artistic style, achieving style fusion and transfer. Different scales of style are controlled by adjusting the weights of different layers. In this embodiment, the external style follows the 18-layer internal style hierarchy of the style adversarial generative network model. The first 7 layers control the style of large-scale structures, and the last 11 layers control the style of small-scale colors and textures. The external style control module can simulate fine-tuning the StyleGAN itself. The features before and after StyleGAN fine-tuning are highly correlated, with the convolutional layers showing the greatest change. Therefore, the difference in convolutional features before and after fine-tuning should also be highly correlated with the original features.
[0323] In some embodiments, when a user uploads facial image data to terminal 400, they can directly select the option to create a stylized digital human avatar. Terminal 400 then sends the facial image data and a stylization identifier to server 400. Upon receiving the stylization identifier, server 400 directly performs stylization processing on the facial image data to obtain stylized facial image data, which is then sent to terminal 300 and display device 200 for display.
[0324] In some embodiments, terminal 400 only uploads face image data to the server, and server 400 sends the face enhancement image (digital human realistic image) to terminal 300. Terminal 300 displays the face enhancement image on the digital human display interface. The digital human display interface also includes a style selection box, which includes at least one style control. After receiving a user's instruction to select a style control, terminal 300 sends the digital human realistic image identifier and the identifier corresponding to the style control to server 400, so that server 400 obtains the external intermediate style encoding features of multiple parts from the preset address corresponding to the identifier and, based on the digital human identifier and the data corresponding to the realistic digital human image identifier, performs the step of generating target stylized face image data. The data corresponding to the realistic digital human image identifier is the face enhancement image.
[0325] For example, such as Figure 16 As shown, the digital human display interface includes an image display box 161 and a style selection box 162. The image display box 161 displays the digital human's realistic image, and the style selection box 162 includes a Japanese anime control 1621, a Disney control 1622, a dark theme control 1623, and a realistic control 1624. Upon receiving a user's instruction to select the Japanese anime control 1621, the system generates Japanese anime-style facial image data based on the external intermediate style encoding features corresponding to the digital human's realistic image and the Japanese anime style, and displays it in the image display box 161.
[0326] Server 400 receives style intensity parameters;
[0327] After receiving the user's instruction to adjust the style intensity, the terminal 300 sends the style intensity parameter adjusted by the user to the server 400.
[0328] After receiving the style intensity parameter, server 400 determines the style weight based on the style intensity parameter;
[0329] Calculate the product of residual features and style weights;
[0330] The residual features are obtained by inputting the external convolutional features into the residual module. The calculation method is the same as above, so there is no need to calculate it again and it can be obtained directly.
[0331] Facial structural features are determined to be the product of the product and the sum of the internal intermediate style coding features;
[0332] The facial image data is adjusted based on facial structural features to obtain the adjusted facial image data.
[0333] The server 400 receives background intensity parameters;
[0334] In this process, after receiving a user's instruction to adjust the background intensity, the terminal 300 sends the adjusted background intensity parameter to the server 400.
[0335] Color weights are determined based on background intensity parameters;
[0336] The color features are obtained by weighting the external color style coding features and the internal intermediate style coding features with color weights. The external color style coding features and the internal intermediate style coding features remain unchanged and can be obtained directly. Only the color features need to be recalculated.
[0337] The face image data is adjusted based on color features to obtain the adjusted face image data.
[0338] In some embodiments, after generating the target stylized face image data, the server 400 sends the target stylized face image data (digital human stylized image) to the terminal 300, and the terminal 300 displays the target stylized face image data on the digital human display interface. The digital human display interface also includes a style intensity selection box, which includes a style adjustment bar and a style adjustment ball. The style intensity is changed by dragging the style adjustment ball on the style adjustment bar. The digital human display interface also includes a background intensity selection box, which includes a background adjustment bar and a background adjustment ball. The background intensity is changed by dragging the background adjustment ball on the background adjustment bar.
[0339] For example, such as Figure 17 As shown, the digital human display interface includes an image display box 171, a style selection box 172, a style intensity selection box 173, and a background intensity selection box 174. The image display box 171 displays a stylized image of the digital human. The style selection box 172 includes Japanese anime controls 1721, Disney controls 1722, dark controls 1723, and realistic controls 1724. The style intensity selection box 173 includes a style adjustment bar 1731 and a style adjustment ball 1732. The background intensity selection box 174 includes a background adjustment bar 1741 and a background adjustment ball 1742. The system receives the user's dragging of the style adjustment ball 1732 onto the style adjustment bar 1731 or the background adjustment ball 1742 onto the background adjustment bar 1741, adjusts the stylized image of the digital human based on the style intensity parameters and background intensity parameters, and displays it in the image display box 171.
[0340] In some embodiments, after generating the target stylized face image data, the server 400 sends the target stylized face image data (digital human stylized image) to the terminal 300, and the terminal 300 displays the target stylized face image data on the digital human display interface. The digital human display interface also includes a "Change Image" control. The terminal 300 receives a user input instruction to select the "Change Image" control and sends the instruction to the server 400. The server 400 performs an operation to reacquire the external intermediate style coding features of multiple parts, and inputs the internal intermediate style coding features and the reacquired external intermediate style coding features into the trained style adversarial generative network model to regenerate the target stylized face image data, and sends it to the terminal 300 for display.
[0341] For example, such as Figure 17 As shown, the digital human display interface also includes a switch control 175.
[0342] In some embodiments, the image processing method is as follows: Figure 18 As shown, the style image is pre-input into an external style encoder to obtain external intermediate style coding features, which are then stored. The received face image data undergoes keypoint detection and alignment to obtain keypoint information. Based on this keypoint information, face segmentation is performed to obtain internal intermediate style coding features. The external and internal intermediate style coding features are then input into a stylization model (style adversarial generative network model) to obtain stylized face image data. User instructions to adjust style intensity and background intensity are received, and the stylized face image data is adjusted accordingly.
[0343] This application uses an internal style path to control the style of the original domain, i.e., the natural face domain, and adds an external style path to model and control the style of the target domain, i.e., the artistic face domain. This corresponds to the content path and style path in the standard image stylization problem. The external style path inherits the hierarchical structure of the style adversarial generative network model. Based on the face stylization method of transfer learning, and leveraging the powerful expressive capabilities of the style adversarial generative network model, by fine-tuning the model on a small-scale cartoon-style face dataset, it can transform the generation space from the real face domain to the cartoon-style portrait domain with only a few specified cartoon-style portrait images and a few hours of training time. It can also flexibly adjust the structural and color styles of the generated images to achieve more flexible face stylization. This solution is universal and can be modeled using "customized" style types, such as cartoon style, Japanese anime style, Disney style, dark style, etc., and then style transfer can be performed according to different faces. It can be directly applied to digital human image-driven tasks.
[0344] In some embodiments, after uploading facial image data to server 400, terminal 300 also uploads audio data to server 400.
[0345] After the facial image data passes the facial landmark verification and is successfully uploaded to the server 400, the terminal 300 displays the tone setting interface. This tone setting interface includes at least one preset recommended tone control and a custom tone control.
[0346] Terminal 300 receives the user's instruction to select a preset recommended tone control, sends the corresponding identifier of the preset recommended tone to server 400, and displays the digital human naming interface.
[0347] In some embodiments, after receiving a user's instruction to select a custom tone control, the terminal 300 displays an audio recording selection interface, which includes adult controls and child controls.
[0348] For example, such as Figure 19 As shown, the tone setting interface includes a small control 191, a small control 192, and a custom tone control 193. Upon receiving user input to select the custom tone control 193, the audio recording preparation interface is displayed, as shown below. Figure 20 As shown. The audio recording selection interface includes recording precautions 201, adult controls 202, and child controls 203. Upon receiving user input to select adult control 202 or child control 203, the corresponding process is initiated. Upon receiving user input to select Xiaowan control 191, the digital human naming interface is displayed, as shown... Figure 21 As shown.
[0349] After receiving the user's instruction to select an adult control, terminal 300 displays the ambient sound detection interface.
[0350] Terminal 300 collects ambient sounds for a preset duration and sends the user-recorded ambient sounds to server 400.
[0351] Server 400 receives environmental recordings uploaded by terminal 300;
[0352] Check if the environmental audio recording is up to standard;
[0353] After receiving the environmental recording audio uploaded by the terminal 300, the customized central control service calls the algorithm service to check whether the environmental recording audio is qualified.
[0354] The steps for checking whether the environmental audio recording is up to standard include:
[0355] Obtain the noise level of the recorded ambient sound;
[0356] Determine if the noise level exceeds a preset threshold;
[0357] If the noise level exceeds the preset threshold, the ambient sound recording is deemed unqualified.
[0358] If the noise level does not exceed the preset threshold, the ambient sound recording is deemed acceptable.
[0359] If the ambient sound recording is found to be acceptable, an ambient sound acceptance message and the target text required for recording the audio are sent to terminal 300.
[0360] If the ambient sound recording is found to be substandard, an ambient sound substandard message is sent to terminal 300, prompting terminal 300 to prompt the user to select a quiet space to re-record.
[0361] After receiving the ambient sound qualification message and the target text required for recording audio, the terminal 300 displays the target text, which can be selected to reflect the user's vocal characteristics.
[0362] Terminal 300 receives audio of the user reading the target text and sends the audio to server 400. Terminal 300 can send audio data of a preset duration to server 400 so that server 400 can send the recognition result back to terminal 300, thereby achieving real-time recognition of the text being read.
[0363] Server 400 receives audio from the user reading the target text;
[0364] Identify the user text corresponding to the audio;
[0365] Calculate the pass rate based on the target text and the user text;
[0366] The steps for calculating the pass rate based on the target text and the user text include:
[0367] Compare the target text with the user text to obtain the number of correct characters in the user text;
[0368] The pass rate is determined by the ratio of the number of correct words to the number of words in the target text.
[0369] Determine if the pass rate is less than the preset value;
[0370] If the pass rate is less than the preset value, a voice upload failure message is sent to terminal 300 so that terminal 300 prompts the user to re-record the audio of reading the target text;
[0371] In some embodiments, when identifying text being read in real time, the target text is compared with the user text to determine erroneous, over-read, and under-read text. The erroneous, over-read, and under-read text are marked and sent to the terminal 300 so that the terminal 300 displays the erroneous, over-read, and under-read text in different colors or fonts.
[0372] If the pass rate is not less than the preset value, a voice upload success message is sent to terminal 300 so that terminal 300 can display the next target text or voice recording completion information.
[0373] After the target text is read aloud a preset number of times and passes the test, the audio acquisition process ends, and the terminal 300 displays the digital human naming interface.
[0374] Server 400 receives audio data corresponding to a preset number of target texts.
[0375] After receiving the user's instruction to select the child control, the terminal 300 also displays the ambient sound detection interface. The ambient sound detection steps are the same as when selecting the adult control.
[0376] If the system detects that the user's recorded ambient sound is acceptable, a message indicating that the ambient sound is acceptable and the audio recording required for audio recording are sent to terminal 300.
[0377] Terminal 300 can automatically play the guided reading audio, which can be listened to repeatedly. When it receives a user's instruction to press the record button, it begins recording the user's reading aloud and sends the audio to server 400.
[0378] Server 400 receives the audio of the user repeating the text.
[0379] Identify the user text corresponding to the audio;
[0380] The pass rate is calculated based on the target text corresponding to the guided reading audio and the user text corresponding to the follow-up reading audio.
[0381] Determine if the pass rate is less than the preset value;
[0382] If the pass rate is less than the preset value, a voice upload failure message is sent to terminal 300 so that terminal 300 prompts the user to re-record the audio corresponding to the reading audio; when recognizing the text being read in real time, the target text is compared with the user's text to identify erroneous, over-read, and under-read text, and the erroneous, over-read, and under-read text are marked and sent to terminal 300 so that terminal 300 displays the erroneous, over-read, and under-read text in different colors or fonts.
[0383] If the pass rate is not less than the preset value, a voice upload success message will be sent to terminal 300 so that terminal 300 can play the next audio reading or a voice recording completion message.
[0384] After receiving the voice recording, the terminal 300 displays the digital human naming interface.
[0385] In some embodiments, after receiving an instruction input by a user to select a custom timbre control, the terminal 300 may choose to upload a piece of audio data. After receiving the audio data, the server 400 detects a noise value. If the noise value exceeds a preset threshold, it sends an upload failure message to the terminal 300, so that the terminal 300 prompts the user to re-upload. If the noise value does not exceed the preset threshold, it sends an upload success message to the terminal 300, so that the terminal 300 displays a digital human naming interface.
[0386] After receiving the digital human name input by the user, the terminal 300 sends the digital human name to the server 400.
[0387] For example, as Figure 21 shown, the digital human naming interface includes an input box 211, a wake word control 212, a creation completion control 213, and a trained digital human image 214. The wake word control 212 is used to determine whether to set the digital human name as the wake word of the display device at the same time. If the wake word control 212 is selected, the digital human name is set as the wake word of the display device 200. For example, the naming rule for a digital human set as the wake word of the display device is: 4 to 5 Chinese characters in length, avoid reduplicated words (such as "Xiaoxiaolele"), avoid colloquial expressions (such as "I'm back"), and avoid containing sensitive words. If the wake word control 212 is not selected, the digital human name is not set as the wake word of the display device. For example, the naming rule for a digital human not set as the wake word of the display device 200 is: a maximum of 5 characters, Chinese, English and numbers can be used, and sensitive words shall be avoided. Among them, the names of digital humans created by one display device or one user account cannot be duplicated.
[0388] After receiving an instruction input by the user to select the creation completion control 213, the name of the digital human is sent to the server 400. After detecting that the name of the digital human sent by the user passes the review, the server 400 sends a creation success message to the terminal 300. The terminal 300 may display a prompt message indicating successful creation. After detecting that the name of the digital human sent by the user fails the review, the server 400 sends a creation failure message and the failure reason to the terminal 300. The terminal 300 may display the reason for the creation failure and a prompt message for renaming.
[0389] In some embodiments, the server 400 trains a voice cloning model using the audio data uploaded by the user to obtain timbre parameters that conform to the user's timbre. During speech synthesis, the text to be broadcast can be input into the voice cloning model embedded with the timbre parameters, so as to obtain broadcast speech that conforms to the user's timbre.
[0390] To support digital human voice interaction, this application adds phoneme duration prediction to the general speech synthesis architecture to drive the facial key points of the digital human. To support digital human image customization, a small-sample timbre customization is achieved based on a multi-speaker speech synthesis model. By using 1-10 user speech samples and fine-tuning a small number of model parameters, human voice cloning is achieved.
[0391] Server 400 sends face enhancement images or target stylized face image data to display device 200 that is associated with terminal 300, so that display device 200 displays digital human images based on digital human image data. In some embodiments, server 400 may also send the digital human name corresponding to the digital human image data to display device 200 that is associated with terminal 300, so that display device 200 displays the digital human name at the corresponding position in the digital human image.
[0392] In some embodiments, after receiving the digital human name uploaded by the terminal 300, the server 400 sends the initial image and the digital human name to the display device 200 and displays them on the digital human selection interface. The digital human is identified as "Training in Progress" and may also indicate the training time. For example, the digital human selection interface looks like this: Figure 22 As shown. After training is complete, the server 400 sends the final image obtained from the training to the display device 200 to update the display.
[0393] In some embodiments, the voice corresponding to the digital human's voice can also be sent to the display device 200 so that when the user moves the focus to the control corresponding to the digital human, the voice corresponding to the digital human's voice can be played. For example, in Figure 7 When the focus 75 moves to the Dingding control 72, the voice with Dingding's tone, "Hello, I am Dingding," is played.
[0394] In some embodiments, target speech is generated based on the digital human's voice features, and a key point sequence is determined based on the target speech. Image data is synthesized based on the key point sequence and the digital human image data. The image data and target speech are sent to the display device 200 and saved locally by the display device 200. The digital human control is displayed as the first frame or a specified frame of the image data. When the user moves the focus to the digital human control, the digital human image and target speech are played.
[0395] In some embodiments, when the display device 200 displays a digital human selection interface, it receives user input instructions to manage the digital human.
[0396] In response to user input instructions to manage digital humans, the control display 260 displays a digital human management interface, which includes at least one delete control, modify control, and disable control corresponding to a digital human.
[0397] If a user inputs a command to select the delete control, then delete the relevant data corresponding to that digital person.
[0398] If a user inputs an instruction to disable the control, the relevant data corresponding to the digital human is retained and marked as disabled.
[0399] If a user inputs a command to select and modify the control, the control display 260 displays the modification identification code. After scanning the modification identification code through the terminal 300, the user's video or photo can be re-uploaded to the terminal 300 to change the digital human's appearance, and / or the user's audio can be re-uploaded to change the digital human's voice characteristics, and / or the digital human's name / wake word can be changed on the terminal 300.
[0400] It should be noted that during the digital human customization process described above, users can exit the process at any time. The target application on terminal 300 records and caches data from the server in real time, recording every instance of user data. When a user re-enters the process, the target application retrieves the previously recorded data from the server, facilitating continued operation and avoiding re-recording. If the user is not satisfied with the recording, they can also choose to re-record at any time.
[0401] The embodiments of this application do not restrict the order of video recording, audio recording, and digital human naming.
[0402] In some embodiments, a schematic diagram of digital human interaction is shown as follows: Figure 23 As shown in the diagram. Display device 200 displays a QR code. After terminal 300 scans the QR code, it receives the user's recorded video and audio. Terminal 300 sends the recorded video and audio to server 400. Server 400 uses voice cloning technology and image preprocessing technology to obtain customized data for the digital human, including the digital human's appearance and voice characteristics. Server 400 sends the digital human's appearance to both terminal 300 and display device 200. Display device 200 displays the digital human's appearance on the user interface.
[0403] In some embodiments, the display device 200 and the terminal 300 do not need to establish an association relationship. Figure 9The digital human addition interface also includes a local upload control 92. Upon receiving user input to select the local upload control 92, the camera on the display device 200 is activated to capture the user's image data. Alternatively, local video and images can be displayed, allowing the user to select locally stored image data. This image data is then uploaded to the server 400, where it performs face detection and digital human image data generation. The display device 200 then displays the digital human image based on the data sent by the server 400. Similarly, ambient sound can be collected via the display device 200's sound collector and sent to the server 400 for ambient sound detection. The display device 200's sound collector or the voice acquisition function of the control device 100 can also transmit audio of user-read target text to the server 400, where the server 400 generates digital human voice features.
[0404] In some embodiments, the present application further improves some functions of server 400. Server 400 performs the following steps, such as... Figure 24 As shown.
[0405] Step S2401: Receive voice data input by the user from the display device 200;
[0406] After starting the digital human interaction program, the display device 200 receives voice data input by the user;
[0407] In some embodiments, the step of activating a digital human interaction program includes:
[0408] When displaying the user interface, display device 200 receives instructions from the user to select the control corresponding to the digital human application. The user interface includes the control corresponding to the application installed on display device 200.
[0409] In response to the user's input command to select the digital human and apply the corresponding control, display as follows: Figure 6 The digital human entry interface shown.
[0410] In response to the user's instruction to select the natural dialogue control 62, the digital human interaction program is launched, waiting for the user to input voice data through the control device 100 or to control the sound acquisition device to start collecting the user's voice data. Natural dialogue includes a chat mode, where the user can chat with the digital human.
[0411] In some embodiments, the step of activating a digital human interaction program includes:
[0412] Receives environmental voice data collected by a sound acquisition device;
[0413] When the ambient voice data is detected to be greater than or equal to the preset volume or the ambient voice data sound signal duration is greater than or equal to the preset threshold, it is determined whether the ambient voice data includes the wake word corresponding to the digital human.
[0414] If the ambient voice data includes the wake word corresponding to the digital human, the digital human interaction program is started, the sound collector is controlled to start collecting the user's voice data, and the voice receiving box is displayed in the floating layer of the current user interface.
[0415] If the ambient voice data does not include the wake word corresponding to the digital human, the operation of displaying the voice receiver box will not be performed.
[0416] In some embodiments, the digital human interaction program and the voice assistant can be installed simultaneously on the display device 200. The device can receive a user's instruction to set the digital human interaction program as the default interaction program, and then set the digital human interaction program as the default interaction program. Received voice data can be sent to the digital human interaction program, which in turn sends the voice data to the server 400. Alternatively, the digital human interaction program can receive voice data and send it to the server 400.
[0417] In some embodiments, after the digital human interaction program is started, voice data input by the user pressing the voice key of the control device 100 is received.
[0418] Specifically, voice data collection begins after the user starts pressing the voice button on the control device 100 and ends after the user stops pressing the voice button on the control device 100.
[0419] In some embodiments, after the digital human interaction program is launched, when the voice receiver box is displayed in the floating layer of the current user interface, the sound collector is controlled to start collecting the user's input voice data. If no voice data is received for a long time, the digital human interaction program can be closed and the voice receiver box can be de-displayed.
[0420] In some embodiments, the display device 200 receives voice data input by the user and sends the voice data along with a digital human identifier selected by the user to the server 400. The digital human identifier is used to represent the digital human's appearance, voice characteristics, and name, etc.
[0421] In some embodiments, after receiving voice data input by the user, the display device 200 sends the voice data and the device identifier of the display device 200 to the server 400. The server 400 retrieves the digital human identifier corresponding to the device identifier from the database. It should be noted that when the display device 200 detects that the user has changed the digital human identifier of the display device 200, it sends the changed digital human identifier to the server 400, so that the server 400 changes the digital human identifier corresponding to the device identifier in the database to the modified digital human identifier. In this embodiment, the user does not need to upload the digital human identifier each time; it can be directly obtained from the database.
[0422] In some embodiments, the user can, for example, Figure 7 The digital human selection interface shown displays digital human images; select the digital human you wish to use.
[0423] In some embodiments, each created digital human has a unique digital human name that can be set as a wake word, which can be used to determine the digital human selected by the user based on the wake word included in the ambient voice data.
[0424] In some embodiments, the voice data input by the user received by the display device 200 is essentially streaming audio data. After receiving the voice data, the display device 200 sends the voice data to the sound processing module for acoustic processing. The sound processing module performs acoustic processing, including sound source localization, noise reduction, and sound quality enhancement. Sound source localization is used to enhance or preserve the signal of the target speaker and suppress the signals of other speakers in situations involving multiple speakers, enabling speaker tracking and subsequent speech orientation pickup. Noise reduction is used to remove environmental noise from the voice data. Sound quality enhancement is used to increase the intensity of a speaker's voice when it is low. The purpose of acoustic processing is to obtain a relatively clean and clear voice of the target speaker from the voice data. The acoustically processed voice data is then sent to the server 400.
[0425] In some embodiments, after receiving voice data input by the user, the display device 200 directly sends it to the server 400, whereby the server 400 performs acoustic processing on the voice data and sends the acoustically processed voice data to a semantic service. After processing the received voice data, such as performing speech recognition and semantic understanding, the server 400 sends the processed voice data back to the display device 200.
[0426] Step S2402: Generate the broadcast text based on the voice data;
[0427] After receiving voice data, the semantic service of server 400 uses speech recognition technology to identify the corresponding text content. It then performs semantic understanding, business distribution, vertical domain parsing, and text generation on the text content to obtain the broadcast text.
[0428] Step S2403: Generate digital human data based on the broadcast text, digital human voice features, and digital human image;
[0429] In some embodiments, the semantic service of server 400 can send the broadcast text to terminal 300, and the terminal can complete the voice interaction transfer, connect to the streaming control service of server 400, and the streaming control service can complete speech synthesis, key point prediction, image synthesis and live interaction, etc.
[0430] In some embodiments, the semantic service of server 400 can send the broadcast text directly to the streaming control service, which then performs speech synthesis, key point prediction, image synthesis, and live interaction.
[0431] In some embodiments, digital human data includes digital human image data and broadcast voice. The streaming control service performs the step of generating digital human data based on the broadcast text, digital human voice features, and digital human image data, including:
[0432] The broadcast voice is synthesized based on the speech features corresponding to the digital human identifier and the broadcast text;
[0433] The process involves inputting the text to be broadcast into a pre-trained voice cloning model corresponding to the digital human identifier, resulting in broadcast speech with the digital human's timbre. The broadcast speech is a sequence of audio frames.
[0434] Determine the sequence of key points based on the broadcast voice;
[0435] The process involves denoising and other data preprocessing of the broadcast speech to obtain speech features. These speech features are then input into an encoder to obtain high-level semantic features. These high-level semantic features are then input into a decoder, which combines the real keypoint sequence with the actual keypoint sequence to generate a predicted keypoint sequence, thus generating digital human limb movements.
[0436] Digital human image data is synthesized based on key point sequences and digital human image data;
[0437] Specifically, digital human image data is synthesized based on key point sequences and digital human identity data corresponding to digital human image data. The digital human image data is either face-enhanced images or stylized face image data.
[0438] In some embodiments, a sequence of digital human image frames is synthesized based on the keypoint sequence and the digital human image corresponding to the digital human identifier. Image synthesis is performed using an image synthesis service based on the predicted keypoint sequence and digital human image data (digital human image) to obtain digital human data, namely all image frame sequences and audio frame sequences.
[0439] In some embodiments, a digital human parameter sequence is generated based on the broadcast text; wherein, the digital human parameter sequence is a sequence of parameters such as digital human image, lip shape, expression, and movement. The digital human data includes a base model (face enhancement image or stylized face image data), the digital human parameter sequence, and an audio frame sequence.
[0440] Step S2404: Send the digital human data to the display device 200 so that the display device 200 plays the digital human image and audio according to the digital human data.
[0441] In some embodiments, the streaming control service relies on the live streaming channel to push the encoded image frame sequence and broadcast voice to the live streaming room to complete the digital human streaming.
[0442] In some embodiments, the live data streaming process is as follows: Figure 25 As shown. Terminal 300 sends a request to establish a live streaming channel, creates a live streaming room, and sends the live streaming room to the streaming control service. The streaming control service sends the live streaming data obtained through steps such as speech synthesis, key point prediction, and image synthesis to the display device 200 via the live streaming channel in a live streaming pull manner, and the display device 200 plays it.
[0443] The streaming control service is an important part of the digital human's driving display and terminal presentation. It is responsible for driving and displaying the virtual image, reflecting the overall customization and driving effect of the digital human.
[0444] The streaming control service receives three types of requests from the display device: 1) restart: The streaming control service interrupts the current video playback, re-applies for a room instance, verifies the validity and sensitivity of the customized image, records the instance status, creates a live room and publishes a broadcast, and completes the live broadcast preparation actions; 2) query: The streaming control service asynchronously processes the request content, performs actions such as speech synthesis, key point prediction, image synthesis, and live room streaming, until the image frame group and audio frame group are pushed out, completes the live playback, destroys the room, and reclaims the instance; 3) stop: The streaming control service interrupts the current video playback, destroys the room, and reclaims the instance.
[0445] To ensure the real-time nature of the digital human-driven system, live streaming technology is used to synthesize digital human data from the received request content in real time and push it to the live streaming room, enabling instant playback on the playback end.
[0446] In addition, the push streaming control service uses an instance pool mechanism. A unique instance is requested for each instance with the same verification information. The instance pool automatically reclaims instances that are no longer in use to make them available to other devices. Instances that experience anomalies or remain unclaimed for an extended period are automatically detected and destroyed by the instance pool, and new instances are created to ensure a healthy number of instances in the pool.
[0447] The display device 200 receives the encoded image frame sequence and the broadcast voice, injects them into the decoder for decoding, and synchronously plays the decoded image frames and broadcast voice, i.e., the image and voice of the digital human.
[0448] In some embodiments, the server 400 sends the digital human parameter sequence and the broadcast voice to the display device 200. The display device 200 draws and renders the digital human image based on the digital human parameters and the basic model, and displays the drawn digital human image synchronously while the broadcast voice is played.
[0449] In some embodiments, after recognizing the voice data, the server 400, in addition to the digital human data, also sends request user interface data or media asset data, etc., from the voice data. The display device 200 displays the user interface data sent by the server 400 and displays the digital human data at a designated location. For example, when a user inputs "How's the weather today?", the user interface of the display device 200 displays as follows: Figure 26 As shown.
[0450] In some embodiments, the digital human image is displayed in the user interface layer.
[0451] In some embodiments, the digital human image is displayed as an overlay on top of the user interface layer.
[0452] In some embodiments, the user interface layer is located above the video layer. Digital human data is displayed in a preset area of the video layer, and a target area is drawn in the user interface layer. The target area is transparent, and the preset area and the target area coincide, so that the digital human image in the video layer can be displayed to the user.
[0453] In some embodiments, the digital human interaction sequence diagram is as follows: Figure 27 As shown. After receiving voice data, display device 200 sends the voice data to the semantic service, which then sends the semantic results back to display device 200. Display device 200 initiates a request to the streaming control service. Upon response, the streaming control service generates image synthesis data through speech synthesis, keypoint prediction, and image synthesis services, and pushes the image synthesis data and audio data to the live broadcast room. Display device 200 can obtain live broadcast data from the live broadcast room. When the push queue is empty, the streaming control service automatically ends the streaming and exits the live broadcast room. If display device 200 detects a timeout due to no action, it ends the live broadcast and exits the live broadcast room.
[0454] This application embodiment supports providing enterprise and individual users with the capability for high-fidelity customization of general-purpose digital humans with small sample sizes and low resource consumption, and provides a novel anthropomorphic intelligent interaction system based on replicating the digital human image and voice. The digital human image includes 2D real-life images, 2D cartoon images, and 3D near-real-life images. Users enter the terminal customization process by scanning a QR code through an application. A personalized digital human image is customized by collecting the user's second-level video information / selfie image information, and a personalized voice is customized by collecting 1-10 sentences of audio data from the user, achieving personalized digital human voice customization. After customization, the image and voice can be selected and switched through the display device 200, providing voice and text-based interaction using the selected image and voice. During the interaction, the display device 200 receives user requests, and the response (broadcast text) is generated by perception and cognition algorithms based on semantic understanding, speech analysis, and empathy understanding. The response is output in video and audio form through the digital human image and voice. The audio and video data are generated by algorithms such as speech synthesis, face-driven processing, and image generation, and are coordinated and forwarded to the target display device by the push streaming control service, completing one interaction.
[0455] Some embodiments of this application provide an image processing method applicable to a server 400, which is configured to: receive face image data; input the face image data into a shared encoder to obtain a first depth-coded feature; input the first depth-coded feature into a segmentation decoder to obtain a segmentation mask; input the segmentation mask and the first depth-coded feature into a flow-guided structure module to obtain a thinning feature; input the first depth-coded feature and the thinning feature into a matting decoder to obtain a matted face image; perform image quality enhancement processing on the matted face image to obtain a face-enhanced image; determine facial key point data in the face-enhanced image; and generate standard data, the standard data including the face-enhanced image and the facial key point data. In this application embodiment, a segmentation mask is first obtained through a segmentation decoder. The segmentation mask provides semantic information obtained from segmentation to the matting decoder, thereby making the matting result obtained by the matting decoder more accurate and the image edge segmentation cleaner. This helps improve the quality and accuracy of the standard data and eliminates the need for manual assistance.
[0456] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0457] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A server, characterized in that, Configured as: Receive facial image data; The face image data is input into a shared encoder to obtain first depth-coded features; The first depth-coded features are input into the segmentation decoder to obtain the segmentation mask; After concatenating the segmentation mask with the first depth-coded feature, the refined feature is obtained by passing it through two convolutional layers with activation functions and one channel attention layer. The first depth-encoded feature and the thinning feature are input into the matting decoder to obtain the matted face image; The cut-out face image is then subjected to image quality enhancement processing to obtain an enhanced face image; Determine the facial key point data in the enhanced face image; Generate standard data, which includes face enhancement images and facial landmark data.
2. The server according to claim 1, characterized in that, The facial image data includes facial video data. The server performs an operation to input the facial image data into a shared encoder to obtain first depth-coded features, which is further configured to: Select a target image frame from the face video data. The head of the person in the target image frame is located in the middle of the image. The eyes of the person in the target image frame are open. The facial contour and features of the person in the target image frame are complete. The target image frame is input into a shared encoder to obtain the first depth-coded features.
3. The server according to claim 1, characterized in that, The server performs image quality enhancement processing on the cut-out face image to obtain an enhanced face image, and is further configured to: The background of the cut-out face image is replaced to obtain the face image with the background replaced; The image quality of the face image after background replacement is enhanced to obtain an enhanced face image.
4. The server according to claim 1, characterized in that, The server performs image quality enhancement processing on the cut-out face image to obtain an enhanced face image, and is further configured to: The cut-out face image is input into a convolutional neural network encoder to obtain the second deep coding features; The second deep encoded features are input into the generative adversarial network prior model to obtain face enhancement images.
5. The server according to claim 4, characterized in that, The server executes the input of the second deep encoded features into a generative adversarial network prior model to obtain a face enhancement image, and is further configured to: Obtain the first hidden feature of the second deep encoded feature in the latent space; The first hidden feature is transformed into the target space through a nonlinear mapping to obtain the second hidden feature; The second hidden feature, noise, and the output of the previous layer's generative adversarial network block are input into the current layer's generative adversarial network block to obtain the output of the current layer's generative adversarial network block. The image output by the last layer of the generative adversarial network block is determined to be a face enhancement image.
6. The server according to claim 1, characterized in that, After generating the standard data, the server is configured as follows: Receive voice data input by the user from the display device; Generate broadcast text based on the voice data; Digital human data is generated based on the broadcast text and the standard data: The digital human data is sent to the display device so that the display device can play digital human images and voice based on the digital human data.
7. The server according to claim 6, characterized in that, The digital human data includes digital human image data and broadcast voice. The server generates digital human data based on the broadcast text and the standard data, and is further configured to: The broadcast speech is synthesized based on the broadcast text; Determine the key point sequence based on the broadcast voice and the facial key point data; Digital human image data is synthesized based on the key point sequence and the face enhancement image.
8. A display device, characterized in that, include: The monitor is configured to display the user interface; A communicator configured to perform data communication with the server according to any one of claims 1 to 7; The controller is configured as follows: Receive voice data input by the user; The voice data is sent to the server via the communicator; Receive digital human data sent by the server based on the voice data; Based on the digital human data, the images and voice of the digital human are played.
9. An image processing method applied to a server, characterized in that, include: Receive facial image data; The face image data is input into a shared encoder to obtain first depth-coded features; The depth-encoded features are input into the segmentation decoder to obtain a segmentation mask; After concatenating the segmentation mask with the first depth-coded feature, the refined feature is obtained by passing it through two convolutional layers with activation functions and one channel attention layer. The first depth-encoded feature and the thinning feature are input into the matting decoder to obtain the matted face image; The cut-out face image is then subjected to image quality enhancement processing to obtain an enhanced face image; Determine the facial key point data in the enhanced face image; Generate standard data, which includes face enhancement images and facial landmark data.
Citation Information
Patent Citations
Image processing method, image processing device and computer readable storage medium
CN112308043A
Server and portrait segmentation method
CN115272368A
Non-entity class object matting method based on semantic information guidance
CN115512102A
Server, display device and virtual digital human interaction method
CN116185191A
