Image generation method and related equipment

By identifying the pose and style of the target object in the image, determining the image range category and screening parameters, the problem of inefficiency in the image generation method is solved and more efficient image generation is achieved.

CN120655810APending Publication Date: 2025-09-16SHENZHEN TENCENT COMP SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410304908.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing image generation methods need to limit the image input range in unknown scenarios to ensure output stability, resulting in low generation efficiency.

Method used

By identifying the posture and style of the target object in the image, determining the image range category, and filtering the target image generation parameters from the preset parameter set, the target image is generated.

Benefits of technology

The restriction on the image input range is removed, which improves the efficiency of image generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655810A_ABST
    Figure CN120655810A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image generation method and related equipment. The related equipment can comprise an image generation device, electronic equipment, a computer program product and a computer readable storage medium. According to the embodiment of the invention, after at least one original image is obtained, the original image comprises at least one target object, the object posture of the target object is recognized in the original image, the object posture information is obtained, the object style of the target object is recognized in the original image, the object style information is obtained, and then the target object is obtained on the basis of the object posture information. Determining an image range category of the original image, screening out a target image generation parameter corresponding to the original image from a preset image generation parameter set according to the image range category and the object style information, and then generating at least one target image corresponding to the original image based on the target image generation parameter and the object attitude information; according to the scheme, the image generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image generation technology, and in particular to an image generation method and related equipment, wherein the related equipment includes an image generation device, an electronic device, a computer program product and a computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of internet technology, image generation using various diffusion models has become increasingly convenient. To improve the quality of generated images, current image generation methods can fine-tune the diffusion model using a low-rank matrix and then use the fine-tuned model for image generation.

[0003] During the research and practice of current technologies, the inventors of this application discovered that when using a fine-tuned model for scenarios where the image input is unknown, it is necessary to limit the range of image input to ensure the stability of the output. Moreover, it is also necessary to manually test the reasonable parameter range of each image generation parameter, resulting in low image generation efficiency. Summary of the Invention

[0004] An embodiment of the present application provides an image generation method and related equipment, which may include an image generation device, an electronic device, a computer program product, and a computer-readable storage medium, which can improve the generation efficiency of image generation.

[0005] A method for generating an image, comprising:

[0006] Acquire at least one original image, where the original image includes at least one target object;

[0007] Identifying the object posture of the target object in the original image to obtain object posture information, and identifying the object style of the target object in the original image to obtain object style information;

[0008] determining an image range category of the original image based on the object posture information, the image range category indicating an object range of the target object in the original image;

[0009] Filtering target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information;

[0010] At least one target image corresponding to the original image is generated based on the target image generation parameters and the object posture information.

[0011] Accordingly, an embodiment of the present application provides an image generating device, including:

[0012] an acquisition unit, configured to acquire at least one original image, wherein the original image includes at least one target object;

[0013] a recognition unit, configured to recognize the object posture of the target object in the original image to obtain object posture information, and recognize the object style of the target object in the original image to obtain object style information;

[0014] a determining unit, configured to determine an image range category of the original image based on the object posture information, wherein the image range category indicates an object range of the target object in the original image;

[0015] a screening unit, configured to screen target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information;

[0016] A generating unit is configured to generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

[0017] In some embodiments, the determination unit can be specifically used to identify the position information of at least one candidate object part of the target object and the position reliability of the position information in the object posture information; based on the position reliability, screen out at least one target object part from the candidate object parts; and determine the image range category of the original image according to the position information of the target object part.

[0018] In some embodiments, the determination unit can be specifically used to identify the object area of ​​the target object in the original image based on the position information of the target object part; obtain the part category of the target object part, and determine the area type of the object area based on the part category; based on the area type, classify the image range of the original image to obtain the image range category of the original image.

[0019] In some embodiments, the generation unit can be specifically used to identify the object depth of the target object in the original image to obtain object depth information; determine the object posture information of the target object in the original image based on the object depth information and object posture information; and use an image generation model to generate at least one target image corresponding to the original image according to the image generation parameters and object posture information.

[0020] In some embodiments, the generation unit can be specifically used to obtain the image size of the original image and perform geometric scaling on the image size to obtain a target image size, where the product of width and height in the target image size is a preset value; generating at least one target image corresponding to the original image based on the image features and image generation parameters includes: generating at least one target image corresponding to the original image based on the image generation parameters and the object's body shape information, where the image size of the target image is the target image size.

[0021] In some embodiments, the image generation device may further include a training unit, which may be specifically used to obtain image samples of at least one object style and determine sample training parameters of the image samples; based on the image samples and sample training parameters, the preset image generation model is trained multiple times to obtain multiple candidate image generation models; and based on the preset image prompt information, an image generation model is screened out from the candidate image generation models.

[0022] In some embodiments, the training unit can be specifically used to obtain original image samples of at least one object style, and identify the object posture of at least one object in the original image sample to obtain sample object posture information; based on the sample object posture information, identify at least one current object area in the original image sample; cut out the image corresponding to the current object area in the original image sample, and scale the cut out image to obtain at least one image sample corresponding to the original image sample.

[0023] In some embodiments, the training unit can be specifically used to identify the part position of at least one target sample object part in the sample object posture information; based on the part position, calculate the region center point and region size of at least one current object region; and identify the current object region in the original image sample based on the region center point and region size.

[0024] In some embodiments, the training unit can be specifically used to filter out the target part position corresponding to each current object area from the part positions, and calculate the midpoint of the target part position to obtain the area center point of the current object area; calculate the distance between the target part positions to obtain at least one initial area side length of the current object area; filter out the current area side length from the initial area side lengths, and adjust the current area side length to obtain the area size of the current object area.

[0025] In some embodiments, the training unit can be specifically used to identify sample prompt words in the image sample and calculate the initial training times of the image sample; obtain the sample number of image samples corresponding to each original image sample, and calculate the ratio of the initial training times to the sample number to obtain the training times of the image sample; send the image sample and sample prompt words to the review server for review, and receive the review result returned by the review server; when the review result indicates that the image sample and sample prompt words have passed the review, determine the sample training parameters of the image sample based on the sample prompt words and training times.

[0026] In some embodiments, the training unit can be specifically used to train the preset image generation model for a preset training round based on the image samples and sample training parameters to obtain a candidate image generation model corresponding to one round of training; use the candidate image generation model as the preset image generation model, and return to execute the step of training the preset image generation model for a preset training round based on the image samples and sample training parameters until the preset number of training rounds is reached, thereby obtaining a candidate image generation model corresponding to each round of training.

[0027] In some embodiments, the training unit can be specifically used to generate an image corresponding to the image sample based on the sample training parameters using a preset image generation model to obtain a predicted image, and determine the image loss of the image sample based on the image sample and the predicted image; update the network parameters of the preset image generation model according to the image loss, and use the updated preset image generation model as the preset image generation model; return to execute the step of generating the image corresponding to the image sample based on the sample training parameters using the preset image generation model until the number of updates reaches the preset training rounds, and obtain a candidate image generation model corresponding to one round of training.

[0028] In some embodiments, the training unit can be specifically used to generate preview images using the candidate image generation model according to preset image prompt information, and obtain a training preview image corresponding to each candidate image generation model; based on the image loss, generate image loss change information of the preset image generation model, and send the image loss change information and the training preview image to the model screening server, so that the model screening server can screen out the image generation model from the candidate image generation models; receive the model screening results returned by the model screening server, and based on the model screening results, determine the image generation model from the candidate image generation models.

[0029] In some embodiments, the image generation device may further include a configuration unit, which may be specifically used to configure the parameter range of the preset image generation parameters to obtain the initial parameter range of the preset image generation parameters; obtain a test image sample set of at least one image category, the test image sample set including at least one test image sample of the preset image range category under the target object style; based on the test image sample set, filter out the parameter values ​​of the preset image generation parameters corresponding to each image category within the initial parameter range to obtain an image generation parameter set, and use the image generation parameter set as the preset image generation parameter set.

[0030] In some embodiments, the configuration unit can be specifically used to generate at least one image combination corresponding to each image category using the image generation model based on the initial parameter range and the test image sample, the image combination including a plurality of control images generated by combining different parameter values ​​within the initial parameter range; sending the image combination and the initial parameter range to the parameter configuration server so that the parameter configuration server can filter out the target control image from the image combination, and narrow the initial parameter range based on the target control image to obtain the narrowed parameter range corresponding to each image category; receiving the narrowed parameter range returned by the parameter configuration server, and determining the parameter value of the preset image generation parameter corresponding to each image category based on the narrowed parameter range to obtain an image generation parameter set.

[0031] In some embodiments, the configuration unit can be specifically used to use the narrowed parameter range as the initial parameter range corresponding to the image category; return to execute the step of generating at least one image combination corresponding to each image category based on the initial parameter range and the test image sample using the image generation model until a preset stop condition is reached, thereby obtaining a target parameter range corresponding to each image category; and filter out parameter values ​​of preset image generation parameters in the target parameter range to obtain an image generation parameter set.

[0032] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the image generation method provided in the embodiment of the present application.

[0033] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any image generation method provided in the embodiment of the present application.

[0034] In addition, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in the image generation method provided in the embodiment of the present application.

