Data processing method and apparatus for image generation

By extracting image descriptors from the base map data using a deep learning model, the problem of poor base map generation in existing technologies is solved, and target image generation with consistent base map style is achieved, thus improving the effect and diversity of image generation.

CN116433468BActive Publication Date: 2026-11-27特赞(上海)信息科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310154767.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2026-11-27
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

The existing technology produces poor image quality by generating images from a base map, mainly because the descriptive words in the preset descriptive word database do not match the style of the base map, resulting in poor image reproduction.

Method used

By performing image descriptive word extraction processing on the base map data based on a deep learning model, including the extraction of image style, color, and details, and combining a preset model and database, descriptive words consistent with the style of the base map are generated for image generation.

Benefits of technology

It improves the effect of generating target images from base maps, making the generated images consistent with the style of the base map, and increasing the diversity and detail of the images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433468B_ABST
    Figure CN116433468B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device for image generation. By acquiring image requirement data, the image requirement data includes base map data and user description data, the base map data is base map data used for generating a target image; the base map data is subjected to deep learning model-based image description word extraction processing to obtain image description word data, the image description word data is description word data used for representing a base map used for generating a target image; and image generation processing is performed according to the image description word data and the user description data to obtain the target image. In the process of generating the target image according to the base map, the base map is subjected to image style extraction, the image style of the target image is determined according to the extracted base map image style, the target image with the same style as the base map but variable image content is generated, the problem that the effect is poor in the prior art when generating an image according to a base map is solved, and the image effect of the target image generated according to the base map is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more specifically, to a data processing method and apparatus for image generation. Background Technology

[0002] With the continuous development of information technology, AI algorithms for generating images from text have developed rapidly. This development has led to the widespread application of AI painting, where creators can generate new images that match the style of the descriptive words or background images by inputting them. In the field of text-to-image generation, the construction of descriptive words has a significant impact on the quality of the generated image. When generating a target image from a background image, existing technologies determine the corresponding descriptive words for the background image using a pre-set descriptive word database. However, since the descriptive words in the pre-set database are all commonly used descriptive words, the style reproduction of the background image is poor when generating a target image based on these common descriptive words, resulting in poor image quality.

[0003] Therefore, existing technologies for generating images from base maps suffer from poor image quality. Summary of the Invention

[0004] The main objective of this application is to provide a data processing method and apparatus for image generation, in order to solve the problem of poor image generation from a base image in the prior art, and to improve the image quality of target images generated from a base image in AI painting.

[0005] To achieve the above objectives, a first aspect of this application proposes a data processing method for image generation, comprising:

[0006] Obtain image requirement data, wherein the image requirement data includes base map data and user description data, and the base map data is the base map data used to generate the target image;

[0007] The base map data is processed by extracting image descriptors based on a deep learning model to obtain image descriptor data, wherein the image descriptor data is descriptor data used to represent the base map of the target image;

[0008] The target image is obtained by performing image generation processing based on the image descriptor data and the user description data.

[0009] In some optional embodiments of this application, the image descriptor data obtained by performing image descriptor extraction processing based on a deep learning model on the base map data includes:

[0010] Based on a preset style extraction model, image style data is extracted from the base map data to obtain image style data, wherein the image style data is style data used to represent the style used to generate the target image base map;

[0011] The base map data is subjected to image color extraction processing to obtain image color data, wherein the image color data is color data used to represent the base map of the target image;

[0012] The base map data is supplemented with image details based on a preset detail database to obtain image detail data, wherein the image detail data is detail data used to represent the image;

[0013] The image descriptive data is determined based on the image style data, the image color data, and the image detail data.

[0014] In some optional embodiments of this application, image style data is obtained by performing image style extraction on the base map data based on a preset style extraction model, including:

[0015] The base map data is subjected to a first image style extraction process based on a preset image style descriptor matching model to obtain first image style data, wherein the first image style data is the base map style descriptor data after the first image style extraction process.

[0016] The base map data is processed by a second image style extraction based on a preset visual question answering model to obtain second image style data, wherein the second image style data is the base map style descriptive word data after the second image style extraction processing;

[0017] The image style data is determined based on the first image style data and the second image style data.

