Picture generation method and system based on artificial intelligence

By obtaining user input information and features, combining it with the clothing database for multiple rounds of iterations to generate target images, and using the picture generation model to generate virtual faces, the problem of insufficient diversity and insufficient details of clothing images in the existing technology is solved, and individuality is achieved. ization and high-quality image generation.

CN118736029APending Publication Date: 2024-10-01广州小白信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311699860.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing image generation systems based on artificial intelligence have problems such as insufficient diversity, insufficient image details, and inaccurate understanding of user needs when generating clothing images.

Method used

By obtaining user input information and characteristics, combined with the clothing database to determine the preferred clothing combination, multiple rounds of iterations are performed to generate the target image, and a picture generation model is used to generate a virtual face, face replacement and image synthesis are performed to ensure the personalization and quality of the image.

Benefits of technology

It realizes personalized clothing generation, image iterative optimization, virtual face generation and target picture face replacement, improving the diversity of images, the fineness of details and the accuracy of user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736029A_ABST
    Figure CN118736029A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence picture processing, and particularly relates to an artificial intelligence-based picture generation method, which comprises the following steps of: acquiring user input information and user characteristics of a user; determining at least one preferable clothing combination through a clothing database based on the user input information and the user characteristics; generating at least one initial image based on the user features and the at least one preferred clothing combination; executing at least one round of iteration on the at least one initial image until an iteration ending condition is met, and determining a target image; generating at least one second candidate image of the current round based on the at least one first candidate image and the at least one group of first evaluation values of the at least one first candidate image; according to the method, the initial image is subjected to multiple rounds of iteration, the new candidate image is generated according to the evaluation value, adjustment is performed according to coordination evaluation until the iteration ending condition is met, and the final target image is generated, so that the iteration optimization can improve the quality of the generated image and meet the expectation of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of artificial intelligence image processing, and in particular relates to an artificial intelligence-based image generation method and system. Background Art

[0002] Artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems.

[0003] The existing AI-based image generation methods and systems have the following problems:

[0004] A. Insufficient diversity of generated images: Current image generation systems sometimes tend to generate similar styles and colors when generating clothing images, resulting in a lack of diversity in the generated images. This may limit the user's choice space and reduce the practicality of the system.

[0005] B. Image details are not fine enough: Although the image generation system can generate realistic images, it still lacks in some details. For example, the generated clothing images may lack realism in texture, subtle edges and details, affecting the quality and authenticity of the image.

[0006] C. Accuracy of understanding user needs: The current image generation system may not understand user needs accurately enough. The system may not correctly interpret the intention and preferences of the user input, resulting in the generated image not matching the user's expected results. Summary of the invention

[0007] In view of this, the embodiments of the present invention hope to provide an image generation method and system based on artificial intelligence to solve or alleviate the technical problems existing in the prior art and to provide at least a beneficial option for the above-mentioned technical problems.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] The method for generating an image based on artificial intelligence comprises the following steps:

[0010] S1. Obtain user input information and user characteristics of the user;

[0011] S2. determining at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics;

[0012] S3, generating at least one initial image based on the user characteristics and the at least one preferred clothing combination;

[0013] S4, performing at least one round of iteration on the at least one initial image until an iteration end condition is met, and determining a target image;

[0014] The at least one round comprises:

[0015] Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations;

[0016] Evaluate the coordination of the at least one second candidate image to determine at least one set of second evaluation values;

[0017] Based on the at least one set of second evaluation values, determining whether the iteration end condition is met;

[0018] S5, responding to "no", entering the next round of iteration;

[0019] S6. In response to then, the iteration ends, and the target image is determined based on the at least one second candidate image and the at least one set of second evaluation values;

[0020] S7, determining a first person and a second person appearing in a target image for generating a virtual face, and determining weights of the first person and the second person;

[0021] S8, obtaining a preset number of face image pairs, each face target image pair including a first face image of the first person and a second face image of the second person;

[0022] S9, generating a candidate virtual face picture for each face picture pair using a picture generation model according to the weights of the first person and the second person;