[0035] In an embodiment of the present application, after acquiring at least one original image, the original image includes at least one target object, and the object posture of the target object is identified in the original image to obtain object posture information, and the object style of the target object is identified in the original image to obtain object style information. Based on the object posture information, the image range category of the original image is determined, and the image range category indicates the object range of the target object in the original image. According to the image range category and the object style information, the target image generation parameters corresponding to the original image are screened out from a preset image generation parameter set, and at least one target image corresponding to the original image is generated based on the target image generation parameters and the object posture information. Since the scheme can remove the limitation of the image input range by identifying the object posture of the target object in the original image and determining the image range category of the original image based on the object posture information, it is also possible to screen out the target image generation parameters from a preset image generation parameter set based on the image range category and the object style information, without having to test the reasonable parameter range of each generation parameter. Therefore, the generation efficiency of the image generation can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 Schematic diagram of a scene of the image generation method provided in an embodiment of the present application;

[0038] Figure 2 Schematic diagram of the process of generating an image according to an embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of an image combination provided in an embodiment of the present application;

[0040] Figure 4 This is a schematic diagram of the overall process of generating a graph according to an embodiment of the present application;

[0041] Figure 5 It is a schematic diagram of parameter adjustment in the graph provided in the embodiment of the present application;

[0042] Figure 6 is a schematic diagram of splitting an original image sample into image samples provided by an embodiment of the present application;

[0043] Figure 7 Schematic diagram of training preview images generated by the candidate image generation model corresponding to different numbers of training rounds provided in an embodiment of the present application;

[0044] Figure 8 is a schematic diagram of image loss change information provided by an embodiment of the present application;

[0045] Figure 9 This is a schematic diagram of the preset image generation model training and configuration of image generation parameters provided in an embodiment of the present application;

[0046] Figure 10 is a schematic diagram of generating a target image using an original image provided by an embodiment of the present application;

[0047] Figure 11 is another flowchart of the image generation method provided in an embodiment of the present application;

[0048] Figure 12 is a structural diagram of an image generating device provided in an embodiment of the present application;

[0049] Figure 13 is another structural schematic diagram of the image generating device provided in an embodiment of the present application;

[0050] Figure 14 is another structural schematic diagram of the image generating device provided in an embodiment of the present application;

[0051] Figure 15 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0053] The present invention provides an image generation method and related devices, which may include an image generation device, an electronic device, a computer program product, and a computer-readable storage medium. The image generation device may be integrated into an electronic device, which may be a server, a terminal, or other device.

[0054] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0055] For example, see Figure 1 Taking the image generation device integrated into an electronic device as an example, after acquiring at least one original image, the electronic device identifies the object posture of the target object in the original image and obtains object posture information, and identifies the object style of the target object in the original image and obtains object style information. Based on the object posture information, the image range category of the original image is determined. According to the image range category and the object style information, the target image generation parameters corresponding to the original image are screened out from a preset image generation parameter set. Based on the target image generation parameters and the object posture information, at least one target image corresponding to the original image is generated, thereby improving the generation efficiency of image generation.

[0056] The image generation method provided in the embodiments of the present application involves computer vision and machine learning (ML) in artificial intelligence. The embodiments of the present application can identify the object pose and object style of a target object in an original image, determine the image range category of the original image based on the identified object pose information, filter target image generation parameters corresponding to the original image from a preset image generation parameter set based on the image range category and object risk information, and generate at least one target image corresponding to the original image using an image generation model based on the target image generation parameters and the object pose information, thereby improving the generation efficiency of image generation.

[0057] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0058] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI disciplines. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0059] Computer vision (CV) is the science of making machines "see." Specifically, it refers to using cameras and computers to replace the human eye in identifying, detecting, and measuring objects, and then further processing them to produce images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems that can extract information from images or multidimensional data. Large model technology has brought significant changes to the development of computer vision technology. Pre-trained models in the field of vision, such as the Swin Transformer, ViT, V-MOE, and MAE, can be fine-tuned to quickly and widely apply to specific downstream tasks. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and other technologies. It also includes common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0060] Machine Learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning. Pretrained models are the latest development in deep learning, integrating these techniques.

[0061] It can be understood that in the specific implementation of this application, when it involves original images, image samples and other related data of the object or target object, when the following embodiments of this application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0062] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0063] This embodiment will be described from the perspective of an image generating device, which can be specifically integrated into an electronic device, which can be a server or a terminal; wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a wearable device, a virtual reality device or other smart device that can generate images.

[0064] A method for generating an image, comprising:

[0065] Acquire at least one original image, the original image including at least one target object, identify the object posture of the target object in the original image to obtain object posture information, and identify the object style of the target object in the original image to obtain object style information, determine an image range category of the original image based on the object posture information, the image range category indicating the object range of the target object in the original image, filter out target image generation parameters corresponding to the original image from a preset image generation parameter set based on the image range category and the object style information, and generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

[0066] like Figure 2 As shown, the specific process of the image generation method is as follows:

[0067] 101. Obtain at least one original image.

[0068] The original image includes at least one target object. The target object can be of various types, such as a real or virtual (human or animal) character, a building, a device, or other entities.

[0069] There are multiple ways to obtain at least one original image, which can be as follows:

[0070] For example, at least one original image uploaded by a terminal or client can be received, or images including at least one object can be screened out from a network or image database to obtain at least one original image, or at least one image including a target object can be generated on an image generation platform to obtain an original image, or an image generation request can be received, which carries the storage address of at least one original image, and at least one original image can be obtained based on the storage address, and so on.

[0071] 102. Identify the object posture of the target object in the original image to obtain object posture information, and identify the object style of the target object in the original image to obtain object style information.

[0072] The object pose information can be understood as the pose information of the target object in the original image. The object pose information can include the position information of at least one part of the target object and the position reliability of the position information. For example, if the target object is a human character, the object pose information can include the position of each part of the character's body in the original image and the position reliability of each position. The position reliability can be understood as the degree of reliability of the position information. When the position reliability is greater than the reliability threshold, the position information can be determined to be reliable, i.e., the target object part exists at that position in the original image.

[0073] The object style information can be understood as information indicating the object style of the target object in the original image. The so-called object style can be understood as the object role category. For example, if the target object is a human role, the object style can be understood as the role type of the human role.

[0074] There are many ways to identify the pose of the target object in the original image, which can be as follows:

[0075] For example, a posture recognition network may be used to identify the position information of the object part of the target object and the position reliability of the position information in the original image, thereby obtaining the object posture information.

[0076] The posture recognition network may have various network structures, such as OpenPose (a posture recognition network) or other networks that can recognize the posture of an object, etc. Taking OpenPose as an example, the posture recognition network can be used to recognize the posture of the target object in the original image, thereby outputting pose_keypoints_2d (an array of positions and positional credibility) containing the position information of each object part and the positional credibility of the position information. The pose_keypoints_2d array can then be used as the object posture information.

[0077] There are many ways to identify the object style of the target object in the original image. For example, a style recognition network can be used to identify the object style of the target object in the original image to obtain object style information. Alternatively, the object category of the target object can be identified in the original image, and the object style of the target object can be determined based on the object category to obtain object style information, and so on.

[0078] 103. Determine an image range category of the original image based on the object posture information.

[0079] The image range category indicates the object range of the target object in the original image. The object range may be of multiple types, for example, it may include categories such as head, half body or whole body, or it may also include categories such as head, torso or whole body.

[0080] There are multiple ways to determine the image range category of the original image based on the object posture information, which can be as follows:

[0081] For example, the position information of at least one candidate object part of the target object and the position reliability of the position information are identified in the object posture information, and based on the position reliability, at least one target object part is screened out from the candidate object parts, and the image range category of the original image is determined according to the position information of the target object part.

[0082] The candidate object part can be understood as the object part whose position is included in the object posture information. The so-called object part can be understood as a part of the target object. Taking the target object as a character as an example, the part can be a body part of the character, such as the left shoulder, right shoulder, glasses, forehead, nose, left hand, or right hand. Based on the position reliability, there are many ways to filter out at least one target object part from the candidate object parts. For example, the position reliability can be compared with a preset reliability threshold to obtain a comparison result. Based on the comparison result, at least one candidate object part whose position reliability exceeds the preset reliability threshold can be filtered out from the candidate object parts to obtain the target object part.

[0083] After selecting at least one target object part from the candidate object parts, the image range category of the original image can be determined based on the positional information of the target object part. There are various ways to determine the image range category of the original image based on the positional information of the target object part. For example, based on the positional information of the target object part, the object region of the target object can be identified in the original image to obtain the part category of the target object. Based on the part category, the region type of the object region can be determined. Based on the region type, the image range of the original image can be classified to obtain the image range category of the original image.

[0084] Among them, there are many ways to identify the object area of ​​the target object in the original image based on the position information of the target object part. For example, based on the position information of the target object part, the part position of each target object position can be identified in the original image, and the closed area formed by the part positions can be used as the object area of ​​the target object.

[0085] After identifying the target object's object region in the original image and obtaining the target object's part category, the region type of the object region can be determined based on the part category. There are multiple ways to determine the region type of the object region based on the part category. For example, when the part category includes the head, torso, and lower limbs, the region type of the object region can be determined as the object's entire region. When the part category includes the head, torso, and upper limbs, the region type of the object region can be determined as the object's torso region. When the part category includes the head, the region type of the object region can be determined as the object's head region, and so on.

