Artificial intelligence drawing method, device, system and storage medium

By obtaining the positioning information and environmental information of the photos taken, combining crawler technology and large language models to generate effective prompt words, and using the Stable Diffusion model to integrate environmental factors, it solves the problem of difficulty in capturing environmental information in artificial intelligence drawings in the existing technology, and achieves Personalized image generation and accurate rendering improve image processing accuracy and user experience.

CN118096923BActive Publication Date: 2024-09-17BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410318883.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2024-09-17
Estimated Expiration
2044-03-20

AI Technical Summary

Technical Problem

Existing artificial intelligence drawing technology is difficult to accurately capture and render shooting environment information. The generated images lack personalization and accuracy, and cannot effectively utilize shooting technology, networked crawler technology and big data screening technology.

Method used

By obtaining the positioning information of the photos taken, real-time weather, seasons and user-entered keywords, combined with crawler technology and large language models, effective prompt words are generated, and the Stable Diffusion model is used to integrate environmental factors to generate personalized photos.

Benefits of technology

It realizes one-click change of image style and style according to user preferences, improves the accuracy of capturing image features and semantics, generates more detailed descriptors, and has a self-checking mechanism to prevent incorrect generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118096923B
    Figure CN118096923B
Patent Text Reader

Abstract

The present invention discloses an artificial intelligence drawing method, device, system and storage medium, the method comprising: obtaining a photograph and the location information corresponding to the photograph; obtaining a real-scene picture, extracting environmental factors from the real-scene picture as the background and elements when drawing; determining the real-time weather, season and local time information of the location according to the user's location; obtaining a custom sentence, and extracting keywords from the custom sentence; generating effective prompt words according to the location information corresponding to the photograph, the real-time weather, season and local time information of the location and the keywords; according to the effective prompt words, selecting the corresponding environmental factors from the background and elements when drawing as fusion elements, and fusing the fusion elements based on the photograph to obtain personalized photos. The present invention changes the style and style of the picture according to the user's preferences and AI image recognition, and does not require the user to describe the picture himself, saving time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an artificial intelligence drawing method, device, system and storage medium. Background Art

[0002] The history of AI drawing can be traced back to decades of research and innovation. In recent years, the rise of deep learning has had a revolutionary impact on the field of AI drawing. The powerful learning ability of deep neural networks enables models to learn from large amounts of data and generate realistic images. In particular, the emergence of generative adversarial networks (GANs) provides an effective way to generate high-quality images. Today, AI drawing technology has begun to be widely used in real-time applications and commercial fields. For example, virtual reality, game development, advertising design and other fields have begun to use AI drawing technology to generate realistic images and scenes. However, in order for AI drawing to achieve the desired effect and purpose, users need to invest in accurate keywords and demand descriptions, but often the expression of sentences will be more or less biased.

[0003] The AI ​​re-drawing that has appeared on the market is just to redraw the photos through AI technology to form "photos" of different styles. In the existing AI painting programs, AI lacks the ability to capture the surrounding environment information like real people, and can only obtain limited information from the photos. How to make better use of AI drawing functions by combining shooting technology, online crawler technology, and big data screening technology to render images more vividly and accurately is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention is provided to solve the above problems existing in the prior art. Therefore, an artificial intelligence drawing method, device, system and storage medium are needed, which use photos taken by users, geographical location information, keywords input by users and information filtered by filters as prompt words for artificial intelligence drawing, and build an open community to facilitate users to upload and share completed works of art.

[0005] According to a first embodiment of the present invention, there is provided an artificial intelligence drawing method, the method comprising:

[0006] Obtaining the taken photos and the location information corresponding to the taken photos;

[0007] Acquire a real scene picture, and extract environmental factors from the real scene picture as background and elements for drawing;

[0008] Determine, based on the user's location, real-time weather, season, and local time information for the location;

[0009] Obtaining a custom sentence, and extracting keywords from the custom sentence;

[0010] Generate an effective prompt word according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location and the keyword;

[0011] According to the effective prompt words, corresponding environmental factors are selected from the background and elements during the drawing as fusion elements, and based on the taken photos, the fusion elements are fused to obtain personalized photos.

[0012] Furthermore, the positioning information corresponding to the taken photo includes latitude and longitude coordinates and altitude.

[0013] Furthermore, the real scene picture is obtained by the following method:

[0014] Use crawler technology to regularly crawl relevant resource information and pictures on open source maps as real-life pictures.

[0015] Furthermore, the application has a built-in network search function to determine the real-time weather, season and local time information of the location according to the user's location.

[0016] Furthermore, using the large language model as a filter, effective prompt words are generated according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location, and the keyword.