[0023] S10, extracting each frame of the target image in the target video;

[0024] S11, determining a target virtual face picture with a similar expression to the target picture from the candidate virtual face pictures;

[0025] S12, performing face replacement on the target image according to the target virtual face image to obtain a face replacement image;

[0026] S13, synthesizing the face replacement image into the target video to obtain a virtual image video.

[0027] As a further solution of the present invention: the determining at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics comprises: determining the user's clothing preference characteristics based on the user input information and the user characteristics;

[0028] Based on the clothing preference feature, the at least one preferred clothing combination is determined through the clothing database.

[0029] As a further solution of the present invention: the generating of at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image comprises: determining, based on the at least one set of first evaluation values, an element to be adjusted of the at least one first candidate image and an adjustment parameter of the element to be adjusted, the adjustment parameter comprising at least one of an adjustment dimension, an adjustment direction, a position adjustment and an adjustment amplitude;

[0030] Based on the adjustment parameter, the element to be adjusted is adjusted to generate the at least one second candidate image.

[0031] As a further solution of the present invention: the determining of the first person and the second person for generating the virtual face image, and determining the weights of the first person and the second person include: generating a person and weight setting interface;

[0032] Receiving two characters and weights of the two characters set by a user on the character and weight setting interface;

[0033] Generate a sample virtual face picture using the picture generation model according to the sample face pictures of the two characters and the weights of the two characters;

[0034] If the user saves the two characters and the weights of the two characters, the two characters are determined as the first character and the second character, and the weights of the two characters are determined as the weights of the first character and the second character.

[0035] As a further solution of the present invention: the face image pairs are stored in the blockchain, and obtaining a preset number of face image pairs includes:

[0036] Step 1: Obtain a first video of the first person and a second video of the second person;

[0037] Step 2: extracting a first picture of the first person from the first video, and extracting a second picture of the second person from the second video;

[0038] Step 3: segmenting the first face image from the first image, and segmenting the second face image from the second image;

[0039] Step 4: combining the first face picture and the second face picture into the face picture pair;

[0040] Step 5: determining whether the number of the face image pairs reaches the preset number;

[0041] Step 6: If the number of the face image pairs does not reach the preset number, return to step 2.

[0042] As a further solution of the present invention: determining a target virtual face picture having an expression similar to that of the target picture from the candidate virtual face pictures comprises: segmenting a target face picture from the target picture;

[0043] Detecting a first facial feature point from the target face image;

[0044] Detecting second facial feature points from each candidate virtual face image;

[0045] Performing feature matching on the second facial feature points of each candidate virtual face image with the first facial feature points;

[0046] The candidate virtual face picture corresponding to the second face feature point with the highest matching degree is determined as the target virtual face picture.

[0047] As a further solution of the present invention: said performing face replacement on said target image according to said target virtual face image comprises: adjusting second face feature points of said target virtual face image according to said first face feature points;

[0048] The face area in the target image is replaced with the adjusted target virtual face image.

[0049] As a further solution of the present invention: the system comprises: an acquisition module, used to acquire user input information and user characteristics of the user;

[0050] A first determination module, configured to determine at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics;

[0051] A generating module, configured to generate at least one initial image based on the user characteristics and the at least one preferred clothing combination;

[0052] A second determination module is used to perform at least one round of iteration on the at least one initial image until an iteration end condition is met to determine a target image;

[0053] Wherein, the at least one round includes:

[0054] Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations;

[0055] Evaluate the coordination of the at least one second candidate image to determine at least one set of second evaluation values;

[0056] Based on the at least one set of second evaluation values, determining whether the iteration end condition is met;

[0057] In response to no, proceed to the next iteration;

[0058] In response to this, the iteration ends, and the target image is determined based on the at least one second candidate image and the at least one set of second evaluation values.

[0059] As a further solution of the present invention: the first determination module is further used to: determine the user's clothing preference characteristics based on the user input information and the user characteristics;

[0060] Based on the clothing preference feature, the at least one preferred clothing combination is determined through the clothing database.