[0086] After determining the region type of the object region, the image range of the original image can be classified based on the region type to obtain the image range category of the original image. There are many ways to classify the image range of the original image. For example, when the region type is the entire object region, the image range category of the original image can be determined as a full-body image or a whole-body image. When the region type is the torso region of the object, the image range category of the original image can be determined as a torso image or a half-body image. When the region type is the head region of the object, the image range category of the original image can be determined as a head image, and so on.

[0087] 104. Filter target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information.

[0088] The preset image generation parameter set includes at least one image generation parameter corresponding to an image category. The so-called image generation parameter can be understood as a parameter used when generating an image using the image generation parameter. For example, if the image generation model is LoRA (an image generation model), the image generation parameter can be an img2img parameter (an image generation parameter).

[0089] There are multiple ways to filter out target image generation parameters corresponding to the original image from the preset image generation parameter set based on the image range category and object style information, which can be specifically as follows:

[0090] For example, based on the object style information, at least one image generation parameter corresponding to the object style of the target object can be filtered out from the preset image generation parameter set to obtain a candidate image generation parameter set, and the image generation parameters corresponding to the image range category can be filtered out from the candidate image generation parameter set to obtain the initial image generation parameters, and the fixed image generation parameters can be obtained. The fixed image generation parameters are added to the initial image generation parameters to obtain the target image generation parameters corresponding to the original image. Alternatively, the parameter index of the preset image generation parameter set can be obtained, the object style information and the image range category are matched with the parameter index, and at least one image generation parameter that is successfully matched is used as the initial image generation parameter, and the fixed image generation parameters are obtained. The fixed image generation parameters are added to the initial image generation parameters, and the target image generation parameters corresponding to the original image are obtained, and so on.

[0091] It should be noted that the target image generation parameters can be understood as parameter values ​​of preset image generation parameters and fixed image generation parameters. There can be multiple types of preset image generation parameters. For example, taking the image generation model as LoRA, they can include forward prompt words, size parameters, sampling parameters, LoRA parameters, redraw intensity and random seed number (seed), and other parameters, etc. Prompt word parameters can include forward prompt words and reverse prompt words. Forward prompt words are adjustable parameters, and forward prompt words can be supplemented according to the characteristics of the character. Size parameters can include length and width, sampling parameters can include samplers and sampling steps, and LoRA parameters can include LoRA model parameters and LoRA weights. In addition, during the image generation process, some image parameters are non-adjustable parameters, namely fixed image generation parameters. The parameter types of fixed image generation parameters can be multiple, for example, they can include reverse prompt words, checkpoint parameters (Base CheckPoint), feature parameters (Embedding), ControlNet (an image processing network) parameters, or other fixed parameters, etc. Image processing network parameters can include object pose parameters and image depth parameters.

[0092] Optionally, based on the image range category and object style information, before filtering out the target image generation parameters corresponding to the original image from the preset image generation parameter set, it also includes: configuring the parameter range of the preset image generation parameters to obtain the initial parameter range of the preset image generation parameters, obtaining a test image sample set of at least one image category, the test image sample set including at least one test image sample of the preset image range category under the target object style, based on the test image sample set, filtering out the parameter values ​​of the preset image generation parameters corresponding to each image category within the initial parameter range content to obtain the image generation parameter set, and using the target image generation parameter set as the preset image generation parameter set.

[0093] There are many ways to configure the parameter range of the preset image generation parameter. For example, a preset parameter range can be set for the preset image generation parameter to obtain an initial parameter range of the preset image generation parameter.

[0094] Among them, the image category can be understood as a preset image range category under the target object style, that is, a preset image range category under an object style can be an image category. For example, taking the target object style as object style A, the image category can include one of the head image, half-body image (torso image) or full-body image (whole image) under object style A. There are many ways to obtain a test image sample set of at least one image category. For example, a test image sample set of at least one image category can be received from a terminal or client, or an original image sample of at least one target object style can be obtained, and an image sample of at least one image range category can be segmented from the original image sample to obtain a test image sample set, and so on.

[0095] After configuring the parameter range of the preset image generation parameters and obtaining a set of test image samples for at least one image category, the parameter values ​​of the preset image generation parameters corresponding to each image category can be screened out within the initial parameter range based on the test sample set to obtain an image generation parameter set. There are various ways to screen out the parameter values ​​of the preset image generation parameters corresponding to each image category within the initial parameter range based on the test image sample set. For example, based on the initial parameter range and the test image samples, an image generation model can be used to generate at least one image combination corresponding to each image category. The image combination includes multiple control images generated by combining different parameter values ​​within the initial parameter range. The image combination is then sent to a parameter configuration server so that the parameter configuration server can screen out a target control image from the image combination and narrow the initial parameter range based on the target object image to obtain a narrowed parameter range corresponding to each image category. The narrowed parameter range returned by the parameter configuration server is received, and based on the narrowed parameter range, the parameter value of the preset image generation parameter corresponding to each image category is determined to obtain an image generation parameter set.

[0096] The image combination can include multiple comparison images generated by combining different parameter values ​​within the initial parameter range. By comparing multiple comparison images, the effects of different preset image generation parameters can be displayed. Taking the LoRA model as an example, the image combination can be an X / Y / Z plot (an effect image matrix), which can be as follows: Figure 3 As shown. Through this image combination, the influence of multi-dimensional variables on the generation effect can be compared. It is applicable to positions that may affect the results of each other (such as redrawing amplitude and LoRA weight, etc.), and the result matrix of the fused image is generated. After the image combination and the initial parameter range are sent to the parameter configuration server, the parameter configuration server can be used to manually confirm the reasonable image range (i.e., filter out the target control image), thereby reducing (narrowing) the initial parameter range and obtaining the reduced parameter range corresponding to each image category. It should be noted that each image combination can correspond to an image category. By filtering out the target control image in the image combination, the initial parameter range corresponding to the image category can be reduced or narrowed.

[0097] After the parameter configuration server has narrowed down the parameter range corresponding to each image category, the parameter configuration server can receive the narrowed down parameter range returned by the parameter configuration server. Then, based on the narrowed down parameter range, the parameter value of the preset image generation parameter corresponding to each image category is determined. There are various ways to determine the parameter value of the preset image generation parameter corresponding to each image category. For example, the narrowed down parameter range can be used as the initial parameter range corresponding to the image category, and the step of generating at least one image combination corresponding to each image category using the image generation model based on the initial parameter range and the test image sample is returned until a preset stopping condition is reached. A target parameter range corresponding to each image category is obtained, and the parameter value of the preset image generation parameter is screened out within the target parameter range to obtain an image generation parameter set.

[0098] Among them, the preset stopping condition can be understood as a pre-set condition for stopping iteration. There can be many types of preset stopping conditions, for example, it can include the number of iteration rounds, the initial parameter range cannot be further reduced, the initial parameter range reaches the preset range or other conditions for stopping iteration, etc.

[0099] Among them, there can be multiple ways to filter out the parameter values ​​of the preset image generation parameters in the target parameter range. For example, when there is a parameter value within the target parameter range, the parameter value in the target parameter range is used as the parameter value of the preset image generation parameter, thereby obtaining an image generation parameter set; when there are multiple parameter values ​​within the target parameter range, any parameter value in the target parameter range is filtered out as the parameter value of the preset image generation parameter, or the parameter value is sent to the parameter configuration server so that the parameter configuration server can filter out the target parameter value from multiple parameter values, and use the target parameter value as the parameter value of the preset image generation parameter, thereby obtaining an image generation parameter set, and so on.

[0100] After the parameter values ​​of the preset image generation parameters corresponding to each image category are determined, the image generation parameter set can be used as the preset image generation parameter set.

[0101] Among them, taking the image generation model as LoRA and the preset image generation parameters as img2img parameters (i.e., image generation parameters) as an example, the overall process of image generation can be as follows: Figure 4 The configuration of image generation parameters can be targeted at different usage scenarios. For example, for a certain image input, the configurable parameters can be as follows: Figure 4 As shown in , feedback adjustment is performed after the image is generated. For uncertain image input, the image input range can be limited (such as head / square), and the img2img parameters can be fixed on this basis. For uncertain image input, the parameter adjustment can be as follows Figure 5As shown, different parameter adjustments result in different adjustments. During parameter configuration or adjustment, an image combination (X / Y / Z plot) is generated based on the initial parameter range of each parameter (preset image generation parameters). This allows comparison of the impact of multi-dimensional variables on the generation results. This is suitable for dimensions that may affect each other (such as redraw amplitude and LoRA weight), generating a result matrix for the fused image. A reasonable image range is then manually confirmed to narrow the parameter range until the final parameter combination is fully determined. To relax the input image range restrictions, the size module pre-calculates the aspect ratio and controls the width-height product of the output image to balance image output speed and quality. For the human figure / pose range, the program incorporates OpenPose (object pose) and Depth (object depth) to detect depth of field and skeleton in the image for more accurate body recognition. Furthermore, for different human body regions within the image, different parameter configurations are determined through test set measurements. These mapping configurations are written to the configuration file to obtain a set of image generation parameters, which are then used as the default image generation parameter set for subsequent image generation.

[0102] 105. Generate at least one target image corresponding to the original image based on the image generation parameters and the object posture information.

[0103] For example, the object depth of the target object is identified in the original image to obtain object depth information, and based on the object depth information and object posture information, the object posture information of the target object in the original image is determined. According to the image generation parameters and the object posture information, an image generation model is used to generate at least one target image corresponding to the original image.