[0018] In some optional embodiments of this application, the base map data is subjected to a first image style extraction process based on a preset image style descriptor matching model to obtain first image style data, including:

[0019] The base map data is subjected to image coding-based vector extraction processing to obtain image vector data, wherein the image vector data is data used to represent the base map image vector;

[0020] The preset image style descriptors are subjected to vector extraction processing based on text encoding to obtain text vector data, wherein the text vector data is data used to represent the text vectors of the preset image style descriptors;

[0021] The image vector data and the text vector data are filtered based on similarity to obtain the first image style data, wherein the first image style data is the data of preset image style descriptive words corresponding to text vectors that satisfy preset similarity rules.

[0022] In some optional embodiments of this application, the base map data is subjected to a second image style extraction process based on a preset visual question-answering model to obtain second image style data, including:

[0023] Based on a preset visual question-answering model, the base map data is processed by image style extraction based on a preset first style question-answering to obtain first question-answering image style data, wherein the first question-answering image style data is base map style data used to represent the first style type question-answering;

[0024] Based on a preset visual question-answering model, the base map data is processed by image style extraction based on a preset second style question-answering to obtain second question-answering image style data, wherein the second question-answering image style data is base map style data used to represent the second style type question-answering;

[0025] The second image style data is determined based on the first question-and-answer image style data and the second question-and-answer image style data.

[0026] In some optional embodiments of this application, image color extraction processing is performed on the base map data to obtain image color data, including:

[0027] The base map data is preprocessed based on image scaling to obtain scaled base map data;

[0028] The scaled base map data is subjected to a color space-based conversion process to obtain converted base map data, wherein the converted base map data is used to represent the data after the scaled base map color space has been converted;

[0029] The converted base map data is subjected to pixel filtering processing based on a color similarity threshold to obtain base map color pixel data, wherein the base map color pixel data is used to represent image pixel data that meets the color similarity threshold;

[0030] The image color data is determined based on the background image color pixel data, wherein the image color data is the data of the colors corresponding to the background image color pixels.

[0031] In some optional embodiments of this application, image generation processing based on the image descriptor data and the user description data to obtain the target image includes:

[0032] The user description data is processed based on image subject extraction to obtain image subject data, wherein the image subject data is data for the subject in the user target image;

[0033] The user description data is processed based on image intent recognition to obtain image description intent data, wherein the image description intent data is data used to represent the user's target image intent.

[0034] The image subject data and the image descriptive word data are input into a preset artificial intelligence painting model to obtain the target image data.

[0035] According to a second aspect of this application, a data processing apparatus for image generation is provided, comprising:

[0036] The data acquisition module is used to acquire image requirement data, wherein the image requirement data includes base map data and user description data, and the base map data is base map data used to generate the target image;

[0037] The descriptor extraction module is used to perform image descriptor extraction processing on the base map data based on a deep learning model to obtain image descriptor data, wherein the image descriptor data is descriptor data used to represent the base map of the target image;

[0038] The image generation module is used to perform image generation processing based on the image descriptor data and the user description data to obtain the target image.

[0039] According to a third aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing the computer to perform the above-described data processing method for image generation.

[0040] According to a fourth aspect of this application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the data processing method for image generation described above.

[0041] The technical solutions provided by the embodiments of this application may include the following beneficial effects:

[0042] In this application, image requirement data is acquired, including background image data and user description data. The background image data is used to generate a target image. Image descriptor extraction processing based on a deep learning model is performed on the background image data to obtain image descriptor data, which represents descriptive words used to generate the background image of the target image. Image generation processing is then performed based on the image descriptor data and the user description data to obtain the target image. In the process of generating the target image based on the background image, image style extraction is performed on the background image. The image style of the target image is determined based on the extracted background image style, generating a target image with the same style as the background image but with variable image content. This solves the problem of poor image quality in existing technologies that generate images based on background images, improving the image quality of target images generated from background images. Attached Figure Description

[0043] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application. In the drawings:

[0044] Figure 1 A flowchart of a data processing method for image generation provided in this application;

[0045] Figure 2 A flowchart of a data processing method for image generation provided in this application;

[0046] Figure 3 A flowchart of a data processing method for image generation provided in this application;