[0061] As a further solution of the present invention: the second determination module is further used to: determine the to-be-adjusted element of the at least one first candidate image and the adjustment parameter of the to-be-adjusted element based on the at least one set of first evaluation values, wherein the adjustment parameter includes at least one of an adjustment dimension, an adjustment direction, a position adjustment and an adjustment amplitude;

[0062] Based on the adjustment parameter, the element to be adjusted is adjusted to generate the at least one second candidate image.

[0063] The embodiment of the present invention has the following advantages due to the adoption of the above technical solution:

[0064] (1) Personalized clothing generation: By obtaining the user's input information and features and combining them with the clothing database, at least one preferred clothing combination can be determined to meet the user's personalized clothing needs.

[0065] (2) Iterative optimization of image generation: By performing multiple rounds of iterations on the initial image, new candidate images are generated based on the evaluation values, and adjustments are made based on the coordination evaluation until the iteration end conditions are met to generate the final target image. This iterative optimization can improve the quality of the generated image and meet user expectations.

[0066] (3) Virtual face generation: Based on the characters and weights set by the user, a sample virtual face image is generated using the image generation model. Users can set the characters and weights on the character and weight setting interface to meet the needs of generating virtual faces in different scenarios.

[0067] (4) Blockchain storage: Face image pairs can be stored in the blockchain to ensure data security and immutability, while facilitating management and retrieval.

[0068] (5) Face replacement of target image: The target image is replaced by selecting a target virtual face image with a similar expression to the target image from the candidate virtual face images and adjusting the second facial feature points of the target virtual face image according to the first facial feature points. This method can more accurately match facial feature points, making the replacement result more realistic and natural.

[0069] (6) Personalized generation: The system can generate a target image that meets the user's personalized needs based on the user's input information and features. By obtaining the user's input information and user features, such as clothing preference features, the system can generate at least one preferred clothing combination based on the user's needs and generate an initial image based on this. During the iteration process, the system can also continuously generate a second candidate image that better meets the user's needs based on the user's feedback and adjustment parameters, and finally determine the target image.

[0070] (7) Database support: The clothing database in the system plays an important role, containing a large amount of clothing information and image data. By building a complete clothing database, the system can obtain clothing attribute information, image data, and user reviews from it. This provides a reliable data foundation for the system to generate clothing combinations that meet user needs.

[0071] (8) Coordination evaluation algorithm: In the second determination module, the system evaluates the coordination of the generated image. The system can use computer vision and machine learning technology to design and implement an evaluation algorithm to evaluate the overall coordination, color matching, proportional relationship and other factors of the image from a visual perspective. This can ensure that the generated image has good visual effects and coordination.

[0072] (9) Iterative algorithm design: The system uses an iterative algorithm to generate the second candidate image. By using genetic algorithms, optimization algorithms, or deep learning methods, the system can generate a second candidate image that better meets user needs based on the evaluation value and adjustment parameters of the first candidate image. This can ensure image quality while improving the system's ability to adapt to user personalized needs.

[0073] (10) End condition design: The system has flexible iteration end condition design. According to the specific application scenario and user needs, you can set conditions such as coordination reaching a certain threshold, user satisfaction reaching a certain level, or the number of iterations reaching a set value to determine whether the iteration end condition is met. In this way, the iteration process of the system can be flexibly controlled according to the actual situation of the user.

[0074] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0076] Figure 1 The figure is a flow chart of the method for generating pictures based on artificial intelligence of the present invention.

[0077] Figure 2 This is a framework diagram of the artificial intelligence-based picture generation system of the present invention. DETAILED DESCRIPTION

[0078] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0079] It should be noted that the terms "first", "second", "symmetrical", "array", etc. are only used to distinguish between description and position description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the definition of "first", "symmetrical", etc. can explicitly or implicitly include one or more of these features; similarly, when the number of certain features is not limited in the form of words such as "two" or "three", it should be noted that this feature also explicitly or implicitly includes one or more feature quantities.

[0080] like Figure 1 As shown, the present invention is based on the artificial intelligence picture generation method, the method comprises the following steps:

[0081] S1. Obtain user input information and user characteristics of the user;