[0104] The object depth information can be understood as the image depth of the target object in the original image. There are many ways to identify the object depth of the target object in the original image. For example, an image depth network can be used to identify the image depth of the target object area in the original image to obtain the object depth information.

[0105] After identifying the object depth information of the target object in the original image, the object posture information of the target object in the original image can be determined based on the object depth information and the object posture information. The object posture information can be understood as information related to the depth of field and posture of the target object in the original image. There are many ways to determine the object posture information of the target object in the original image based on the object depth and object posture information. For example, the object depth information and the object posture information can be fused to obtain the object posture information of the target object in the original image. Alternatively, the object posture information can be corrected based on the object depth information to obtain corrected object posture information, and the corrected object posture information can be used as the object posture information of the target object in the original image, and so on.

[0106] After determining the object posture information of the target object in the original image, the image generation model can be used to generate at least one target image corresponding to the original image based on the image generation parameters and the object posture information. There are various ways to use the image generation model to generate at least one target image corresponding to the original image. For example, taking the image generation model as LoRA and the image generation parameters as img2img parameters as an example, LoRA can be used to generate at least one target image corresponding to the original image based on the object posture information and the img2img parameters.

[0107] Optionally, in some embodiments, before generating at least one target image corresponding to the original image using the image generation model based on the image generation parameters and the subject's body shape information, a target image size of the output target image may be calculated. There are various ways to calculate the target image size of the output target image. For example, the image size of the original image may be obtained and geometrically scaled to obtain the target image size. At least one target image corresponding to the original image may be generated based on the image generation parameters and the subject's body shape information, and the image size of the target image may be the target image size.

[0108] The product of the width and height in the target image size is a preset value. The preset value may include 2048*2048 or any other preset value. The width and height in the target image size may also be a preset multiple, for example, the width is 4 times the height or any other multiple, etc.

[0109] Optionally, in some embodiments, the image generation model may be pre-set by an operation and maintenance personnel, or may be obtained by self-training of the image generation device. That is, before the step of "generating at least one target image corresponding to the original image using the image generation model according to the image generation parameters and the subject's body posture information", the image generation method includes:

[0110] Obtain image samples of at least one object style and determine sample training parameters of the image samples. Based on the sample training parameters of the image samples, train a preset image generation model multiple times to obtain multiple candidate image generation models. Based on preset image prompt information, select an image generation model from the candidate image generation models. Specifically, the method may be as follows:

[0111] (1) Obtain an image sample of at least one object style and determine a sample training parameter of the image sample.

[0112] The sample training parameters may be understood as training parameters for training using image samples, for example, they may include text prompt words, number of training times (ie, number of single training steps), training rounds, or other training parameters, and so on.

[0113] There are multiple ways to obtain at least one image sample of the object style, which can be as follows:

[0114] For example, an original image sample of at least one object style can be obtained, and the object posture of at least one object can be identified in the original image sample to obtain sample object posture information. Based on the sample object posture information, at least one current object area can be identified in the original image sample, the current object area can be cropped out in the original image sample, and the cropped image can be scaled to obtain at least one image sample corresponding to the original image sample.

[0115] The method of identifying the object posture of at least one object in the original image sample may be similar to the method of identifying the object posture of the target object in the original image, as described above, and will not be described in detail here.

[0116] After identifying the object posture of at least one object in the original image sample, at least one current object region can be identified in the original image sample based on the identified sample object posture information. The current object region can be understood as a region formed by different object ranges of the object in the original image sample, for example, it can include a head region, a torso region (half-body region), or an entire region (full-body region), etc. There are many ways to identify at least one current object region in the original image sample. For example, the position of at least one target sample object part can be identified in the sample object posture information. Based on the position, the region center point and region size of at least one current region can be calculated. Based on the region center point and region size, the current object region can be identified in the original image.

[0117] The target sample object parts for different current object regions are different. For example, when the current object region is the torso region, the target sample object parts may include the left shoulder, right shoulder, left hip, and right hip. When the current object region is the head region, the target sample object parts may include the forehead, chin, left ear, and right ear. When the current object region is the entire region, the target sample object parts may include the left hand, right hand, left foot, right foot, and forehead. There are multiple ways to calculate the region center point and region size of at least one current object region based on the region positions of the target sample object parts. For example, the target region position corresponding to each current object region is filtered out from the region positions, and the midpoint of the target region position is calculated to obtain the region center point of the current object region. The distance between the target region positions is calculated to obtain at least one initial region side length of the current object region. The current region side length is filtered out from the initial region side length, and the current region side length is adjusted to obtain the region size of the current object region.

[0118] Taking the torso as an example, the target area can include the left shoulder, right shoulder, left hip, and right hip. There are multiple ways to calculate the midpoint of the target area. For example, the coordinates of the midpoint between the left and right shoulders can be calculated, and the coordinates of the midpoint between the left and right hips can be calculated. The coordinates of the midpoint of these two midpoints can be calculated to obtain the center point of the torso area, i.e., the center point of the square corresponding to the torso area. There are multiple ways to calculate the side length of the initial area. For example, the shoulder width and hip width can be calculated and used as the side length of the initial area.

[0119] After calculating at least one initial region side length of the current object region, the current region side length can be selected from the initial region side lengths. There are various ways to select the current region side length from the initial region side lengths. For example, the longest initial region side length can be selected from the initial region side lengths to obtain the current region side length. For example, if the current object region is the torso, the larger value of the shoulder width and hip width can be selected as the current region side length.

[0120] After the current region side length is filtered out from the initial region side lengths, the filtered current region side length can be adjusted to obtain the region size of the current object region. There are many ways to adjust the current region side length, for example, you can add a preset margin to the current region side length to obtain the region side length of the current object region, and use the region side length as the region size.

[0121] After calculating the region center point and region size of at least one current object region, the current object region can be identified in the original image based on the region center point and region size. There are various ways to identify the current object region in the original image sample. For example, based on the region center point and region size, the vertex positions of the four vertices of the current object region can be identified in the original image sample. Based on the vertex positions, the current object region can be identified in the original image sample.

[0122] After identifying the current object region in the original image sample, an image corresponding to the current object region can be captured from the original image sample and scaled to obtain at least one image sample corresponding to the original image sample. Scaling the captured image can be performed in a variety of ways. For example, the captured images can be uniformly scaled to a predetermined image size to obtain at least one image sample corresponding to the original image template.

[0123] Among them, the original image sample is as follows Figure 6As shown, the original image sample contains the entire sample object. Therefore, it is possible to split the original image sample into three image samples of different image range categories, namely, head image samples, torso image samples, and overall image samples. This allows the overall information of the character (sample object) to be maintained when the number of pixels in a single training material is limited, while also obtaining the detailed characteristics of key parts, making it easier for the subsequent image generation model (LoRA) to better incorporate character characteristics into input images of different image range categories during subsequent training. It should be noted that when the original image sample includes the entire range of the sample object, it can be split into at least one of a head image sample, a torso image sample, and an overall image sample. When the original image sample includes the torso range (half-body range) of the sample object, it can be split into at least one of a head image sample and a torso image sample. When the original image sample includes the head range of the sample object, it can be split into a head image sample, and so on.

[0124] After obtaining image samples of at least one object style, sample training parameters of the image samples can be determined. There are many ways to determine the sample training parameters of the image samples. For example, sample prompt words can be identified in the image samples, and the initial training times of the image samples can be calculated. The number of sample samples corresponding to each original image sample is obtained, and the ratio of the initial training times to the number of samples is calculated to obtain the training times of the image samples. The image samples and sample prompt words are sent to the review server for review, and the review result returned by the review server is received. When the review result indicates that the image samples and sample prompt words have passed the review, the sample training parameters of the image samples are determined based on the sample prompt words and the training times.

[0125] There are many ways to identify sample prompt words in image samples. For example, DeepDanBooru (an image recognition system) can be used to infer sample prompt words from image samples, or other image recognition models or systems that recognize prompt words can be used to infer sample prompt words from image samples, and so on.

[0126] There are many ways to calculate the initial training times of image samples. For example, the number of samples and the total number of training steps of the original image samples can be obtained, and the product of the number of samples and the total number of training steps can be calculated to obtain the total training times. The ratio between the total training times and the training rounds can be calculated to obtain the initial training times of the image samples, which can be shown in formula (1). Specifically, it can be as follows:

[0127]

[0128] Where x is the initial training number of image samples.

[0129] The number of samples can be understood as the number of image samples split from the original image sample. The ratio of the initial training times to the number of samples is calculated to obtain the number of training times for the image samples, which can be shown in formula (2). Specifically, it can be as follows:

[0130]

[0131] Where x is the initial training number of image samples.

[0132] The review server can be understood as a server that reviews the current object area and sample prompt word of the image sample cropped from the original image sample. There are various ways to send the image sample and sample prompt word to the review server for review. For example, the review server can manually review the prompt word and image sample to obtain the review result.

[0133] When the review result indicates that the image sample and the sample prompt word have passed the review, the sample training parameters of the image sample can be determined based on the sample prompt word and the number of training times. There are many ways to determine the sample training parameters of the image sample. For example, the initial network parameters of a preset image generation model can be obtained, and the number of training epochs (n) can be identified in the initial network parameters. The number of training epochs (n), the sample prompt word, and the number of training times can be used as the sample training parameters of the image sample.

