AI image generation method and system based on image analysis and language description

By identifying the correlation between images and language, the target image is generated, which solves the problem of insufficient accuracy in generating images simultaneously through image analysis and language description in the existing technology, and achieves higher image generation accuracy and positional relationship description.

CN118037888BActive Publication Date: 2024-10-01嘉达鼎新信息技术(苏州)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410146129.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2024-10-01
Estimated Expiration
2044-02-01

AI Technical Summary

Technical Problem

Existing technology cannot generate images based on image analysis and language description at the same time, resulting in reduced accuracy of generated images.

Method used

By identifying the object outline in the image and the key sentences in the language, confirm the correlation between the two, and generate the target image based on the correlation and the layout information in the sentence, including the comparison of the basic information of the object outline and the element information of the sentence and integration.

Benefits of technology

It improves the accuracy of image generation, ensures the matching between images and language descriptions, and enhances the positional relationship description of target images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118037888B_ABST
    Figure CN118037888B_ABST
Patent Text Reader

Abstract

The present application discloses an AI image generation method and system based on image analysis and language description, and relates to the field of image generation technology, which includes identifying and obtaining the contours of each object in the image to be detected, and confirming the first basic image information corresponding to each object contour based on each object contour; identifying and obtaining each key sentence in the language to be detected, and confirming the first element information corresponding to each key sentence based on each key sentence; confirming the first correlation between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence, and confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence; based on the first correlation and the second element information corresponding to each key sentence, confirming the layout relationship between each object contour and each key sentence to generate a target image. The present application has the effect of reducing the occurrence of situations where the accuracy of the generated image is reduced due to the inability to simultaneously generate the image based on image analysis and language description.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image generation technology, and in particular to an AI image generation method and system based on image analysis and language description. Background Art

[0002] Image generation refers to the process of generating images using computer algorithms. In the field of image generation, the rational arrangement of images in a scene based on language description has a wide range of applications.

[0003] In the related art, in the process of generating images through image analysis or language description, it is impossible to generate images based on image analysis and language description at the same time, thereby effectively reducing the accuracy of the generated images, and there is room for improvement. Summary of the invention

[0004] In order to reduce the situation where the accuracy of generated images is reduced due to the inability to generate images based on image analysis and language description at the same time, the present application provides an AI image generation method and system based on image analysis and language description.

[0005] In a first aspect, the present application provides an AI image generation method based on image analysis and language description, comprising the following steps:

[0006] Identify and obtain the contours of each object in the image to be detected, and confirm the first basic image information corresponding to each object contour based on the contours of each object;

[0007] Identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence;

[0008] confirming a first degree of association between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence, and then confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence;

[0009] Then, based on the first correlation degree and the second element information corresponding to each key sentence, the layout relationship between each object outline and each key sentence is confirmed, and then a target image is generated.

[0010] Preferably, the identifying and acquiring the contours of each object in the image to be detected, and confirming the first basic image information corresponding to each object contour based on the contours of each object, specifically includes:

[0011] Associating the image to be detected with the image extraction model, thereby extracting each object in the image to be detected and identifying the object contour corresponding to each object;

[0012] Based on the object contours corresponding to each object, each object is grouped and divided into first basic image information according to a preset division method, wherein the first basic image information includes first person image information, first animal image information, first plant image information and other image information, wherein the preset division method is set to divide according to the basic attributes of the object contour.

[0013] Preferably, the identifying and acquiring each key sentence in the language to be detected, and confirming the first element information corresponding to each key sentence based on each key sentence, specifically includes:

[0014] The language to be detected is associated with a language extraction model for identification, and the sentence segmentation information in the language to be detected is confirmed. Then, based on the sentence segmentation information, each key sentence in the language to be detected is confirmed, and then the subject information in each key sentence is confirmed, and the subject information in each key sentence is set as the first element information, wherein the first element information includes first person element information, first animal element information, first plant element information and other element information.

[0015] Preferably, the determining of the first degree of association between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence specifically includes:

[0016] Prioritizing comparing the first basic image information corresponding to each object outline with the first element information corresponding to each key sentence, and then confirming the relevant basic image information corresponding to each object outline and the relevant element information corresponding to each key sentence;