[0082] S2, determining at least one preferred clothing combination through a clothing database based on user input information and user characteristics;

[0083] S3, generating at least one initial image based on user characteristics and at least one preferred clothing combination;

[0084] S4, performing at least one round of iteration on at least one initial image until an iteration end condition is met, and determining a target image;

[0085] At least one round includes:

[0086] Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations;

[0087] evaluating the coordination of at least one second candidate image to determine at least one set of second evaluation values;

[0088] Based on at least one set of second evaluation values, determining whether an iteration end condition is satisfied;

[0089] S5, responding to "no", entering the next round of iteration;

[0090] S6. In response to then, the iteration ends, and a target image is determined based on at least one second candidate image and at least one set of second evaluation values;

[0091] S7, determining a first person and a second person appearing in a target image for generating a virtual face, and determining weights of the first person and the second person;

[0092] S8, obtaining a preset number of face image pairs, each face target image pair including a first face image of a first person and a second face image of a second person;

[0093] S9, generating a candidate virtual face image for each face image pair using the image generation model according to the weights of the first person and the second person;

[0094] S10, extracting each frame of the target image in the target video;

[0095] S11, determining a target virtual face picture with a similar expression to the target picture from the candidate virtual face pictures;

[0096] S12, performing face replacement on the target image according to the target virtual face image to obtain a face replacement image;

[0097] S13, synthesizing the face replacement image into the target video to obtain a virtual image video.

[0098] Determining at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics includes: determining the user's clothing preference characteristics based on the user input information and the user characteristics;

[0099] At least one preferred clothing combination is determined through a clothing database based on the clothing preference feature.

[0100] Generating at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of at least one first candidate image comprises: determining an element to be adjusted and an adjustment parameter of the element to be adjusted of at least one first candidate image based on the at least one set of first evaluation values, the adjustment parameter comprising at least one of an adjustment dimension, an adjustment direction, a position adjustment, and an adjustment amplitude;

[0101] Based on the adjustment parameters, the element to be adjusted is adjusted to generate at least one second candidate image.

[0102] Determining a first person and a second person for generating a virtual face image, and determining the weights of the first person and the second person includes: generating a person and weight setting interface;

[0103] Receive two characters and weights of the two characters set by the user from the character and weight setting interface;

[0104] Generate a sample virtual face picture using a picture generation model according to the sample face pictures of the two characters and the weights of the two characters;

[0105] If the user saves the two characters and the weights of the two characters, the two characters are determined as the first character and the second character, and the weights of the two characters are determined as the weights of the first character and the second character.

[0106] The face image pairs are stored in the blockchain. Obtaining a preset number of face image pairs includes:

[0107] Step 1: Obtain a first video of a first person and a second video of a second person;

[0108] Step 2: extracting a first picture of a first person from the first video, and extracting a second picture of a second person from the second video;

[0109] Step 3: Segmenting a first face image from the first image, and segmenting a second face image from the second image;

[0110] Step 4: Combining the first face image and the second face image into a face image pair;

[0111] Step 5: Determine whether the number of face image pairs reaches a preset number;

[0112] Step 6: If the number of face image pairs does not reach the preset number, return to step 2.

[0113] Determining a target virtual face picture having an expression similar to that of the target picture from the candidate virtual face pictures includes: segmenting the target face picture from the target picture;

[0114] Detecting the first facial feature point from the target face image;

[0115] Detecting second facial feature points from each candidate virtual face image;

[0116] Perform feature matching of the second facial feature points of each candidate virtual face image with the first facial feature;

[0117] The candidate virtual face picture corresponding to the second facial feature point with the highest matching degree is determined as the target virtual face picture.

[0118] Replacing the face of the target image according to the target virtual face image includes: adjusting the second face feature point of the target virtual face image according to the first face feature point;

[0119] Replace the face area in the target image with the adjusted target virtual face image.

[0120] Obtain user input information and user characteristics: Obtain relevant input information and characteristics from the user, which may include user preferences, specific needs, etc.