[0134] Among them, the interval number n of training rounds can be understood as every n training times as a round of training, that is, every n training rounds as a round of training. For example, taking n as 300, it can be found that 0-300 training times are regarded as a round of training (that is, the first round of training), and the output of the first round of training is the model after training in the 300th round, 300-600 training times are the second round of training, and the output of the second round of training is the model after training in the 600th round, and so on.

[0135] (2) According to the sample training parameters of the image samples, the preset image generation model is trained multiple times to obtain multiple candidate image generation models.

[0136] For example, the preset image generation model can be trained for a preset number of training rounds based on image samples and sample training parameters to obtain a candidate image generation model corresponding to one round of training. The candidate image generation model is used as the preset image generation model, and the step of training the preset image generation model for a preset number of training rounds based on image samples and sample training parameters is returned to execute until the preset number of training rounds is reached, and the candidate image generation model corresponding to each round of training is obtained.

[0137] Among them, there can be multiple ways to train the preset image generation model for preset training rounds based on image samples and sample training parameters. For example, based on the sample training parameters, the preset image generation model can be used to generate an image corresponding to the image sample to obtain a predicted image, and based on the image sample and the predicted image, the image loss of the image sample can be determined. According to the image loss, the network parameters of the preset image generation model are updated, and the updated preset image generation model is used as the preset image generation model. The step of generating an image corresponding to the image sample based on the sample training parameters using the preset image generation model is returned to execute until the number of updates reaches the preset training rounds, and a candidate image generation model corresponding to one round of training is obtained.

[0138] Among them, there are many ways to use a preset image generation model to generate an image corresponding to an image sample based on the sample training parameters. For example, a sample prompt word can be extracted from the sample training parameters, and based on the sample training parameters, a preset image generation model can be used to generate an image corresponding to the sample prompt word, thereby obtaining an image corresponding to the image sample, and using the image corresponding to the image sample as a predicted image.

[0139] After generating an image corresponding to an image sample using a preset image generation model, the image loss of the image sample can be determined based on the generated predicted image and the image sample. There are many ways to determine the image loss of an image sample. For example, the image features of the predicted image and the image sample can be extracted separately, and the similarity between the image features can be calculated to obtain feature similarity. Based on the feature similarity, the image loss of the image sample can be calculated using a preset loss function. Alternatively, the image features of the predicted image and the image sample can be extracted separately, and the feature distance between the image features can be calculated. Based on the feature distance, the image loss of the image sample can be calculated using a preset loss function, and so on.

[0140] After determining the image loss of the image sample, the network parameters of the preset image generation model can be updated according to the image loss, thereby obtaining an updated preset image generation model.

[0141] After updating the network parameters of the preset image generation model, the updated preset image generation model can be used as the preset image generation model. Then, the process returns to the step of generating an image corresponding to the image sample using the preset image generation model based on the sample training parameters until the number of updates reaches the preset training rounds, thereby obtaining a candidate image generation model corresponding to one round of training.

[0142] After the preset image generation model is trained for a preset number of training rounds based on the image samples and the sample training parameters, the candidate image generation model corresponding to one round of training can be used as the preset image generation model for the next round of training. The process then returns to the step of training the preset image generation model for a preset number of training rounds based on the image samples and the sample training parameters until the preset number of training rounds is reached, thereby obtaining candidate image generation models corresponding to each round of training.

[0143] (3) Based on the preset image prompt information, an image generation model is selected from the candidate image generation models.

[0144] For example, according to the preset image prompt information, a candidate image generation model can be used to generate a preview image, and a training preview image corresponding to each candidate image generation model can be obtained. Based on the image loss, image loss change information of the preset image generation model can be generated, and the image loss change information and the training preview image can be sent to the model screening server so that the model screening server can screen out the image generation model from the candidate image generation models, accept the model screening results returned by the model screening server, and determine the image generation model from the candidate image generation models based on the model screening results.

[0145] The preset image prompt information can be understood as a preset prompt word or prompt text for generating a preview image. The training preview image can be understood as a preview image generated by the candidate image generation model in the form of a Vincent graph. Taking the base model of the candidate image generation model as LoRA and the number of training rounds n as 300 as an example, the training preview images generated by the candidate image generation model corresponding to different training rounds can be as follows: Figure 7 shown.

[0146] The image loss change information can be understood as information indicating changes in image loss. There are many types of image loss change information, such as a line graph or other information that can indicate changes. For example, the image loss change information can be a line graph. Figure 8 The degree of fit of the candidate image generation model can be judged by the image loss change information and the training preview image. For images with a loss greater than 0.9, it is easy to be underfitting, and less than 0.6, it is easy to be overfitting.

[0147] After generating the training preview image and the image loss change information, the training preview image and the image loss change information can be sent to the model screening server so that the model screening server can screen out the image generation model from the candidate image generation models. There are many ways for the model screening server to screen out the image generation model from the candidate image generation models. For example, the model screening server can manually screen out at least one current candidate image generation model from the candidate image generation server based on the training preview image and the image loss information, generate a candidate image combination / matrix (X / Y / Z plot) using the current candidate image generation model based on the sample training parameters, and screen out the image generation model from the current candidate image generation model based on the candidate image combination / matrix to obtain a model screening result, and return the model screening result.

[0148] After receiving the model screening result returned by the model screening server, the image generation model can be determined from the candidate image generation models based on the model screening result.

[0149] Taking the preset image generation model as LoRA and the image generation parameters as img2img parameters as an example, the process of training the preset image generation model and configuring the image generation parameters can be as follows: Figure 9As shown, stylized character / screen images are collected. Openpose is used to assist in recognizing the original source material (original image samples) to generate at least one image sample, which is uniformly scaled to a standard training size. The image recognition system is used to infer the sample prompt word from the image sample and the number of training steps for each image sample is calculated. Then, the sample prompt word and image sample are manually inspected and modified to obtain the image sample and sample training parameters. The preset LoRA is trained based on the sample training parameters and image samples, and the loss value changes are recorded and plotted as a line graph. The temporary model is saved every n training rounds to obtain multiple candidate LoRAs. The candidate images are used to generate a model with the default prompt word to output a stage preview (training preview). Several excellent LoRAs are manually selected based on the loss line graph and stage preview graph. Then, an XYZ plot is generated for comparison to manually select the target LoRA. For configuring image generation parameters, the core parameter variation range can be set. Test image samples with different object ratios are input to generate an X / Y / Z plot. The target image is manually selected and the parameter range is narrowed. After iteration, the optimal parameter combination for each image category is obtained, and a mapping file (preset image generation parameter set) is generated. In the whole process, it can be found that by implementing the three automation tools of training set preprocessing module, loRA training module and img2img parameter selection module, automation is achieved in each sub-step, reducing the manual processing steps to 5 steps, and generating parameter configuration mapping files for use in subsequent image preprocessing. After training the preset image generation model and configuring the preset image generation parameters, the img2img parameters of at least one input original image can be preprocessed to generate the target image. The process of generating the target image can be as follows: Figure 10 As shown in the figure, the input original image is received, the reasonable output width and height (target image size) are calculated, the object posture information is output using openpose, the target img2img parameters of the corresponding object area (object range category) are filtered out in the mapping file (preset image generation parameter set), and the target img2img parameters are combined with controlNet to output the target image.

[0150] This solution can significantly improve the efficiency of character stylization LoRA and matching parameter creation, laying a foundation for future mass character stylization. Traditionally, the three steps of training set preprocessing, LoRA training and testing, and optimal parameter selection for different LoRAs require extensive manual effort. Many of these steps can be replaced by automated modules, reducing labor and time. This solution also eliminates some limitations on input images, supporting image fusion of a wider range of sizes and object parts, making stylization applications more engaging and improving the efficiency of image generation.

[0151] From the above, it can be seen that after acquiring at least one original image, the embodiment of the present application includes at least one target object, identifies the object posture of the target object in the original image, obtains object posture information, and identifies the object style of the target object in the original image, obtains object style information, and determines the image range category of the original image based on the object posture information. The image range category indicates the object range of the target object in the original image, and according to the image range category and the object style information, the target image generation parameters corresponding to the original image are screened out from the preset image generation parameter set, and at least one target image corresponding to the original image is generated based on the target image generation parameters and the object posture information; since the scheme can remove the limitation of the image input range by identifying the object posture of the target object in the original image and determining the image range category of the original image based on the object posture information, it can also screen out the target image generation parameters from the preset image generation parameter set based on the image range category and the object style information, without having to test the reasonable parameter range of each generation parameter, and therefore, the generation efficiency of the image generation can be improved.

[0152] The method described in the above embodiment will be further described in detail below with examples.

[0153] In this embodiment, the image generation device is specifically integrated into an electronic device, the electronic device is a server, the image generation model is LoRA, and the image generation parameter is an img2img parameter.

[0154] (1) Preset LoRA training

[0155] (1) The server obtains an image sample of at least one object style and determines a sample training parameter of the image sample.

[0156] For example, the server may obtain an original image sample of at least one object style, and use an openpose network to identify the object posture of at least one object in the original image sample to obtain sample object posture information.