[0017] Obtaining relevant basic image information corresponding to each object contour, and extracting relevant element information corresponding to the relevant basic image information corresponding to each object contour from each key sentence, and then confirming a first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information;

[0018] The first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information is compared with a preset correlation degree threshold; when the first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information exceeds the preset correlation degree threshold, the relevant basic image information and the relevant element information are marked as target basic image information and target element information.

[0019] Preferably, the confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence specifically includes:

[0020] Confirm each key sentence corresponding to the first element information, perform circular screening on the key sentences, and then extract each description information set associated with the first element information based on the key sentences, and confirm the first overlap of each description information in each description information set by comparing the description information sets, eliminate the description information whose first overlap is higher than the preset overlap threshold, integrate the remaining description information in each description information set, and mark it as the second element information.

[0021] Preferably, the determining the layout relationship between each object outline and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence specifically includes:

[0022] The target basic image information and the target element information are confirmed based on the first association degree, and the target basic image information confirms the first layout information between the target basic image information and the target element information according to the second element information.

[0023] Preferably, the determining the layout relationship between the contours of each object and each key sentence, and then generating the target image, specifically also includes:

[0024] Acquire positional relationship statement information in each key sentence, set the positional relationship statement information in each key sentence as the third element information, confirm the positional information of the third element information in each key sentence, and then confirm the marked object set within the preset range of the positional information based on the positional information corresponding to the third element information in each key sentence, and then set the third element information in the key sentence and the marked object set corresponding to it as a key-value pair, perform cyclic screening on each key sentence, confirm the key-value pair set, and then confirm the second layout information based on the key-value pair set;

[0025] A target image is generated based on the first layout information and the second layout information.

[0026] In a second aspect, the present application provides an AI image generation system based on image analysis and language description, including:

[0027] An image recognition and analysis module, used to recognize and obtain the contours of each object in the image to be detected, and to confirm the first basic image information corresponding to each object contour based on the contours of each object;

[0028] A language recognition and analysis module, used to identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence;

[0029] An image and language association analysis module, used to confirm a first degree of association between the first basic image information corresponding to each object outline and the first element information corresponding to each key sentence, and then confirm the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence;

[0030] The target image generation module is used to confirm the layout relationship between each object outline and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence, and then generate a target image.

[0031] In a third aspect, the present application provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute any one of the above-mentioned AI image generation methods based on image analysis and language description.

[0032] In summary, the present application includes at least one of the following beneficial technical effects:

[0033] 1. The present invention provides an AI image generation method based on image analysis and language description, which analyzes the image to be detected to confirm the first basic image information and analyzes the language to be detected to confirm the first element information, and then confirms the first correlation based on the first basic image information and the first element information, and obtains the second element information corresponding to each key sentence, and then confirms the layout relationship between the contour of each object and each key sentence based on the first correlation and the second element information corresponding to each key sentence to generate a target image, thereby effectively reducing the situation where the accuracy of the generated image is reduced due to the inability to simultaneously generate the image based on image analysis and language description;

[0034] 2. By comparing the first basic image information corresponding to each object contour with the first element information corresponding to each key sentence, the relevant basic image information corresponding to each object contour and the relevant element information corresponding to each key sentence are confirmed, and based on the first correlation between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information, the target basic image information and the target element information are confirmed, thereby accurately obtaining the information in the image to be detected and the language to be detected, thereby effectively improving the accuracy of target image generation;

[0035] 3. Through the mutual coordination of the first layout information and the second layout information, the position description of each object in each key sentence is further confirmed, and then the position relationship of each object in the target basic image information is effectively confirmed, thereby effectively improving the accuracy of target image generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flow chart of the method of AI image generation based on image analysis and language description in an embodiment of the present application.

[0037] Figure 2 It is a system schematic diagram of AI image generation based on image analysis and language description in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following is combined with Figure 1-2 This application is described in further detail.

[0039] Example 1

[0040] The embodiments of the present application disclose an AI image generation method based on image analysis and language description.

[0041] Reference Figure 1 , an AI image generation method based on image analysis and language description, comprising the following steps:

[0042] S1. Identify and obtain the contours of each object in the image to be detected, and confirm the first basic image information corresponding to the contours of each object based on the contours of each object;