[0017] Furthermore, by using the Stable Diffusion model, corresponding environmental factors are selected from the background and elements during the drawing as fusion elements according to the effective prompt words, and the fusion elements are fused based on the taken photos to obtain personalized photos.

[0018] Further, after personalizing the photo, the method further includes:

[0019] The personalized photos are saved in a database, and the personalized photos in the database can be shared.

[0020] According to a second technical solution of the present invention, there is provided an artificial intelligence drawing device, the device comprising:

[0021] A photo shooting and positioning unit, configured to obtain the taken photo and the positioning information corresponding to the taken photo;

[0022] A data resource acquisition unit is configured to acquire a real scene picture and extract environmental factors from the real scene picture as background and elements for drawing;

[0023] A weather event acquisition unit, configured to determine the real-time weather, season and local time information of the location according to the location of the user;

[0024] A keyword extraction unit is configured to obtain a custom sentence and extract keywords from the custom sentence;

[0025] an information screening unit, configured to generate a valid prompt word according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location and the keyword;

[0026] The AI ​​drawing unit is configured to select corresponding environmental factors as fusion elements from the background and elements during drawing according to the effective prompt words, and fuse the fusion elements based on the taken photos to obtain personalized photos.

[0027] According to a third technical solution of the present invention, there is provided an artificial intelligence drawing system, the system comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the method as described above.

[0028] According to a fourth technical solution of the present invention, a non-transitory computer-readable storage medium storing instructions is provided. When the instructions are executed by a processor, the method described above is executed.

[0029] The artificial intelligence drawing method, device, system and storage medium according to each solution of the present invention have at least the following technical effects:

[0030] (1) Based on user preferences and AI knowledge Figure 1 key to change the style and appearance of the picture, without the need for users to describe the picture themselves, saving time.

[0031] (2) Using computer vision can capture image features and semantics more accurately.

[0032] (3) After using the AI ​​big language model to integrate the information extracted from the crawler and image features, the description of the image is more detailed and in line with expectations.

[0033] (4) It has a self-error detection mechanism. The generated image is passed through the image recognition system again to prevent the generation of errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In the drawings, which are not necessarily drawn to scale, the same reference numerals may describe similar parts in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar parts. The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the specification and claims, are used to illustrate the embodiments of the invention. When appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.

[0035] Figure 1 A flow chart of an artificial intelligence drawing method according to an embodiment of the present invention is shown.

[0036] Figure 2 A diagram showing an implementation framework structure of an artificial intelligence drawing method according to an embodiment of the present invention is shown.

[0037] Figure 3 A structural diagram of an artificial intelligence drawing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments, but are not intended to limit the present invention. For the various steps described herein, if there is no necessity for a causal relationship between each other, the order in which they are described as examples herein should not be regarded as a limitation, and those skilled in the art should know that they can be adjusted in order, as long as the logic between them is not destroyed, resulting in the inability to implement the entire process.

[0039] The embodiment of the present invention provides an artificial intelligence drawing method, such as Figure 1 As shown, the method comprises the following steps:

[0040] Step S100, obtaining a photograph and location information corresponding to the photograph.

[0041] In this embodiment, a camera, a mobile phone, etc. can be used to take corresponding photos to obtain the taken photos, or pictures obtained by other means, such as photos taken by drones, etc., which are not specifically limited here. The positioning information corresponding to the taken photos can be GPS positioning information, including the user's latitude and longitude coordinates and altitude. These data will be used for personalized image generation in the subsequent drawing process.

[0042] Step S200, obtaining a real scene picture, and extracting environmental factors from the real scene picture as background and elements for drawing.

[0043] For example, the application uses crawler technology to regularly crawl relevant resource information and real-life pictures on open source maps. These resources include landscape photos, buildings, natural landscapes, etc., to provide background and elements for drawing.

[0044] Step S300, determining the real-time weather, season and local time information of the location according to the user's location.

[0045] For example, the application has a built-in web search function that can obtain real-time weather, seasons, local events and other information for a specific location based on the user's location. This data helps customize the spatiotemporal elements of image generation.

[0046] Step S400: Obtain a custom sentence and extract keywords from the custom sentence.

[0047] It should be noted that the user can input a custom sentence to describe the elements or emotions that the user wants the photo to contain. For example, the user can input "a beach under the summer sun" or "a snow scene in winter". These sentences will become an important basis for the subsequent generation of pictures. Keywords are extracted from the custom sentences, such as "summer", "sunshine", "beach" and other keywords can be extracted from "a beach under the summer sun". Keywords such as "winter" and "snow" can be extracted from "a snow scene in winter". These keywords play a key role in the subsequent generation of effective prompt words and the selection of backgrounds and elements from step S200.

[0048] Step S500, generating effective prompt words according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location and the keyword.