[0157] The server can identify the position of at least one target sample object part in the sample object posture information. Filter out the target part position corresponding to each current object area from the part position, calculate the midpoint of the target part position, obtain the area center point of the current object area, calculate the distance between the target part positions, obtain at least one initial area side length of the current object area, filter out the longest initial area side length from the initial area side lengths, thereby obtaining the current area side length, add a preset margin to the current area side length, thereby obtaining the area side length of the current object area, and use the area side length as the area size. Based on the area center point and area size, identify the vertex positions of the four vertices of the current object area in the original image sample, and identify the current object area in the original image sample based on the vertex positions. Cut out the image corresponding to the current object area from the original image sample, and uniformly scale the cut-out image to the preset image size, thereby obtaining at least one image sample corresponding to the original image template.

[0158] The server may use DeepDanBooru to infer sample prompt words from the image sample, or may use other image recognition models or systems for recognizing prompt words to infer sample prompt words from the image sample, and so on.

[0159] The server obtains the sample number and the total number of training steps of the original image sample, calculates the product of the sample number and the total number of training steps, thereby obtaining the total number of training times, and calculates the ratio between the total number of training times and the number of training rounds to obtain the initial number of training times of the image sample, which can be shown in formula (1). The sample number of the image sample corresponding to each original image sample is obtained, and the ratio of the initial number of training times to the sample number is calculated to obtain the number of training times of the image sample, which can be shown in formula (2).

[0160] The server sends the image sample and sample prompt word to the review server for review, and receives the review result returned by the review server. When the review result indicates that the image sample and sample prompt word have passed the review, the server obtains the preset LoRA initial network parameters, and identifies the interval number n of the training round (epoch) in the initial network parameters. The interval number n of the training round, the sample prompt word and the number of training times are used as the sample training parameters of the image sample.

[0161] (2) The server trains the preset LoRA multiple times according to the sample training parameters of the image sample to obtain multiple candidate LoRAs.

[0162] For example, the server can extract sample prompt words from the sample training parameters, and based on the sample training parameters, use the preset LoRA to generate an image corresponding to the sample prompt words, thereby obtaining an image corresponding to the image sample, and use the image corresponding to the image sample as the predicted image.

[0163] The server can extract image features of the predicted image and the image sample respectively, and calculate the similarity between the image features to obtain feature similarity, and based on the feature similarity, use a preset loss function to calculate the image loss of the image sample. Alternatively, the server can extract image features of the predicted image and the image sample respectively, and calculate the feature distance between the image features. Based on the feature distance, use a preset loss function to calculate the image loss of the image sample, and so on.

[0164] The server updates the network parameters of the preset LoRA based on the image loss, thereby obtaining an updated preset LoRA. The updated preset LoRA is used as the preset LoRA. Then, the server returns to the step of generating an image corresponding to the image sample using the preset LoRA based on the sample training parameters until the number of updates reaches the preset training rounds, thereby obtaining a candidate LoRA corresponding to one training round.

[0165] The server can use the candidate LoRA corresponding to one round of training as the preset LoRA for the next round of training. Then, the server returns to the step of training the preset LoRA for a preset number of training rounds based on the image samples and sample training parameters until the preset number of training rounds is reached, thereby obtaining the candidate LoRA corresponding to each round of training.

[0166] (3) The server selects LoRA from the candidate LoRAs based on the preset image prompt information.

[0167] For example, the server can generate preview images using candidate LoRAs based on preset image prompt information to obtain a training preview image corresponding to each candidate LoRA. Based on the image loss, an image loss line graph of the preset LoRA is generated, and the image loss line graph and the training preview image are sent to the model screening server so that the model screening server can screen out LoRAs from the candidate LoRAs, accept the model screening results returned by the model screening server, and determine LoRAs from the candidate LoRAs based on the model screening results.

[0168] (2) The server uses the trained LoRA to generate at least one target image corresponding to the original image.

[0169] like Figure 11 As shown, an image generation method, the specific process is as follows:

[0170] 201. The server obtains at least one original image.

[0171] For example, the server can receive at least one original image uploaded by a terminal or client, or can screen out images including at least one object from a network or image database to obtain at least one original image, or can generate at least one image including a target object on an image generation platform to obtain an original image, or can also receive an image generation request that carries the storage address of at least one original image, and obtain at least one original image based on the storage address, and so on.

[0172] 202. The server identifies the object posture of the target object in the original image and obtains object posture information.

[0173] For example, the server can use OpenPose to identify the object pose of the target object in the original image, so as to output pose_keypoints_2d containing the position information of each object part and the position reliability of the position information, and the pose_keypoints_2d array can be used as the object pose information.

[0174] 203. The server identifies the object style of the target object in the original image and obtains object style information.

[0175] For example, the server can use a style recognition network to identify the object style of the target object in the original image, thereby obtaining object style information, or it can also identify the object category of the target object in the original image, and determine the object style of the target object based on the object category, thereby obtaining object style information, and so on.

[0176] 204. The server determines the image range category of the original image based on the object posture information.

[0177] For example, the server may identify the position information of at least one candidate object part of the target object and the position reliability of the position information from the object pose information, compare the position reliability with a preset reliability threshold to obtain a comparison result, and based on the comparison result, select at least one candidate object part from the candidate object parts whose position reliability exceeds the preset reliability threshold to obtain the target object part. Based on the position information of the target object parts, the part position of each target object part is identified in the original image, and the closed area formed by the part positions is used as the object area of ​​the target object.

[0178] The server can obtain the part category of the target object. When the part category includes the head, torso, and lower limbs, the region type of the target region can be determined as the entire object region. When the part category includes the head, torso, and upper limbs, the region type of the target region can be determined as the torso region. When the part category includes the head, the region type of the target region can be determined as the head region, and so on.

[0179] When the region type is the entire region of the object, the server can determine that the image range category of the original image is a full-body image or a whole-body image; when the region type is the torso region of the object, the server can determine that the image range category of the original image is a torso image or a half-body image; when the region type is the head region of the object, the server can determine that the image range category of the original image is a head image, and so on.

[0180] 205. The server selects target img2img parameters corresponding to the original image from a preset img2img parameter set according to the image range category and the object style information.

[0181] For example, the server can filter out img2img parameters corresponding to the object style of the target object from the preset img2img parameter set based on the object style information, obtain a candidate img2img parameter set, filter out img2img parameters corresponding to the image range category from the candidate img2img parameter set, obtain initial img2img parameters, obtain fixed img2img parameters, and add the fixed img2img parameters to the initial img2img parameters to obtain the target img2img parameters corresponding to the original image. Alternatively, the server can obtain a parameter index of the preset img2img parameter set, match the object style information and the image range category with the parameter index, use the successfully matched img2img parameters as the initial img2img parameters, obtain fixed img2img parameters, and add the fixed img2img parameters to the initial img2img parameters, the target img2img parameters corresponding to the original image, and so on.

[0182] Optionally, in some embodiments, before filtering out the target img2img parameters corresponding to the original image from the preset img2img parameter set, the server may further set a preset parameter range for the preset img2img parameters, thereby obtaining an initial parameter range of the preset img2img parameters.

[0183] The server can receive a test image sample set of at least one image category uploaded by a terminal or client, or can also obtain at least one original image sample of the target object style, cut out image samples of at least one image range category from the original image sample, obtain a test image sample set, and so on.

[0184] The server can use LoRA to generate at least one image combination corresponding to each image category based on the initial parameter range and the test image sample. The image combination includes multiple control images generated by combining different parameter values ​​within the initial parameter range. The server sends the image combination to the parameter configuration server so that the parameter configuration server can filter out the target control image from the image combination, narrow the initial parameter range based on the target object image, obtain the narrowed parameter range corresponding to each image category, and receive the narrowed parameter range returned by the parameter configuration server. The narrowed parameter range is used as the initial parameter range corresponding to the image category, and the server returns to the step of generating at least one image combination corresponding to each image category based on the initial parameter range and the test image sample using LoRA until a preset stop condition is reached, thereby obtaining the target parameter range corresponding to each image category.

[0185] When there is a parameter value within the target parameter range, the server may use the parameter value within the target parameter range as the parameter value of the preset img2img parameter, thereby obtaining an img2img parameter set; when there are multiple parameter values ​​within the target parameter range, the server may filter out any parameter value within the target parameter range as the parameter value of the preset img2img parameter, or send the parameter value to the parameter configuration server so that the parameter configuration server can filter out the target parameter value from the multiple parameter values ​​and use the target parameter value as the parameter value of the preset img2img parameter, thereby obtaining an img2img parameter set, etc. The img2img parameter set is used as the preset img2img parameter set.

[0186] 206. The server generates at least one target image corresponding to the original image based on the img2img parameter and the object posture information.

[0187] For example, the server can use an image depth network to identify the image depth of the area where the target object is located in the original image, thereby obtaining object depth information.

[0188] The server fuses the object depth information and the object posture information to obtain the object posture information of the target object in the original image. Alternatively, the server may correct the object posture information based on the object depth information to obtain corrected object posture information, and use the corrected object posture information as the object posture information of the target object in the original image, and so on.

[0189] The server uses LoRA to generate at least one target image corresponding to the original image based on the object's body information and img2img parameters.

[0190] Optionally, in some embodiments, the server may also obtain the image size of the original image, and scale the image size proportionally to obtain the target image size, and generate at least one target image corresponding to the original image based on the img2img parameter and the object's body shape information, and the image size of the target image is the target image size.