[0043] S2. Identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence;

[0044] S3. confirming the first correlation between the first basic image information corresponding to the contours of each object and the first element information corresponding to each key sentence, and then confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence;

[0045] S4. Then, based on the first correlation degree and the second element information corresponding to each key sentence, the layout relationship between each object outline and each key sentence is confirmed, and then a target image is generated.

[0046] It should be further noted that in step S1, identifying and acquiring contours of each object in the image to be detected, and confirming first basic image information corresponding to each object contour based on the contours of each object, specifically includes:

[0047] Associating the image to be detected with the image extraction model, thereby extracting each object in the image to be detected and identifying the object contour corresponding to each object;

[0048] Based on the object contours corresponding to each object, each object is grouped and divided into first basic image information according to a preset division method, wherein the first basic image information includes first person image information, first animal image information, first plant image information and other image information, wherein the preset division method is set to divide according to the basic attributes of the object contour, wherein the other image information is set to be image information excluding people, animals and plants.

[0049] Specifically, the image extraction model is trained using a neural network model to perform AI deep learning and learn the mapping relationship between the input image and the output image. That is, by associating the image to be detected with the image extraction model, AI can be used to automatically extract each object in the image to be detected and identify the object contours corresponding to each object. In an embodiment of the present application, the first basic image information is divided into different sets according to the standards of people, animals, plants and others.

[0050] It should be further noted that in step S2, identifying and obtaining each key sentence in the language to be detected, and confirming the first element information corresponding to each key sentence based on the key sentence, specifically includes:

[0051] The language to be detected is associated with a language extraction model for identification, and the sentence segmentation information in the language to be detected is confirmed. Then, based on the sentence segmentation information, each key sentence in the language to be detected is confirmed, and then the subject information in each key sentence is confirmed, and the subject information in each key sentence is set as the first element information, wherein the first element information includes first person element information, first animal element information, first plant element information and other element information.

[0052] Specifically, similarly, the language extraction model is consistent with the image extraction model theory, and the comma is used as the sentence segmentation information to further extract the subject information in each key sentence, that is, a person or an object or other. For example, the leaves of the jujube tree are green, and the jujube tree is set as the first element information.

[0053] It should be further noted that in step S3, determining the first degree of association between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence specifically includes:

[0054] Prioritizing comparing the first basic image information corresponding to each object outline with the first element information corresponding to each key sentence, and then confirming the relevant basic image information corresponding to each object outline and the relevant element information corresponding to each key sentence;

[0055] Obtaining relevant basic image information corresponding to each object contour, and extracting relevant element information corresponding to the relevant basic image information corresponding to each object contour from each key sentence, and then confirming a first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information;

[0056] The first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information is compared with a preset correlation degree threshold; when the first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information exceeds the preset correlation degree threshold, the relevant basic image information and the relevant element information are marked as target basic image information and target element information.

[0057] For example, if the first basic image information corresponding to each object outline includes a jujube tree image, an Ultraman image, and an alligator image, and the first element information corresponding to each key sentence includes a jujube tree and Ultraman, then the relevant basic image information is the jujube tree image and the Ultraman image, and the relevant element information is the jujube tree and Ultraman. If the language description is that Ultraman is fighting under a jujube tree, and the leaves of the jujube tree are green, then the jujube tree and Ultraman can be set as the target basic image information and target element information.

[0058] Further, based on the first element information corresponding to each key sentence, confirming the second element information corresponding to each key sentence specifically includes:

[0059] Confirm each key sentence corresponding to the first element information, perform circular screening on the key sentences, and then extract each description information set associated with the first element information based on the key sentences, and confirm the first overlap of each description information in each description information set by comparing the description information sets, eliminate the description information whose first overlap is higher than the preset overlap threshold, integrate the remaining description information in each description information set, and mark it as the second element information.

[0060] For example, if the language description is that Ultraman is fighting under a jujube tree, and the leaves of the jujube tree are green; then the second element information is that the leaves are green.

[0061] It should be further noted that in step S4, the layout relationship between each object outline and each key sentence is confirmed based on the first correlation degree and the second element information corresponding to each key sentence, specifically including:

[0062] The target basic image information and the target element information are confirmed based on the first association degree, and the target basic image information confirms the first layout information between the target basic image information and the target element information according to the second element information.

[0063] Specifically, the scene description of each object by each key sentence is confirmed through the first layout information.

[0064] Furthermore, the layout relationship between the contours of each object and each key sentence is confirmed, and then the target image is generated, which specifically includes:

[0065] Acquire positional relationship statement information in each key sentence, set the positional relationship statement information in each key sentence as the third element information, confirm the positional information of the third element information in each key sentence, and then confirm the marked object set within the preset range of the positional information based on the positional information corresponding to the third element information in each key sentence, and then set the third element information in the key sentence and the marked object set corresponding to it as a key-value pair, perform cyclic screening on each key sentence, confirm the key-value pair set, and then confirm the second layout information based on the key-value pair set;

[0066] Exemplarily, the second layout information is used to confirm the position description of each object by each key sentence. If the language description is that Ultraman is fighting under a jujube tree, and the leaves of the jujube tree are green; then the second layout information is Ultraman-Jujube Tree, and the third element information is under the jujube tree.

[0067] A target image is generated based on the first layout information and the second layout information.

[0068] Example 2

[0069] The embodiments of the present application also disclose an AI image generation system based on image analysis and language description.

[0070] Reference Figure 2 , an AI image generation system based on image analysis and language description, including:

[0071] An image recognition and analysis module, used to recognize and obtain the contours of each object in the image to be detected, and to confirm the first basic image information corresponding to each object contour based on the contours of each object;

[0072] A language recognition and analysis module, used to identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence;

[0073] An image and language association analysis module, used to confirm a first degree of association between the first basic image information corresponding to each object outline and the first element information corresponding to each key sentence, and then confirm the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence;

[0074] The target image generation module is used to confirm the layout relationship between each object outline and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence, and then generate a target image.

[0075] The above contents are merely examples and explanations of the concept of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

[0076] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0077] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. AI image generation method based on image analysis and language description, It is characterized in that The following steps are involved: Identify and obtain the contours of each object in the image to be detected, and confirm the first basic image information corresponding to each object contour based on the contours of each object; The identifying and acquiring the contours of each object in the image to be detected, and confirming the first basic image information corresponding to each object contour based on the contours of each object, specifically includes: Associating the image to be detected with the image extraction model, thereby extracting each object in the image to be detected and identifying the object contour corresponding to each object; Based on the object contours corresponding to the objects, the objects are grouped and divided into first basic image information according to a preset division method, wherein the first basic image information includes first person image information, first animal image information, first plant image information and other image information, wherein the preset division method is set to divide according to basic attributes of the object contours; Identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence; The identifying and obtaining each key sentence in the language to be detected, and confirming the first element information corresponding to each key sentence based on the key sentence, specifically includes: Associating the language to be detected with the language extraction model for identification, confirming the sentence segmentation information in the language to be detected, and then confirming each key sentence in the language to be detected based on the sentence segmentation information, and then confirming the subject information in each key sentence, and setting the subject information in each key sentence as the first element information, wherein the first element information includes first person element information, first animal element information, first plant element information and other element information; confirming a first degree of association between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence, and then confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence; The confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence specifically includes: Confirm each key sentence corresponding to the first element information, perform circular screening on each key sentence, and then extract each description information set associated with the first element information based on each key sentence, and confirm the first overlap of each description information in each description information set by comparing the each description information set, remove the description information whose first overlap is higher than a preset overlap threshold, integrate the remaining description information in each description information set, and mark it as the second element information; Then, based on the first correlation degree and the second element information corresponding to each key sentence, the layout relationship between each object outline and each key sentence is confirmed, thereby generating a target image; The determining the layout relationship between each object outline and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence specifically includes: Based on the first association degree, target basic image information and target element information are confirmed, and the target basic image information confirms first layout information between the target basic image information and the target element information according to the second element information; The determining of the layout relationship between the contours of each object and each key sentence, and then generating a target image, specifically includes: Acquire positional relationship statement information in each key sentence, set the positional relationship statement information in each key sentence as the third element information, confirm the positional information of the third element information in each key sentence, and then confirm the marked object set within the preset range of the positional information based on the positional information corresponding to the third element information in each key sentence, and then set the third element information in the key sentence and the marked object set corresponding to it as a key-value pair, perform cyclic screening on each key sentence, confirm the key-value pair set, and then confirm the second layout information based on the key-value pair set; A target image is generated based on the first layout information and the second layout information.