[0047] Figure 4 This is a schematic diagram of a data processing apparatus for image generation provided in this application. Detailed Implementation

[0048] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0049] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0050] In this application, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing this application and its embodiments, and are not intended to limit the indicated device, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation.

[0051] Furthermore, in addition to indicating location or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in some cases to indicate a certain dependency or connection relationship. Those skilled in the art can understand the specific meaning of these terms in this application based on the specific circumstances.

[0052] Furthermore, the terms "installation," "setup," "equipped with," "connection," "linked," and "socketing" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, components, or parts. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0053] With the rapid development of AI algorithms for text-to-image generation, AI painting is widely used on internet social media. Creators input descriptive words or add background images, and AI algorithms generate new images that match the style of the descriptive words or background images. In the field of text-to-image generation, descriptive words (hereinafter referred to as prompts) have a significant impact on the generated image.

[0054] When users generate images with a similar style based on a background image, they can obtain all relevant words from the background image's prompts and generate a target profile based on the obtained prompts. In current technology, a good prompt is largely based on continuous personal experimentation. Using prompts shared by others to generate images again can yield images with the same style. Another approach is that there are already positions for prompt engineers who are specifically responsible for collecting and filtering some commonly used and high-quality prompt words. The retained prompt words will ensure that the generated images are more 'good-looking', but it is impossible to reproduce the style of the background image well, resulting in poor image quality when generating images based on the background image.

[0055] In an optional embodiment of this application, a data processing method for image generation is provided. By performing background image descriptor extraction processing based on a neural network model on the current background image, a prompt consistent with the style modification and other descriptive information of the background image is obtained. The target image is generated based on the prompt extracted from the background image, which solves the problem in the prior art that the generated image effect is poor due to the inconsistency between the selected descriptors and the style of the background image.

[0056] In one optional embodiment of this application, a data processing method for image generation is provided. Figure 1 A flowchart of a data processing method for image generation provided in this application is shown below. Figure 1 As shown, the method includes the following steps:

[0057] S101: Obtain image requirement data;

[0058] Image requirement data includes base map data and user description data. Base map data is the base map data used to generate the target image. User description data is image-related information of the target image required by the user, including image subject information, intent information, status information, etc. User description data is text or voice information obtained through human-computer interaction. Based on the base map data and user description data, image generation based on text is performed to obtain the target image required by the user.

[0059] S102: Perform image descriptor extraction processing on the base map data based on a deep learning model to obtain image descriptor data;

[0060] Image descriptor data refers to descriptive words used to represent the background image used to generate the target image. Image descriptors are extracted from the background image using a deep learning model to obtain image descriptors that correspond to the style of the background image. AI painting is then performed based on the descriptors of the background image, resulting in a target image with the same style as the background image. This solves the problem of poor image generation results based on preset descriptors in existing technologies and improves the image generation effect.

[0061] In an optional embodiment of this application, a data processing method for image generation is provided. Figure 2 A flowchart of a data processing method for image generation provided in this application is shown below. Figure 2 As shown, the method includes the following steps:

[0062] S201: Extract image style data from the base map data based on the preset style extraction model to obtain image style data;

[0063] Image style data is used to represent the style data used to generate the target image base map. Image style descriptors are extracted from the base map through preset and learning models to obtain image style descriptors. Different style descriptor extraction methods are set to achieve style extraction from different dimensions, improve the comprehensiveness of descriptors, and thus improve the similarity between the image and the base map style during image generation.

[0064] In another optional embodiment of this application, a data processing method for image generation is provided. Figure 3 A flowchart of a data processing method for image generation provided in this application is shown below. Figure 3 As shown, the method includes the following steps:

[0065] S301: Based on the preset image style descriptor matching model, the base map data is processed to extract the first image style, and the first image style data is obtained.

[0066] The first image style data is the base image style descriptor data after the first image style extraction process.

[0067] In another optional embodiment of this application, a data processing method for image generation is provided for extracting first image style data, the method comprising:

[0068] The base map data is subjected to image encoding-based vector extraction processing to obtain image vector data, wherein the image vector data is used to represent the base map image vector; the preset image style descriptors are subjected to text encoding-based vector extraction processing to obtain text vector data, wherein the text vector data is used to represent the text vector of the preset image style descriptors; the image vector data and text vector data are subjected to similarity-based filtering processing to obtain the first image style data, wherein the first image style data is the data of preset image style descriptors corresponding to text vectors that satisfy preset similarity rules.

[0069] In an optional embodiment of this application, based on a preset image style descriptive word matching model, text vectors are extracted from pre-prepared descriptive style text using text encoding, and image vectors are extracted from the base image using image encoding. The image vectors are then matched with the extracted style vectors based on similarity, and returned in descending order of similarity score. Descriptive style texts whose similarity ranking meets a preset threshold are used as the first image style data. Specifically, by classifying style types, multiple sets of style texts corresponding to different style types are set. Matching is performed on different sets and the results are returned. These sets corresponding to different style types include, for example, the "Artist" set (e.g., Van Gogh, Qi Baishi); the "Artistic Movement" set (e.g., abstract art, pop art); the "Detail Description" set (e.g., high-definition, wide-angle); and the "Media Description" set (e.g., 3D rendering, photography, oil painting). The sets corresponding to different style types can be set according to the user's painting needs.

[0070] In an optional embodiment of this application, the preset image style descriptor matching model can be a Contrastive Language-Image Pretraining (CLIP) model, which learns the mapping between an image and its descriptive text. A text encoding module and an image encoding module, through the feature encoding obtained by the two encodings, establish a similarity relationship, thereby realizing the determination of the background image style descriptor based on the similarity relationship established between the background image and the background image style descriptor.

[0071] S302: Based on the preset visual question answering model, perform second image style extraction processing on the base image data to obtain second image style data;

[0072] The second image style data is the background image style descriptor data after the second image style extraction process. The second image style extraction process is a question-and-answer process based on a preset visual question-and-answer model.

[0073] In another optional embodiment of this application, a data processing method for image generation is provided for extracting second image style data, the method comprising:

[0074] Based on a preset visual question-answering model, the background image data is processed by image style extraction based on a preset first style question-answering to obtain first question-answering image style data, which is used to represent the background image style data obtained from the first style type question-answering; based on the preset visual question-answering model, the background image data is processed by image style extraction based on a preset second style question-answering to obtain second question-answering image style data, which is used to represent the background image style data obtained from the second style type question-answering; the second image style data is determined based on the first question-answering image style data and the second question-answering image style data.

[0075] For example, a preset visual question-answering model can be configured with two style-related questions: "What style does the picture belong to?" and "What is the style of this image?" to answer questions about the style and presentation of an image.

[0076] In an optional embodiment of this application, different style questions can be set according to the painting requirement data to achieve the identification and extraction of the background image style.

[0077] S303: Determine image style data based on the first image style data and the second image style data.

[0078] Image style data includes first image style data and second image style data.

[0079] S202: Perform image color extraction processing on the base map data to obtain image color data;

[0080] Image color data is used to represent the color data used to generate the base map of the target image. Color is also an important influencing factor in the generation of the target image. By extracting color, the consistency of style between the target image and the base map can be achieved, thereby improving the effect of generating the image based on the base map.

[0081] In another optional embodiment of this application, a data processing method for image generation is provided, for extracting image color data, the method comprising:

[0082] The base map data is preprocessed based on image scaling to obtain scaled base map data. The scaled base map data is then converted based on color space to obtain converted base map data, which represents the data after the color space conversion of the scaled base map. The converted base map data is then filtered by color similarity threshold to obtain base map color pixel data, which represents the image pixel data that meets the color similarity threshold. Finally, image color data is determined based on the base map color pixel data, which is the data corresponding to the colors of the base map color pixels.

[0083] The base image is uniformly scaled to an N*N size, such as N=30. The color space of the scaled image is converted to Lab color space. Lab color space can measure the similarity of pixels by the distance between their values. A color similarity threshold T is set, such as T=100. The number M of pixels whose distance from the current pixel is less than the threshold T is calculated for each pixel. Then R=M / (N*N) represents the proportion of the current pixel's color in the base image. After calculating the proportion of all pixels, the color set corresponding to the pixels whose proportion value is greater than the threshold (such as the threshold T1=0.2) is selected and added to the prompt to obtain the base image color description.

