An image generation method, apparatus, electronic device, and storage medium
By extracting and recognizing frames from the video to be analyzed, and using a large image editing model to automatically determine and edit the image region of the target object, the problem of time-consuming and labor-intensive production of traditional promotional posters is solved, and the efficiency of quickly generating target images is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI IQIYI NEW MEDIA TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional poster production relies on manual labor, which is time-consuming and labor-intensive, making it difficult to meet the needs of fast-paced, large-scale advertising.
By acquiring the video to be analyzed and reference images of the target object, the large image editing model is used to extract and identify video frames, automatically determine the image region of the target object, and perform image editing to generate the target image.
It enables automatic and rapid generation of images including target objects, improving image generation efficiency and making it suitable for large-scale and real-time production of promotional posters.
Smart Images

Figure CN122265455A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image generation technology, and in particular to an image generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Traditional methods of creating promotional posters heavily rely on manual labor by designers. Specifically, designers need to manually sift through a massive amount of raw images to select those relevant to the target audience and aligned with the promotional intent. They then need to perform tedious post-processing on these selected images. For example, for a promotional poster featuring a person, the designer needs to select images from a vast collection of portraits that include the target individual and fit the promotional intent. Then, they need to refine the portrait, optimize the background, and integrate text within the image to ultimately obtain the target image.
[0003] The entire process is not only time-consuming, labor-intensive, and costly, but also has low production efficiency, making it difficult to meet the needs of fast-paced, large-scale promotion. Summary of the Invention
[0004] The purpose of this invention is to provide an image generation method, apparatus, electronic device, and storage medium to achieve automatic and rapid generation of images including target objects. The specific technical solution is as follows:
[0005] In a first aspect, embodiments of the present invention provide an image generation method, the method comprising:
[0006] Acquire the video to be analyzed and a reference image of the target object, wherein the reference image is used to provide the identification features of the target object;
[0007] Frames are extracted from the video to be analyzed to obtain the original images;
[0008] Based on the recognition features of the target object in the reference image, an image region including the target object is identified in the original image;
[0009] The image region and image editing instructions are input into the large image editing model to obtain a target image including the target object, generated by the large image editing model performing image editing on the background region other than the target object in the image region according to the image editing instructions.
[0010] Optionally, the reference image includes a facial image of the target object;
[0011] The step of determining the image region including the target object in the original image based on the reference image includes:
[0012] For each original image, face detection is performed on the original image to determine each face region in the original image. Based on the similarity between the face in each face region and the face in the face image, it is determined whether the original image includes the target object. If so, the original image is determined as an intermediate image.
[0013] For each intermediate image, body detection is performed on the intermediate image to determine each body region in the intermediate image. Among the body regions, the body region that has the greatest overlap with the target face region and satisfies the preset overlap condition is determined as the image region in the original image that includes the target object. The target face region is: the face region in each face region whose similarity with the face image is greater than a preset similarity threshold.
[0014] Optionally, the method further includes:
[0015] Perform semantic segmentation on the intermediate image to obtain the segmentation mask for each object in the intermediate image;
[0016] Among the various segmentation masks, the segmentation mask corresponding to the image region is determined and used as the segmentation mask of the target object;
[0017] Based on the segmentation mask of the target object, a mask image of the intermediate image is generated, wherein the mask image is used to cover other regions in the intermediate image except for the target object;
[0018] The step of inputting the image region and image editing instructions into the large image editing model includes:
[0019] The intermediate image, the mask image, and the image editing instructions are input into the large image editing model, so that the large image editing model performs image editing on the background area of the intermediate image, excluding the target object, based on the mask image.
[0020] Optionally, the method further includes:
[0021] Obtain the scene size of the target image;
[0022] Before inputting the image region and image editing instructions into the large image editing model, the method further includes:
[0023] Perform body key point recognition on the image region to determine the identifiable body key points of the target object in the image region;
[0024] Based on the correspondence between the various body key points of the target object identified from the image region, the preset image frame, and the visibility of each body key point, the image frame to which the image region belongs is determined;
[0025] If the image region belongs to the target image scene, the step of inputting the image region and image editing instructions into the large image editing model is performed.
[0026] Optionally, before inputting the image region and image editing instructions into the large image editing model, the method further includes:
[0027] Reference information and image design instructions are input into a visual multimodal large model to obtain a promotional image design scheme generated by the visual multimodal large model based on the image design instructions and processing the reference information, which is used as the image editing instructions; wherein, the image design instructions are used to instruct the visual multimodal large model to generate a promotional image design scheme based on the provided reference information, the reference information including: the image region, or, the image region and reference data used to guide the image design scheme.
[0028] Optionally, after obtaining the target image including the target object output by the large image editing model, the method further includes:
[0029] The target image is input into a pre-trained image quality assessment model to obtain an image quality score obtained by the image quality assessment model for the target image. The image quality assessment model is trained based on sample images and their corresponding image quality scores.
[0030] When the image quality score is greater than a preset score threshold, the target image is output.
[0031] Secondly, embodiments of the present invention provide an image generation apparatus, the apparatus comprising:
[0032] An acquisition module is used to acquire the video to be analyzed and a reference image of the target object, wherein the reference image is used to provide the identification features of the target object;
[0033] The frame extraction module is used to extract frames from the video to be analyzed to obtain each original image.
[0034] A region determination module is used to identify an image region including the target object in the original image based on the recognition features of the target object in the reference image;
[0035] The image acquisition module is used to input the image region and image editing instructions into the image editing large model, and acquire the target image including the target object generated by the image editing large model according to the image editing instructions, performing image editing on the background region of the image region excluding the target object.
[0036] Optionally, the reference image includes a facial image of the target object;
[0037] The region determination module includes:
[0038] The face detection unit is used to perform face detection on each original image, determine each face region in the original image, and determine whether the original image includes the target object based on the similarity between the face in each face region and the face in the face image. If so, the original image is determined as an intermediate image.
[0039] A body detection unit is used to perform body detection on each intermediate image to determine each body region in the intermediate image. The body region that has the greatest overlap with the target face region and satisfies a preset overlap condition is determined as the image region in the original image that includes the target object. The target face region is defined as the face region in each face region whose similarity to the face image is greater than a preset similarity threshold.
[0040] Optionally, the device further includes:
[0041] A mask image generation module is used to perform semantic segmentation on the intermediate image to obtain segmentation masks for each object in the intermediate image; determine the segmentation mask corresponding to the image region from each segmentation mask as the segmentation mask for the target object; and generate a mask image of the intermediate image based on the segmentation mask of the target object, wherein the mask image is used to cover other regions in the intermediate image except for the target object.
[0042] The image acquisition module is specifically used to input the intermediate image, the mask image, and the image editing instructions into the large image editing model, so that the large image editing model performs image editing on the background area of the intermediate image, excluding the target object, based on the mask image.
[0043] Optionally, the acquisition module is further configured to acquire the scene size of the target image;
[0044] The device further includes:
[0045] The key point recognition module is used to perform body key point recognition on the image region and determine the body key points of the target object that can be identified in the image region.
[0046] The scene recognition module is used to determine the image scene to which the image region belongs based on the correspondence between each body key point of the target object identified from the image region and the preset image scene and the visibility of each body key point; if the image region belongs to the target image scene, the execution of the image acquisition module is triggered.
[0047] Optionally, the device further includes:
[0048] The image editing instruction acquisition module is used to input reference information and image design instructions into the visual multimodal large model, and acquire the promotional image design scheme generated by the visual multimodal large model in processing the reference information according to the image design instructions, as the image editing instruction; wherein, the image design instruction is used to instruct the visual multimodal large model to generate the promotional image design scheme based on the provided reference information, the reference information including: the image region, or, the image region and reference data for guiding the image design scheme.
[0049] Optionally, the device further includes:
[0050] The image quality assessment module is used to input the target image into a pre-trained image quality assessment model and obtain the image quality score obtained by the image quality assessment model in assessing the image quality of the target image. The image quality assessment model is trained based on sample images and their corresponding image quality scores.
[0051] The image output module is used to output the target image when the image quality score is greater than a preset score threshold.
[0052] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0053] Memory, used to store computer programs;
[0054] When a processor executes a program stored in memory, it implements any of the methods described in the first aspect above.
[0055] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.
[0056] In the solution provided by this invention, the electronic device extracts and identifies frames from the video to be analyzed, automatically determining the frames containing the target object (i.e., image regions in the original image containing the target object) from a massive amount of video footage. The electronic device then inputs the frames containing the target object and image editing instructions into a large-scale image editing model. Based on the image editing instructions, the model is instructed to perform image editing on the frames to obtain a target image containing the target object. Thus, the electronic device automatically captures frames of the target object in the video and automatically generates images containing the target object based on those frames, greatly improving image generation efficiency. Applied to the scenario of generating promotional posters, only the relevant video of the target object needs to be input into the electronic device as the video to be analyzed; the electronic device can then automatically and quickly generate promotional images of the target object, providing a feasible technical solution for the large-scale and real-time production of promotional images. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0058] Figure 1 This is a schematic flowchart of an image generation method provided in an embodiment of the present invention;
[0059] Figure 2 Based on Figure 1 A flowchart illustrating an image region determination method according to the embodiment shown;
[0060] Figure 3 Based on Figure 1 A schematic diagram of a first specific process of the image generation method in the illustrated embodiment;
[0061] Figure 4 Based on Figure 1 A schematic diagram of a second specific process for the image generation method of the illustrated embodiment;
[0062] Figure 5 Based on Figure 1 A schematic diagram of a third specific process for the image generation method in the illustrated embodiment;
[0063] Figure 6 This is a schematic diagram of a specific process of the image generation method provided in an embodiment of the present invention;
[0064] Figure 7 This is a schematic flowchart illustrating an example of the image generation method provided in an embodiment of the present invention.
[0065] Figure 8 This is a schematic diagram of the structure of an image generation apparatus provided in an embodiment of the present invention;
[0066] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0067] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0068] To automatically and quickly generate images including target objects, embodiments of the present invention provide an image generation method, apparatus, electronic device, computer-readable storage medium, and computer program product. The image generation method provided by the embodiments of the present invention will be introduced first.
[0069] The image generation method provided in this embodiment of the invention can be applied to any electronic device that needs to generate images, such as mobile phones, computers, servers, etc. This invention does not make specific limitations on these devices. For clarity, they are collectively referred to as electronic devices below.
[0070] like Figure 1 As shown, an image generation method includes:
[0071] S101, Obtain the video to be analyzed and the reference image of the target object.
[0072] S102, extract frames from the video to be analyzed to obtain the original images.
[0073] S103, based on the recognition features of the target object in the reference image, identify the image region containing the target object in the original image.
[0074] S104, input the image region and image editing instructions into the large image editing model, and obtain the target image including the target object generated by the large image editing model performing image editing on the background region other than the target object in the image region according to the image editing instructions.
[0075] In the solution provided by this invention, the electronic device extracts and identifies frames from the video to be analyzed, automatically determining the frames containing the target object (i.e., image regions in the original image containing the target object) from a massive amount of video footage. The electronic device then inputs the frames containing the target object and image editing instructions into a large-scale image editing model. Based on the image editing instructions, the model is instructed to perform image editing on the frames to obtain a target image containing the target object. Thus, the electronic device automatically captures frames of the target object in the video and automatically generates images containing the target object based on those frames, greatly improving image generation efficiency. Applied to the scenario of generating promotional posters, only the relevant video of the target object needs to be input into the electronic device as the video to be analyzed; the electronic device can then automatically and quickly generate promotional images of the target object, providing a feasible technical solution for the large-scale and real-time production of promotional images.
[0076] For step S101:
[0077] When it is necessary to generate an image that includes one or more objects, the user can input "the video content that includes these objects" and "reference images of these objects (used to provide identification features of these objects when extracting scenes of these objects from the video)" into the electronic device. The electronic device can then obtain the video to be analyzed and the reference image of the target object. The target object can be a person, robot, doll, cartoon character, anthropomorphic animal, etc. This embodiment of the invention does not specifically limit the type of target object.
[0078] For example, before a variety show episode goes live, in order to generate a poster of guest A from that episode for pre-release promotion, users can input the video of the episode (the video to be analyzed) and the facial image of guest A (the reference image) into an electronic device, which will then generate an image including guest A.
[0079] For example, to promote the couple guests on a show, users can input the show's video (the video to be analyzed) and the facial images of the two guests (reference images) into an electronic device. The electronic device will then generate an image including the two guests based on their scenes together on the show.
[0080] For example, before the release of an animated film, in order to generate promotional posters for the film based on the anthropomorphic animal protagonist in the animated film, users can input the animated film (the video to be analyzed) and the image of the animal protagonist (the reference image) into an electronic device, which will then generate an image including the animal protagonist.
[0081] For step S102:
[0082] Because the video to be analyzed contains a large number of video frames, processing each video frame would greatly increase the computational load on the electronic device. Therefore, after obtaining the video to be analyzed, the electronic device can first extract frames from the video to be analyzed, and then use the video frames obtained from the frame extraction process as the original images to be processed later.
[0083] Electronic devices may perform frame extraction in, but are not limited to, the following ways:
[0084] In the first method, the electronic device can perform frame extraction processing at preset time intervals, for example, extracting a video frame as an original image every 1 second.
[0085] In the second approach, the electronic device can extract keyframes, or I-frames (IntraFrames), from the video to be analyzed as individual raw images.
[0086] In the third method, when the video to be analyzed is an already uploaded video, the electronic device can identify highlights by analyzing the video's playback history and bullet comments (danmaku) information. For example, segments with high user rewatch rates, segments with a surge in bullet comments, and segments with bullet comments containing keywords such as "high energy ahead," "so handsome," or "so beautiful" are identified as highlights. The electronic device can then use the individual video frames of these highlights as individual original images.
[0087] For step S103:
[0088] After acquiring the original image, the electronic device can first analyze whether the original image contains the target object by referring to the recognition features of the target object in the reference image. If the target object is present in the original image, its location within the image can be determined, thus identifying the image region containing the target object. The specific method for determining this image region will be discussed later. Figure 2 The embodiments shown are described in detail, and will not be repeated here.
[0089] For step S104:
[0090] Since the image regions are extracted directly from the video to be analyzed, they often fail to meet the user's desired visual experience in terms of composition, color representation, and visual impact. Therefore, after extracting the image region containing the target object, the electronic device can use a large image editing model (such as Nano Banana, JiMeng 4.0, or Qwen ImageEdit) to perform targeted optimization processing, thereby generating an image that meets the user's desired visual experience.
[0091] Based on this, in order to instruct the large image editing model to perform targeted optimization processing on the image region, the electronic device can also acquire image editing instructions to instruct the large image editing model on the image region, and then input the image editing instructions and the image region together into the large image editing model, thereby obtaining the target image including the target object generated by the large image editing model performing image editing on the background area of the image region excluding the target object under the instruction of the image editing instructions.
[0092] For "image editing instructions", electronic devices can obtain them through, but are not limited to, the following methods:
[0093] In one approach, the electronic device can directly receive user-input prompts as image editing instructions. For example, a user could input a prompt into the electronic device: "You are a professional poster designer. Based on the provided image, please retain the human subject, add sci-fi neon lighting effects, and generate a promotional poster with a technological feel." The electronic device can then use this prompt as an image editing instruction.
[0094] In another approach, the electronic device can input an image region into a large visual multimodal model, which then generates image editing instructions for that region. The specific implementation will be discussed later. Figure 5 The embodiments shown are described in detail, and will not be repeated here.
[0095] It should be noted that when inputting an image region into the large image editing model, the image region can be cropped from the original image and then input into the large image editing model, or a segmentation mask can be generated on the original image to cover other content in the original image except for the image region, and then the original image including the segmentation mask can be input into the large image editing model.
[0096] As one embodiment of the present invention, such as Figure 2 As shown, the reference image includes a facial image of the target object; when the electronic device performs step S103, it can specifically achieve this through steps S201-S202:
[0097] S201, For each original image, perform face detection on the original image to determine each face region in the original image. Based on the similarity between the face in each face region and the face in the face image, determine whether the original image includes the target object. If so, determine the original image as an intermediate image.
[0098] For each original image, the electronic device can first determine whether it includes the target object through face detection and face comparison, that is, determine whether the original image can be used as an intermediate image. Specifically:
[0099] Electronic devices can first perform face detection on the original image using a pre-trained face detection model, existing face detection algorithms, etc., to determine each face region in the original image. The detected face regions can be identified using region bounding boxes, pixel-level masks, or key point contours. This embodiment of the invention does not specifically limit this.
[0100] Furthermore, for each detected facial region, the electronic device can extract the facial features in that region and compare them with the facial features extracted from the facial image of the target object, thereby determining the similarity between the face in that region and the face in the facial image.
[0101] If, among the facial regions detected from the original image, there exists a facial region whose facial similarity to the facial image is greater than a preset similarity threshold, then the original image can be determined to be an image containing the target object. Therefore, the original image can be used as an intermediate image, and correspondingly, the facial regions whose facial similarity to the facial image is greater than a preset similarity threshold can be used as the target facial regions in the intermediate image.
[0102] S202, For each intermediate image, perform body detection on the intermediate image to determine each body region in the intermediate image, and determine the body region in the original image that has the largest overlap with the target face region and satisfies the preset overlap condition.
[0103] For each intermediate image (i.e., an image that includes the target object), the electronic device can further determine the position of the target object within that intermediate image, specifically:
[0104] Electronic devices can first perform body detection on the intermediate image using a pre-trained body detection model or existing body detection algorithms to determine each body region in the intermediate image. The detected body regions can be identified using region bounding boxes, pixel-level masks, or key point contours. This embodiment of the invention does not specifically limit this.
[0105] Furthermore, for each detected body region, the electronic device can determine the overlap between that body region and the target face region. By judging whether the overlap between the body region and the target face region meets preset overlap conditions, it can determine whether the body region and the target face region correspond to the same object in the image. The preset overlap conditions will be explained in detail in a later section and will not be repeated here.
[0106] If the overlap between the body region and the target face region meets the preset overlap conditions, in order to avoid the problem of misidentification caused by the two objects overlapping, the electronic device can further select the body region with the largest overlap with the target face region from each body region that meets the preset overlap conditions, and determine it as the image region in the original image that includes the target object.
[0107] For example, when a child stands in front of an adult, the child's face will overlap with both the child's and the adult's body areas. However, the overlap between the child's face and the adult's body area is the greatest (e.g., the child's face occupies 1 / 5 of the child's body and 1 / 10 of the adult's body). The body area with the greatest overlap (i.e., the child's body area) can be identified as the image area in the original image that includes the target object.
[0108] The aforementioned preset overlap conditions may include, but are not limited to, the following two forms:
[0109] 1. The proportion of the face area that overlaps with the body area is greater than the preset proportion.
[0110] The electronic device can first determine the number of pixels occupied by the overlapping part of the face region and the body region, that is, determine how many pixels in the face region also belong to the body region. Then, it calculates the ratio between the number of pixels in the face region and the number of pixels occupied by the face region. If the ratio is greater than a preset ratio, it is determined that the body region and the face region meet the preset overlap condition.
[0111] 2. The cross-union ratio between the body region and the face region is greater than the preset cross-union ratio threshold.
[0112] The electronic device can determine the intersection between the body region and the face region, that is, determine how many pixels belong to both the body region and the face region, and determine the union between the body region and the face region, that is, determine how many pixels belong to either the body region or the face region. Then, it calculates the ratio between the number of pixels corresponding to the intersection and the number of pixels corresponding to the union. If the ratio is greater than a preset intersection-union ratio threshold, it is determined that the body region and the face region meet the preset overlap condition.
[0113] It should be noted that the "preset intersection-union ratio threshold" mentioned here can change depending on the image framing of the body area. Specifically, for the same object, the ratio between the face area and body area gradually decreases in close-up, medium shot, and full shot framing. Correspondingly, the preset intersection-union ratio threshold in the preset overlap condition should also decrease accordingly. For example, in close-up framing, the preset intersection-union ratio threshold is 70%, in medium shot framing, it is 50%, in medium shot framing, it is 20%, and in full shot framing, it is 5%.
[0114] Therefore, when determining whether the body region and the face region meet the preset overlap conditions using the cross-union ratio (CUP), the electronic device can first determine the image frame to which the body region belongs by identifying the body key points included in the body region, and then use the preset CUP threshold corresponding to that image frame as the CUP threshold in the preset overlap conditions. The method for determining the image frame based on body key points will be discussed later. Figure 3 The embodiments shown are described in detail, and will not be repeated here.
[0115] In the solution provided by the embodiments of the present invention, the electronic device can first determine whether the original image includes a target object through face detection, and then, if the original image includes a target object, determine the body region corresponding to the target object based on the overlap between the face region and the body region, thereby accurately determining the image region in the original image that includes the target object.
[0116] Apart from Figure 2 The electronic device can also implement step S103 in other ways as shown, and the embodiments of the present invention do not specifically limit this:
[0117] For example, an electronic device can perform body detection on each original image to identify various body regions within that image. Then, for each body region, it determines whether the body region is a body region of the target object based on the similarity between the face in that body region and the face in the face image. If so, the body region is identified as an image region in the original image that includes the target object.
[0118] For example, for a specific target object, a detection model (YOLO, convolutional neural network, etc.) can be trained based on various images containing that target object. In this way, for each original image, the electronic device can directly input the original image into the detection model, and then obtain the bounding box or segmentation mask of the target object in the original image output by the detection model, thereby determining the image region in the original image that includes the target object.
[0119] As one embodiment of the present invention, the electronic device can calculate the sharpness of an image to determine whether to perform subsequent operations. Specifically:
[0120] In one approach, before executing step S201, the electronic device may first calculate the sharpness of each original image and determine whether the sharpness of the original image is greater than a preset sharpness threshold. Then, step S201 is executed only for the original images whose sharpness is greater than the preset sharpness threshold.
[0121] In another approach, after the electronic device obtains each intermediate image by performing step S201, it can first calculate the sharpness of each intermediate image and determine whether the sharpness of the intermediate image is greater than a preset sharpness threshold. Then, it can only perform step S202 for the intermediate images whose sharpness is greater than the preset sharpness threshold.
[0122] The method for calculating sharpness can employ existing algorithms or models, and this embodiment of the invention does not impose specific limitations on this. For example, the image can first be converted to a grayscale image, then convolved with the grayscale image using the Laplacian operator, and finally the variance of the convolution result can be calculated. Since the calculated variance value reflects the high-frequency detail content in the image, the higher the variance value, the sharper the image, so the calculated variance value can be used as the image sharpness.
[0123] In the solution provided by this embodiment of the invention, the electronic device performs a sharpness determination step before executing step S201, which avoids performing subsequent face detection and body detection operations on images with low sharpness, thereby saving computing resources. Performing the sharpness determination step after executing step S201 allows the electronic device to calculate sharpness only for images containing the target object, avoiding invalid sharpness calculation operations and thus saving computing resources.
[0124] As one embodiment of the present invention, when an electronic device inputs an image region into a large image editing model, it can crop the image region from the original image and then input the cropped image region into the large image editing model. Alternatively, it can use a masking image to input only the image region into the large image editing model. These two methods will be described below.
[0125] In the first approach, the electronic device can crop out the identified image region containing the target object from the original image, thus obtaining a partial image containing only the target object. Then, the electronic device inputs this partial image and image editing instructions into a large image editing model. Since other objects from the original image have been excluded from the partial image, the influence of other objects from the original image on the image editing process can be avoided when the large image editing model performs image editing.
[0126] In the second method, the electronic device indicates the target object region (including the image region of the target object) for image editing through a mask image, specifically including the following steps:
[0127] Step A1: Perform semantic segmentation on the intermediate image to obtain the segmentation mask for each object in the intermediate image.
[0128] After identifying the image region containing the target object, the electronic device can perform semantic segmentation on the intermediate image to more accurately indicate the target object region targeted by the large-scale image editing model. Specifically, the electronic device can use a pre-trained semantic segmentation model to process the intermediate image, obtain the object category to which each pixel in the image belongs, and thus generate a segmentation mask for each object in the intermediate image.
[0129] Step A2: Determine the segmentation mask corresponding to the image region from each segmentation mask, and use it as the segmentation mask for the target object.
[0130] After obtaining the segmentation masks of each object in the intermediate image, the electronic device needs to find the segmentation mask corresponding to the previously determined image region from these segmentation masks, i.e., the segmentation mask of the target object. Specifically, the electronic device can compare the image region (body region) determined in step S202 with each segmentation mask, calculate the degree of overlap between the image region and each segmentation mask, and determine the segmentation mask with the largest overlap (e.g., the largest intersection-union ratio) and exceeding a preset threshold as the segmentation mask of the target object. Alternatively, if the image region itself is obtained through semantic segmentation (i.e., each body region is a segmentation mask), then the "segmentation mask of the image region in the original image that is determined to include the target object" can be directly used as the segmentation mask of the target object.
[0131] Step A3: Generate a mask image for the intermediate image based on the segmentation mask of the target object.
[0132] The electronic device generates a mask image based on the segmentation mask of the determined target object. The mask image has the same size as the intermediate image. In the mask image, the pixel values corresponding to the segmentation mask of the target object are set to a first value (representing the area to be preserved), while the pixel values of other pixels in the mask image (pixels in the background area or other object areas) are set to a second value (representing the area to be edited). In this way, the mask image clearly identifies the target object area that needs to remain unchanged, and the background area that allows for editing of the larger image model.
[0133] When an electronic device uses a mask image to indicate the target area for image editing, after obtaining the mask image, the electronic device can input the original intermediate image, the generated mask image, and the image editing instructions into a large-scale image editing model. Upon receiving this input, the large-scale image editing model parses the image editing instructions and, based on the indications in the mask image, limits the scope of the image editing operation to the area marked as to be edited within the mask image. During the editing process, the model keeps the content of the target object area (the pixels marked as the preserved area in the mask image) unchanged, only modifying, replacing, enhancing, or adding effects to the background area, ultimately generating a target image that includes the target object and whose background has been edited according to the instructions.
[0134] In the solutions provided by this invention, the method of directly cropping the image region is simple and efficient, and suitable for scenarios where the target and background are clearly distinguishable. The method of generating a mask image through semantic segmentation, on the other hand, enables pixel-level control over the editing range, precisely preserving the complete details of the target object and retaining the global contextual information of the original image, resulting in a more natural blending of the edited background and the target object.
[0135] As one embodiment of the present invention, such as Figure 3 As shown, the electronic device can also perform steps S301-S303:
[0136] S301, Obtain the scene size of the target image.
[0137] When generating an image related to the target object, the user can further set the image type to be generated, that is, set the target image type (at least one of close-up, medium shot, and full shot). Thus, the electronic device can filter the subsequently obtained image areas based on the acquired target image type, and retain only the image areas whose image type is the one set by the user.
[0138] Accordingly, before executing step S104, the electronic device may execute steps S302-S303 to determine the image scene to which the image region belongs:
[0139] S302, perform body key point recognition on the image region to determine the identifiable body key points of the target object in the image region.
[0140] After obtaining an image region, the electronic device can identify key body points such as the head, neck, shoulders, elbows, wrists, hips, knees, and ankles within the image region, thereby determining which key body points of the target object can be identified in the image region. The identification of key body points can be achieved based on existing key body point detection algorithms or trained key body point detection models; this embodiment of the invention does not specifically limit the specific implementation.
[0141] S303, based on the correspondence between the key body points of the target object identified from the image region, the preset image frame, and the visibility of each key body point, determine the image frame to which the image region belongs.
[0142] Electronic devices can pre-store the correspondence between image framing and the visibility of key body points. For example, if only head and neck key points are identified from the image area, the framing is determined to be a close-up; if only head, neck, and shoulder key points are identified from the image area, the framing is determined to be a medium shot; if head, neck, shoulder, and elbow key points are identified from the image area, but hip key points are not present, the framing is determined to be a medium shot; and if head, neck, shoulder, elbow, hip, and ankle key points are identified from the image area, the framing is determined to be a full shot.
[0143] Based on this, after identifying the key body points of the target object from the image region, the electronic device can determine the image frame to which the image region belongs according to the above correspondence. If the determined image region belongs to the target image frame, the electronic device can execute step S104; if the determined image region does not belong to the target image frame, the electronic device can discard the image region and not perform further processing.
[0144] In the solution provided by the embodiments of the present invention, the electronic device can further support the user to set the image scene. On this basis, after the electronic device recognizes the scene of the target object in the video to be analyzed, it can filter out the scene belonging to the image scene set by the user by recognizing the body key points of the scene. Then, it can perform subsequent image editing operations only based on these scenes, thereby meeting the user's image generation needs.
[0145] As one embodiment of the present invention, such as Figure 4 As shown, after executing step S104, the electronic device can also execute steps S401-S402:
[0146] S401, Input the target image into the pre-trained image quality assessment model, and obtain the image quality score obtained by the image quality assessment model for the target image.
[0147] An image quality assessment model can be pre-trained based on sample images and their corresponding image quality scores, and then deployed into electronic devices. When an electronic device receives a target image, it can first input the target image into the pre-trained image quality assessment model, which then performs an image quality assessment to obtain the corresponding image quality score.
[0148] In one implementation, the image quality assessment model can be a large model such as VLLM (Visual-Language Large Model). Based on this, in addition to inputting the target image into the image quality assessment model, the electronic device can also input user-preset prompts to instruct the image quality assessment model on the evaluation method and evaluation content of the image, so as to instruct the image quality assessment model to evaluate the quality of the target image in terms of facial clarity, human posture score, expression score, picture composition score, or viewing experience.
[0149] S402: When the image quality score is greater than the preset score threshold, output the target image.
[0150] After obtaining the image quality score of the target image, the electronic device can determine whether the image quality score is greater than a preset score threshold. If it is greater, the target image is output; otherwise, the target image is discarded.
[0151] In one implementation, the user can also set the number of images (i.e., the target number). Based on this, after obtaining all target images with image quality scores greater than a preset score threshold, the electronic device can select and output the target number of target images in descending order of image quality scores. Of course, if the number of target images with image quality scores greater than the preset score threshold is less than the target number, the electronic device can repeat step S104 to increase the number of target images.
[0152] In the solution provided by the embodiments of the present invention, after obtaining the target image, the electronic device can evaluate the target image through a pre-trained image quality evaluation model, thereby ensuring that the final output image is an image of high quality and improving the user experience.
[0153] As one embodiment of the present invention, after the electronic device obtains the target image by performing step S104, it may directly output the target image without performing image quality evaluation.
[0154] As one embodiment of the present invention, such as Figure 5 As shown, before executing step S104, the electronic device may also execute step S501:
[0155] S501, input the reference information and image design instructions into the visual multimodal large model, and obtain the promotional image design scheme generated by the visual multimodal large model by processing the reference information according to the image design instructions.
[0156] As mentioned earlier, electronic devices can input image regions into a visual multimodal large model (such as GPT-4V or Qwen-VL), and then generate image editing methods for the image regions through the visual multimodal large model as image editing instructions. The implementation method will be described in detail below:
[0157] After obtaining the image area, the electronic device can use the image area as reference information. If the electronic device also obtains the image description text and / or reference image input by the user, it can also use these reference data used to guide the image design scheme together with the image area as reference information. That is, the reference information includes one of the following: image area, image area and image description text, image area and reference image, and image area and image description text and reference image.
[0158] Furthermore, the electronic device can input reference information and image design instructions for instructing the visual multimodal large model to generate a promotional image design scheme based on the provided reference information into the visual multimodal large model, obtain the promotional image design scheme generated by the visual multimodal large model in processing the reference information according to the image design instructions, and use it as an image editing instruction.
[0159] For example, an electronic device can input reference information and a message like, "You are a professional poster designer. Based on the provided reference image and style description text, design a promotional poster scheme for the image to be edited, describing in detail the style, tone, lighting, font, and layout suggestions. Please output a detailed text description," into a visual multimodal model, and then obtain the text description output by the visual multimodal model as an image editing instruction.
[0160] In the solution provided by this invention, the electronic device can support the flexible combination of image regions with user-input image description text and reference images to form multi-dimensional reference information. Combined with image design instructions for a large visual multimodal model, it can generate professionally guiding image descriptions as image editing instructions. Furthermore, the image editing instructions accurately guide the large visual multimodal model in image editing, making the target image output by the large image editing model more in line with the needs of the publicity and distribution scenario, while taking into account both the user's personalized needs and the professionalism and accuracy of the editing results.
[0161] The following will combine Figure 6 Here is a specific image generation method provided by an embodiment of the present invention:
[0162] S601, Obtain the scene size of the target image.
[0163] Step S601 is similar to step 301, and will not be described again here.
[0164] S602, Obtain the video to be analyzed and the reference image of the target object.
[0165] S603 performs frame extraction on the video to be analyzed to obtain the original images.
[0166] S604, Based on the recognition features of the target object in the reference image, identify the image region containing the target object in the original image.
[0167] Steps S602-S603 are similar to steps S101-S103, and will not be described again here.
[0168] S605, perform body key point recognition on the image region to determine the identifiable body key points of the target object in the image region.
[0169] S606: Based on the correspondence between the various body key points of the target object identified from the image region, the preset image frame, and the visibility of each body key point, determine the image frame to which the image region belongs. If the image region belongs to the target image frame, proceed to step S607.
[0170] Steps S605-S606 are similar to steps S302-S303, and will not be described again here.
[0171] S607, Input the reference information and image design instructions into the visual multimodal large model, and obtain the promotional image design scheme generated by the visual multimodal large model by processing the reference information according to the image design instructions.
[0172] Step S607 is similar to step S501, and will not be described again here.
[0173] S608, input the image region and image editing instructions into the large image editing model, and obtain the target image including the target object generated by the large image editing model performing image editing on the background region of the image region excluding the target object in accordance with the image editing instructions.
[0174] Step S608 is similar to step S104, and will not be described again here.
[0175] S609, Input the target image into the pre-trained image quality assessment model, and obtain the image quality score obtained by the image quality assessment model in assessing the image quality of the target image.
[0176] S610: When the image quality score is greater than the preset score threshold, output the target image.
[0177] Steps S609-S610 are similar to steps S401-S402, and will not be described again here.
[0178] The following will be based on Figure 7For example, let's introduce the specific application of the image generation method provided in the embodiments of the present invention:
[0179] First, using a variety show video (the video to be analyzed) as the initial input, frame extraction is performed on the video to obtain original images. Simultaneously, a reference image of the target celebrity is obtained by combining the celebrity name input by the user. The original images and reference images obtained after frame extraction are then fed into a face recognition model. Based on the recognition features of the target celebrity in the reference image, the face recognition model identifies and extracts frames containing the target celebrity from the original images, completing the initial screening of the target celebrity's images.
[0180] Subsequently, the extracted images of celebrities are input into the image processing module, which filters out images with clear quality (i.e., images with a clarity greater than a preset clarity threshold) and removes blurry and invalid images to avoid unnecessary computational overhead.
[0181] Next, the filtered clear images of the celebrity are input into the semantic segmentation module. Semantic segmentation removes other people from the image (i.e., generates a segmentation mask for the target celebrity, retaining only the target celebrity area and occluding other areas), accurately locating the image area in the original image that includes the target celebrity.
[0182] Subsequently, for the image regions in the original image that include the target celebrity, on the one hand, they are input into the visual-language large model (i.e., the visual multimodal large model). This model reads the image features and combines them with the user's input style preferences to provide appropriate design ideas (i.e., reads image features / user input style to provide appropriate design ideas) and generates poster design schemes (i.e., image editing instructions, used to guide subsequent image editing operations). On the other hand, they are input into the image editing model (i.e., the image editing large model) as the benchmark for image editing.
[0183] Finally, the image editing model performs editing operations on the background area of the original image containing the target celebrity according to the poster design scheme, generating a promotional poster image (target image) containing the target celebrity, thus realizing the automated generation from variety show video to target celebrity promotional poster.
[0184] Corresponding to the above image generation method, embodiments of the present invention also provide an image generation apparatus, such as... Figure 8 As shown, the device includes:
[0185] The acquisition module 801 is used to acquire the video to be analyzed and a reference image of the target object, wherein the reference image is used to provide the recognition features of the target object;
[0186] The frame extraction module 802 is used to extract frames from the video to be analyzed to obtain the original images.
[0187] The region determination module 803 is used to identify an image region including the target object in the original image based on the recognition features of the target object in the reference image;
[0188] The image acquisition module 804 is used to input the image region and image editing instructions into the image editing large model, and acquire the target image including the target object generated by the image editing large model performing image editing on the background region of the image region excluding the target object in accordance with the image editing instructions.
[0189] As one embodiment of the present invention, the reference image may include a facial image of the target object;
[0190] The region determination module may include:
[0191] The face detection unit is used to perform face detection on each original image, determine each face region in the original image, and determine whether the original image contains a target object based on the similarity between the face in each face region and the face in the face image. If so, the original image is determined as an intermediate image.
[0192] The body detection unit is used to perform body detection on each intermediate image to determine each body region in the intermediate image. The body region with the largest overlap with the target face region that meets the preset overlap conditions is determined as the image region in the original image that includes the target object. The target face region is defined as the face region in each face region whose similarity with the face image is greater than a preset similarity threshold.
[0193] As one embodiment of the present invention, the above-mentioned apparatus may further include:
[0194] The mask image generation module is used to perform semantic segmentation on the intermediate image to obtain the segmentation mask of each object in the intermediate image; determine the segmentation mask corresponding to the image region in each segmentation mask as the segmentation mask of the target object; and generate a mask image of the intermediate image based on the segmentation mask of the target object, wherein the mask image is used to occlude other regions in the intermediate image except for the target object.
[0195] The image acquisition module is specifically used to input the intermediate image, the mask image, and image editing instructions into the large image editing model, so that the large image editing model can perform image editing on the background area of the intermediate image, excluding the target object, based on the mask image.
[0196] As one embodiment of the present invention, the above-described acquisition module can also be used to acquire the scene of the target image;
[0197] The above-mentioned device may further include:
[0198] The key point recognition module is used to identify body key points in an image region and determine the identifiable body key points of the target object in the image region.
[0199] The scene recognition module is used to determine the image scene to which the image region belongs based on the correspondence between the key body points of the target object identified from the image region and the preset image scene and the visibility of each key body point; if the image region belongs to the target image scene, the execution of the image acquisition module is triggered.
[0200] As one embodiment of the present invention, the above-mentioned apparatus may further include:
[0201] The image editing instruction acquisition module is used to input reference information and image design instructions into the visual multimodal large model, and to acquire the promotional image design scheme generated by the visual multimodal large model after processing the reference information according to the image design instructions, as the image editing instruction; wherein, the image design instruction is used to instruct the visual multimodal large model to generate a promotional image design scheme based on the provided reference information, the reference information including: image region, or, image region and reference data used to guide the image design scheme.
[0202] As one embodiment of the present invention, the above-mentioned apparatus may further include:
[0203] The image quality assessment module is used to input the target image into a pre-trained image quality assessment model and obtain the image quality score obtained by the image quality assessment model on the target image. The image quality assessment model is trained based on sample images and their corresponding image quality scores.
[0204] The image output module is used to output the target image when the image quality score is greater than a preset score threshold.
[0205] This invention also provides an electronic device, such as... Figure 9 As shown, it includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0206] Memory 903 is used to store computer programs;
[0207] The processor 901, when executing the program stored in the memory 903, implements the image generation method described in any of the above embodiments.
[0208] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0209] The communication interface is used for communication between the aforementioned terminal and other devices.
[0210] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0211] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0212] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the image generation methods described in the above embodiments.
[0213] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the image generation methods described in the above embodiments.
[0214] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0215] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0216] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0217] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. An image generation method, characterized in that, The method includes: Acquire the video to be analyzed and a reference image of the target object, wherein the reference image is used to provide the identification features of the target object; Frames are extracted from the video to be analyzed to obtain the original images; Based on the recognition features of the target object in the reference image, an image region including the target object is identified in the original image; The image region and image editing instructions are input into the large image editing model to obtain a target image including the target object, generated by the large image editing model performing image editing on the background region other than the target object in the image region according to the image editing instructions.
2. The method according to claim 1, characterized in that, The reference image includes a facial image of the target object; The step of determining the image region including the target object in the original image based on the reference image includes: For each original image, face detection is performed on the original image to determine each face region in the original image. Based on the similarity between the face in each face region and the face in the face image, it is determined whether the original image includes the target object. If so, the original image is determined as an intermediate image. For each intermediate image, body detection is performed on the intermediate image to determine each body region in the intermediate image. Among the body regions, the body region that has the greatest overlap with the target face region and satisfies the preset overlap condition is determined as the image region in the original image that includes the target object. The target face region is: the face region in each face region whose similarity with the face image is greater than a preset similarity threshold.
3. The method according to claim 2, characterized in that, The method further includes: Perform semantic segmentation on the intermediate image to obtain the segmentation mask for each object in the intermediate image; Among the various segmentation masks, the segmentation mask corresponding to the image region is determined and used as the segmentation mask of the target object; Based on the segmentation mask of the target object, a mask image of the intermediate image is generated, wherein the mask image is used to cover other regions in the intermediate image except for the target object; The step of inputting the image region and image editing instructions into the large image editing model includes: The intermediate image, the mask image, and the image editing instructions are input into the large image editing model, so that the large image editing model performs image editing on the background area of the intermediate image, excluding the target object, based on the mask image.
4. The method according to claim 1, characterized in that, The method further includes: Obtain the scene size of the target image; Before inputting the image region and image editing instructions into the large image editing model, the method further includes: Perform body key point recognition on the image region to determine the identifiable body key points of the target object in the image region; Based on the correspondence between the various body key points of the target object identified from the image region, the preset image frame, and the visibility of each body key point, the image frame to which the image region belongs is determined; If the image region belongs to the target image scene, the step of inputting the image region and image editing instructions into the large image editing model is performed.
5. The method according to any one of claims 1-4, characterized in that, Before inputting the image region and image editing instructions into the large image editing model, the method further includes: Reference information and image design instructions are input into a visual multimodal large model to obtain a promotional image design scheme generated by the visual multimodal large model based on the image design instructions and processing the reference information, which is used as the image editing instructions; wherein, the image design instructions are used to instruct the visual multimodal large model to generate a promotional image design scheme based on the provided reference information, the reference information including: the image region, or, the image region and reference data used to guide the image design scheme.
6. The method according to any one of claims 1-4, characterized in that, After obtaining the target image, which includes the target object, output by the large image editing model, the method further includes: The target image is input into a pre-trained image quality assessment model to obtain an image quality score obtained by the image quality assessment model for the target image. The image quality assessment model is trained based on sample images and their corresponding image quality scores. When the image quality score is greater than a preset score threshold, the target image is output.
7. An image generation apparatus, characterized in that, The device includes: An acquisition module is used to acquire the video to be analyzed and a reference image of the target object, wherein the reference image is used to provide the identification features of the target object; The frame extraction module is used to extract frames from the video to be analyzed to obtain each original image. A region determination module is used to identify an image region including the target object in the original image based on the recognition features of the target object in the reference image; The image acquisition module is used to input the image region and image editing instructions into the image editing large model, and acquire the target image including the target object generated by the image editing large model according to the image editing instructions, performing image editing on the background region of the image region excluding the target object.
8. The apparatus according to claim 7, characterized in that, The reference image includes a facial image of the target object; the region determination module includes: a face detection unit, configured to perform face detection on each original image, determine each face region in the original image, and determine whether the original image includes the target object based on the similarity between the face in each face region and the face in the face image; if so, the original image is determined as an intermediate image; a body detection unit, configured to perform body detection on each intermediate image, determine each body region in the intermediate image, and determine the body region in each body region that has the greatest overlap with the target face region and satisfies a preset overlap condition as the image region in the original image that includes the target object, wherein the target face region is: the face region in each face region that has a similarity greater than a preset similarity threshold with the face image; And / or, The apparatus further includes: a mask image generation module, configured to perform semantic segmentation on the intermediate image to obtain segmentation masks for each object in the intermediate image; determine a segmentation mask corresponding to the image region from each segmentation mask, and use it as the segmentation mask for the target object; generate a mask image of the intermediate image based on the segmentation mask of the target object, wherein the mask image is used to mask other regions in the intermediate image except for the target object; and an image acquisition module, specifically configured to input the intermediate image, the mask image, and image editing instructions into an image editing large model, so that the image editing large model performs image editing on the background region in the intermediate image except for the target object based on the mask image. And / or, The acquisition module is further configured to acquire the target image scene; the device further includes: a key point recognition module, configured to perform body key point recognition on the image region to determine the identifiable body key points of the target object in the image region; a scene recognition module, configured to determine the image scene to which the image region belongs based on the correspondence between each body key point of the target object identified from the image region, a preset image scene, and the visibility of each body key point; and to trigger the execution of the image acquisition module when the image region belongs to the target image scene. And / or, The device further includes: An image editing instruction acquisition module is used to input reference information and image design instructions into a visual multimodal large model, and acquire a promotional image design scheme generated by the visual multimodal large model processing the reference information according to the image design instructions, as the image editing instruction; wherein, the image design instruction is used to instruct the visual multimodal large model to generate a promotional image design scheme based on the provided reference information, the reference information including: the image region, or, the image region and reference data for guiding the image design scheme; And / or, The device further includes: an image quality assessment module, used to input the target image into a pre-trained image quality assessment model, and obtain an image quality score obtained by the image quality assessment model from the image quality assessment of the target image, wherein the image quality assessment model is trained based on sample images and their corresponding image quality scores; and an image output module, used to output the target image when the image quality score is greater than a preset score threshold.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.