2. The AI ​​image generation method based on image analysis and language description according to claim 1, Features: The determining of the first degree of association between the first basic image information corresponding to each object contour and the first element information corresponding to each key sentence specifically includes: Prioritizing comparing the first basic image information corresponding to each object outline with the first element information corresponding to each key sentence, and then confirming the relevant basic image information corresponding to each object outline and the relevant element information corresponding to each key sentence; Obtaining relevant basic image information corresponding to each object contour, and extracting relevant element information corresponding to the relevant basic image information corresponding to each object contour from each key sentence, and then confirming a first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information; The first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information is compared with a preset correlation degree threshold; when the first correlation degree between the relevant basic image information corresponding to each object contour and the relevant element information corresponding to the relevant basic image information exceeds the preset correlation degree threshold, the relevant basic image information and the relevant element information are marked as target basic image information and target element information.

3. AI image generation system based on image analysis and language description, It is characterized in that include: An image recognition and analysis module, used to recognize and obtain the contours of each object in the image to be detected, and to confirm the first basic image information corresponding to each object contour based on the contours of each object; The identifying and acquiring the contours of each object in the image to be detected, and confirming the first basic image information corresponding to each object contour based on the contours of each object, specifically includes: Associating the image to be detected with the image extraction model, thereby extracting each object in the image to be detected and identifying the object contour corresponding to each object; Based on the object contours corresponding to the objects, the objects are grouped and divided into first basic image information according to a preset division method, wherein the first basic image information includes first person image information, first animal image information, first plant image information and other image information, wherein the preset division method is set to divide according to basic attributes of the object contours; A language recognition and analysis module, used to identify and obtain each key sentence in the language to be detected, and confirm the first element information corresponding to each key sentence based on the key sentence; The identifying and obtaining each key sentence in the language to be detected, and confirming the first element information corresponding to each key sentence based on the key sentence, specifically includes: Associating the language to be detected with the language extraction model for identification, confirming the sentence segmentation information in the language to be detected, and then confirming each key sentence in the language to be detected based on the sentence segmentation information, and then confirming the subject information in each key sentence, and setting the subject information in each key sentence as the first element information, wherein the first element information includes first person element information, first animal element information, first plant element information and other element information; An image and language association analysis module, used to confirm a first degree of association between the first basic image information corresponding to each object outline and the first element information corresponding to each key sentence, and then confirm the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence; The confirming the second element information corresponding to each key sentence based on the first element information corresponding to each key sentence specifically includes: Confirm each key sentence corresponding to the first element information, perform circular screening on each key sentence, and then extract each description information set associated with the first element information based on each key sentence, and confirm the first overlap of each description information in each description information set by comparing the each description information set, remove the description information whose first overlap is higher than a preset overlap threshold, integrate the remaining description information in each description information set, and mark it as the second element information; A target image generation module, configured to confirm the layout relationship between the contours of each object and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence, and then generate a target image; The determining the layout relationship between each object outline and each key sentence based on the first correlation degree and the second element information corresponding to each key sentence specifically includes: Based on the first association degree, target basic image information and target element information are confirmed, and the target basic image information confirms first layout information between the target basic image information and the target element information according to the second element information; The determining of the layout relationship between the contours of each object and each key sentence, and then generating a target image, specifically includes: Acquire positional relationship statement information in each key sentence, set the positional relationship statement information in each key sentence as the third element information, confirm the positional information of the third element information in each key sentence, and then confirm the marked object set within the preset range of the positional information based on the positional information corresponding to the third element information in each key sentence, and then set the third element information in the key sentence and the marked object set corresponding to it as a key-value pair, perform cyclic screening on each key sentence, confirm the key-value pair set, and then confirm the second layout information based on the key-value pair set; A target image is generated based on the first layout information and the second layout information.

4. A computer-readable storage medium, Features: Instructions are stored, and when the instructions are executed on a computer, the computer executes the AI ​​image generation method based on image analysis and language description as described in any one of claims 1 to 2.