[0191] From the above, it can be seen that after the server of the embodiment of the present application obtains at least one original image, the original image includes at least one target object, identifies the object posture of the target object in the original image, obtains object posture information, and identifies the object style of the target object in the original image, obtains object style information, and determines the image range category of the original image based on the object posture information, where the image range category indicates the object range of the target object in the original image, and filters out the target img2img parameters corresponding to the original image from the preset img2img parameter set according to the image range category and the object style information, and generates at least one target image corresponding to the original image based on the target img2img parameters and the object posture information; since the scheme can remove the restriction of the image input range by identifying the object posture of the target object in the original image and determining the image range category of the original image based on the object posture information, it can also filter out the target img2img parameters from the preset img2img parameter set based on the image range category and the object style information, without having to test the reasonable parameter range of each generation parameter, and therefore, the generation efficiency of the image generation can be improved.

[0192] In order to better implement the above method, an embodiment of the present application also provides an image generating device, which can be integrated into an electronic device, such as a server or terminal, and the terminal may include a tablet computer, a laptop computer and / or a personal computer, etc.

[0193] For example, Figure 12 As shown, the image generation device may include an acquisition unit 301, an identification unit 302, a determination unit 303, a screening unit 304, and a generation unit 305, as follows:

[0194] (1) Acquisition unit 301;

[0195] The acquisition unit 301 is configured to acquire at least one original image, where the original image includes at least one target object.

[0196] For example, the acquisition unit 301 can be specifically used to receive at least one original image uploaded by a terminal or client, or to screen out images including at least one object from a network or image database to obtain at least one original image, or to generate at least one image including a target object on an image generation platform to obtain an original image, and so on.

[0197] (2) Identification unit 302;

[0198] The recognition unit 302 is configured to recognize the object posture of the target object in the original image to obtain object posture information, and recognize the object style of the target object in the original image to obtain object style information.

[0199] For example, the recognition unit 302 can be specifically used to use a posture recognition network to identify the position information of the object part of the target object and the position reliability of the position information in the original image, thereby obtaining the object posture information, and use a style recognition network to identify the object style of the target object in the original image, thereby obtaining the object style information.

[0200] (3) determining unit 303;

[0201] The determining unit 303 is configured to determine an image range category of the original image based on the object posture information, where the image range category indicates an object range of the target object in the original image.

[0202] For example, the determination unit 303 can be specifically used to identify the position information of at least one candidate object part of the target object and the position reliability of the position information in the object posture information, screen out at least one target object part from the candidate object parts based on the position reliability, and determine the image range category of the original image according to the position information of the target object part.

[0203] (4) screening unit 304;

[0204] The screening unit 304 is configured to screen target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information.

[0205] For example, the screening unit 304 can be specifically used to screen out at least one image generation parameter corresponding to the object style of the target object from the preset image generation parameter set based on the object style information, obtain a candidate image generation parameter set, screen out image generation parameters corresponding to the image range category from the candidate image generation parameter set, obtain initial image generation parameters, obtain fixed image generation parameters, and add the fixed image generation parameters to the initial image generation parameters to obtain target image generation parameters corresponding to the original image.

[0206] (5) generating unit 305;

[0207] The generating unit 305 is configured to generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

[0208] For example, the generation unit 305 can be specifically used to identify the object depth of the target object in the original image, obtain object depth information, determine the object posture information of the target object in the original image based on the object depth information and object posture information, and use the image generation model to generate at least one target image corresponding to the original image according to the image generation parameters and the object posture information.

[0209] Optionally, in some embodiments, the image generation device may further include a training unit 306, such as Figure 13 As shown, the specific details can be as follows:

[0210] The training unit 306 is used to train the preset image generation model to obtain an image generation model.

[0211] For example, the training unit 306 can be specifically used to obtain image samples of at least one object style and determine the sample training parameters of the image samples. According to the sample training parameters of the image samples, the preset image generation model is trained multiple times to obtain multiple candidate image generation models. According to the preset image prompt information, the image generation model is screened out from the candidate image generation models.

[0212] Optionally, in some embodiments, the image generating device may further include a configuration unit 307, such as Figure 14 As shown, the specific details can be as follows:

[0213] The configuration unit 307 is configured to configure the preset image generation parameters of each image category to obtain an image generation parameter set, and use the image generation parameter set as the preset image generation parameter set.

[0214] For example, the configuration unit 307 can be specifically used to configure the parameter range of the preset image generation parameter, obtain the initial parameter range of the preset image generation parameter, obtain a test image sample set of at least one image category, and the test image sample set includes at least one test image sample of the preset image range category under the target object style. Based on the test image sample set, the parameter value of the preset image generation parameter corresponding to each image category is filtered out within the initial parameter range content to obtain the image generation parameter set, and the target image generation parameter set is used as the preset image generation parameter set.

[0215] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.

[0216] As can be seen from the above, in the embodiment of the present application, after the acquisition unit 301 acquires at least one original image, the original image includes at least one target object, the recognition unit 302 recognizes the object posture of the target object in the original image to obtain object posture information, and recognizes the object style of the target object in the original image to obtain object style information. The determination unit 303 determines the image range category of the original image based on the object posture information, where the image range category indicates the object range of the target object in the original image. The screening unit 304 filters the target image generation parameters corresponding to the original image from the preset image generation parameter set according to the image range category and the object style information. The generation unit 305 generates at least one target image corresponding to the original image based on the target image generation parameters and the object posture information. Since this scheme can remove the restriction on the image input range by identifying the object posture of the target object in the original image and determining the image range category of the original image based on the object posture information, it can also filter the target image generation parameters from the preset image generation parameter set based on the image range category and the object style information. There is no need to test the reasonable parameter range of each generation parameter, and thus the generation efficiency of the image generation can be improved.

[0217] The present application also provides an electronic device, such as Figure 15 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present application, specifically:

[0218] The electronic device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will understand that Figure 15 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.

[0219] Processor 401 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. It performs various functions of the electronic device and processes data by running or executing software programs and / or modules stored in memory 402 and accessing data stored in memory 402. Optionally, processor 401 may include one or more processing cores. Preferably, processor 401 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401.

[0220] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0221] The electronic device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 403 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0222] The electronic device may further include an input unit 404, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0223] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows:

[0224] Acquire at least one original image, the original image including at least one target object, identify the object posture of the target object in the original image to obtain object posture information, and identify the object style of the target object in the original image to obtain object style information, determine an image range category of the original image based on the object posture information, the image range category indicating the object range of the target object in the original image, filter out target image generation parameters corresponding to the original image from a preset image generation parameter set based on the image range category and the object style information, and generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

[0225] For example, an electronic device may acquire at least one original image, the original image including at least one target object. A posture recognition network is used to identify positional information of an object part of the target object and the positional reliability of the positional information in the original image, thereby obtaining object posture information. A style recognition network is used to identify the object style of the target object in the original image, thereby obtaining object style information. Positional information of at least one candidate object part of the target object and the positional reliability of the positional information are identified in the object posture information. Based on the positional reliability, at least one target object part is selected from the candidate object parts. The image range category of the original image is determined based on the positional information of the target object part. Based on the object style information, at least one image generation parameter corresponding to the object style of the target object is selected from a preset image generation parameter set to obtain a candidate image generation parameter set. Image generation parameters corresponding to the image range category are selected from the candidate image generation parameter set to obtain initial image generation parameters. Fixed image generation parameters are obtained, and the fixed image generation parameters are added to the initial image generation parameters to obtain target image generation parameters corresponding to the original image. The object depth of the target object is identified in the original image to obtain object depth information, and based on the object depth information and the object posture information, the object posture information of the target object in the original image is determined. According to the image generation parameters and the object posture information, at least one target image corresponding to the original image is generated using an image generation model.

[0226] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0227] From the above, it can be seen that after acquiring at least one original image, the embodiment of the present application includes at least one target object, identifies the object posture of the target object in the original image, obtains object posture information, and identifies the object style of the target object in the original image, obtains object style information, and determines the image range category of the original image based on the object posture information. The image range category indicates the object range of the target object in the original image, and according to the image range category and the object style information, the target image generation parameters corresponding to the original image are screened out from the preset image generation parameter set, and at least one target image corresponding to the original image is generated based on the target image generation parameters and the object posture information; since the scheme can remove the limitation of the image input range by identifying the object posture of the target object in the original image and determining the image range category of the original image based on the object posture information, it can also screen out the target image generation parameters from the preset image generation parameter set based on the image range category and the object style information, without having to test the reasonable parameter range of each generation parameter, and therefore, the generation efficiency of the image generation can be improved.

[0228] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0229] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any of the image generation methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0230] Acquire at least one original image, the original image including at least one target object, identify the object posture of the target object in the original image to obtain object posture information, and identify the object style of the target object in the original image to obtain object style information, determine an image range category of the original image based on the object posture information, the image range category indicating the object range of the target object in the original image, filter out target image generation parameters corresponding to the original image from a preset image generation parameter set based on the image range category and the object style information, and generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

[0231] For example, at least one original image is obtained, the original image including at least one target object. A pose recognition network is used to identify positional information of an object part of the target object and the positional reliability of the positional information in the original image, thereby obtaining object pose information. A style recognition network is used to identify the object style of the target object in the original image, thereby obtaining object style information. Positional information of at least one candidate object part of the target object and the positional reliability of the positional information are identified in the object pose information. Based on the positional reliability, at least one target object part is selected from the candidate object parts. The image range category of the original image is determined based on the positional information of the target object part. Based on the object style information, at least one image generation parameter corresponding to the object style of the target object is selected from a preset image generation parameter set to obtain a candidate image generation parameter set. Image generation parameters corresponding to the image range category are selected from the candidate image generation parameter set to obtain initial image generation parameters. Fixed image generation parameters are obtained, and the fixed image generation parameters are added to the initial image generation parameters to obtain target image generation parameters corresponding to the original image. The object depth of the target object is identified in the original image to obtain object depth information, and based on the object depth information and the object posture information, the object posture information of the target object in the original image is determined. According to the image generation parameters and the object posture information, at least one target image corresponding to the original image is generated using an image generation model.