[0084] S203: Based on a preset detail database, perform image detail supplementation processing on the base map data to obtain image detail data;

[0085] Image detail data refers to the detailed data used to represent the image. Descriptive words that can optimize the target image are matched using a preset detail database. This database stores descriptive words that can optimize the target image and are used as supplementary descriptive words in the target image generation process. For example, the preset detail database stores descriptive words from multiple sets, which are randomly selected each time, such as descriptive words related to environmental factors, lighting conditions, and detail supplementation.

[0086] In this embodiment, by adding details to the descriptive words of the generated target image, the AI ​​painting model can generate richer details based on the prompt. The AI ​​painting model will generate based on the given prompt, making the prompt relatively richer, thereby improving the rationality of the generated target image rendering.

[0087] S204: Determine image descriptor data based on image style data, image color data, and image detail data.

[0088] S103: Perform image generation processing based on image descriptor data and user description data to obtain the target image.

[0089] In another optional embodiment of this application, a data processing method for image generation is provided, for generating a target image based on image descriptor data and user description data, the method comprising:

[0090] The user description data is processed based on the extraction of the image subject to obtain image subject data, which is the data of the subject in the user's target image; the user description data is processed based on the recognition of image intent to obtain image description intent data, which is the data used to represent the user's target image intent; the image subject data and image description word data are input into a preset artificial intelligence painting model to obtain target image data.

[0091] In this embodiment of the application, style modifications and artist descriptions corresponding to a given base image are extracted from the descriptive words of the base image. A prompt composed of style information can be generated that has the same style as the base image but with a variable subject and high diversity. In addition, additional random styles are added to complete the style and increase diversity, thereby improving the image effect of the target image.

[0092] In another optional embodiment of this application, a data processing apparatus for image generation is provided. Figure 4This application provides a schematic diagram of a data processing apparatus for image generation, as shown below. Figure 4 As shown, the device includes:

[0093] The data acquisition module 41 is used to acquire image requirement data, which includes base map data and user description data. The base map data is the base map data used to generate the target image.

[0094] The descriptor extraction module 42 is used to perform image descriptor extraction processing on the base map data based on a deep learning model to obtain image descriptor data, wherein the image descriptor data is descriptor data used to represent the base map of the target image;

[0095] The image generation module 43 is used to perform image generation processing based on image descriptor data and user description data to obtain the target image.

[0096] The specific methods of execution of each unit in the above embodiments have been described in detail in the embodiments of the method, and will not be elaborated here.

[0097] In summary, this application obtains image requirement data, including background image data and user description data, where the background image data is used to generate the target image. The background image data is then processed using a deep learning model to extract image descriptive terms, resulting in image descriptive term data, which represents descriptive terms used to represent the background image used to generate the target image. Finally, image generation processing is performed based on the image descriptive term data and the user description data to obtain the target image. In the process of generating the target image from the background image, image style extraction is performed on the background image. The image style of the target image is determined based on the extracted background image style, generating a target image with the same style as the background image but with variable image content. This solves the problem of poor image quality in existing technologies that generate images from background images, thus improving the image quality of target images generated from background images.

[0098] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0099] Obviously, those skilled in the art should understand that the various units or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps into a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0100] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data processing method for image generation, characterized in that, include: Obtain image requirement data, wherein the image requirement data includes base map data and user description data, and the base map data is the base map data used to generate the target image; The base map data is processed by image descriptor extraction based on a deep learning model to obtain image descriptor data, wherein the image descriptor data is descriptor data used to represent the base map of the target image, including: Image style data is extracted from the base map data based on a preset style extraction model to obtain image style data, wherein the image style data represents the style data used to generate the target image base map; image color data is extracted from the base map data to obtain image color data, wherein the image color data represents the color data used to generate the target image base map; image detail data is supplemented from the base map data based on a preset detail database to obtain image detail data, wherein the image detail data represents the detail data of the image; and image descriptive term data is determined based on the image style data, the image color data, and the image detail data. Image generation processing is performed based on the image descriptor data and the user description data to obtain a target image, including: performing image subject extraction processing on the user description data to obtain image subject data, wherein the image subject data is data for the subject in the user's target image; performing image intent recognition processing on the user description data to obtain image description intent data, wherein the image description intent data is data for representing the user's target image intent; and inputting the image subject data and image descriptor data into a preset artificial intelligence painting model to obtain target image data.