[0049] For example, a large language model is used as a filter to combine the user's location, environmental information obtained by the crawler, weather, season, etc. with the sentence input by the user to generate effective prompt words. These prompt words will guide the subsequent image generation.

[0050] Step S600, according to the effective prompt words, corresponding environmental factors are selected from the background and elements during the drawing as fusion elements, and based on the taken photo, the fusion elements are fused to obtain a personalized photo.

[0051] For example, based on the generated prompt words, the Stable Diffusion model is used for AI drawing. The model will use the photos taken by the user as the basis, integrate the elements and emotions required by the user, and generate personalized photos that meet the user's needs. During the drawing process, the model adds appropriate scenery, objects or emotional elements according to the prompt words to create a unique image.

[0052] In this embodiment, data collection is achieved through a crawler built into the application, which regularly grabs relevant pictures and resources from the Internet. These data are connected to the application's server through the network. The large language model acts as a filter, combining the user's input sentence with the acquired environmental information to generate prompt words. The model communicates with the back-end server through the application's API to obtain the required data. The Stable Diffusion model is the core of artificial intelligence drawing. It establishes a connection between the front-end and back-end servers of the application, receives photos taken by the user and the generated prompt words, and then generates personalized images. The present invention incorporates spatiotemporal elements into the AI ​​drawing process to create photos with emotion and personality. By combining various technologies and data sources, users can easily capture the beautiful moments of the moment and transform them into unique works of art. The present invention can quickly process the photos taken, providing users with a good visual experience when taking photos.

[0053] The embodiment of the present invention provides an implementation framework of an artificial intelligence drawing method, the framework structure is as follows Figure 2As shown, it includes a front end and a back end. The front end includes a user login interface module, a photo acquisition positioning module, and a keyword input module; the back end includes a big data crawling module, a filter module, a database, and a referenced Stable Diffusion algorithm module. The front end is divided into a user login interface module, a photo acquisition positioning module, and a keyword input module. Users can use this interface to take photos, obtain location information, and enter custom keyword descriptions. The back end data processing: the back end includes a big data crawling module, a filter module, a database, and a referenced Stable Diffusion algorithm module. The data crawling module is responsible for regularly crawling relevant pictures and resource information from the Internet. The filter module generates valid prompt words based on the user's location, environmental information obtained by the crawler, weather, season, etc. The database is used to store user information and generated pictures. The Stable Diffusion algorithm module is the core, which accepts the photos taken by the user and the generated prompt words, and then generates personalized images; the camera function is that the user uses the mobile phone camera function at the front end to take photos, which is completed through the front or rear camera. These photos are transmitted between the front-end user interface and the back-end data processing; the GPS positioning includes the front-end using the mobile phone GPS positioning to obtain the user's latitude and longitude coordinates and altitude, and these data are transmitted through the front-end and the back-end to provide location information; the crawler module includes the back-end big data crawler module to regularly grab relevant pictures and resource information from the Internet, and these data are further processed by the back-end filter module; the filter module includes the back-end filter module using a large language model to combine the user's location, environmental information obtained by the crawler, weather, season, etc. with the user's input sentence to generate prompt words. These prompt words will guide the Stable Diffusion algorithm module to generate pictures.

[0054] The present invention takes a filter mainly composed of a large language model as its core. This filter uses the positioning of the application itself and the environmental information crawled by the crawler as input, and after processing, it serves as the core information of artificial intelligence drawing to guide the drawing of pictures. Thereby, the artificial intelligence drawing program is realized to capture and filter the information of the environment when shooting like a real person. The present invention truly realizes painting, integrates the spatiotemporal information in the photos taken by the user and then draws, and truly realizes artificial intelligence painting. Just like a real painter, it can highlight the characteristics of the environment when shooting and the characteristics of the characters themselves, so that the generated image contains the spatiotemporal information when shooting.

[0055] The embodiment of the present invention also provides an artificial intelligence drawing device, such as Figure 3 As shown, the device 300 includes:

[0056] The photo shooting and positioning unit 301 is configured to obtain the taken photo and the positioning information corresponding to the taken photo;

[0057] The data resource acquisition unit 302 is configured to acquire a real scene picture and extract environmental factors from the real scene picture as background and elements for drawing;

[0058] The weather event acquisition unit 303 is configured to determine the real-time weather, season and local time information of the location according to the user's location;

[0059] The keyword extraction unit 304 is configured to obtain a custom sentence and extract keywords from the custom sentence;

[0060] The information screening unit 305 is configured to generate a valid prompt word according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location and the keyword;

[0061] The AI ​​drawing unit 306 is configured to select corresponding environmental factors as fusion elements from the background and elements during drawing according to the effective prompt words, and fuse the fusion elements based on the taken photos to obtain personalized photos.