[0232] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0233] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0234] Since the instructions stored in the computer-readable storage medium can execute the steps in any image generation method provided in the embodiments of the present application, the beneficial effects that can be achieved by any image generation method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0235] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the aforementioned image generation aspect or image-to-image aspect.

[0236] The above is a detailed introduction to an image generation method and related equipment provided in an embodiment of the present application. The related equipment may include an image generation device, an electronic device, a computer program product and a computer-readable storage medium. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. An image generation method, characterized in that: include: Acquire at least one original image, where the original image includes at least one target object; Identifying the object posture of the target object in the original image to obtain object posture information, and identifying the object style of the target object in the original image to obtain object style information; determining an image range category of the original image based on the object posture information, the image range category indicating an object range of the target object in the original image; Filtering target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information; At least one target image corresponding to the original image is generated based on the target image generation parameters and the object posture information.

2. The image generation method according to claim 1, wherein: The determining the image range category of the original image based on the object posture information includes: Identifying position information of at least one candidate object part of the target object and position reliability of the position information in the object posture information; Based on the position credibility, screening out at least one target object part from the candidate object parts; The image range category of the original image is determined according to the position information of the target object part.

3. The image generation method according to claim 2, wherein: The determining the image range category of the original image according to the position information of the target object part includes: identifying an object region of the target object in the original image according to the position information of the target object part; Acquiring a part category of the target object part, and determining a region type of the object region based on the part category; Based on the region type, the image range of the original image is classified to obtain an image range category of the original image.

4. The image generation method according to claim 1, wherein: The step of generating at least one target image corresponding to the original image based on the target image generation parameters and the object posture information includes: Identifying the object depth of the target object in the original image to obtain object depth information; Determining object posture information of the target object in the original image based on the object depth information and the object posture information; At least one target image corresponding to the original image is generated using an image generation model according to the image generation parameters and the object's body posture information.

5. The image generation method according to claim 4, characterized in that Before generating at least one target image corresponding to the original image using the image generation model according to the image generation parameters and the subject's body posture information, the method further includes: Obtaining the image size of the original image, and scaling the image size proportionally to obtain a target image size, where the product of width and height in the target image size is a preset value; Generating at least one target image corresponding to the original image based on the image features and image generation parameters includes: generating at least one target image corresponding to the original image based on the image generation parameters and object posture information, and the image size of the target image is the target image size.

6. The image generation method according to claim 4, characterized in that Before generating at least one target image corresponding to the original image using the image generation model according to the image generation parameters and the object's body shape information, the method further includes: Obtaining an image sample of at least one object style and determining a sample training parameter of the image sample; Training the preset image generation model multiple times according to the image samples and sample training parameters to obtain multiple candidate image generation models; According to the preset image prompt information, an image generation model is screened out from the candidate image generation models.

7. The image generation method according to claim 6, wherein: The obtaining of an image sample of at least one object style includes: Acquire an original image sample of at least one object style, and identify an object posture of at least one object in the original image sample to obtain sample object posture information; Based on the sample object posture information, identifying at least one current object region in the original image sample; An image corresponding to the current object area is cut out from the original image sample, and the cut out image is scaled to obtain at least one image sample corresponding to the original image sample.

8. The image generation method according to claim 7, wherein: The identifying at least one current object region in the original image sample based on the sample object posture information includes: Identifying a location of at least one target sample object part in the sample object posture information; Calculating a region center point and a region size of at least one current object region based on the part position; The current object region is identified in the original image sample according to the region center point and the region size.

9. The image generation method according to claim 8, characterized in that: The calculating, based on the part position, a region center point and a region size of at least one current object region includes: Filtering the target part position corresponding to each current object area from the part positions, and calculating the midpoint of the target part position to obtain the area center point of the current object area; Calculating the distance between the target part positions to obtain at least one initial region side length of the current object region; The side length of the current region is selected from the side lengths of the initial region, and the side length of the current region is adjusted to obtain the region size of the current object region.

10. The image generation method according to claim 6, wherein: The determining of the sample training parameters of the image sample includes: Identifying a sample prompt word in the image sample and calculating the initial training times of the image sample; Obtaining the number of image samples corresponding to each original image sample, and calculating the ratio of the initial training times to the sample number to obtain the number of training times for the image samples; Sending the image sample and the sample prompt word to the review server for review, and receiving the review result returned by the review server; When the audit result indicates that the image sample and the sample prompt word have passed the audit, a sample training parameter of the image sample is determined based on the sample prompt word and the number of training times.

11. The image generation method according to claim 6, wherein: The method of training the preset image generation model multiple times based on the image samples and the sample training parameters to obtain multiple candidate image generation models includes: Based on the image samples and sample training parameters, the preset image generation model is trained for a preset training round to obtain a candidate image generation model corresponding to one round of training; The candidate image generation model is used as the preset image generation model, and the step of training the preset image generation model for a preset number of training rounds based on the image samples and sample training parameters is returned to execute until the preset number of training rounds is reached, thereby obtaining the candidate image generation model corresponding to each round of training.

12. The image generation method according to claim 11, wherein: The step of training the preset image generation model for a preset training round based on the image samples and the sample training parameters to obtain a candidate image generation model corresponding to one round of training includes: Based on the sample training parameters, a preset image generation model is used to generate an image corresponding to the image sample to obtain a predicted image, and based on the image sample and the predicted image, an image loss of the image sample is determined; updating the network parameters of the preset image generation model according to the image loss, and using the updated preset image generation model as the preset image generation model; Return to executing the step of generating the image corresponding to the image sample based on the sample training parameters using the preset image generation model until the number of updates reaches the preset training rounds, and obtain a candidate image generation model corresponding to one round of training.

13. The image generation method according to claim 12, wherein: The step of selecting an image generation model from the candidate image generation models according to the preset image prompt information includes: According to the preset image prompt information, the candidate image generation model is used to generate a preview image to obtain a training preview image corresponding to each candidate image generation model; generating image loss change information of the preset image generation model based on the image loss, and sending the image loss change information and a training preview image to a model screening server so that the model screening server can screen out an image generation model from the candidate image generation models; Receive the model screening result returned by the model screening server, and determine an image generation model from the candidate image generation models based on the model screening result.

14. The image generation method according to claim 4, wherein: Before selecting the target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and the object style information, the method further includes: Configuring a parameter range of a preset image generation parameter to obtain an initial parameter range of the preset image generation parameter; Acquire a test image sample set of at least one image category, wherein the test image sample set includes at least one test image sample of a preset image range category under a target object style; Based on the test image sample set, parameter values ​​of the preset image generation parameters corresponding to each image category are screened out within the initial parameter range to obtain an image generation parameter set, and the image generation parameter set is used as the preset image generation parameter set.

15. The image generation method according to claim 14, wherein: The step of screening out parameter values ​​of the preset image generation parameters corresponding to each image category within the initial parameter range based on the test image sample set to obtain an image generation parameter set includes: Based on the initial parameter range and the test image samples, the image generation model is used to generate at least one image combination corresponding to each image category, wherein the image combination includes a plurality of control images generated by combining different parameter values ​​within the initial parameter range; Sending the image combination and the initial parameter range to a parameter configuration server, so that the parameter configuration server can filter out a target control image from the image combination and narrow down the initial parameter range based on the target control image to obtain a narrowed parameter range corresponding to each image category; The narrowed parameter range returned by the parameter configuration server is received, and based on the narrowed parameter range, parameter values ​​of preset image generation parameters corresponding to each image category are determined to obtain an image generation parameter set.

16. The image generation method according to claim 15, characterized in that: The step of determining the parameter values ​​of the preset image generation parameters corresponding to each image category based on the narrowed parameter range to obtain the image generation parameter set includes: Using the narrowed parameter range as the initial parameter range corresponding to the image category; Returning to the step of generating at least one image combination corresponding to each image category using the image generation model based on the initial parameter range and the test image sample until a preset stopping condition is met, thereby obtaining a target parameter range corresponding to each image category; Parameter values ​​of preset image generation parameters are screened out in the target parameter range to obtain an image generation parameter set.

17. An image generating device, characterized in that: include: an acquisition unit, configured to acquire at least one original image, wherein the original image includes at least one target object; a recognition unit, configured to recognize the object posture of the target object in the original image to obtain object posture information, and recognize the object style of the target object in the original image to obtain object style information; a determining unit, configured to determine an image range category of the original image based on the object posture information, wherein the image range category indicates an object range of the target object in the original image; a screening unit, configured to screen target image generation parameters corresponding to the original image from a preset image generation parameter set according to the image range category and object style information; A generating unit is configured to generate at least one target image corresponding to the original image based on the target image generation parameters and the object posture information.

18. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores an application program, and the processor is configured to run the application program in the memory to execute the steps of the image generation method according to any one of claims 1 to 16.

19. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the image generation method according to any one of claims 1 to 16 are implemented.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the image generation method according to any one of claims 1 to 16.