2. The data processing method according to claim 1, characterized in that, Based on a preset style extraction model, image style data is extracted from the base map data to obtain image style data including: The base map data is subjected to a first image style extraction process based on a preset image style descriptor matching model to obtain first image style data, wherein the first image style data is the base map style descriptor data after the first image style extraction process. The base map data is processed by a second image style extraction based on a preset visual question answering model to obtain second image style data, wherein the second image style data is the base map style descriptive word data after the second image style extraction processing; The image style data is determined based on the first image style data and the second image style data.

3. The data processing method according to claim 2, characterized in that, The base image data is processed by first image style extraction based on a preset image style descriptor matching model to obtain first image style data, including: The base map data is subjected to image coding-based vector extraction processing to obtain image vector data, wherein the image vector data is data used to represent the base map image vector; The preset image style descriptors are subjected to vector extraction processing based on text encoding to obtain text vector data, wherein the text vector data is data used to represent the text vectors of the preset image style descriptors; The image vector data and the text vector data are filtered based on similarity to obtain the first image style data, wherein the first image style data is the data of preset image style descriptive words corresponding to text vectors that satisfy preset similarity rules.

4. The data processing method according to claim 2, characterized in that, The second image style extraction process is performed on the base image data based on a preset visual question-answering model to obtain the second image style data, which includes: Based on a preset visual question-answering model, the base map data is processed by image style extraction based on a preset first style question-answering to obtain first question-answering image style data, wherein the first question-answering image style data is base map style data used to represent the first style type question-answering; Based on a preset visual question-answering model, the base map data is processed by image style extraction based on a preset second style question-answering to obtain second question-answering image style data, wherein the second question-answering image style data is base map style data used to represent the second style type question-answering; The second image style data is determined based on the first question-and-answer image style data and the second question-and-answer image style data.

5. The data processing method according to claim 1, characterized in that, The base map data is subjected to image color extraction processing to obtain image color data including: The base map data is preprocessed based on image scaling to obtain scaled base map data; The scaled base map data is subjected to a color space-based conversion process to obtain converted base map data, wherein the converted base map data is used to represent the data after the scaled base map color space has been converted; The converted base map data is subjected to pixel filtering processing based on a color similarity threshold to obtain base map color pixel data, wherein the base map color pixel data is used to represent image pixel data that meets the color similarity threshold; The image color data is determined based on the background image color pixel data, wherein the image color data is the data of the colors corresponding to the background image color pixels.

6. A data processing apparatus for image generation, characterized in that, include: The data acquisition module is used to acquire image requirement data, wherein the image requirement data includes base map data and user description data, and the base map data is base map data used to generate the target image; The descriptor extraction module is used to perform image descriptor extraction processing on the base map data based on a deep learning model to obtain image descriptor data, wherein the image descriptor data is descriptor data used to represent the base map of the target image, including: Image style data is extracted from the base map data based on a preset style extraction model to obtain image style data, wherein the image style data represents the style data used to generate the target image base map; image color data is extracted from the base map data to obtain image color data, wherein the image color data represents the color data used to generate the target image base map; image detail data is supplemented from the base map data based on a preset detail database to obtain image detail data, wherein the image detail data represents the detail data of the image; and image descriptive term data is determined based on the image style data, the image color data, and the image detail data. An image generation module is used to perform image generation processing based on the image descriptor data and the user description data to obtain a target image, including: performing image subject extraction processing on the user description data to obtain image subject data, wherein the image subject data is data for the subject in the user's target image; performing image intent recognition processing on the user description data to obtain image description intent data, wherein the image description intent data is data for representing the user's target image intent; and inputting the image subject data and image descriptor data into a preset artificial intelligence painting model to obtain target image data.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the data processing method for image generation as described in any one of claims 1-5.

8. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the data processing method for image generation as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Virtual content generation method and device, electronic equipment and storage medium

    CN114904270A

  • Stylized image description generation method based on transfer learning

    CN115294427A