Image processing and image generation model training method and device, equipment and medium
By combining semantic description information and visual features, using ControlNet and Stable Diffusion models, the image generation model is optimized, solving the problems of poor maneuverability and poor visual effects of the image generation model in character image generation, and achieving high-quality image generation.
Patent Information
- Application Number
- CN202410484436.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-09-06
AI Technical Summary
Existing image generation models have poor controllability and poor visual effects in character image generation. In particular, body organ elements are prone to defects, such as too many heads and too few fingers.
Using image processing methods, by obtaining the image of the reference object and the semantic description information associated with the target object, feature extraction is performed to generate the target image. The ControlNet model and the Stable Diffusion model are combined to use semantic segmentation and local redrawing technology to optimize hand details. , ensuring the realism and visual quality of the generated images.
It improves the prediction accuracy and generation quality of the image generation model, ensures that the generated target image has a high degree of realism and visual effects, solves the deficiencies in hand detail performance, and improves user experience and generation efficiency.
Smart Images

Figure CN118608904A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of AI (Artificial Intelligence), specifically to technical fields such as deep learning and computer vision, and especially to training methods, devices, equipment and media for image processing and image generation models. Background Art
[0002] Generating new image materials based on existing image materials showing reference objects can provide artists and designers with more creative inspiration and possibilities, allowing them to transform existing image materials into new and creative works, thereby enriching the forms of expression and connotations in the fields of art and design. In addition, in the fields of game development, film production, and advertising creativity, existing image materials can be used to generate image materials showing new characters, scenes, or props, thereby improving production efficiency, reducing costs, and bringing a richer visual experience. Summary of the invention
[0003] The present disclosure provides a method, apparatus, device and medium for training image processing and image generation models.
[0004] According to a first aspect of the present disclosure, there is provided an image processing method, comprising:
[0005] Acquire a first image showing a reference object and semantic description information associated with a target object;
[0006] Performing feature extraction on the first image to obtain a plurality of key feature graphs;
[0007] A target image showing the target object is generated according to the semantic description information and the multiple key feature maps.
[0008] According to a second aspect of the present disclosure, a method for training an image generation model is provided, comprising:
[0009] Acquire a sample image showing a sample object and semantic description information associated with the sample object;
[0010] Extracting features from the sample image to obtain a plurality of key feature maps;
[0011] Using an image generation model to generate an image based on the multiple key feature maps and the semantic description information to obtain a predicted image;
[0012] The image generation model is trained based on the difference between the predicted image and the sample image.
[0013] According to a third aspect of the present disclosure, there is provided an image processing apparatus, comprising:
[0014] An acquisition module, configured to acquire a first image showing a reference object and semantic description information associated with a target object;
[0015] An extraction module, used for performing feature extraction on the first image to obtain a plurality of key feature maps;
[0016] A generating module is used to generate a target image showing the target object according to the semantic description information and the multiple key feature maps.
[0017] According to a fourth aspect of the present disclosure, a training device for an image generation model is provided, comprising:
[0018] An acquisition module, used to acquire a sample image showing a sample object and semantic description information associated with the sample object;
[0019] An extraction module, used for extracting features from the sample image to obtain a plurality of key feature maps;
[0020] A generation module, configured to generate an image based on the multiple key feature maps and the semantic description information using an image generation model to obtain a predicted image;
[0021] A training module is used to train the image generation model based on the difference between the predicted image and the sample image.
[0022] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0023] at least one processor; and
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image processing method proposed in the first aspect of the present disclosure, or execute the training method of the image generation model proposed in the second aspect of the present disclosure.
[0026] According to the sixth aspect of the present disclosure, a non-transitory computer-readable storage medium of computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the image processing method proposed in the first aspect of the present disclosure, or to execute the training method of the image generation model proposed in the second aspect of the present disclosure.
[0027] According to the seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the image processing method proposed in the first aspect of the present disclosure, or, when executed, implements the training method of the image generation model proposed in the second aspect of the present disclosure.
[0028] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0030] Figure 1 A flowchart of an image processing method provided in the first embodiment of the present disclosure;
[0031] Figure 2 A flowchart of an image processing method provided in Embodiment 2 of the present disclosure;
[0032] Figure 3 A flowchart of an image processing method provided in Embodiment 3 of the present disclosure;
[0033] Figure 4 A flowchart of an image processing method provided in Embodiment 4 of the present disclosure;
[0034] Figure 5 A flowchart of an image processing method provided in Embodiment 5 of the present disclosure;
[0035] Figure 6 A flowchart of a method for training an image generation model provided in Embodiment 6 of the present disclosure;
[0036] Figure 7 It is a schematic diagram of the implementation principle of the embodiment of the present disclosure;
[0037] Figure 8 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0038] Fig. 9 A schematic diagram of the structure of an image processing device provided in Embodiment 7 of the present disclosure;
[0039] Fig.10 A schematic diagram of the structure of a training device for an image generation model provided in Embodiment 8 of the present disclosure;
[0040] Fig.11 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0041] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0042] In the related art, the use of generative models to generate character images has at least the following disadvantages: poor controllability, poor visual effects, and defects in elements such as the generated character's body organs (such as multiple heads, missing fingers, etc.).
[0043] Therefore, in response to at least one of the above-mentioned problems, the present disclosure proposes a method, device, equipment and medium for training image processing and image generation models.
[0044] The following describes the image processing and image generation model training methods, devices, equipment and media of the embodiments of the present disclosure with reference to the accompanying drawings.
[0045] Figure 1 A flowchart of the image processing method provided in the first embodiment of the present disclosure.
[0046] The embodiment of the present disclosure is illustrated by an example in which the image processing method is configured in an image processing device. The image processing device can be applied to any electronic device so that the electronic device can perform an image processing function.
[0047] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.
[0048] like Figure 1 As shown, the image processing method may include the following steps:
[0049] Step S101: acquiring a first image showing a reference object and semantic description information associated with a target object.
[0050] The reference object and the target object are two different objects. For example, the reference object may be a woman, and the target object may be a man.
[0051] There is no limit on the number of first images (or reference images) showing reference objects, for example, the number of first images can be one or more. It should be noted that when there are multiple first images, the reference objects in the multiple first images can be different, so that target images showing target objects with different postures, contours, depths and other features can be generated based on the multiple first images, meeting the personalized and batch image generation needs of users.
[0052] In the embodiments of the present disclosure, there is no limitation on the method for acquiring the first image. For example, the first image may be an image provided by a user (for example, taken by a user), or the first image may be acquired online through web crawler technology, or the first image may be an image sent by other users, or the first image may be an artificially synthesized image, and so on.
[0053] In the embodiments of the present disclosure, the semantic description information associated with the target object can be provided or input by the user, wherein the input method includes but is not limited to touch input (such as sliding, clicking, etc.), keyboard input, voice input, etc.
[0054] Step S102: extract features from the first image to obtain a plurality of key feature maps.
[0055] Among them, the key feature maps include but are not limited to: an object posture map (used to indicate the posture of a reference object, taking the reference object as a person as an example, the object posture map can be a person posture map), an object contour map (used to indicate the contour of a reference object, taking the reference object as a person as an example, the object posture map can be a person contour map), a depth map (used to indicate the depth of the reference object), an edge feature map (used to indicate edge information in the first image), an optical flow feature map (used to indicate the motion mode of pixels or feature points in the first image), a saliency feature map (used to indicate the most salient or attractive area in the first image), etc.
[0056] Therefore, it is possible to generate a new target image showing the target object based on the rich key feature map in the first image, which can improve the generation quality of the target image and meet the actual mapping needs of users.
[0057] In the disclosed embodiment, feature extraction may be performed on the first image based on a feature extraction algorithm to obtain a plurality of key feature maps.
[0058] Step S103: generating a target image showing the target object according to the semantic description information and the multiple key feature maps.
[0059] In the embodiments of the present disclosure, a target image showing a target object may be generated based on image generation technology according to semantic description information and a plurality of key feature graphs.
[0060] The image processing method of the disclosed embodiment generates a target image showing the target object based on multiple key feature maps associated with the reference object extracted from the first image and semantic description information associated with the target object required by the user, which can not only improve the generation quality of the target image, but also meet the actual mapping needs of the user and improve the user's experience. For example, through the dual constraints of semantic description information and multiple visual features, the detail expression of the target image can be more accurately controlled while ensuring the diversity of image generation, thereby improving the generation quality of the target image.
[0061] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0062] In order to clearly explain how a target image showing a target object is generated based on semantic description information and multiple key feature maps in any embodiment of the present disclosure, the present disclosure also proposes an image processing method.
[0063] Figure 2 A flowchart of the image processing method provided in the second embodiment of the present disclosure.
[0064] like Figure 2 As shown, the image processing method may include the following steps:
[0065] Step S201: acquiring a first image showing a reference object and semantic description information associated with a target object.
[0066] For the explanation of step S201, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0067] In any embodiment of the present disclosure, the semantic description information may be used to indicate at least one of the following:
[0068] The first item is the attribute information of the target object, where the attribute information includes but is not limited to gender, age, etc.
[0069] The second item is the macro characteristics of the target object, where the macro characteristics include but are not limited to expressions, clothing, etc.
[0070] The third item is the image style associated with the target object (such as composition, painting style, etc.).
[0071] As an example, the semantic description information may be used to indicate the target object's gender, age, expression, clothing, scene (such as the scene or environment in which the target object is located), composition, and style of painting.
[0072] In summary, it is possible to generate a target image showing the target object based on at least one of the attribute information of the target object input by the user, the macroscopic features of the target object, and the image style associated with the target object, thereby meeting the personalized mapping needs of different users.
[0073] Step S202: extract features from the first image to obtain a plurality of key feature maps.
[0074] For the explanation of step S202, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0075] Step S203: generating an initial image showing the target object according to the semantic description information and the multiple key feature maps.
[0076] In the embodiments of the present disclosure, preliminary image generation can be performed based on image generation technology according to semantic description information and multiple key feature maps to obtain an initial image showing the target object.
[0077] Step S204: semantically segment the first image to obtain a second image showing a designated part of the reference object.
[0078] The designated parts include but are not limited to: hands, feet or limbs.
[0079] In the embodiment of the present disclosure, semantic segmentation may be performed on a designated part of a reference object in a first image based on semantic segmentation technology to obtain a second image showing the designated part of the reference object.
[0080] Taking the reference object as a person and the designated part as a hand as an example, a person hand segmentation algorithm can be used to perform semantic segmentation on the hand area in the reference image to obtain a second image showing the hand (or called a hand image).
[0081] Step S205: generating a target image showing the target object according to the second image and the initial image.
[0082] In the embodiment of the present disclosure, a target image showing the target object can be generated according to the second image and the initial image. For example, the second image and the initial image can be fused based on image fusion technology to obtain the target image.
[0083] The image processing method of the embodiment of the present disclosure adopts semantic segmentation technology to perform semantic segmentation on the designated part (such as hand) of the first image in order to solve the problem that the existing image generation technology is not good in generating designated parts (such as hands and feet) of the character (such as logical errors in the hand content, missing or redundant fingers, etc.). The second image (such as hand image) showing the designated part is obtained to replace the designated part in the initial image, which can improve the generation quality of the target image and further improve the user experience.
[0084] In order to clearly explain how an initial image showing a target object is generated based on semantic description information and multiple key feature maps in the above embodiment, the present disclosure also proposes an image processing method.
[0085] Figure 3 This is a flowchart of the image processing method provided in the third embodiment of the present disclosure.
[0086] like Figure 3 As shown, the image processing method may include the following steps:
[0087] Step S301: Acquire a first image showing a reference object and semantic description information associated with a target object.
[0088] Step S302: extract features from the first image to obtain a plurality of key feature maps.
[0089] For explanations of steps S301 to S302, reference may be made to the relevant descriptions in any embodiment of the present disclosure and will not be repeated here.
[0090] Step S303: use the control model to encode the semantic description information and multiple key feature graphs to obtain encoded features.
[0091] In the disclosed embodiments, a control model (such as ControlNet, a conditional control model) may be used to encode (or extract features from) the semantic description information and a plurality of key feature graphs to obtain encoding features.
[0092] Step S304, using a control model to process the coding feature to obtain at least one conditional control signal; wherein the conditional control signal is used to control the image generation model to generate an image.
[0093] In an embodiment of the present disclosure, a control model may be used to process the coding features to obtain at least one conditional control signal, wherein the conditional control signal is used to control an image generation model (such as a diffusion model, exemplarily, the image generation model may be a stable diffusion model) to generate images.
[0094] Step S305 , using the image generation model to generate an image based on the conditional control signal to obtain an initial image that meets the control requirements in the conditional control signal.
[0095] In the embodiments of the present disclosure, an image generation model may be used to generate an image based on a conditional control signal to obtain an initial image that meets the control requirements in the conditional control signal.
[0096] Among them, the control requirements mainly include the following aspects:
[0097] 1. Posture and motion control: Based on the object posture graph, the control requirements are used to control or instruct the image generation model to accurately restore the body posture and motion of the reference object, including the placement of the limbs, the bending angle of the body, and the overall coordination of the motion.
[0098] 2. Shape and contour control: The object contour map provides the outer boundary information of the reference person. The control requirements are used to control or instruct the image generation model to generate an object image (such as a person image) with a clear and accurate contour based on the object contour map, ensuring that the contour of the target object is consistent with the contour of the reference object.
[0099] 3. Depth and stereoscopic control: The depth map provides the distance relationship and stereoscopic effect of objects in the shooting scene of the first image. The control requirements are used to control or instruct the image generation model to generate an image with real depth and stereoscopic effect according to the depth map, so that the generated target object can be naturally integrated with the background to present a sense of space.
[0100] 4. Appearance feature control: The semantic description information includes appearance features such as gender, age, expression, and clothing. The control requirements are used to control or instruct the image generation model to generate an object image with corresponding appearance features and image style based on the semantic description information. For example, facial features of people of different genders are generated based on the gender description, the skin texture and facial lines of the person are adjusted based on the age description; the facial expression of the person is shaped based on the expression description; and suitable clothing and accessories are added to the person based on the clothing description.
[0101] 5. Detail and texture control: In addition to the overall shape and structure, the control requirements are also used to control or instruct the image generation model to pay attention to the details and texture of the image, including the subtle facial expressions of the characters, the texture and wrinkles of the clothes, the detailed elements of the background, etc. By precisely controlling these details and textures, the quality and authenticity of the generated images can be further improved.
[0102] 6. Style and tone control: Semantic description information can also include image style and tone, and control requirements can include requirements on color matching, lighting effects, artistic style, etc., to control or guide the image generation model to generate images that conform to a specific style.
[0103] Step S306: semantically segment the first image to obtain a second image showing a designated part of the reference object.
[0104] Step S307: generating a target image showing the target object according to the second image and the initial image.
[0105] For explanations of steps S306 to S307, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0106] The image processing method of the disclosed embodiment can guide and optimize the image generation model by controlling the model, thereby ensuring that the preliminary image generated by the image generation model has a high degree of realism and visual quality, thereby improving the user experience.
[0107] In order to clearly explain how to generate a target image showing a target object based on a second image and an initial image in any embodiment of the present disclosure, the present disclosure also proposes an image processing method.
[0108] Figure 4 This is a flowchart of the image processing method provided in the fourth embodiment of the present disclosure.
[0109] like Figure 4 As shown, the image processing method may include the following steps:
[0110] Step S401: acquiring a first image showing a reference object and semantic description information associated with a target object.
[0111] Step S402: extract features from the first image to obtain a plurality of key feature maps.
[0112] Step S403: generating an initial image showing the target object according to the semantic description information and the multiple key feature maps.
[0113] Step S404: semantically segment the first image to obtain a second image showing a designated part of the reference object.
[0114] The explanation of steps S401 to S404 can be found in the relevant description in any embodiment of the present disclosure, and will not be repeated here.
[0115] Step S405: perform image fusion on the second image and the initial image to obtain an intermediate image.
[0116] In the disclosed embodiment, the second image and the initial image can be fused based on the image fusion technology to obtain an intermediate image. That is, the designated part in the second image can be used to replace the designated part in the initial image to improve the quality of the subsequent target image.
[0117] In any one of the embodiments of the present disclosure, the method for acquiring the intermediate image may be, for example, first, the specified portion in the second image and the specified portion in the initial image may be aligned, and then, based on the image fusion technology, the aligned second image and the initial image may be fused to obtain the intermediate image.
[0118] Therefore, by aligning the designated parts of the two images to be fused, the fusion quality of the images can be improved, and the user experience can be further improved.
[0119] Step S406, redrawing the designated part of the target object in the intermediate image to obtain the target image.
[0120] In the embodiment of the present disclosure, based on the local image redrawing technology, the designated part of the target object in the intermediate image can be redrawn or optimized to obtain the target image.
[0121] The image processing method of the embodiment of the present disclosure uses the designated part of the original first image to replace the designated part in the generated initial image to obtain an intermediate image, which can improve the generation quality of the intermediate image, and redraws (such as optimizes) the designated part in the intermediate image with relatively high quality to obtain a target image, which can further improve the generation quality of the target image.
[0122] In order to clearly explain how to perform semantic segmentation on a first image in any embodiment of the present disclosure to obtain a second image showing a specified part of a reference object, the present disclosure also proposes an image processing method.
[0123] Figure 5 This is a flowchart of the image processing method provided in Embodiment 5 of the present disclosure.
[0124] like Figure 5 As shown, the image processing method may include the following steps:
[0125] Step S501: Acquire a first image showing a reference object and semantic description information associated with a target object.
[0126] Step S502: extract features from the first image to obtain a plurality of key feature maps.
[0127] Step S503: generating an initial image showing the target object according to the semantic description information and the multiple key feature maps.
[0128] For explanations of steps S501 to S503, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0129] Step S504: performing target detection on the first image to obtain a target position of a designated part of the reference object in the first image.
[0130] In the embodiment of the present disclosure, target detection may be performed on the first image based on a target detection algorithm to obtain the position of a designated part of the reference object in the first image (referred to as the target position in the present disclosure).
[0131] As an example, the target position is detected in the following manner:
[0132] 1. Use a target detection algorithm to perform target detection on the first image to obtain the positions of multiple detection frames and the categories to which the targets in the multiple detection frames belong.
[0133] In the disclosed embodiment, a target detection algorithm may be used to perform regression prediction of the target on the first image to obtain the positions of multiple detection frames, and to perform category prediction of the target on the first image to obtain the categories to which the multiple detection frames belong.
[0134] As an example, a target detection algorithm may be used to predict the category of the target in the first image, and a probability distribution of multiple detection frames may be obtained, wherein the probability distribution is used to indicate the probability that the target in the corresponding detection frame belongs to multiple predicted categories. In the present disclosure, the categories to which the targets in the multiple detection frames belong may be determined based on the probability distribution of the multiple detection frames. For example, for any detection frame, the predicted category corresponding to the maximum probability in the probability distribution of the detection frame may be used as the category to which the target in the detection frame belongs.
[0135] 2. Based on the categories of the multiple detection frames, determine the target detection frame from the multiple detection frames; wherein the category of the target detection frame matches or is consistent with the category to which the specified part belongs.
[0136] 3. The position of the target detection frame is used as the target position of the designated part of the reference object in the first image.
[0137] In summary, based on the target detection technology, the position of the specified part in the first image (ie, the target position) is predicted, which can improve the accuracy and reliability of the prediction result.
[0138] Step S505: semantically segment the first image based on the target position to obtain a second image showing the designated part.
[0139] In the disclosed embodiment, semantic segmentation may be performed on the first image based on the target position to obtain a second image containing only the designated part.
[0140] As an example, the target position may be input into an object segmentation model (or a large object segmentation model) so as to use the object segmentation model to perform semantic segmentation on the first image based on the target position to obtain a second image output by the object segmentation model.
[0141] Taking the reference object as a person and the designated part as a hand as an example, the object segmentation model can be a person hand segmentation model. The person hand segmentation model can be used to perform hand segmentation on the first image based on the target position to obtain a second image showing the hand (or called a hand image).
[0142] Step S506: generating a target image showing the target object according to the second image and the initial image.
[0143] For the explanation of step S506, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0144] The image processing method of the embodiment of the present disclosure performs target detection on the first image to obtain the position of the specified part in the first image (i.e., the target position), and then performs semantic segmentation on the first image based on the target position, which can improve the segmentation accuracy, that is, improve the accuracy of obtaining the second image.
[0145] The above are embodiments corresponding to the application method of the image generation model (ie, the image processing method). The present disclosure also proposes a training method for the image generation model.
[0146] Figure 6 A flowchart of the training method of the image generation model provided in Embodiment 6 of the present disclosure.
[0147] like Figure 6 As shown, the training method of the image generation model may include the following steps:
[0148] Step S601: Acquire a sample image showing a sample object and semantic description information associated with the sample object.
[0149] For the explanation of the semantic description information associated with the sample object, reference may be made to the relevant description of the semantic description information associated with the target object in the above embodiment. The implementation principle is similar and will not be elaborated here.
[0150] In the embodiments of the present disclosure, there is no limitation on the method of acquiring sample images. For example, the sample images may be sample images acquired from an existing training set or a self-owned training set, or the sample images may be images collected online, such as by using web crawler technology, or the sample images may be images collected offline, or the sample images may be images collected in real time, or the sample images may be artificially synthesized images, etc. The embodiments of the present disclosure do not impose any limitation on this.
[0151] Step S602: extract features from the sample image to obtain a plurality of key feature maps.
[0152] The feature extraction method of the sample image is similar to that of the first image, and will not be described in detail here.
[0153] Step S603: Use an image generation model to generate an image based on multiple key feature maps and semantic description information to obtain a predicted image.
[0154] In the embodiments of the present disclosure, an image generation model may be used to generate an image based on multiple key feature maps and semantic description information to obtain a predicted image output by the image generation model.
[0155] Step S604: training the image generation model based on the difference between the predicted image and the sample image.
[0156] In an embodiment of the present disclosure, the value of the loss function (referred to as the loss value in the present disclosure) can be determined based on the difference between the predicted image and the sample image, so that the image generation model can be trained according to the loss value to minimize the loss value.
[0157] It should be noted that the above only uses the termination condition of model training as the minimization of the loss value as an example. In actual application, other termination conditions can also be set. For example, the termination conditions can also include: the training time reaches the set time, the number of training times reaches the set number of times, etc. The embodiments of the present disclosure do not limit this.
[0158] In any one of the embodiments of the present disclosure, the key feature map includes multiple items of an object pose map, an object contour map, and a depth map; the semantic description information is used to indicate at least one of the following: attribute information of the sample object; macro features of the sample object; and an image style associated with the sample object.
[0159] The training method of the image generation model of the embodiment of the present disclosure uses sample images to train the image generation model, which can improve the prediction accuracy of the image generation model and further improve the generation quality of the target image.
[0160] In any embodiment of the present disclosure, the depth model is a ControlNet model, the image generation model is a Stable Diffusion model, the target object and the reference object are both people, and the designated part is a hand. The implementation principle of each embodiment of the present disclosure can be as follows: Figure 7 As shown, it mainly includes the following steps:
[0161] Step 1: Input the first image containing the reference person ( Figure 7 The semantic description information includes, but is not limited to, the target person's gender, age, expression, clothing, scene, composition, and painting style, etc., which is used to define and guide the overall style and macro features of the final generated character image, that is, to determine the content of the final generated target image at the macro level.
[0162] Step 2: Extract features from the input reference image. For example, computer vision models of different tasks can be used to extract key feature maps such as character posture map, depth map, and character outline map (or character outline sketch) in the reference image as control inputs of the subsequent ControlNet model, which are used to control, constrain and optimize the generation results of the Stable Diffusion model.
[0163] Step 3. In order to solve the problem that the Stable Diffusion model has poor effect in generating human hands, such as logical errors in the hand content, missing or redundant fingers, etc., a special human hand segmentation algorithm can be introduced in the present disclosure. The hand area of the reference image is semantically segmented by the human hand segmentation algorithm to obtain a hand image, which is used to replace the human hand in the initial image generated by the Stable Diffusion model, that is, to provide real and reliable hand information for subsequent image generation.
[0164] Step 4: Input the semantic description information, character posture map, depth map, character outline map and other key feature maps of the target person into the combined model of Stable Diffusion and ControlNet to generate an initial image showing the target person.
[0165] Step 5: Based on the local image redrawing technology of the hand image, the segmented hand image is aligned with the corresponding position of the initial image generated by the StableDiffusion model. The hand in the reference image is naturally integrated into the initial image through local redrawing, thereby obtaining the final high-quality target image.
[0166] For example, the hand in the reference image can be naturally merged with the hand in the initial image, and the hand details can be optimized through local redrawing to improve the overall authenticity of the generated target image.
[0167] As an example, the reference person is female and the target person is male. Using the ControlNet model and the Stable Diffusion model, the generated target image can be as follows: Figure 8 shown.
[0168] That is to say, the present invention utilizes the Stable Diffusion model and the ControlNet model to simplify and automate the process of generating character images by inputting natural language description information and reference images, and introduces a hand segmentation algorithm to make up for the defects of the Stable Diffusion model in hand generation, and finally obtains high-quality character images with both diversity and visual authenticity.
[0169] In summary, the image processing method provided by the present disclosure is mainly reflected in the following aspects compared with the prior art:
[0170] 1. Intelligent character generation process: Different from the traditional character material design method, this paper adopts the Stable Diffusion model and ControlNet model based on artificial intelligence. Users only need to provide natural language description information and reference images to automatically generate character images with diverse styles and rich details. This intelligent generation process can greatly reduce the professional threshold of users, allowing non-design professionals to easily create high-quality character materials.
[0171] 2. Double-constrained generation control: This disclosure integrates two types of control information: semantic description information and visual features. Through the semantic description information, users can flexibly specify the overall style and attributes of the target person; and the extracted key feature map (i.e., visual features) of the reference image can provide fine visual guidance for the generation process. This dual constraint of semantics and vision can achieve more accurate control of the detailed expression of the character image while ensuring the diversity of image generation, achieving unprecedented controllability and flexibility.
[0172] 3. Targeted hand optimization technology: In view of the general deficiencies of existing character image generation technology in the expression of hand details, the present invention proposes a unique hand optimization solution. By performing hand segmentation on the reference image and locally fusing and redrawing the segmentation result with the image initially generated by the Stable Diffusion model, it is possible to generate hand details with extremely high authenticity and rationality, effectively making up for the shortcomings of the existing technology and achieving an overall improvement in the quality of character image generation.
[0173] Compared with the prior art, the image processing method provided by the present disclosure has at least the following advantages:
[0174] 1) Technical aspects: This disclosure adopts a set of technical solutions with clear processes and reasonable module division, giving full play to the advantages of various artificial intelligence technologies. Through semantic description information and key feature maps extracted from reference images, the content and details of the generated image can be effectively controlled from the whole to the part. In view of the shortcomings of the Stable Diffusion algorithm in hand generation, this disclosure proposes a special hand processing and local redrawing technology, which effectively improves the authenticity and rationality of the hand details.
[0175] 2) Generation quality: This paper is based on the Stable Diffusion model trained on a large-scale data set, and combines the ControlNet model to guide and optimize the generation process, ensuring that the generated character material images have a high degree of realism and visual quality. Experimental results show that the images generated by this paper have excellent performance in terms of authenticity, rationality and aesthetics, and can significantly improve the user experience in related application fields.
[0176] 3) Application efficiency: Compared with the traditional character modeling and design process, the present invention only needs to input the semantic description information and reference image of the target character to automatically complete the whole process from initial generation to local optimization, which greatly reduces the human resource investment, reduces the time cost of character material design and production, and improves the image production efficiency.
[0177] 4) Commercial value: This disclosure provides an efficient and low-cost character material generation solution for many industries such as virtual character image design, character original painting creation, game development, film and television post-production, etc. With high-quality generation effects and significant efficiency advantages, this disclosure has broad application prospects and huge commercial value, and is expected to create considerable economic benefits for related industries.
[0178] With the above Figures 1 to 5 Corresponding to the image processing method provided in the embodiment, the present disclosure also provides an image processing device. Figures 1 to 5 The image processing method provided in the embodiment corresponds to the above, so the implementation of the image processing method is also applicable to the image processing device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0179] Fig. 9 This is a structural diagram of the image processing device provided in Embodiment 7 of the present disclosure.
[0180] like Fig. 9As shown, the image processing device 900 may include: an acquisition module 910 , an extraction module 920 and a generation module 930 .
[0181] The acquisition module 910 is used to acquire a first image showing a reference object and semantic description information associated with the target object;
[0182] An extraction module 920 is used to extract features from the first image to obtain a plurality of key feature maps;
[0183] The generating module 930 is used to generate a target image showing the target object according to the semantic description information and a plurality of key feature graphs.
[0184] In a possible implementation of the embodiments of the present disclosure, the generation module 930 is used to: generate an initial image showing the target object based on semantic description information and multiple key feature maps; perform semantic segmentation on the first image to obtain a second image showing a specified part of the reference object; and generate a target image showing the target object based on the second image and the initial image.
[0185] In a possible implementation of the embodiments of the present disclosure, the generation module 930 is used to: use a control model to encode semantic description information and multiple key feature maps to obtain encoded features; use the control model to process the encoded features to obtain at least one conditional control signal; wherein the conditional control signal is used to control the image generation model to generate an image; use the image generation model to generate an image based on the conditional control signal to obtain an initial image that meets the control requirements in the conditional control signal.
[0186] In a possible implementation of the embodiment of the present disclosure, the generation module 930 is used to: perform image fusion on the second image and the initial image to obtain an intermediate image; and redraw a specified part of the target object in the intermediate image to obtain a target image.
[0187] In a possible implementation of the embodiment of the present disclosure, the generation module 930 is used to: align a specified portion in the second image with a specified portion in the initial image; and fuse the aligned second image with the initial image to obtain an intermediate image.
[0188] In a possible implementation of the embodiments of the present disclosure, the generation module 930 is used to: perform target detection on the first image to obtain the target position of the specified part of the reference object in the first image; based on the target position, perform semantic segmentation on the first image to obtain a second image showing the specified part.
[0189] In a possible implementation of the embodiments of the present disclosure, the generation module 930 is used to: perform target detection on the first image to obtain the positions of multiple detection frames and the categories to which the targets in the multiple detection frames belong; based on the categories of the multiple detection frames, determine the target detection frame from the multiple detection frames; wherein the category of the target detection frame matches the category to which the specified part belongs; and determine the target position of the specified part of the reference object in the first image according to the position of the target detection frame.
[0190] In a possible implementation manner of the embodiment of the present disclosure, the key feature map includes multiple items of an object posture map, an object contour map, and a depth map.
[0191] In a possible implementation manner of the embodiment of the present disclosure, the semantic description information is used to indicate at least one of the following: attribute information of the target object; macro features of the target object; and an image style associated with the target object.
[0192] The image processing device of the disclosed embodiment generates a target image showing the target object based on multiple key feature maps associated with the reference object extracted from the first image and semantic description information associated with the target object required by the user, which can not only improve the generation quality of the target image, but also meet the actual mapping needs of the user and improve the user's usage experience. For example, through the dual constraints of semantic description information and multiple visual features, the detail expression of the target image can be more accurately controlled while ensuring the diversity of image generation, thereby improving the generation quality of the target image.
[0193] With the above Figure 6 Corresponding to the training method of the image generation model provided in the embodiment, the present disclosure also provides a training device for the image generation model. Figure 6 The training method of the image generation model provided in the embodiment corresponds to the embodiment, so the implementation method of the image generation model training method is also applicable to the training device of the image generation model provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0194] Fig.10 A schematic diagram of the structure of the training device for the image generation model provided in Embodiment 8 of the present disclosure.
[0195] like Fig.10 As shown, the training device 1000 for the image generation model may include: an acquisition module 1010 , an extraction module 1020 , a generation module 1030 and a training module 1040 .
[0196] The acquisition module 1010 is used to acquire a sample image showing a sample object and semantic description information associated with the sample object.
[0197] The extraction module 1020 is used to extract features from the sample image to obtain multiple key feature maps.
[0198] The generation module 1030 is used to generate an image based on a plurality of key feature maps and semantic description information using an image generation model to obtain a predicted image.
[0199] The training module 1040 is used to train the image generation model based on the difference between the predicted image and the sample image.
[0200] In a possible implementation of the embodiments of the present disclosure, the key feature map includes multiple items of an object posture map, an object contour map, and a depth map; the semantic description information is used to indicate at least one of the following: attribute information of the sample object; macro features of the sample object; and an image style associated with the sample object.
[0201] The training device for the image generation model of the embodiment of the present disclosure uses sample images to train the image generation model, which can improve the prediction accuracy of the image generation model and further improve the generation quality of the target image.
[0202] In order to implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image processing method or the image generation model training method proposed in any of the above embodiments of the present disclosure.
[0203] In order to implement the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the image processing method or the image generation model training method proposed in any of the above embodiments of the present disclosure.
[0204] In order to implement the above embodiments, the present disclosure also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the image processing method or the image generation model training method proposed in any of the above embodiments of the present disclosure.
[0205] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0206] Fig.11 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.
[0207] Among them, the electronic device may include the server and the client in the above-mentioned embodiment. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0208] like Fig.11 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1102 or a computer program loaded from a storage unit 1107 to a RAM (Random Access Memory) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An I / O (Input / Output) interface 1105 is also connected to the bus 1104.
[0209] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0210] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the above-mentioned image processing method or the training method of the image generation model. For example, in some embodiments, the above-mentioned image processing method or the training method of the image generation model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the image processing method or the image generation model training method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the above-described image processing method or the image generation model training method by any other appropriate means (e.g., by means of firmware).
[0211] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0212] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0213] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0214] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0215] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0216] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0217] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0218] According to the technical solution of the embodiment of the present disclosure, a target image showing the target object is generated based on multiple key feature maps associated with the reference object extracted from the first image and semantic description information associated with the target object required by the user, which can not only improve the generation quality of the target image, but also meet the actual mapping needs of the user and improve the user's experience. For example, through the dual constraints of semantic description information and multiple visual features, the detail expression of the target image can be more accurately controlled while ensuring the diversity of image generation, thereby improving the generation quality of the target image.
[0219] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0220] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An image processing method, comprising: Acquire a first image showing a reference object and semantic description information associated with a target object; Performing feature extraction on the first image to obtain a plurality of key feature graphs; A target image showing the target object is generated according to the semantic description information and the multiple key feature maps.
2. The method according to claim 1, wherein: The step of generating a target image showing the target object according to the semantic description information and the multiple key feature maps includes: Generating an initial image showing the target object according to the semantic description information and the multiple key feature maps; Performing semantic segmentation on the first image to obtain a second image showing a designated part of the reference object; A target image showing the target object is generated based on the second image and the initial image.
3. The method according to claim 2, wherein: The step of generating an initial image showing the target object according to the semantic description information and the multiple key feature maps includes: Using a control model to encode the semantic description information and the multiple key feature graphs to obtain encoding features; Processing the coding feature using the control model to obtain at least one conditional control signal; wherein the conditional control signal is used to control the image generation model to generate an image; The image generation model is used to generate an image based on the conditional control signal to obtain the initial image that meets the control requirements in the conditional control signal.
4. The method according to claim 2, wherein: The step of generating a target image showing the target object according to the second image and the initial image includes: Performing image fusion on the second image and the initial image to obtain an intermediate image; The designated part of the target object in the intermediate image is redrawn to obtain the target image.
5. The method according to claim 4, wherein: The step of fusing the second image with the initial image to obtain an intermediate image includes: performing alignment processing on the designated part in the second image and the designated part in the initial image; The second image after the alignment process is fused with the initial image to obtain an intermediate image.
6. The method according to claim 2, wherein: The performing semantic segmentation on the first image to obtain a second image showing a designated part of the reference object includes: Performing target detection on the first image to obtain a target position of a designated part of the reference object in the first image; Based on the target position, semantic segmentation is performed on the first image to obtain a second image showing the designated part.
7. The method according to claim 6, wherein: The performing target detection on the first image to obtain a target position of the designated part of the reference object in the first image includes: Performing object detection on the first image to obtain positions of multiple detection frames and categories to which objects in the multiple detection frames belong; Based on the categories of the multiple detection frames, determining a target detection frame from the multiple detection frames; wherein the category of the target detection frame matches the category to which the designated part belongs; The target position of the designated part of the reference object in the first image is determined according to the position of the target detection frame.
8. The method according to any one of claims 1 to 7, wherein: The key feature map includes multiple items of an object pose map, an object contour map, and a depth map.
9. The method according to any one of claims 1 to 7, wherein: The semantic description information is used to indicate at least one of the following: attribute information of the target object; Macroscopic characteristics of the target object; The image style associated with the target object.
10. A method for training an image generation model, comprising: Acquire a sample image showing a sample object and semantic description information associated with the sample object; Extracting features from the sample image to obtain a plurality of key feature maps; Using an image generation model to generate an image based on the multiple key feature maps and the semantic description information to obtain a predicted image; The image generation model is trained based on the difference between the predicted image and the sample image.
11. The method according to claim 10, wherein: The key feature map includes multiple items of an object posture map, an object contour map, and a depth map; The semantic description information is used to indicate at least one of the following: Attribute information of the sample object; Macroscopic characteristics of the sample object; The image style associated with the sample object.
12. An image processing device, comprising: An acquisition module, configured to acquire a first image showing a reference object and semantic description information associated with a target object; An extraction module, used for performing feature extraction on the first image to obtain a plurality of key feature maps; A generating module is used to generate a target image showing the target object according to the semantic description information and the multiple key feature maps.
13. The device according to claim 12, wherein: The generating module is used for: Generating an initial image showing the target object according to the semantic description information and the multiple key feature maps; Performing semantic segmentation on the first image to obtain a second image showing a designated part of the reference object; A target image showing the target object is generated based on the second image and the initial image.
14. The device according to claim 13, wherein: The generating module is used for: Using a control model to encode the semantic description information and the multiple key feature graphs to obtain encoding features; Processing the coding feature using the control model to obtain at least one conditional control signal; wherein the conditional control signal is used to control the image generation model to generate an image; The image generation model is used to generate an image based on the conditional control signal to obtain the initial image that meets the control requirements in the conditional control signal.
15. The device according to claim 13, wherein: The generating module is used for: Performing image fusion on the second image and the initial image to obtain an intermediate image; The designated part of the target object in the intermediate image is redrawn to obtain the target image.
16. The device according to claim 15, wherein: The generating module is used for: performing alignment processing on the designated part in the second image and the designated part in the initial image; The second image after the alignment process is fused with the initial image to obtain an intermediate image.
17. The device according to claim 13, wherein: The generating module is used for: Performing target detection on the first image to obtain a target position of a designated part of the reference object in the first image; Based on the target position, semantic segmentation is performed on the first image to obtain a second image showing the designated part.
18. The device according to claim 17, wherein: The generating module is used for: Performing object detection on the first image to obtain positions of multiple detection frames and categories to which objects in the multiple detection frames belong; Based on the categories of the multiple detection frames, determining a target detection frame from the multiple detection frames; wherein the category of the target detection frame matches the category to which the designated part belongs; The target position of the designated part of the reference object in the first image is determined according to the position of the target detection frame.
19. The device according to any one of claims 12 to 18, wherein: The key feature map includes multiple items of an object pose map, an object contour map, and a depth map.
20. The device according to any one of claims 12 to 18, wherein: The semantic description information is used to indicate at least one of the following: attribute information of the target object; Macroscopic characteristics of the target object; The image style associated with the target object.
21. A training device for an image generation model, comprising: An acquisition module, used to acquire a sample image showing a sample object and semantic description information associated with the sample object; An extraction module, used for extracting features from the sample image to obtain a plurality of key feature maps; A generation module, configured to generate an image based on the multiple key feature maps and the semantic description information using an image generation model to obtain a predicted image; A training module is used to train the image generation model based on the difference between the predicted image and the sample image.
22. The device according to claim 21, wherein The key feature map includes multiple items of an object posture map, an object contour map, and a depth map; The semantic description information is used to indicate at least one of the following: Attribute information of the sample object; Macroscopic characteristics of the sample object; The image style associated with the sample object.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image processing method described in any one of claims 1-9, or execute the training method of the image generation model described in claim 10 or 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the image processing method according to any one of claims 1 to 9, or to execute the training method of the image generation model according to claim 10 or 11.
25. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the image processing method according to any one of claims 1 to 9, or, when executed, implements the steps of the training method of the image generation model according to claim 10 or 11.
Citation Information
Patent Citations
Image processing method and device and terminal equipment
CN109598678A
Image generation method and device, electronic equipment and computer readable storage medium
CN116628250A
Local redrawing method and device
CN116758186A
Image generation method and device, image model training method and device, electronic equipment and storage medium
CN116959480A
Human body hand image generation method and device, equipment and storage medium
CN117173334A