[0121] Determine the preferred clothing combination: Based on the user input information and user characteristics, combined with the clothing database, determine at least one preferred clothing combination to meet the user's needs and preferences.

[0122] Generate an initial image: Based on the user characteristics and at least one preferred clothing combination, generate at least one initial image as a starting point for subsequent iterations.

[0123] Iteratively generate the target image: Generate the target image through multiple rounds of iterations, each round of iteration includes the following steps:

[0124] a. Based on the first candidate image and the evaluation value of the first candidate image, generate the second candidate image of the current round.

[0125] b. Perform a coordination evaluation on the second candidate image to determine a second evaluation value.

[0126] c. Determine whether the iteration end condition is met. If not, enter the next round of iteration; if satisfied, end the iteration and obtain the target image.

[0127] Determine the characters and weights in the target image for generating the virtual face: determine the first character and the second character for which the virtual face needs to be generated according to the target image, and determine their weights.

[0128] Obtaining face image pairs: Obtaining a preset number of face image pairs from the blockchain, each face image pair including a first face image of a first person and a second face image of a second person.

[0129] Generate candidate virtual face images using the image generation model: Generate a candidate virtual face image for each face image pair using the image generation model according to the weights of the first person and the second person.

[0130] Matching of target image with candidate virtual face images: Segment the target face image from the target image, detect the first facial feature points, and detect the second facial feature points of each candidate virtual face image. Through feature matching, determine the target virtual face image with a similar expression to the target image.

[0131] Face replacement: The target image is replaced with the target virtual face image, that is, the face area in the target image is replaced with the adjusted target virtual face image.

[0132] Synthesize the avatar video: Synthesize the face replacement image into the target video to obtain the final avatar video.

[0133] like Figure 2 As shown, the present invention is based on an artificial intelligence picture generation system, the system comprises: an acquisition module, used to acquire user input information and user characteristics of a user;

[0134] A first determination module, configured to determine at least one preferred clothing combination through a clothing database based on user input information and user characteristics;

[0135] A generating module, configured to generate at least one initial image based on user characteristics and at least one preferred clothing combination;

[0136] A second determination module is used to perform at least one round of iteration on at least one initial image until an iteration end condition is met to determine a target image;

[0137] At least one round includes:

[0138] Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations;

[0139] evaluating the coordination of at least one second candidate image to determine at least one set of second evaluation values;

[0140] Based on at least one set of second evaluation values, determining whether an iteration end condition is satisfied;

[0141] In response to no, proceed to the next iteration;

[0142] In response thereto, the iteration is ended, and a target image is determined based on at least one second candidate image and at least one set of second evaluation values.

[0143] The first determination module is also used to: determine the user's clothing preference characteristics based on the user input information and the user characteristics;

[0144] At least one preferred clothing combination is determined through a clothing database based on the clothing preference feature.

[0145] The second determination module is further used to: determine the to-be-adjusted element and the adjustment parameter of the to-be-adjusted element of at least one first candidate image based on at least one set of first evaluation values, where the adjustment parameter includes at least one of adjustment dimension, adjustment direction, position adjustment and adjustment amplitude;

[0146] Based on the adjustment parameters, the element to be adjusted is adjusted to generate at least one second candidate image.

[0147] Data preprocessing: In the acquisition module, the text, voice or image data input by the user is preprocessed. For example, the text is segmented and stop words are removed; the voice is denoised, voice recognized and sentiment analyzed; the image is cropped, scaled and the color space is converted, etc.

[0148] Clothing database construction: In the first determination module, a database containing various clothing information needs to be constructed. This includes clothing attributes (such as color, style, material), image data, user reviews, etc. Crawler technology can be used to obtain a large amount of clothing information from e-commerce websites, etc., and then clean and annotate it.

[0149] Image generation model selection: In the generation module, you can explore different image generation models, such as generative adversarial networks (GANs) and variational autoencoders (VAEs). You can select a suitable model according to your specific needs, and train and optimize it to generate an initial image that matches the user's characteristics and clothing combination.