[0062] In some embodiments, the location information corresponding to the taken photo includes latitude and longitude coordinates and altitude.

[0063] In some embodiments, the data resource acquisition unit is further configured to:

[0064] Use crawler technology to regularly crawl relevant resource information and pictures on open source maps as real-life pictures.

[0065] In some embodiments, the weather event acquisition unit is further configured to apply a built-in network search function to determine the real-time weather, season and local time information of the location according to the user's location.

[0066] In some embodiments, the information screening unit is further configured to use a large language model as a filter to generate effective prompt words according to the positioning information corresponding to the taken photos, the real-time weather, season and local time information of the location, and the keywords.

[0067] In some embodiments, the AI ​​drawing unit is further configured to utilize a Stable Diffusion model to select corresponding environmental factors as fusion elements from the background and elements during drawing according to the effective prompt words, and fuse the fusion elements based on the taken photos to obtain personalized photos.

[0068] In some embodiments, the device further comprises a database, in which the personalized photos are stored and the personalized photos in the database can be shared.

[0069] It should be noted that the artificial intelligence drawing device and the method previously described belong to the same technical concept and can achieve the same beneficial effects, which will not be repeated here.

[0070] An embodiment of the present invention provides an artificial intelligence drawing system, the system comprising:

[0071] Memory for storing computer programs;

[0072] A processor is used to execute the computer program to implement the method described in any of the above embodiments.

[0073] An embodiment of the present invention provides a non-transitory computer-readable storage medium storing instructions. When the instructions are executed by a processor, the method described in any of the above embodiments is executed.

[0074] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present invention with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of this application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0075] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the present invention. This should not be interpreted as a feature of an invention that is not claimed for protection being necessary for any claim. On the contrary, the subject matter of the present invention may be less than all the features of the embodiments of a specific invention. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present invention should be determined with reference to the full scope of the equivalent forms of the attached claims and these claims.

Claims

1. An artificial intelligence drawing method, characterized in that: The method comprises: Obtaining the taken photos and the location information corresponding to the taken photos; Acquire a real scene picture, and extract environmental factors from the real scene picture as background and elements for drawing; Determine, based on the user's location, real-time weather, season, and local time information for the location; Obtaining a custom sentence, and extracting keywords from the custom sentence; Using the large language model as a filter, generating effective prompt words according to the location information corresponding to the photographed photo, the real-time weather, season and local time information of the location, and the keyword; By using the Stable Diffusion model, according to the effective prompt words, corresponding environmental factors are selected from the background and elements during the drawing as fusion elements, and based on the taken photos, the fusion elements are fused to obtain personalized photos.

2. The method according to claim 1, characterized in that The location information corresponding to the taken photo includes latitude and longitude coordinates and altitude.

3. The method according to claim 1, characterized in that Get the real scene picture by the following method: Use crawler technology to regularly crawl relevant resource information and pictures on open source maps as real-life pictures.

4. The method according to claim 1, characterized in that: The app has a built-in web search function that determines the real-time weather, season and local time information for the location based on the user's location.

5. The method according to claim 1, characterized in that After obtaining the personalized photo, the method further includes: The personalized photos are saved in a database, and the personalized photos in the database can be shared.

6. An artificial intelligence drawing device, characterized in that: The device comprises: A photo shooting and positioning unit, configured to obtain the taken photo and the positioning information corresponding to the taken photo; A data resource acquisition unit is configured to acquire a real scene picture and extract environmental factors from the real scene picture as background and elements for drawing; A weather event acquisition unit, configured to determine the real-time weather, season and local time information of the location according to the location of the user; A keyword extraction unit is configured to obtain a custom sentence and extract keywords from the custom sentence; an information screening unit, configured to generate a valid prompt word according to the positioning information corresponding to the photographed photo, the real-time weather, season and local time information of the location and the keyword; The AI ​​drawing unit is configured to select corresponding environmental factors as fusion elements from the background and elements during the drawing according to the effective prompt words, and fuse the fusion elements based on the taken photos to obtain personalized photos; The information screening unit is further configured to use the large language model as a filter to generate a valid prompt word according to the location information corresponding to the photographed photo, the real-time weather, season and local time information of the location, and the keyword; The AI ​​drawing unit is further configured to utilize a Stable Diffusion model to select corresponding environmental factors as fusion elements from the background and elements during drawing according to the effective prompt words, and fuse the fusion elements based on the taken photos to obtain personalized photos.

7. An artificial intelligence mapping system, characterized in that: The system comprises: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 5. 8 . A non-transitory computer-readable storage medium storing instructions, which, when executed by a processor, executes the method according to claim 1 .