Image processing method and device
By generating virtual faces through generative adversarial networks and autoencoder models, and combining them with computer graphics rendering, the problems of blurred edges and low resolution in virtual model technology are solved, and high-definition, three-dimensional virtual model generation is achieved.
Patent Information
- Application Number
- CN202110014386.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-06
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-01-06
AI Technical Summary
In existing virtual model technology, real-life model images have blurred edges, low image resolution, and are unable to process complex clothing textures.
Using generative adversarial networks and autoencoder models, the generative model is trained to generate virtual faces that meet user needs. The virtual faces are then mapped to 3D models through image synthesis models, and rendered in combination with computer graphics to generate high-definition, three-dimensional virtual model images.
This avoids the issue of portrait rights of real models. The generated images have clear edges and high resolution, provide better user experience, and can adjust the posture and clothing of the virtual model according to needs.
Smart Images

Figure CN114782240B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to a method for image processing. One or more embodiments of this specification also relate to an image processing apparatus, an application, a computing device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of e-commerce platforms, virtual mannequin (fitting) technology has begun to be applied to major platforms and some offline shopping experience stores. Virtual mannequin technology refers to the technology of putting clothing from an image on a model in the real world or in the image. Because both the clothing and the model can be virtual, it is also called virtual fitting. Existing technologies often use real-life models to achieve fitting, ensuring the authenticity of the real-life model images. However, the generated real-life model images have blurred edges, low image resolution, and cannot handle complex clothing textures. Summary of the Invention
[0003] In view of this, the present invention provides an image processing method. One or more embodiments of the present invention also relate to an image processing apparatus, an application, a computing device, and a computer-readable storage medium to address technical deficiencies in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a method for processing an image is provided, including:
[0005] receiving a request for generating an initial image including a first initial object, wherein the request carries attribute information of the first initial object;
[0006] Inputting the attribute information of the first initial object into a picture generation model to obtain the initial picture containing the first initial object;
[0007] Inputting the initial image and the candidate images containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object,
[0008] The first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0009] Optionally, inputting the attribute information of the first initial object into a picture generation model to obtain the initial picture containing the first initial object includes:
[0010] The attribute information of the first initial object is input into a picture generation model to obtain the initial picture containing the first initial object and the feature information of the first initial object.
[0011] Optionally, inputting the initial image and the candidate image containing the second initial object and the third initial object into an image synthesis model to obtain a target image containing the target object includes:
[0012] Adjusting feature information of a first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image;
[0013] The adjusted at least one initial picture and a candidate picture containing the second initial object and the third initial object are input into a picture synthesis model to obtain at least one target picture containing a target object.
[0014] Optionally, the image generation model includes an image generation network and an image identification network.
[0015] The training steps of the image generation network and the image identification network are as follows:
[0016] Obtaining a sample image training set, wherein the sample image training set includes sample images and sample labels corresponding to the sample images;
[0017] Training an initial image generation network based on the sample images and the sample labels to obtain an image generation network;
[0018] Inputting the sample image into the image generation network to obtain a sample target image;
[0019] An initial image identification network is trained based on the sample target image and the sample label to obtain an image identification network, and a trained image generation model is obtained based on the image generation network and the image identification network.
[0020] Optionally, the picture synthesis model includes an encoder and at least one decoder.
[0021] The training steps of the picture synthesis model are as follows:
[0022] Acquire a sample data set, wherein the sample data set includes a first sample object and a second sample object;
[0023] Inputting the first sample object and the second sample object into the encoder for encoding, and outputting a first encoding vector of the first sample object and a second encoding vector of the second sample object;
[0024] The first encoding vector and the second encoding vector are input into the decoder for decoding, a loss function of the decoding result is determined based on the decoding result, and the network parameters of the encoder are adjusted based on the loss function to obtain a trained image synthesis model.
[0025] Optionally, adjusting the feature information of the first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image includes:
[0026] Encoding feature information of a first initial object in the initial image based on a preset requirement;
[0027] The encoded feature information of the first initial object is decoded using the picture generation model to obtain at least one initial picture of the first initial object having the target feature information.
[0028] Optionally, obtaining a target image containing a target object includes:
[0029] Render the target object of the target image to obtain a rendered target image containing the target object.
[0030] Optionally, after obtaining the target image containing the target object, the method further includes:
[0031] Acquire a target image containing a target object that meets a preset condition, and acquire an image containing a fourth initial object that matches the first initial object;
[0032] The target image containing the target object that meets the preset conditions and the image containing the fourth initial object are input into the image synthesis model to obtain the target image of the target object containing the first initial object and the fourth initial object.
[0033] Optionally, the first initial object includes a face or clothing.
[0034] According to a second aspect of the embodiments of this specification, there is provided an image processing apparatus, including:
[0035] a receiving module configured to receive a request for generating an initial image containing a first initial object, wherein the request for generating an initial image carries attribute information of the first initial object;
[0036] A picture generation module is configured to input the attribute information of the first initial object into a picture generation model to obtain the initial picture containing the first initial object;
[0037] The image synthesis module is configured to input the initial image and the candidate image containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object, wherein the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0038] According to a third aspect of the embodiments of this specification, an application is provided, including:
[0039] receiving a request for generating an initial image including a first initial object, wherein the request carries attribute information of the first initial object;
[0040] Inputting the attribute information of the first initial object into a picture generation model to obtain the initial picture containing the first initial object;
[0041] Inputting the initial image and the candidate images containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object,
[0042] The first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0043] According to a fourth aspect of the embodiments of this specification, there is provided a computing device, including:
[0044] memory and processor;
[0045] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the processor implements the steps of the image processing method when executing the computer-executable instructions.
[0046] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of any one of the image processing methods are implemented.
[0047] One embodiment of the present specification implements receiving a request to generate an initial image containing a first initial object, wherein the generation request carries attribute information of the first initial object; inputting the attribute information of the first initial object into an image generation model to obtain the initial image containing the first initial object; inputting the initial image and a candidate image containing a second initial object and a third initial object into an image synthesis model to obtain a target image containing a target object, wherein the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0048] The image processing method obtains an initial image containing the first initial object by inputting attribute information of the first initial object into an image generation model, and inputs both the initial image and the candidate image into an image synthesis model to obtain a target image containing the target object, thereby obtaining the initial image containing the first initial object and mapping the initial image to the candidate image containing the second initial object and the third initial object. This not only avoids the problem of the image containing the third initial object, but also ensures that the generated image has a sense of reality, and the edges of the processed image are clear and the resolution is high, giving the user a better experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of a picture processing method provided by one embodiment of this specification;
[0050] Figure 2 An embodiment of this specification provides an image processing method for generating a target image schematic diagram containing a target object;
[0051] Figure 3 A schematic diagram of an adjusted picture including a first initial object generated by a picture processing method provided in one embodiment of this specification;
[0052] Figure 4 A schematic diagram of a target image containing a target object generated by an image processing method provided in one embodiment of this specification;
[0053] Figure 5 This is a flowchart of a processing process of an image processing method provided by an embodiment of this specification;
[0054] Figure 6 This is a structural diagram of an image processing device provided by an embodiment of this specification;
[0055] Figure 7 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0056] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0057] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0058] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0059] First, the terms involved in one or more embodiments of this specification are explained.
[0060] Virtual model: A model image synthesized by an algorithm, with a face and body close to that of a real person, which can strike different poses and wear different virtual clothes.
[0061] Virtual model faces: Model faces synthesized by algorithms. Based on training with a large number of model face photos, the final model can synthesize high-definition face photos that do not exist in the real world.
[0062] Generative Adversarial Network (CGAN model): A new network structure in the field of computer vision. It has been used in a large number of generative vision tasks in recent years. It is a mainstream algorithm structure in the field and can include adversarial network structures such as Style GAN2, ProGAN, and StyleGAN.
[0063] Autoencoder model: A network structure in the field of computer vision that generally encodes a photo into a string of information. The module that implements this process is called an encoder; the module that decodes the information string is called a decoder, which is used to restore the information string to a photo.
[0064] Computer graphics (CG): is the science of using mathematical algorithms to convert two-dimensional or three-dimensional graphics into raster form for computer displays.
[0065] 3D rendering: Rendering is the last step in CG, and it is also the stage that finally makes your image conform to your 3D scene.
[0066] In practical applications, the purpose of virtual models is not only to algorithmically synthesize a set of seller show photos that meet merchants' requirements, thereby reducing the cost of hiring professional models for shoots, but also to ensure the high quality and fidelity of the synthesized models and clothing, ensuring they match the quality of buyer shows. Furthermore, after buyers receive the clothing or products, the buyer show photos can be algorithmically synthesized into a set of photos that meet their needs, avoiding the appearance of the buyer's real face in the buyer show photos and mitigating the risk of disclosing the buyer's privacy. Current virtual model (fitting) technologies in the field fall into two main categories: virtual fitting technology based on electronic fitting mirrors (which incorporate multiple sensors). This type of virtual fitting technology is the earliest of its kind. In this type of technology, the user stands in front of the mirror, and sensors capture key points of the body and align them with those of the clothing, attaching the clothing to the user. The model used in this type of technology is the user themselves. Virtual fitting technology based on generative neural networks (GANs) is a newly emerging computer vision technology in the past two years. This method combines generative adversarial networks to transfer model clothing from 2D images. The models used in this type of technology are generally real-life models. However, both of the above methods have major problems and limitations, such as blurred edges, low image resolution, and inability to process complex clothing textures.
[0067] The embodiments of this specification provide a virtual model synthesis technology based on a generative adversarial network and three-dimensional rendering. This technology primarily relies on a generative adversarial network to synthesize a model's face, maps the synthesized face onto a 3D model, and then combines it with traditional computer graphics (CG) methods to render the virtual model and clothing. Advantages include: the virtual model's face doesn't exist in the real world, eliminating the risk of portrait rights violations while still being realistic enough; the clothing has a strong sense of three-dimensionality after three-dimensional reconstruction, and the virtual model can also change its posture. It should be noted that the advantage of a virtual image is that it can be modified according to the needs of specific practical applications. Furthermore, the virtual model can be not only a human face model, but also a cartoon image model. The cartoon image model can be a cartoon image that doesn't exist in the real world, or a licensed cartoon image. This specification does not impose any restrictions on this.
[0068] In this specification, a method for image processing is provided. This specification also relates to an image processing apparatus, an application, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0069] See also Figure 1 , Figure 1 A flowchart of an image processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0070] Step 102: Receive a request for generating an initial image containing a first initial object, wherein the request for generating an initial image carries attribute information of the first initial object.
[0071] Among them, the first initial object can be understood as the object contained in the initial picture that the user needs to generate. Taking the initial picture as a virtual face picture as an example, the first initial object is the virtual face; the attribute information is the basic attribute information of the first initial object itself. For example, if the first initial object is a human face, then the attribute information can be the basic attribute information of the human face, such as yellow skin, big eyes, and high nose bridge.
[0072] Specifically, when the server receives a request from the user to generate an initial image containing a first initial object, the generation request carries the attribute information of the first initial object. In actual applications, the server receives a request from the user to generate an image of a virtual face, and the request must include the attribute information of the virtual face, including skin color, eye shape and size, mouth shape and size, and other basic attribute information about the virtual face. For example, when the server receives a request from the user to generate an image of a virtual Asian face, the image generation request contains the user's generation requirements, that is, the attribute information of the virtual face can be yellow skin, big eyes, high nose bridge, small mouth, and other attribute information that conforms to an Asian face.
[0073] It should be noted that the user's request to generate an initial image containing the first initial object is based on the user's actual needs. In the actual application of virtual model face synthesis, the user can adjust the model's facial attribute information as needed to adapt to actual needs. The embodiments of this specification do not impose too many restrictions on this.
[0074] Step 104: Input the attribute information of the first initial object into the image generation model to obtain the initial image containing the first initial object.
[0075] Among them, the image generation model can be understood as a network model that generates an image that meets the user's needs based on the attribute information of the first initial object carried in the user's image generation request. The embodiment of this specification uses the image generation model as a generative adversarial network model as an example for explanation, but does not impose any limitation on the type of image generation model.
[0076] In a specific implementation, the attribute information of the first initial object is input into the image generation model, and an initial image containing the first initial object can be obtained through the image generation model, wherein the image generation model can be a generative adversarial network model; specifically, the image generation model includes an image generation network and an image identification network,
[0077] The training steps of the image generation network and the image identification network are as follows:
[0078] Obtaining a sample image training set, wherein the sample image training set includes sample images and sample labels corresponding to the sample images;
[0079] Training an initial image generation network based on the sample images and the sample labels to obtain an image generation network;
[0080] Inputting the sample image into the image generation network to obtain a sample target image;
[0081] An initial image identification network is trained based on the sample target image and the sample label to obtain an image identification network, and a trained image generation model is obtained based on the image generation network and the image identification network.
[0082] Among them, the image generation network and the image identification network can be understood as the generative model and discriminative model in the CGAN model. The generative model refers to the ability to generate text, pictures, videos and other data from input data according to the task through model training. The discriminative model cannot reflect the characteristics of the training data itself, but in terms of the preferred classification between different categories, it reflects the differences between heterogeneous data.
[0083] Specifically, by obtaining a sample image training set, wherein the sample data training set includes sample images and labels of sample image objects, an initial image generation network is trained based on the sample images and sample labels to obtain an image generation network, and the output sample target images and sample labels are used to train the initial image identification network to obtain an image identification network, and an image generation model is obtained based on the image generation network and the image identification network to realize the attribute information for the first initial object in the input image generation request, thereby generating an image containing the first initial object.
[0084] It should be noted that the image generation model provided in the embodiments of this specification can specifically select the adversarial network structure of Style GAN2. Compared with other adversarial network structures of the same type, its performance will be more stable and less likely to generate image noise. However, it is not limited to this type of adversarial network structure, and also includes ProGAN, StyleGAN and other types of adversarial network structures. The embodiments of this specification do not make too many restrictions on this.
[0085] In practical applications, taking the training of image generation models to generate images containing virtual faces as an example, by obtaining thousands or even hundreds of millions of images containing faces and the labels corresponding to the face images, if you need to generate a model with an Asian face, you need to collect face images of Asian models. Other races, ages and other conditions can be matched accordingly in the training data.
[0086] For example, the labels corresponding to the face image are white skin, yellow race, age 20-25 years old, big eyes, and low nose bridge. Using a large number of images containing faces and their corresponding labels, the image generation network is trained based on the prior distribution of facial features, enabling the image generation network to generate images similar to the sample images. The image identification network then performs a similarity comparison on the images containing faces generated by the image generation network. The loss function is then used to calculate the generated effect, determining whether the images containing faces generated by the image generation network are of the same type as the faces in the training sample images. It should be noted that during the initial training process, the images generated by the image generation network may not have the shape and features of a face. However, as training progresses, the generated images are identified by the image identification network, and gradually, the images generated by the image generation network possess facial features and may even have the same labels as the images corresponding to the labels. Consequently, the above steps are repeated, and the image generation network and the image identification network undergo iterative interactive adversarial training, ultimately reaching a Nash equilibrium state. This gradually enhances the performance of the image generation network, enabling the generation of virtual faces that meet user needs.
[0087] In the embodiments of the present specification, by training a generative adversarial network model, it is possible to input the attribute information of the first initial object and output a picture of the first initial object corresponding to the attribute information. This not only ensures that the generated picture meets user needs, but also allows the trained model to quickly and automatically generate pictures containing the first initial object in batches for subsequent use.
[0088] After the trained image generation model has the ability to generate a target image, the user's attribute information of the first initial object is input into the image generation model to obtain an image containing the first initial object. Specifically, inputting the attribute information of the first initial object into the image generation model to obtain the initial image containing the first initial object includes:
[0089] The attribute information of the first initial object is input into a picture generation model to obtain the initial picture containing the first initial object and the feature information of the first initial object.
[0090] In specific implementation, the server inputs the feature information of the first initial object carried in the image generation request sent by the user into the trained image generation model, and obtains the initial image containing the first initial object and the feature information of the first initial object through the image generation model.
[0091] Taking the image generation request sent by the user as an example, the first initial object is the virtual face. For example, the attribute information of the virtual face carried in the image generation request received by the server from the user is: fair skin color, age before 20-25 years old, big eyes, high nose, cherry mouth and other basic information. The above attribute information for the virtual face is input into the image generation model to obtain a picture of the virtual face containing the above attribute information, and the feature coding record of the generated picture containing the virtual face is saved, wherein the feature coding can be feature coding information such as head posture information coding, eye distance information coding, and face width information coding. The dimension of the feature coding information of the picture can be set according to needs, and the embodiments of this specification do not impose any restrictions on this.
[0092] In an embodiment of the present specification, by inputting the user's attribute information for the first initial object into the image generation model, an initial image containing the first initial object and feature information of the first initial object can be quickly obtained, so that the initial image containing the first initial object can be subsequently synthesized with the template image to generate a target image containing the target object.
[0093] Step 106: Input the initial image and the candidate image containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object, wherein the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0094] Among them, the second initial object can be understood as part of the object content of the object in the candidate template image, and the third initial object can be understood as another part of the object content of the object in the candidate template image. The candidate image contains a complete object consisting of the second initial object and the third initial object.
[0095] It should be noted that the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object. If the first initial object is a human face and the object in the candidate image is the entire part of the human portrait, then the third initial object in the candidate image is the face part of the human portrait in the candidate image, and the second initial object is the body part of the human portrait in the candidate image.
[0096] During specific implementation, the initial image containing the first initial object generated by the image generation model and the candidate image containing the second initial object and the third initial object are input into the image synthesis model, and the initial image and the candidate image can be synthesized. Since the first initial object and the third initial object are of the same type, it can be achieved in the image synthesis model that part of the third initial object can be replaced with part of the first initial object to obtain the target object combining the first initial object and the second initial object, that is, the image containing the target object is the target image.
[0097] In practical applications, the image processing method provided in the embodiments of this specification is applied to the synthesis of a virtual model as an example, wherein the candidate image is a model image with a real human body image, and the first initial object is the virtual model face. The image with the virtual model face and the candidate image with the real human body model are input into the autoencoder model to replace the virtual model face with the face of the real human body model, and obtain a model composite image with a virtual model face and a body with a real human body image.
[0098] Specifically, the picture synthesis model includes an encoder and at least one decoder.
[0099] The training steps of the picture synthesis model are as follows:
[0100] Acquire a sample data set, wherein the sample data set includes a first sample object and a second sample object;
[0101] Inputting the first sample object and the second sample object into the encoder for encoding, and outputting a first encoding vector of the first sample object and a second encoding vector of the second sample object;
[0102] The first encoding vector and the second encoding vector are input into the decoder for decoding, a loss function of the decoding result is determined based on the decoding result, and the network parameters of the encoder are adjusted based on the loss function to obtain a trained image synthesis model.
[0103] In specific implementation, the picture synthesis model provided in the embodiments of this specification can be a self-encoding model, which is not limited in many ways. In the specific training model process, two pictures are used as training data to train an encoder and two decoders, wherein the encoder can receive data input and compress it into a small code, and then regenerate the original input data from this code. During the continuous training process, the encoder continuously tries to learn to create a code so that it can regenerate the original input picture. As long as there is a large amount of image data, the encoder can learn to create this code, and then decode the encoded content through two decoder modules to restore the output image data to the original input picture data.
[0104] In the embodiments of the present specification, the trained encoder replaces part of the content of the third initial object of the same type as the first initial object in the initial image containing the first initial object, thereby automatically implementing the replacement process between the same types of the first initial object to meet the user's needs for synthesized images.
[0105] See also Figure 2 , Figure 2 A schematic diagram of generating a target image containing a target object by the image processing method provided in one embodiment of this specification is shown.
[0106] Figure 2 In the example, we take the user's picture generation request to generate a virtual model. Figure 2 The model image shown in is a virtual model image generated by the image generation model and the image synthesis model, among which, Figure 2 Part a in the middle is a virtual face generated by the image generation model, not a real model face. Figure 2 Except for part a, the other parts are template pictures of real models. In order to protect the portrait rights of the real model, the face part is replaced with a virtual face, thereby not only protecting the portrait rights of the model, but also automatically achieving rapid face replacement of the real model through the method provided in this embodiment.
[0107] The image processing method provided in this embodiment can render the generated target image containing the target object to present a high-definition image with good display effect to the user, so as to facilitate further use by the user.
[0108] Since the initial image generated by the image generation model includes only a single object in the form of the first initial object, the generated image has a single presentation form when applied to a 3D stereographic image. In order to provide a richer presentation form of the target object, the feature information of the first initial object is adjusted to achieve a richer presentation form in the image synthesis model. Specifically, the initial image and the candidate image including the second initial object and the third initial object are input into the image synthesis model to obtain a target image including the target object, including:
[0109] Adjusting feature information of a first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image;
[0110] The adjusted at least one initial picture and a candidate picture containing the second initial object and the third initial object are input into a picture synthesis model to obtain at least one target picture containing a target object.
[0111] Among them, the preset requirement conditions can be understood as the requirement conditions that need to be adjusted for the picture containing the first initial object generated by the user based on the picture generation model. For example, the requirement conditions that need to be adjusted for different first initial objects are not the same. If the first initial object is a face, the preset requirement conditions can be the angle of the front face. If the first initial object is clothes, the preset requirement conditions can be the color of the clothes, etc. The specific preset requirement conditions are not limited in too much in the embodiments of this specification.
[0112] During specific implementation, the server adjusts the feature information of the first initial object in the initial picture based on the user's preset requirement conditions, obtains at least one adjusted initial picture, and then inputs the at least one adjusted initial picture and the candidate picture containing the second initial object and the third initial object into the picture synthesis model to obtain at least one target picture containing the target object. It should be noted that the preset requirement conditions can be one, two or more conditions, that is, the adjusted initial picture is also one, two or more accordingly, and then it is synthesized with the candidate picture through the picture synthesis model, and the target pictures containing the target object obtained can be one, two or more.
[0113] For example, taking the generation of a virtual model with rich postures as an example, the image generation model is used through the user's image generation request to generate a virtual face image that meets the user's request for the user, and the feature information of the virtual face is recorded and saved, such as head posture information, mouth state information, eye state information, etc. The preset requirement is to generate a virtual model image with multiple head postures, that is, to adjust the head posture information in the feature information of the virtual face. The image generation model can generate virtual faces with multiple head postures, and the multiple virtual faces with different head postures are synthesized with the real model of the candidate image through the image synthesis model to obtain a virtual model with multiple head postures.
[0114] In the embodiment of the present specification, by adjusting the first initial object according to preset requirements, multiple adjusted pictures containing the first initial object are generated, so that a series of target pictures containing a variety of target objects can be quickly generated through the picture synthesis model to meet user needs.
[0115] Furthermore, the adjusting the feature information of the first initial object in the initial picture based on a preset requirement to obtain at least one adjusted initial picture includes:
[0116] Encoding feature information of a first initial object in the initial image based on a preset requirement;
[0117] The encoded feature information of the first initial object is decoded using the picture generation model to obtain at least one initial picture of the first initial object having the target feature information.
[0118] In a specific implementation, the feature information of the first initial object in the initial picture is encoded based on the user's preset requirements, and the encoded feature information of the first initial object is decoded using the picture generation model to obtain at least one initial picture of the first initial object with the target feature information.
[0119] Continuing with the above example, the feature coding of the head posture information in the feature information of the virtual face is adjusted, such as adjusting the feature vector that controls the head posture, to adjust the feature coding of multiple head postures, and decode the encoded head feature information using the image generation model, that is, to generate a virtual face with one, two or more head postures.
[0120] In the embodiment of the present specification, by performing secondary encoding on the feature information of the first initial object, a picture containing a variety of the first initial object is output, and then synthesized with the candidate picture, so as to quickly display a variety of target pictures containing the target object to the user.
[0121] See also Figure 3 , Figure 3 A schematic diagram of an adjusted picture containing a first initial object generated by the picture processing method provided in one embodiment of this specification is shown.
[0122] Figure 3 Taking the first initial object as the virtual model's face as an example, a detailed example is given. Figure 3 The a in the image is a picture containing a virtual face generated based on the image generation model. Figure 3 b in the figure is a virtual face image after adjusting the head feature information of the virtual face. The head posture of the virtual face is tilted at a certain angle to achieve the adjustment of the head feature information and show that the adjusted virtual model meets the user's needs.
[0123] After obtaining a target image containing a target object, in order to make the target image have a better display effect and improve the image quality, the target image may be rendered. Specifically, obtaining the target image containing the target object includes:
[0124] Render the target object of the target image to obtain a rendered target image containing the target object.
[0125] During specific implementation, the target object in the obtained target image is 3D rendered, and the image resolution can be adjusted independently to obtain a rendered target image containing the target object.
[0126] It should be noted that the resolution adjusted through rendering can reach a clarity of up to 4k, which is much higher than the image effect generated in the image generation model. In addition, for the problem of blurred image edges, the 3D rendering technology provided in the embodiment of this specification is used for synthesis, and the three-dimensional sense of the image edges is very strong to improve the user experience.
[0127] In actual applications, in the field of virtual model generation, clothing is usually synthesized onto the model, and then after manual subsequent processing, that is, image refinement, it can be returned to the user. Since the model used in this method is a real person, the portrait right is not only a potential problem, but the quality of the generated image is also very limited, and the subsequent manual processing is also costly. The image processing method provided in the embodiment of this specification manually screens the synthesized virtual model image to obtain the image that needs to be rendered through rendering technology, thereby obtaining a high-definition and high-quality image to overcome problems such as image quality.
[0128] In the embodiments of this specification, by rendering the obtained target image containing the target object, not only can the defects of image quality be solved, the three-dimensional effect and edge clarity of the image can be enhanced through rendering technology, but also the time for subsequent manual image processing can be saved through automated rendering technology.
[0129] In addition, after a target image containing a target object is generated for a user through the image generation model and the image synthesis model, the target image is only a virtual synthetic image with a single form of expression. In order to obtain a richer target image with a better presentation effect, it is necessary to obtain an image of a fourth initial object that matches the first initial object and further perform image synthesis. Specifically, after obtaining the target image containing the target object, the method further includes:
[0130] Acquire a target image containing a target object that meets a preset condition, and acquire a candidate image containing a fourth initial object that matches the first initial object;
[0131] The target image containing the target object that meets the preset conditions and the candidate image containing the fourth initial object are input into the image synthesis model to obtain the target image of the target object containing the first initial object and the fourth initial object.
[0132] Among them, the fourth initial object can be understood as the initial object that matches the first initial object. For example, the first initial object is a virtual face. If the virtual face is a frontal face, then the body posture that matches the frontal face is the frontal body posture. If the virtual face is a left-side face, then the body posture that matches the side face is the left-side body posture.
[0133] During specific implementation, a target image containing a target object is generated by an image generation model and an image synthesis model to obtain a target image that meets preset conditions, wherein the preset conditions may be the actual needs of the user, and a candidate image containing a fourth initial object that matches the first initial object is obtained, and the target image that meets the preset conditions and the candidate image containing the fourth initial object are input into the image synthesis model to obtain a target image of the target object containing the fourth initial object.
[0134] Taking the target image as an example of a virtual model image, in order to obtain a target image of a multi-pose virtual model, the user obtains a virtual face image containing an adjusted head posture, wherein the head posture is the head posture of the left side, and obtains a candidate image containing a body posture of the left side that matches the head posture of the left side, wherein the candidate image is a complete real model image, and inputs the virtual face image and the candidate image into the image synthesis model to obtain a target image with a left side head posture and a left side body posture.
[0135] It should be noted that there can be multiple virtual face images with adjusted head postures, and virtual face images at different angles can be adjusted according to user needs. There can also be multiple complete real model images in the candidate images. Based on this, in the image synthesis model, multiple virtual model images with multiple head postures and multiple body postures can be obtained.
[0136] In the embodiment of the present specification, based on obtaining a target image that meets preset conditions and a candidate image of a fourth initial object that can match the first initial object, a target image containing the first initial object and the fourth initial object can be quickly obtained by synthesizing them through an image synthesis model, so as to achieve a target image that is diverse and meets user needs.
[0137] It should be noted that, in the image processing method provided in the embodiments of this specification, the first initial object includes a face or clothing.
[0138] In practical applications, the method provided in the embodiments of this specification can also be applied to the generation of virtual clothes and synthesized onto the body of a virtual model to realize virtual fitting technology. No excessive limitations are made on the application scenarios here.
[0139] See also Figure 4 , Figure 4 A schematic diagram of a target image containing a target object generated by the image processing method provided in one embodiment of this specification is shown.
[0140] Figure 4 In this article, we take the target object as an avatar as an example to explain. Figure 4Graph a in the figure shows multiple images of virtual models, where the faces of the multiple virtual models are virtual human faces generated by the image generation model. Since the body postures of the models in the candidate images are all different during the synthesis of the virtual models, multiple virtual models with virtual human faces and different body postures can be generated based on template images with different postures. Figure 4 b in FIG shows multiple virtual model images, wherein the faces of the multiple virtual model images are virtual human faces, and the head features are the head postures displayed after adjusting the head feature information. Since the body postures of the models in the candidate images are different in the synthesis of the virtual models, multiple images with the same body postures can be generated. Figure 4 Figure 1 shows virtual models of models with different head postures and body postures.
[0141] In summary, the embodiments of this specification obtain an initial image containing the first initial object by inputting the attribute information of the first initial object into the image generation model, and inputting both the initial image and the candidate image into the image synthesis model to obtain a target image containing the target object, thereby realizing model face synthesis and mapping the synthesized face to the 3D model. This not only avoids the issue of portrait rights of real-life models, but also ensures that the generated image is realistic, and the edges of the processed image are clear and the resolution is high, giving users a better experience.
[0142] In addition, the image processing method provided in the embodiments of this specification may include three innovative points: First, the embodiments of this specification are based on the structure of a generative adversarial network, using model face photos as training data to train a model face generator. Using this generator, model face photos can be automatically generated in batches as the image basis of the virtual model. Second, the embodiments of this specification are based on an autoencoder model, using paired face photos as training data, to train an encoder and two decoders. Using this trained autoencoder model, the face swap between the original face and the target face can be completed. Specifically, the application goal of this patent is to swap the generated model face onto a 3D model of the original template. Through this operation, the method can obtain a 3D model model with a "synthetic face" for rendering virtual fitting. Third, another innovative point of the embodiments of this specification is the multi-pose rendering of the virtual model. The model photos output by the generative adversarial network only have a single head posture from the front. In order to provide a richer range of model postures, this patent performs secondary encoding on the image features output by the generative adversarial network and adjusts the feature vector that controls the head posture to achieve feature-level editing of the facial image. Finally, it outputs model photos in multiple postures in combination with the 3D posture of the human body.
[0143] The following combined Figure 5, taking the application of the image processing method provided in this specification in virtual model synthesis as an example, the image processing method is further explained. Figure 5 A flowchart of a processing process of an image processing method provided by an embodiment of this specification is shown.
[0144] Figure 5 a in the figure shows the generation process of a virtual model face in a face generation network. In the embodiment of this specification, based on the structure of a generative adversarial network, a model face generator is trained with model face photos as training data. The generator can automatically generate model face photos in batches as the image basis of the virtual model. In the selection of training data, corresponding matching can be performed according to the target model type. For example, if an Asian-faced model needs to be generated, facial images of Asian models need to be collected. Other races, ages and other conditions can be matched accordingly in the training data. The feature priors of the trained face generator are completely derived from the training data set. The generative adversarial network structure is divided into two parts: a generator and a discriminator. The generator is used to generate a face photo based on the prior distribution of facial features; the discriminator is used to compare the similarity between the generator and the real face photos in the training data, and the loss function is used to calculate the generation effect, that is, whether a face photo of the same type as the training data is generated. During the iterative interactive adversarial training process of the generator and the discriminator, the performance of the generator is gradually enhanced. Generate virtual faces based on the face generator and face discriminator, and output virtual face images that meet user needs;
[0145] Figure 5 b in the figure shows the process of the virtual model face-changing network changing the face of the virtual model. The embodiment of this specification is based on the autoencoder model, and uses paired face images (face A and face B) as training data to train an encoder and two decoders. This "autoencoder" is actually a deep neural network that can receive data input, compress it into a small code, and then regenerate the original input data from this code. In this standard autoencoder setting, the encoder will try to learn to create a code so that the network can regenerate the original input image. As long as there is enough image data, the encoder can learn to create this code, and then let the two decoder modules, one restore it to the original face A, and the other restore it to the target face B. Using this trained autoencoder model, Figure 5 The virtual face image generated by a in the input is encoded by the encoder, decoded by the decoder, and the template image of the real model is used to obtain the virtual face and replace it with the template image of the real model, so that the model image with the virtual face can be output and can be used for virtual fitting rendering.
[0146] Figure 5Figure c shows the process of synthesizing a virtual model in multiple poses. The model photo output by the generative adversarial network only has a single frontal head pose. To provide a richer range of model poses, the multi-pose synthesis stage performs a secondary encoding of the image features output by the generative adversarial network. The feature vector controlling the head pose is adjusted to achieve feature-level editing of the facial image. Ultimately, photos of the model in multiple poses are output, matching the 3D pose of the virtual model. While the generative adversarial network outputs the virtual model's face image, it also records and stores the feature encoding. While the output face image cannot be directly modified, the feature encoding can be modified in a targeted manner, such as by editing only the feature vector controlling the head pose. This method generates feature encodings for multiple head poses. These encodings are then converted back to the photo output to produce a model face in multiple head poses. Finally, these head poses are adapted to the diverse body poses, and the desired model poses are manually selected and rendered.
[0147] In the embodiments of this specification, a virtual face that meets the requirements is generated by a face generator, and the virtual face is replaced with a real model template image by a trained encoder to realize an automated virtual model face-changing process. A virtual model with a single posture can be rendered, and a model face with multiple postures can be realized by changing the feature information of the virtual face. When the posture is matched with the body posture, the image of the virtual model with multiple postures can be quickly obtained.
[0148] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 6 FIG. 1 shows a schematic diagram of the structure of an image processing device provided by an embodiment of this specification. Figure 6 As shown, the device includes:
[0149] The receiving module 602 is configured to receive a request for generating an initial image including a first initial object, wherein the request carries attribute information of the first initial object;
[0150] The picture generation module 604 is configured to input the attribute information of the first initial object into a picture generation model to obtain the initial picture containing the first initial object;
[0151] The image synthesis module 606 is configured to input the initial image and the candidate image containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object, wherein the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object.
[0152] Optionally, the image generation model 604 is further configured to:
[0153] The attribute information of the first initial object is input into a picture generation model to obtain the initial picture containing the first initial object and the feature information of the first initial object.
[0154] Optionally, the image synthesis module 606 is further configured to:
[0155] Adjusting feature information of a first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image;
[0156] The adjusted at least one initial picture and a candidate picture containing the second initial object and the third initial object are input into a picture synthesis model to obtain at least one target picture containing a target object.
[0157] Optionally, the image generation model 604 is further configured to:
[0158] The image generation model includes an image generation network and an image identification network.
[0159] The training steps of the image generation network and the image identification network are as follows:
[0160] Obtaining a sample image training set, wherein the sample image training set includes sample images and sample labels corresponding to the sample images;
[0161] Training an initial image generation network based on the sample images and the sample labels to obtain an image generation network;
[0162] Inputting the sample image into the image generation network to obtain a sample target image;
[0163] An initial image identification network is trained based on the sample target image and the sample label to obtain an image identification network, and a trained image generation model is obtained based on the image generation network and the image identification network.
[0164] Optionally, the image synthesis module 606 is further configured to:
[0165] The picture synthesis model includes an encoder and at least one decoder,
[0166] The training steps of the picture synthesis model are as follows:
[0167] Acquire a sample data set, wherein the sample data set includes a first sample object and a second sample object;
[0168] Inputting the first sample object and the second sample object into the encoder for encoding, and outputting a first encoding vector of the first sample object and a second encoding vector of the second sample object;
[0169] The first encoding vector and the second encoding vector are input into the decoder for decoding, a loss function of the decoding result is determined based on the decoding result, and the network parameters of the encoder are adjusted based on the loss function to obtain a trained image synthesis model.
[0170] Optionally, the image generation model 604 is further configured to:
[0171] Encoding feature information of a first initial object in the initial image based on a preset requirement;
[0172] The encoded feature information of the first initial object is decoded using the picture generation model to obtain at least one initial picture of the first initial object having the target feature information.
[0173] Optionally, the image synthesis module 606 is further configured to:
[0174] Render the target object of the target image to obtain a rendered target image containing the target object.
[0175] Optionally, the image synthesis module 606 is further configured to:
[0176] Acquire a target image containing a target object that meets a preset condition, and acquire a candidate image containing a fourth initial object that matches the first initial object;
[0177] The target image containing the target object that meets the preset conditions and the candidate image containing the fourth initial object are input into the image synthesis model to obtain the target image of the target object containing the first initial object and the fourth initial object.
[0178] Optionally, the image processing device further includes: the first initial object includes a face or clothes.
[0179] The image processing device provided in the embodiment of this specification obtains an initial image containing the first initial object by inputting the attribute information of the first initial object into the image generation model, and inputs both the initial image and the candidate image into the image synthesis model to obtain a target image containing the target object, thereby realizing model face synthesis and mapping the synthesized face to the 3D model. This not only avoids the portrait rights issue of real-life models, but also ensures that the generated image has a sense of reality, and the edges of the processed image are clear and the resolution is high, giving users a better experience.
[0180] The above is a schematic diagram of an image processing device according to this embodiment. It should be noted that the technical solution of the image processing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the image processing device, please refer to the description of the technical solution of the above-mentioned image processing method.
[0181] An embodiment of the present specification further provides an application program, which stores computer instructions, and when the instructions are executed by a processor, is used to implement the steps of the image processing method.
[0182] During specific implementation, the application may include an application that implements the image processing method, such as an e-commerce application that can apply the image processing method.
[0183] The above is a schematic solution of an application of this embodiment. It should be noted that the technical solution of this application and the technical solution of the above-mentioned image processing method are of the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned image processing method.
[0184] Figure 7 7 shows a block diagram of a computing device 700 according to one embodiment of the present disclosure. Components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0185] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)), whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0186] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 7The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0187] Computing device 700 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 700 can also be a mobile or stationary server.
[0188] The processor 720 is configured to execute the following computer-executable instructions, wherein the processor implements the steps of the image processing method when executing the computer-executable instructions.
[0189] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-mentioned image processing method.
[0190] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which are used to implement the steps of the image processing method when executed by a processor.
[0191] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned image processing method.
[0192] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0193] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0194] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0195] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0196] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for processing an image, comprising: receiving a request for generating an initial image including a first initial object, wherein the request carries attribute information of the first initial object; Inputting the attribute information of the first initial object into an image generation model to obtain the initial image containing the first initial object, wherein the image generation model is obtained based on an image generation network and an image identification network, the image generation network is used to generate images, and the image identification network is used to identify the generated images; Inputting the initial image and the candidate images containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object, The first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object. The target object is obtained by replacing the third initial object with the first initial object.
2. The image processing method according to claim 1, wherein inputting the attribute information of the first initial object into the image generation model to obtain the initial image containing the first initial object comprises: The attribute information of the first initial object is input into a picture generation model to obtain the initial picture containing the first initial object and the feature information of the first initial object.
3. The image processing method according to claim 2, wherein inputting the initial image and the candidate images containing the second initial object and the third initial object into the image synthesis model to obtain the target image containing the target object comprises: Adjusting feature information of a first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image; The adjusted at least one initial picture and a candidate picture containing the second initial object and the third initial object are input into a picture synthesis model to obtain at least one target picture containing a target object.
4. The image processing method according to claim 1 or 2, wherein the image generation model includes an image generation network and an image identification network. The training steps of the image generation network and the image identification network are as follows: Get the sample image training set, where The sample image training set includes sample images and sample labels corresponding to the sample images; Training an initial image generation network based on the sample images and the sample labels to obtain an image generation network; Inputting the sample image into the image generation network to obtain a sample target image; An initial image identification network is trained based on the sample target image and the sample label to obtain an image identification network, and a trained image generation model is obtained based on the image generation network and the image identification network.
5. The image processing method according to claim 1 or 3, wherein the image synthesis model comprises an encoder and at least one decoder. The training steps of the picture synthesis model are as follows: Get a sample dataset, where The sample data set includes a first sample object and a second sample object; Inputting the first sample object and the second sample object into the encoder for encoding, and outputting a first encoding vector of the first sample object and a second encoding vector of the second sample object; The first encoding vector and the second encoding vector are input into the decoder for decoding, a loss function of the decoding result is determined based on the decoding result, and the network parameters of the encoder are adjusted based on the loss function to obtain a trained image synthesis model.
6. The image processing method according to claim 3, wherein adjusting the feature information of the first initial object in the initial image based on a preset requirement to obtain at least one adjusted initial image comprises: Encoding feature information of a first initial object in the initial image based on a preset requirement; The encoded feature information of the first initial object is decoded using the picture generation model to obtain at least one initial picture of the first initial object having target feature information.
7. The image processing method according to claim 1, wherein obtaining a target image containing a target object comprises: Render the target object of the target image to obtain a rendered target image containing the target object.
8. The image processing method according to claim 7, further comprising: after obtaining the target image containing the target object; Acquire a target image containing a target object that meets a preset condition, and acquire a candidate image containing a fourth initial object that matches the first initial object; The target image containing the target object that meets the preset conditions and the candidate image containing the fourth initial object are input into the image synthesis model to obtain the target image of the target object containing the first initial object and the fourth initial object. 9 . The image processing method according to claim 1 , wherein the first initial object comprises a face or clothing.
10. An image processing device, comprising: a receiving module configured to receive a request for generating an initial image containing a first initial object, wherein the request for generating an initial image carries attribute information of the first initial object; An image generation module is configured to input the attribute information of the first initial object into an image generation model to obtain the initial image containing the first initial object, wherein the image generation model is obtained based on an image generation network and an image identification network, the image generation network is used to generate images, and the image identification network is used to identify the generated images; The image synthesis module is configured to input the initial image and the candidate image containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing a target object, wherein the first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object, and the target object is obtained by replacing the third initial object with the first initial object.
11. An application comprising: receiving a request for generating an initial image including a first initial object, wherein the request carries attribute information of the first initial object; Inputting the attribute information of the first initial object into an image generation model to obtain the initial image containing the first initial object, wherein the image generation model is obtained based on an image generation network and an image identification network, the image generation network is used to generate images, and the image identification network is used to identify the generated images; Inputting the initial image and the candidate images containing the second initial object and the third initial object into the image synthesis model to obtain a target image containing the target object, The first initial object and the third initial object are of the same type, and the target object is composed of the first initial object and the second initial object. The target object is obtained by replacing the third initial object with the first initial object.
12. A computing device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the processor implements the steps of the image processing method according to any one of claims 1 to 9 when executing the computer-executable instructions.
13. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the image processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Mask-worn face image generation method and related device
CN111932439A