[0150] Coordination evaluation algorithm: In the second determination module, the generated image is evaluated for coordination. Computer vision and machine learning technologies can be used to design and implement an evaluation algorithm to evaluate factors such as the overall coordination, color matching, and proportional relationship of the image from a visual perspective and generate a second evaluation value.

[0151] Iterative algorithm design: During the iteration process, a suitable algorithm can be designed to generate the second candidate image for the current round. Genetic algorithms, optimization algorithms, or deep learning methods can be used to generate a second candidate image that better meets user needs based on the evaluation value and adjustment parameters of the first candidate image.

[0152] Design of iteration end conditions: You can design reasonable iteration end conditions based on specific application scenarios and user needs. For example, you can set conditions such as coordination reaching a certain threshold, user satisfaction reaching a certain level, or the number of iterations reaching a set value to determine whether the iteration end conditions are met.

[0153] Target image determination: After the iteration is completed, the generated target image is determined based on the final second candidate image and the second evaluation value. Further adjustments and optimizations can be made based on user feedback and needs to meet the user's personalized needs.

[0154] Acquisition module: This module can obtain the user's input information and user features in a variety of ways, such as text input, voice input, image input, etc. By using natural language processing technology, voice recognition technology and image processing technology, the user's input information and features can be accurately obtained.

[0155] First determination module: When determining at least one preferred clothing combination, the clothing combination that best meets the user's needs can be selected from the clothing database using algorithms and models in combination with the user's clothing preference characteristics. This involves technologies such as data mining, machine learning, and recommendation algorithms.

[0156] Generation module: When generating at least one initial image, deep learning image generation technology, such as a generative adversarial network (GAN) or a variational autoencoder (VAE), can be used to generate an initial image with corresponding features using user features and clothing combinations as input.

[0157] Second determination module: When performing at least one round of iteration, the second candidate image of the current round can be generated according to the evaluation value of the first candidate image, and the coordination evaluation can be performed on the second candidate image. The coordination evaluation can be based on factors such as image content, color matching, and proportional relationship, and can be analyzed and evaluated using image processing and computer vision technology.

[0158] Iteration end condition: It is determined whether the iteration end condition is met according to the second evaluation value, and some indicators or thresholds can be set. For example, when the coordination reaches a certain level, the user satisfaction reaches a certain threshold, or the number of iterations reaches a set value, the iteration can be judged to be over.

[0159] Adjustment parameters and elements: In each iteration, the elements to be adjusted and the adjustment parameters can be determined according to the evaluation value of the first candidate image. The adjustment parameters can include adjustment dimensions (such as color, shape, texture, etc.), adjustment directions (such as increase, decrease, rotation, etc.), position adjustment, and adjustment amplitude. The elements to be adjusted are transformed by adjusting the parameters to generate the second candidate image.

[0160] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0161] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A method for generating an image based on artificial intelligence, characterized in that: The method comprises the following steps: S1. Obtain user input information and user characteristics of the user; S2. determining at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics; S3, generating at least one initial image based on the user characteristics and the at least one preferred clothing combination; S4, performing at least one round of iteration on the at least one initial image until an iteration end condition is met, and determining a target image; The at least one round comprises: Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations; Evaluate the coordination of the at least one second candidate image to determine at least one set of second evaluation values; and determine whether the iteration end condition is satisfied based on the at least one set of second evaluation values; S5, responding to "no", entering the next round of iteration; S6. In response to then, the iteration ends, and the target image is determined based on the at least one second candidate image and the at least one set of second evaluation values; S7, determining a first person and a second person appearing in a target image for generating a virtual face, and determining weights of the first person and the second person; S8, obtaining a preset number of face image pairs, each face target image pair including a first face image of the first person and a second face image of the second person; S9, generating a candidate virtual face picture for each face picture pair using a picture generation model according to the weights of the first person and the second person; S10, extracting each frame of the target image in the target video; S11, determining a target virtual face picture with a similar expression to the target picture from the candidate virtual face pictures; S12, performing face replacement on the target image according to the target virtual face image to obtain a face replacement image; S13, synthesizing the face replacement image into the target video to obtain a virtual image video.

2. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: The determining at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics comprises: determining the user's clothing preference characteristics based on the user input information and the user characteristics; Based on the clothing preference feature, the at least one preferred clothing combination is determined through the clothing database.

3. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: The generating of at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image comprises: determining, based on the at least one set of first evaluation values, an element to be adjusted of the at least one first candidate image and an adjustment parameter of the element to be adjusted, wherein the adjustment parameter comprises at least one of an adjustment dimension, an adjustment direction, a position adjustment and an adjustment amplitude; Based on the adjustment parameter, the element to be adjusted is adjusted to generate the at least one second candidate image.

4. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: The determining of the first person and the second person for generating the virtual face image, and determining the weights of the first person and the second person include: generating a person and weight setting interface; Receiving two characters and weights of the two characters set by a user on the character and weight setting interface; Generate a sample virtual face picture using the picture generation model according to the sample face pictures of the two characters and the weights of the two characters; If the user saves the two characters and the weights of the two characters, the two characters are determined as the first character and the second character, and the weights of the two characters are determined as the weights of the first character and the second character.

5. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: The face image pairs are stored in the blockchain, and obtaining a preset number of face image pairs includes: Step 1: Obtain a first video of the first person and a second video of the second person; Step 2: extracting a first picture of the first person from the first video, and extracting a second picture of the second person from the second video; Step 3: segmenting the first face image from the first image, and segmenting the second face image from the second image; Step 4: combining the first face picture and the second face picture into the face picture pair; Step 5: determining whether the number of the face image pairs reaches the preset number; Step 6: If the number of the face image pairs does not reach the preset number, return to step 2.

6. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: Determining a target virtual face picture with a similar expression to the target picture from the candidate virtual face pictures comprises: segmenting a target face picture from the target picture; Detecting a first facial feature point from the target face image; Detecting second facial feature points from each candidate virtual face image; Performing feature matching on the second facial feature points of each candidate virtual face image with the first facial feature points; The candidate virtual face picture corresponding to the second face feature point with the highest matching degree is determined as the target virtual face picture.

7. The method for generating pictures based on artificial intelligence according to claim 1, characterized in that: The performing face replacement on the target image according to the target virtual face image comprises: adjusting the second face feature points of the target virtual face image according to the first face feature points; and replacing the face area in the target image with the adjusted target virtual face image.

8. The picture generation system based on artificial intelligence is characterized by: The system comprises: an acquisition module, used to acquire user input information and user characteristics of a user; A first determination module, configured to determine at least one preferred clothing combination through a clothing database based on the user input information and the user characteristics; A generating module, configured to generate at least one initial image based on the user characteristics and the at least one preferred clothing combination; A second determination module is used to perform at least one round of iteration on the at least one initial image until an iteration end condition is met to determine a target image; Wherein, the at least one round includes: Generate at least one second candidate image of the current round based on at least one first candidate image and at least one set of first evaluation values ​​of the at least one first candidate image, wherein the at least one first candidate image includes at least one initial image or at least one second candidate image generated in the previous round of iterations; Evaluate the coordination of the at least one second candidate image to determine at least one set of second evaluation values; and determine whether the iteration end condition is satisfied based on the at least one set of second evaluation values; In response to no, proceed to the next iteration; In response to this, the iteration ends, and the target image is determined based on the at least one second candidate image and the at least one set of second evaluation values.

9. The artificial intelligence-based picture generation system according to claim 8, characterized in that: The first determination module is further used to: determine the user's clothing preference characteristics based on the user input information and the user characteristics; Based on the clothing preference feature, the at least one preferred clothing combination is determined through the clothing database.

10. The artificial intelligence-based picture generation system according to claim 8, characterized in that: The second determination module is further used to: determine the to-be-adjusted element of the at least one first candidate image and an adjustment parameter of the to-be-adjusted element based on the at least one set of first evaluation values, wherein the adjustment parameter includes at least one of an adjustment dimension, an adjustment direction, a position adjustment, and an adjustment amplitude; Based on the adjustment parameter, the element to be adjusted is adjusted to generate the at least one second candidate image.