Image generation method, apparatus and device, and storage medium

By obtaining a text collection and a pre-trained image generation model, it generates and displays paired relationship images, solving the problem of personalized avatars that cannot generate images of lovers and besties in the existing technology, and realizing the need for personalized image generation.

WO2024221856A1PCT designated stage expired Publication Date: 2024-10-31BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/132219
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-28
Filing Date
2023-11-17
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing painting software programs can only generate a single image and cannot meet the needs for personalized avatar generation of paired relationship images such as couple images and bestie images.

Method used

By obtaining the text collection and the pre-trained image generation model, it sends an image generation request to the server, generates and displays paired relationship images, and meets the generation needs of personalized pairing relationship avatars.

Benefits of technology

It realizes the generation of paired relationship images based on the input text collection, meets the needs for generating personalized paired relationship avatars, and improves the personalization and satisfaction of image generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023132219_31102024_PF_FP_ABST
    Figure CN2023132219_31102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and provides an image generation method, apparatus and device, and a storage medium. The method comprises: acquiring target information used for image generation, wherein the target information comprises a text set; in response to an image generation operation for the target information, sending an image generation request to a server, wherein the image generation request carries the target information; receiving M groups of images sent by the server, wherein each group of the M groups of images comprise two images that have a pairwise relationship in terms of preset content, the M groups of images are generated by the server according to the target information and a pre-trained image generation model, and M is a positive integer; and displaying the M groups of images. Thus, images having pairwise relationships can be generated according to inputted text sets, thereby meeting requirements of generating personalized avatars having pairwise relationships.
Need to check novelty before this filing date? Find Prior Art

Description

Image generation method, device, equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 28, 2023, with application number 2023104869814 and invention name “Image Generation Method, Device, Equipment and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to an image generation method, apparatus, device, and storage medium. Background Art

[0003] With the rapid development of computer technology and the diversification of social products, users can upload one or more avatars representing their own images through social platforms. Users can upload real photos or search for online images and upload them.

[0004] Since the avatars uploaded by social products have certain privacy and personalized avatar settings, currently, personalized avatars can be generated according to user needs through painting software programs.

[0005] However, current painting software programs can only generate single images. They cannot meet the needs of generating personalized avatars for paired images such as couple images and best friend images. Paired images refer to two images that are perceived as paired images in terms of image content and image style.

[0006] Summary of the Invention

[0007] The present application provides an image generation method, apparatus, device and storage medium, which can generate paired images based on an input text set or an input text set and an uploaded image, meeting the generation requirements of personalized paired avatars.

[0008] In a first aspect, the present application provides an image generation method, comprising:

[0009] Acquiring target information for image generation, wherein the target information includes a text set;

[0010] In response to an image generation operation for the target information, sending an image generation request to a server, where the image generation request carries the target information;

[0011] receiving M groups of images sent by the server, each group of the M groups of images including two images having a paired relationship based on preset content, the M groups of images being generated by the server according to the target information and a pre-trained image generation model, and M being a positive integer;

[0012] The M groups of images are displayed.

[0013] In a second aspect, the present application provides an image generation method, comprising:

[0014] receiving an image generation request sent by a client, wherein the image generation request carries target information, and the target information includes a text set;

[0015] Generate M groups of images based on the target information and a pre-trained image generation model, where each group of the M groups of images includes two images that have a paired relationship based on preset content;

[0016] The M groups of images are sent to the client.

[0017] In a third aspect, the present application provides an image generating device, comprising:

[0018] An acquisition module, configured to acquire target information for image generation, wherein the target information includes a text set;

[0019] a sending module, configured to send an image generation request to a server in response to an image generation operation for the target information, wherein the image generation request carries the target information;

[0020] a receiving module, configured to receive M groups of images sent by the server, each group of the M groups of images including two images having a paired relationship based on preset content, the M groups of images being generated by the server based on the target information and a pre-trained image generation model, and M being a positive integer;

[0021] A display module is used to display the M groups of images.

[0022] In a fourth aspect, the present application provides an image generating device, comprising:

[0023] A receiving module, configured to receive an image generation request sent by a client, wherein the image generation request carries target information, and the target information includes a text set;

[0024] a processing module, configured to generate M groups of images based on the target information and a pre-trained image generation model, wherein each group of the M groups of images includes two images having a paired relationship in terms of preset content;

[0025] A sending module is used to send the M groups of images to the client.

[0026] In a fifth aspect, the present application provides an image generating device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method described in the first aspect or any possible implementation scheme of the first aspect.

[0027] In a sixth aspect, the present application provides a computer-readable storage medium for storing a computer program, which enables a computer to execute the method described in the first aspect or any of the possible implementations of the first aspect.

[0028] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in the first aspect or any one of the possible implementations of the first aspect.

[0029] In summary, in this application, the terminal device obtains target information for image generation, and the target information includes a text set. In response to the image generation operation for the target information, the terminal device sends an image generation request to the server, and the image generation request carries the target information. The server generates M groups of images based on the target information and a pre-trained image generation model. Each group of images includes two images with a paired relationship based on preset content. The terminal device receives and displays the M groups of images sent by the server. Thus, paired relationship images can be generated based on the input text set to meet the generation requirements of personalized paired relationship avatars.

[0030] Furthermore, the target information also includes a target image, so that a paired relationship image can be generated based on the input text set and the uploaded target image, meeting the generation requirements of personalized paired relationship avatars. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] FIG1 is a schematic diagram of a system architecture of an image generation method provided in an embodiment of the present application;

[0033] FIG2 is a schematic diagram of an application scenario of an image generation method provided in an embodiment of the present application;

[0034] FIG3 is a schematic diagram of an application scenario of an image generation method provided in an embodiment of the present application;

[0035] FIG4 is a flow chart of an image generation method provided in an embodiment of the present application;

[0036] FIG5 is a schematic diagram of an image generation page provided in an embodiment of the present application;

[0037] FIG6 is a schematic diagram of a search results page provided in an embodiment of the present application;

[0038] FIG7 is a schematic diagram of a process of generating a display image page according to an embodiment of the present application;

[0039] FIG8 is a schematic diagram of a process of generating a display image page according to an embodiment of the present application;

[0040] FIG9 is a schematic diagram of an image generation page provided in an embodiment of the present application;

[0041] FIG10 is a schematic diagram of an image generation page provided in an embodiment of the present application;

[0042] FIG11 is a schematic diagram of an image generation page provided in an embodiment of the present application;

[0043] FIG12 is a flowchart of an image generation method provided in an embodiment of the present application;

[0044] FIG13 is an interactive flow chart of an image generation method provided in an embodiment of the present application;

[0045] FIG14 is a schematic structural diagram of an image generating device provided in an embodiment of the present application;

[0046] FIG15 is a schematic structural diagram of an image generating device provided in an embodiment of the present application;

[0047] FIG16 is a schematic block diagram of an image generating device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0049] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0050] Before introducing the technical solution of this application, the following is an introduction to the relevant knowledge of this application:

[0051] 1. Artificial Intelligence (AI): It is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to perceive, reason, and make decisions. AI technology is an interdisciplinary discipline covering a wide range of fields, encompassing both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning. The embodiments of this application specifically relate to computer vision (CV), natural language processing, and machine learning, all within the AI ​​field.

[0052] 2. Computer vision technology. Computer vision is the science of making machines "see." More specifically, it refers to machine vision that uses cameras and computers to replace the human eye to identify and measure targets, and further performs image processing to make the computer-processed images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to establish artificial intelligence systems that can obtain information from images or multidimensional data. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, and map construction. The embodiments of this application specifically relate to image processing under the computer vision umbrella. M groups of images are generated based on an input text set and a pre-trained image generation model, or based on an input text set, an uploaded target image, and a pre-trained image generation model. Each group of M images includes two images that have a pairwise relationship based on preset content. This can meet the needs of generating personalized paired-relationship avatars.

[0053] 3. Natural language processing (NLP) technology. Natural language processing (NLP) is a key area of ​​research in computer science and artificial intelligence. Research in this field involves natural language, the language we use daily, and is therefore closely related to linguistics. NLP technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.

[0054] 4. Machine Learning (ML) is a multidisciplinary interdisciplinary field that involves probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory, and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. This application also relates to machine learning in the field of artificial intelligence. For example, a machine learning model is trained using machine learning technology so that the trained machine learning model can generate personalized images based on the input text, specifically, it can generate paired relationship images.

[0055] 5. Paired images refer to two images that are perceived as paired images in terms of image content and image style. Image content refers to the elements included in the image, such as people, animals, scenery, etc. Image style refers to different artistic styles, such as cartoon style, classical Chinese style, punk style, and many other artistic styles.

[0056] In the related art, only a single image can be generated. For paired images such as couple images and bestie images, it is impossible to meet the generation requirements of personalized avatars. In order to solve this technical problem, the terminal device in this application obtains target information for image generation. The target information includes a text set. In response to the image generation operation for the target information, the terminal device sends an image generation request to the server. The image generation request carries the target information. The server generates M groups of images based on the target information and a pre-trained image generation model. Each group of images includes two images with a paired relationship based on preset content. The terminal device receives and displays the M groups of images sent by the server. Thus, paired images can be generated based on the input text set to meet the generation requirements of personalized paired avatars.

[0057] The technical solution of this application will be described in detail below:

[0058] For example, FIG1 is a schematic diagram of the system architecture of an image generation method provided in an embodiment of the present application. As shown in FIG1 , the system architecture may include a server 10 and a terminal device 20. The terminal device 20 may be one or more terminal devices, and the number of terminal devices is not limited. As shown in FIG1 , the terminal device 20 may establish a network connection with the server 10 to facilitate data exchange with the server 10 via the network connection.

[0059] The terminal devices may include: smart phones, tablet computers, laptop computers, desktop computers, wearable devices, smart home devices, head-mounted devices, vehicle-mounted terminals, smart voice interaction devices, and other smart terminals with image generation capabilities. It should be understood that the terminal device 20 shown in FIG1 may be installed with a target application (i.e., an application client). When the application client runs in the terminal device, it can exchange data with the server 10 shown in FIG1 .

[0060] Among them, server 10 can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0061] For example, an application client with an image generation function may be integrated into the terminal device 20. The application client may include a social client (such as an instant messaging client), a multimedia client (such as a video client), an entertainment client (such as a game client), an educational client, and other clients with image loading and display functions.

[0062] For ease of understanding, further reference is made to FIG2 , which is a schematic diagram of an application scenario of an image generation method provided in an embodiment of the present application. The server shown in FIG2 may be the aforementioned server 10 , and the terminal device shown in FIG2 may be the terminal device shown in FIG1 .

[0063] As shown in FIG2 , in one embodiment, a terminal device 20 may be a terminal device used by a target object (e.g., user A). The target object can select or input a text set on the terminal device that they wish to use to generate an image. The text set may include one or more texts, and there is no limit on the number of texts selected or input by the target object. For example, the target object can enter text information into a text input box provided on the terminal device as a text set. Specifically, the target object can trigger a text input control provided on an image generation page to input the text set into the terminal device. The image generation page is a display page of the terminal device held by the target object. As shown in FIG2 , the terminal device can display the text set entered or selected by the target object on the image generation page. As shown in FIG2 , a generation control 20a is displayed on the image generation page. After the target object selects a text set, a trigger operation can be performed on the generation control 20a displayed on the image generation page. Furthermore, the terminal device can redirect the image generation page to a first display page 20b. The first display page 20b displays "Image Generating" to prompt the user that the image is currently being generated based on the text set. After generating M sets of paired images, the M sets of paired images can be displayed. Each set of images includes two images that have a paired relationship based on preset content, such as couple images or best friend images. As shown in Figure 2, the terminal device first displays one set of images, which includes a first image and a second image.

[0064] FIG3 is a schematic diagram of an application scenario of an image generation method provided by an embodiment of the present application, wherein the server shown in FIG3 may be the server 10 described above, and the terminal device shown in FIG3 may be the terminal device shown in FIG1 described above.

[0065] In one embodiment, as shown in FIG3 , a target user can select a target image and text set according to their needs, trigger an image upload control provided on the image generation page, and trigger a text input control provided on the image generation page to input the target image and text set into a terminal device. The image generation page is a display page of the terminal device owned by the target user. As shown in FIG3 , the terminal device can display the target image and text set uploaded by the target user on the image generation page, which displays a generation control 20a. After the target user selects the target image and text set, they can trigger the generation control 20a displayed on the image generation page. Furthermore, the terminal device can redirect the image generation page 20a to a first display page 20b, which displays "Image Generating" to prompt the user that an image is currently being generated based on the target image and text set. After generating M sets of paired images, M sets of paired images can be displayed, each set of images including two images that are paired based on preset content, such as images of a couple or close friends. As shown in FIG3 , the terminal device first displays a group of images, the group of images including a first image and a second image, wherein the first image may be a target image, and the second image is a generated image that is paired with the target image.

[0066] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation and other scenarios.

[0067] The technical solution of this application is described in detail below with reference to the accompanying drawings.

[0068] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0069] FIG4 is a flowchart of an image generation method provided in an embodiment of the present application. The image generation method can be performed by an image generation device, which can be implemented in software and / or hardware. The image generation device can be a terminal device or a chip or circuit of the terminal device. Specifically, it can be a client integrated with image generation capabilities. As shown in FIG4, the image generation method of this embodiment can include the following steps:

[0070] S101: A terminal device obtains target information for image generation, where the target information includes a text set.

[0071] S102 : In response to the image generation operation for the target information, the terminal device sends an image generation request to the server, where the image generation request carries the target information.

[0072] S103: The terminal device receives M groups of images sent by the server, where each group of the M images includes two images that have a paired relationship based on preset content. The M groups of images are generated by the server based on target information and a pre-trained image generation model, where M is a positive integer. The preset content refers to the image content presented by each image.

[0073] S104. The terminal device displays M groups of images.

[0074] Specifically, the terminal device obtains target information for image generation. The target information is information input into the terminal device by the target object in order to obtain a paired image. The target information includes a text set, which may include one or more texts. The text set may be text information input by the target object in a text input box provided by the terminal device, or a recommended tag selected by the target object from the recommended tags provided by the terminal device, or a combination of text information input by the target object and a selected recommended tag.

[0075] Optionally, the terminal device obtains target information for image generation in the following three ways:

[0076] Method 1: Receive the text set entered by the target object in the text box on the image generation page.

[0077] Method 2: Receive the first text entered by the target object in the text box of the image generation page, and in response to the target object's selection operation for the recommended tag displayed on the image generation page, write the second text corresponding to the recommended tag selected by the target object into the text box. A text set is obtained based on the first text and the second text corresponding to the recommended tag selected by the target object, wherein the first text and the second text may include one or more texts. The first text is the text entered by the target object in the text box of the image generation page, and the second text is the text entered by the target object in the text box of the image generation page, and the text corresponding to the recommended tag selected by the target object for the recommended tag displayed on the image generation page. The first text and the second text constitute a text set.

[0078] Method three: in response to the target object's selection operation on the recommended tag displayed on the image generation page, the text corresponding to the recommended tag selected by the target object is written into the text box, and a text set is obtained based on the text corresponding to the recommended tag selected by the target object.

[0079] Furthermore, in one practicable manner, the target information further includes M, where M is used to indicate the number of images to be generated. One or more groups of images may be generated at a time. The method of this embodiment, based on any of the above three manners, may further include:

[0080] The terminal device combines the above text set and M into target information.

[0081] FIG5 is a schematic diagram of an image generation page provided by an embodiment of the present application. In one embodiment, as shown in FIG5 , the image generation page may include a text box 11a and a setting option for the number of generated images. Optionally, the image generation page may include a text box 11a, a recommended tag 11b, and a setting option for the number of generated images. In the above-mentioned first method, the target object may enter a text set in the text box of the image generation page, such as “Try to describe the image content, scene, subject, and art style of the image to be generated, separated by commas.” In the above-mentioned second method, the target object may enter a first text in the text box of the image generation page, such as “Try to describe the image content, scene, subject, and art style of the image to be generated, separated by commas,” and may also select a recommended tag from the tags displayed by the recommended tag 11b. Accordingly, the terminal device writes the text corresponding to the recommended tag selected by the target object into the text box in response to the target object's selection operation on the recommended tag displayed on the image generation page, and obtains a text set based on the first text and the text corresponding to the recommended tag selected by the target object. In the third method described above, the target object can select a recommended tag from the tags displayed by recommended tag 11b. Accordingly, the terminal device writes the text corresponding to the target object's selected recommended tag into the text box in response to the target object's selection of the recommended tag displayed on the image generation page. Based on the text corresponding to the target object's selected recommended tag, a text set is generated. Optionally, M can be 1 or a positive integer greater than 1. When M is 1, it can be a default value and does not require user setting. When the user sets M, the terminal device combines the above text set and M to form the target information. Optionally, the target object can also perform corresponding operations such as adding, modifying, deleting, and rewriting text information on the text already filled in the text box.

[0082] The following describes in detail how to open the image generation page. Before S101, the image generation page needs to be displayed in response to the operation of the target object. This embodiment shows the following two optional implementation methods:

[0083] Optionally, in an practicable manner, before S101, the method of this embodiment may further include:

[0084] S105. In response to the target object inputting a preset keyword in the target browser input box, the terminal device displays a search result page, where the search result page includes a first view and a second view. The first view includes at least one set of generated images, each set of images includes two images that have a paired relationship based on preset content, and the second view includes an entrance for entering the image generation page.

[0085] S106: The terminal device displays an image generation page in response to the image generation operation triggered by the target object in the first view.

[0086] FIG6 is a schematic diagram of a search results page provided in an embodiment of the present application. As shown in FIG6 , a target user enters a preset keyword, such as "XX image" or "XX avatar," in the target browser input box. XX images can be paired images, such as couple images or best friend images. After clicking Search, the terminal device displays the search results page shown in FIG6 in response to the target user entering the preset keyword in the target browser input box. The search results page can include a first view and a second view. The first view includes at least one generated set of XX images, each set of images including two images that are paired based on the preset content. For example, if the target user searches for couple images, the first view displays at least one generated set of couple images. The second view includes an entry for accessing an image generation page. In a first practicable embodiment, the image generation operation triggered by the target user in the first view can be the target user clicking on any image displayed in the first view. The terminal device displays the image generation page in response to the image generation operation triggered by the target user in the first view.

[0087] Optionally, in an practicable manner, in S106, the terminal device displays an image generation page in response to the image generation operation triggered by the target object in the first view, which may specifically be:

[0088] S1061. In response to a target operation of a target object on any target image in at least one group of images in a first view, display an image display page, where the image display page includes the target image, target information for generating the target image, and a third view, where the third view includes an entrance for entering the image generation page.

[0089] S1062: In response to the image generation operation triggered by the target object in the third view, an image generation page is displayed, and target information for generating the target image is displayed in a text box on the image generation page.

[0090] For example, FIG7 is a schematic diagram of a process for displaying an image generation page provided by an embodiment of the present application. As shown in FIG7 , a target object can click on any target image in at least one group of images in the first view, for example, if the target image is the fourth image. In response to this operation, the terminal device displays an image display page 11c as shown in FIG7 . Image display page 11c includes the fourth image, target information for generating the fourth image, and a third view. As shown in FIG7 , the target information for generating the fourth image is "a girl with thick makeup, looking back, with long blue hair, anime brushstrokes, backlighting, warm and quiet, dark blue background, high definition." The third view includes an entry for entering the image generation page, and the third view displays instruction information, which is "change the words to generate a new image." Next, if the target object clicks on the entry for entering the image generation page in the third view, as shown in FIG7 , the terminal device displays an image generation page 11d as shown in FIG7 , in response to the image generation operation triggered by the target object in the third view. The target information for generating the fourth image is displayed in the text box of the image generation page.

[0091] Optionally, in another practicable manner, in S106, the terminal device displays an image generation page in response to the image generation operation triggered by the target object in the first view, which may specifically be:

[0092] S1061′: In response to the image generation operation triggered by the target object in the second view, display an image generation page.

[0093] Figure 8 is a schematic diagram of a process for displaying an image generation page provided in an embodiment of the present application. As shown in Figure 8, on the search result page shown in Figure 6, the second view includes an entrance for entering the image generation page. The target object can click on the second view. At this time, the terminal device responds to the image generation operation triggered by the target object in the second view and displays the image generation page 11e as shown in Figure 8.

[0094] Through the above two methods, you can provide the target object with customized input text or modify the text, or enter text based on the recommended tags to generate a pairwise relationship image.

[0095] Optionally, in an implementable manner, the image generation page may further include an image generation type switching view, where the image generation types include single image generation and paired image generation. The image generation page displayed in S1061 and S1061′ may specifically be:

[0096] S11. In response to the target object selecting the operation of generating a paired relationship image, display a first type of image generation page. The image generation request also carries first indication information. The first indication information is used to indicate the generation of the first type of paired relationship image or the generation of the second type of paired relationship image.

[0097] Specifically, the first type of paired relationship image is, for example, a couple image, and the second type of paired relationship image is, for example, a bestie image. The first type of paired relationship image and the second type of paired relationship image can also be other paired relationship types, and the embodiment of the present application does not limit this. Figure 9 is a schematic diagram of an image generation page provided in an embodiment of the present application. As shown in Figure 9, the image generation page can also include an image generation type switching view 11f based on the above-mentioned image generation page. The image generation type includes single image generation (shown as "single person" in Figure 9) and paired relationship image generation (shown as "pair" in Figure 9). When the target object clicks to switch to "pair", the terminal device responds to the target object's selection of the paired relationship image generation operation and displays the first type of image generation page. The first type of image generation page is, for example, the image generation page shown in Figure 9, where the generation quantity is displayed as a group. Accordingly, the image generation request also carries a first indication information, and the first indication information is used to instruct the server to generate a first type of paired relationship image or generate a second type of paired relationship image.

[0098] In another practicable manner, the method of this embodiment may further include:

[0099] S21 . In response to the target object selecting a single image generation operation, display a second type of image generation page. The image generation request further carries second instruction information. The second instruction information is used to instruct the generation of a single image.

[0100] S22. Receive N images sent by the server, where N is a positive integer.

[0101] S23. Display N images.

[0102] Figure 10 is a schematic diagram of an image generation page provided in an embodiment of the present application. As shown in Figure 10, the image generation page, based on the above-mentioned image generation page, can also include an image generation type switching view 11f. The image generation types include single image generation (shown as "single person" in Figure 10) and paired image generation (shown as "paired" in Figure 10). When the target object clicks to switch to "single person", the terminal device displays the second type of image generation page in response to the target object's selection of the single image generation operation. The second type of image generation page is, for example, the image generation page shown in Figure 10, where the number of generated images is displayed as sheets. Accordingly, the image generation request also carries a second indication information, and the second indication information is used to instruct the server to generate a single image. After generating N images according to the target information, the server sends them to the terminal device, and the terminal device displays the N images.

[0103] Optionally, in one practicable manner, the image generation page further includes an image upload entry, and the target information further includes a target image, where the target image is an image uploaded by the target object through the image upload entry. Before S102, the method of this embodiment may further include:

[0104] S107: The terminal device receives the target image uploaded by the target object through the image upload portal.

[0105] Specifically, the image generation page in this embodiment also includes an image upload entrance. Figure 11 is a schematic diagram of an image generation page provided in an embodiment of the present application. As shown in Figure 11, the image generation page in this embodiment can also include an image upload entrance 12a on the basis of the above-mentioned image generation page. The target object can upload the target image through the image upload entrance 12a. The uploaded target image can be an image taken by the target object or an image downloaded from the Internet. Before or after the target object uploads the target image, a text set can be entered in the text box, such as entering "consistent with the visual style of the uploaded image" as shown in Figure 11. Optionally, other text can be entered in the text box, and recommended tags can also be selected.

[0106] In one embodiment, each group of images in the M groups of images includes a target image and a first image, the first image and the target image have a paired relationship based on preset content, and the first image is generated by the server based on a text set, a target image and a pre-trained image generation model.

[0107] In another embodiment, when the target information further includes a target image, the method of this embodiment may further include:

[0108] S108. The terminal device receives M first images sent by the server. The first images and the target image have a paired relationship based on preset content. The first images are generated by the server according to the text set, the target image and the image generation model.

[0109] S109: The terminal device displays M first images.

[0110] Alternatively, S109 may be: forming a group of images with the target image and each first image, obtaining M groups of images, and displaying the M groups of images.

[0111] Accordingly, the server generates M groups of images based on the text set, the target image, and the pre-trained image generation model. Each group of the M groups of images includes two images that have a paired relationship based on the preset content. In this embodiment, the terminal device obtains target information for image generation. The target information includes a text set and an uploaded target image. In response to the image generation operation for the target information, the terminal device sends an image generation request to the server. The image generation request carries the target information. The server generates M groups of images based on the target information and the pre-trained image generation model. Each group of images includes two images that have a paired relationship based on the preset content. The terminal device receives and displays the M groups of images sent by the server. Thus, paired images can be generated based on the input text set and the uploaded target image, meeting the generation requirements of personalized paired avatars.

[0112] In the above S103, the terminal device receives M groups of images sent by the server, and each group of images in the M groups of images includes two images that have a paired relationship in preset content, where the preset content can be, for example, style and main content perception, or other content, which is not limited in this embodiment.

[0113] For example, taking M equal to 1 as an example, the obtained text set is, for example, "a couple's avatar wearing pink tops and pinching each other's faces". Based on the text set, the server will generate a paired avatar image of a man and a woman wearing pink tops and pinching each other's faces. At this time, the couple images are two identical images. Optionally, if the target object selects a recommended tag such as campus, the terminal device will automatically fill in the displayed text box with text that conforms to the campus style, and finally match the clothing, age and campus of the characters in the image in the generated paired image. Optionally, if the target object selects a recommended tag such as animation, the terminal device will automatically fill in the displayed text box with animation-related text information. The server will cartoonize the entire image while generating the image, and add content elements similar to the Chinese and Japanese comic styles to the generated image. The final generated paired image has a typical animation style. Optionally, if the recommended tag selected by the target object is art, for example, the server will refer to the style of well-known paintings when generating images, and will refer to the typical style and color matching in the corresponding paintings, and finally apply and display them in the generated paired relationship images, so that the finally generated paired relationship images have the style of famous works and painters in terms of color matching, line direction, background elements, etc., and finally form paired relationship images with the artificial style of the same painting.

[0114] The image generation method provided in this embodiment is that the terminal device obtains target information for image generation, and the target information includes a text set. The terminal device responds to the image generation operation for the target information by sending an image generation request to the server, and the image generation request carries the target information. The server generates M groups of images based on the target information and a pre-trained image generation model. Each group of images includes two images with a paired relationship based on preset content. The terminal device receives and displays the M groups of images sent by the server. Thus, paired relationship images can be generated based on the input text set to meet the generation requirements of personalized paired relationship avatars.

[0115] FIG12 is a flowchart of an image generation method provided in an embodiment of the present application. The method can be performed by an image generation device, which can be implemented in software and / or hardware. The image generation device can be a server. As shown in FIG12 , the method of this embodiment can include the following steps:

[0116] S201: The server receives an image generation request sent by a terminal device. The image generation request carries target information, and the target information includes a text set.

[0117] S202: The server generates M groups of images according to the target information and a pre-trained image generation model, where each group of the M groups of images includes two images that have a paired relationship based on preset content.

[0118] S203: The server sends M groups of images to the terminal device.

[0119] Specifically, the image generation model can be pre-trained based on samples, with the model input being a text set and the model output being an image generated based on the text set, or the model input being a text set and an image, and the model output being an image generated based on the text set and the input image. Each of the M groups of images includes two images that have a paired relationship based on preset content, where the preset content can be, for example, style and main content perception, or other content, which is not limited in this embodiment.

[0120] Optionally, the image generation request may also carry first indication information, the first indication information being used to indicate the generation of a first type of paired relationship image or a second type of paired relationship image, wherein the first type of paired relationship image is, for example, a couple image, and the second type of paired relationship image is, for example, a bestie image. The first type of paired relationship image and the second type of paired relationship image may also be other paired relationship types, which are not limited in this embodiment of the present application. S202 may specifically be:

[0121] S2021. Generate M groups of images according to the target information, the image generation model and the first instruction information.

[0122] Optionally, M is equal to 1, and S2021 may specifically be:

[0123] S31 . Determine, based on the text set and the first indication information, common elements and difference elements used to generate paired images, where the elements are used to describe the images to be generated.

[0124] Specifically, if the first instruction information indicates generating a first type of paired relationship image (e.g., a couple image), the corresponding difference element may be gender, i.e., male and female, and may also include other elements, which are not limited in this embodiment. Common elements may be determined based on keywords in each text in the text set. For example, if the text set is "school years, golden hair, star-shaped decorations, long hair, anime brushstrokes, relaxed, mysterious, dark background, high definition," the common elements may be determined to include: student years, hair - long golden hair, star-shaped decorations, anime brushstrokes, relaxed, mysterious, dark background, high definition.

[0125] Elements are defined as describing the image to be generated. It's understood that a single image can contain multiple elements. For example, expressions, head attributes, posture, accessories, background, style, lens, and image are all grouped into elements. Each element group has specific elements. For example, expressions can include smiling, crying, angry, laughing, and sad, and head attributes can include glasses, hairstyle, and color. An element pool can be pre-configured, consisting of multiple element groups and the specific elements within each element group.

[0126] S32: Select elements that match the common elements and the different elements from a pre-stored element pool, and combine the selected elements into a first text and a second text. The first text and the second text have common elements and different elements.

[0127] Specifically, taking the text set "school years, golden hair, star-shaped decorations, long hair, anime brushstrokes, relaxed, mysterious, dark background, high definition" as an example, the common elements of this text set are determined to include: school years, hair-long golden hair, star-shaped decorations, anime brushstrokes, relaxed, mysterious, dark background, high definition. The differentiating elements include male and female. Select elements that match the common elements and the different elements respectively from the pre-stored element pool. Specifically, select elements that match "student days, hair - long golden hair, decoration with shining stars, anime brushstrokes, relaxed, mysterious, dark background, high definition" respectively from the pre-stored element pool, and select elements that match male and female. The selected elements are combined into a first text, for example, "lens high-definition, dark background with mystery, head attributes are long golden hair, decoration with shining stars, style is anime brushstrokes, posture is student days, male". The selected elements are combined into a second text, for example, "lens high-definition, dark background with mystery, head attributes are long golden hair, decoration with shining stars, style is anime brushstrokes, posture is student days, female".

[0128] S33: Input the first text and the second text into the image generation model, and output the first image and the second image, where the first image and the second image have a paired relationship based on preset content.

[0129] Specifically, the first text and the second text are input into the image generation model. The image generation model can generate a first image based on the first text, and then generate a second image based on the second text. It should be noted that for the same text, the image generation model will generate different images under different random seeds, which can ensure a large number of random generations. That is to say, when M is greater than 1, the image generation model repeats the image generation multiple times based on the input first text and second text to generate M groups of images.

[0130] Furthermore, since the image generation model itself is random, the image generation model will generate different images under different random seeds (also called attention weights). For example, in order to make two images in a group of images as similar as possible and improve the matching degree of the two images in a group of images, in one practicable manner, in S33, the first text and the second text are input into the image generation model, and the first image and the second image are output, which can be specifically:

[0131] The image generation model takes the first text, the second text, and instruction information as input and outputs the first image and the second image. The instruction information is used to instruct the image generation model that the difference between the first attention weight used when generating the first image based on the first text and the second attention weight used when generating the second image based on the second text is less than a preset threshold. The preset threshold can be 0, in which case the first attention weight and the second attention weight are the same. This ensures a high degree of match between the two images in a set.

[0132] Optionally, M is greater than 1, the target information further includes M, and the text set includes multiple texts. In S2021, M groups of images are generated according to the target information, the image generation model, and the first instruction information. Specifically, the steps may be:

[0133] S31′: Determine common elements and difference elements for generating paired images based on the text set and the first indication information, where the elements are used to describe the image to be generated.

[0134] Specifically, the first indication information is used to instruct the generation of the first type of paired relationship image or the generation of the second type of paired relationship image, and to determine the common elements and difference elements used to generate the paired relationship image. The specific details are the same as those in S31 and will not be repeated here.

[0135] S32′: Select elements that match the common elements and the different elements from the pre-stored element pool, and combine the selected elements into a first text and a second text. The first text and the second text have common elements and different elements.

[0136] Specifically, the specific process of S32' is the same as the detailed process in S32, and will not be repeated here.

[0137] S33', inputting the first text, the second text and M into the image generation model, where M is used to instruct the image generation model to perform M image generation and output M groups of images.

[0138] Specifically, the first text, the second text, and M are input into the image generation model. According to M, it can be known that the image generation model needs to perform M image generation, wherein each image generation process is as follows: the first text and the second text are input into the image generation model, and the first image and the second image are output, and the first image and the second image have a paired relationship based on the preset content. Specifically, the first text, the second text, and the instruction information may be used as the input of the image generation model, and the first image and the second image are output, and the instruction information is used to instruct the image generation model: the difference between the first attention weight used when generating the first image according to the first text and the second attention weight used when generating the second image according to the second text is less than a preset threshold. After M image generation, M groups of images are obtained and output.

[0139] Optionally, the target information also includes a target image, and S2021 may specifically be:

[0140] M groups of images are generated according to the text set, the target image, the image generation model and the first indication information.

[0141] Specifically, in an implementable manner, generating M groups of images according to the text set, the target image, the image generation model, and the first indication information may include:

[0142] S41. Extract characteristic elements of the target image.

[0143] Optionally, extracting characteristic elements of the target image in S41 may specifically be:

[0144] The target image is denoised and its characteristic elements are extracted. De-noising is then performed using an image generation model. A higher noise intensity yields higher quality and creativity in the generated image, but lower similarity to the input target image. Conversely, a lower noise intensity yields lower quality and creativity in the generated image, but higher similarity to the input target image.

[0145] S42: Determine, based on the characteristic elements of the target image and the first indication information, difference elements corresponding to some elements in the characteristic elements.

[0146] Specifically, the first indication information is used to indicate the generation of a first type of paired relationship image or a second type of paired relationship image. For example, the first indication information is used to indicate the generation of a couple image. If the target image is a male image, the difference elements corresponding to some elements in the image feature elements are female.

[0147] S43. Get the target element of the text collection.

[0148] S44: Select elements that match the characteristic element, the target element, and the difference element from the pre-stored element pool, and compose the selected elements into a third text.

[0149] Specifically, the first indication information is used to instruct generation of a couple image. If the target image is a male image, the difference elements corresponding to some elements in the image feature elements are female, and the third text includes female elements.

[0150] S45. Input the third text and M into the image generation model, where M is used to instruct the image generation model to perform M image generation and output M images, and obtain M groups of images according to the target image and the M images.

[0151] Specifically, the third text and M are input into the image generation model. According to M, it can be known that the image generation model needs to perform M image generation. The image generation process for each time is: the third text is used as the input of the image generation model, and an image is output. The image and the target image are paired images. After M image generation, M images are obtained. Each image and the target image form a group of paired images, and finally M groups of images are obtained.

[0152] In the method of this embodiment, for example, if the uploaded target image is a photo of a woman at the beach, the image generation model extracts characteristic elements such as the beach and scenery from the target image to generate an image of a man at the beach, and the style is similar to that of the uploaded image of the woman.

[0153] In an embodiment of the present application, optionally, the pre-trained image generation model can be an image generation model based on a diffusion model (such as a stable diffusion general model). The pre-trained image generation model can also include multiple Lora models. The Lora model is a lightweight model obtained by fine-tuning the stable diffusion general model on a specific style dataset.

[0154] In the embodiment of the present application, the image generation model can be controlled by the style elements included in the input text to generate images of different styles. Multiple image generation models (such as Lora models) for generating images of different styles can also be pre-stored to increase the diversity of the generated image styles. Examples of these styles include: anime, Van Gogh, minimalist, campus, traditional Chinese style, etc.

[0155] The image generation method provided in this embodiment receives an image generation request from a client via a server. The request carries target information, including a text collection. Based on the target information and a pre-trained image generation model, the server generates M sets of images, each of which includes two images that have a pairwise relationship based on preset content. The M sets of images are then sent to the client. This allows paired images to be generated based on the input text collection, meeting the need for generating personalized paired avatars.

[0156] The following describes the image generation method provided by the embodiment of the present application in detail using a specific embodiment. Specifically, FIG13 illustrates the interactive processing process of the image generation method provided by the embodiment of the present application.

[0157] FIG13 is an interactive flow chart of an image generation method provided in an embodiment of the present application. As shown in FIG13 , this embodiment is described by taking the generation of a pairwise relationship image based on an input text set as an example. The method may include the following steps:

[0158] S301. In response to a target subject inputting a preset keyword in a target browser input box, the client displays a search results page, where the search results page includes a first view and a second view. The first view includes at least one set of generated images, each set of images including two images that have a paired relationship based on preset content. The second view includes an entry for entering an image generation page.

[0159] S302: The client displays an image generation page in response to the image generation operation triggered by the target object in the first view.

[0160] Specifically, in one embodiment, the search result page may be shown in FIG6 . Optionally, in one practicable manner, in response to the image generation operation triggered by the target object in the first view, an image generation page is displayed, which may specifically be:

[0161] S3021. In response to a target operation by a target object on any target image in at least one group of images in the first view, the client displays an image display page, where the image display page includes the target image, target information for generating the target image, and a third view, where the third view includes an entry for entering the image generation page.

[0162] S3022: In response to the image generation operation triggered by the target object in the third view, the client displays an image generation page, wherein target information for generating the target image is displayed in a text box on the image generation page.

[0163] Optionally, in another practicable manner, in response to the image generation operation triggered by the target object in the first view, displaying the image generation page in S302 may specifically be:

[0164] S3021′: The client displays an image generation page in response to the image generation operation triggered by the target object in the second view.

[0165] Through the above two methods, you can provide the target object with customized input text or modify the text, or enter text based on the recommended tags to generate a pairwise relationship image.

[0166] Optionally, in an implementable manner, the image generation page may further include an image generation type switching view, where the image generation types include single image generation and paired image generation. The image generation page displayed in S3022 and S3021′ may specifically be:

[0167] S51. In response to the target object selecting the operation of generating a paired relationship image, the client displays a first type of image generation page. The image generation request also carries first indication information, and the first indication information is used to indicate the generation of the first type of paired relationship image or the generation of the second type of paired relationship image.

[0168] In another practicable manner, the method of this embodiment may further include:

[0169] S61: In response to the target object selecting the operation of generating a single image, the client displays a second type of image generation page. The image generation request further carries second instruction information, and the second instruction information is used to instruct the generation of a single image.

[0170] S62. The client receives N images sent by the server, where N is a positive integer.

[0171] S63. The client displays N images.

[0172] S303. The client receives the first text entered by the target object in the text box of the image generation page, and in response to the target object's selection operation for the recommended tag displayed on the image generation page, writes the text corresponding to the recommended tag selected by the target object into the text box, obtains a text set based on the first text and the text corresponding to the recommended tag selected by the target object, and combines the text set and the image generation number M selected by the target object into target information.

[0173] Alternatively, S303 may include receiving a text set entered by the target subject in a text box on the image generation page. Alternatively, in response to the target subject selecting a recommended tag displayed on the image generation page, the text corresponding to the recommended tag selected by the target subject is written into the text box, and a text set is obtained based on the text corresponding to the recommended tag selected by the target subject.

[0174] S304 : In response to the image generation operation for the target information, the client sends an image generation request to the server, where the image generation request carries the target information.

[0175] S305: The server generates M groups of images according to the target information and a pre-trained image generation model, where each group of the M groups of images includes two images that have a paired relationship based on preset content.

[0176] S306: The server sends M groups of images to the client.

[0177] Each of the M groups of images includes two images that have a paired relationship in terms of preset content. The preset content may be, for example, style and main content perception, or other content, which is not limited in this embodiment.

[0178] After receiving M groups of images, the client displays the M groups of images.

[0179] Specifically, the server generates M groups of images based on the target information and a pre-trained image generation model. The specific implementation method can be found in the description of the embodiment shown in Figure 11, which will not be repeated here.

[0180] Optionally, in another embodiment, S303 may specifically be: the client receives the first text entered by the target object in the text box of the image generation page, and in response to the target object's selection operation for the recommended tag displayed on the image generation page, writes the text corresponding to the recommended tag selected by the target object into the text box, obtains a text collection based on the first text and the text corresponding to the recommended tag selected by the target object, and the client responds to the target image uploaded by the target object through the image upload portal, and combines the text collection, the target image and the number M of image generation selected by the target object into target information.

[0181] Correspondingly, in S305, the server generates M groups of images according to the target information and the pre-trained image generation model. For details, please refer to the description of S41-S45, which will not be repeated here.

[0182] In this embodiment, accordingly, S306 may specifically be: the server sends M first images to the client, the first images and the target images have a paired relationship in preset content, and the first images are generated by the server according to the text set, the target image and the image generation model.

[0183] After receiving the M first images, the client may directly display the M first images, or may group the target image with each first image to obtain M groups of images and display the M groups of images.

[0184] In the embodiments of the present application, unless otherwise specified, there is no restriction on the order of the steps. For the same or corresponding description on the client side, please refer to the description in the embodiment shown in FIG4 , and for the same or corresponding description on the server side, please refer to the description in the embodiment shown in FIG12 , which will not be repeated here.

[0185] In one embodiment, the method of this embodiment can also perform style conversion on a target image based on a target image uploaded by a target subject, for example, to cartoonize a real-life image. A corresponding specific implementation method may be: a terminal device obtains a target image in response to the target subject uploading the target image; the terminal device obtains a text collection in response to the target subject inputting text; the target image and the text collection constitute target information; the terminal device sends an image generation request to a server in response to an image generation operation for the target information; the image generation request carries the target information and instruction information for generating a single image. The text collection may include, for example, an anime style. The server generates an anime-style image based on the target information and the instruction information; the image is a cartoonized version of the target image.

[0186] In another embodiment, the method of this embodiment can also perform gender conversion based on image character gender recognition. For example, an uploaded image of a female behavior image can be converted into a corresponding male behavior image.

[0187] In another embodiment, the method of this embodiment can also replace the entire face with the various countries and clothing based on the facial area extracted from the target image uploaded by the target object to achieve a change of clothes. For example, the target object uploads an ID photo wearing a suit through the image upload portal, and the server can extract the face and replace it with an image representing the clothing.

[0188] In another embodiment, the method of this embodiment can also superimpose the text in the text set or the image indicated by the text in the text set on the target image based on the target image uploaded by the target object and the input text set to form a new image. For example, the original elements of the target image can be changed by adding accessories such as wings and headdresses to the uploaded target image. The expression of the portrait (laughing, crying, etc.) can also be modified in the target image and / or text can be added to form an expression picture.

[0189] The image generation method provided in this embodiment can generate paired images based on an input text set, meeting the generation requirements of personalized paired avatars. Furthermore, it can also generate paired images based on an input text set and an uploaded target image, meeting the generation requirements of personalized paired avatars.

[0190] FIG14 is a schematic structural diagram of an image generating device provided in an embodiment of the present application. As shown in FIG14 , the device may include: an acquisition module 11 , a sending module 12 , a receiving module 13 and a display module 14 .

[0191] The acquisition module 11 is used to acquire target information for image generation, and the target information includes a text set;

[0192] The sending module 12 is used to send an image generation request to the server in response to the image generation operation for the target information, where the image generation request carries the target information;

[0193] The receiving module 13 is configured to receive M groups of images sent by the server, where each group of images includes two images that have a paired relationship based on preset content, and the M groups of images are generated by the server based on target information and a pre-trained image generation model, where M is a positive integer;

[0194] The display module 14 is used to display M groups of images.

[0195] In one embodiment, the acquisition module 11 is used to:

[0196] Receive a text collection entered by the target object in the text box on the image generation page; or;

[0197] receiving a first text input by a target object in a text box on an image generation page;

[0198] In response to the target object selecting a recommended tag displayed on the image generation page, writing text corresponding to the recommended tag selected by the target object into the text box;

[0199] Obtain a text set based on the first text and the text corresponding to the recommended tag selected by the target object; or

[0200] In response to the target object selecting a recommended tag displayed on the image generation page, writing text corresponding to the recommended tag selected by the target object into the text box;

[0201] According to the text corresponding to the recommended tag selected by the target object, a text collection is obtained.

[0202] In one embodiment, the target information further includes M, where M is used to indicate the number of images to be generated. The acquisition module 11 is further configured to:

[0203] The text set and M are combined into target information.

[0204] In one embodiment, the display module 14 is further configured to:

[0205] Before the acquisition module 11 acquires target information for image generation, in response to the target subject inputting a preset keyword in the input box of the target browser, a search result page is displayed, the search result page including a first view and a second view, the first view including at least one set of generated images, each set of images including two images having a paired relationship based on preset content, and the second view including an entry for entering the image generation page;

[0206] In response to the image generation operation triggered by the target object in the first view, displaying an image generation page; or,

[0207] In response to the image generation operation triggered by the target object in the second view, an image generation page is displayed.

[0208] In one embodiment, the display module 14 is specifically used to:

[0209] In response to a target operation by a target object on any target image in at least one group of images in the first view, displaying an image display page, the image display page including the target image, target information for generating the target image, and a third view, the third view including an entrance for entering the image generation page;

[0210] In response to the image generation operation triggered by the target object in the third view, an image generation page is displayed, and target information for generating the target image is displayed in a text box on the image generation page.

[0211] In one embodiment, the image generation page includes an image generation type switching view, where the image generation types include single image generation and paired image generation. The display module 14 is specifically configured to:

[0212] In response to the target object selecting the operation of generating a paired relationship image, a first type of image generation page is displayed. The image generation request also carries first indication information, which is used to indicate the generation of a first type of paired relationship image or a second type of paired relationship image.

[0213] In one embodiment, the display module 14 is further configured to:

[0214] In response to the target object selecting an operation of generating a single image, displaying a second type of image generation page, wherein the image generation request further carries second instruction information, and the second instruction information is used to instruct the generation of a single image;

[0215] The receiving module 13 is further configured to: receive N images sent by the server, where N is a positive integer;

[0216] The display module 14 is further configured to display N images.

[0217] In one embodiment, the image generation page further includes an image upload entry, the target information further includes a target image, and the receiving module 13 is further configured to receive the target image uploaded by the target object through the image upload entry.

[0218] In one embodiment, each of the M groups of images includes a target image and a first image, the first image and the target image have a paired relationship based on preset content, and the first image is generated by the server based on the text set, the target image and the image generation model.

[0219] In one embodiment, the receiving module 13 is configured to: receive M first images sent by a server, where the first images have a paired relationship with the target image based on preset content, and the first images are generated by the server based on the text set, the target image, and the image generation model;

[0220] The display module 14 is used to: display M first images; or,

[0221] The target image and each first image are combined into a group of images to obtain M groups of images;

[0222] Display M groups of images.

[0223] It is understandable that after receiving the uploaded target image, the target image can also be processed in combination with the text set, such as style, scene, etc., to generate a processed target image. In addition, a first image is generated based on the text set and the target image, or a first image is generated based on the processed target image. The first image and the processed target image form a group of images, and the two can be couple images that meet the description of the text set. Specifically, it can be to receive an uploaded real-life female image, combine it with the text set, and process the female image, such as processing it into a cartoon style, the style of a certain film and television work, or a campus scene as the background. Then, based on the real-life female image, combined with the text set, a male image of the corresponding style or background is generated, or the gender of the processed female image is directly converted to generate a corresponding male image to form a couple avatar.

[0224] FIG15 is a schematic structural diagram of an image generating device provided in an embodiment of the present application. As shown in FIG15 , the device may include: a receiving module 21 , a processing module 22 and a sending module 23 .

[0225] The receiving module 21 is used to receive an image generation request sent by a client, the image generation request carries target information, and the target information includes a text set;

[0226] The processing module 22 is used to generate M groups of images based on the target information and the pre-trained image generation model, where each group of the M groups of images includes two images that have a paired relationship in terms of preset content;

[0227] The sending module 23 is used to send M groups of images to the client.

[0228] In one embodiment, the image generation request further carries first indication information, where the first indication information is used to indicate whether to generate a first type of paired relationship image or a second type of paired relationship image;

[0229] The processing module 22 is configured to generate M groups of images according to the target information, the image generation model and the first instruction information.

[0230] In one embodiment, M is equal to 1, the text set includes multiple texts, and the processing module 22 is configured to:

[0231] Determining, based on the text set and the first indication information, common elements and difference elements for generating paired relationship images, where the elements are used to describe the images to be generated;

[0232] Selecting elements that match the common elements and the difference elements from a pre-stored element pool, and combining the selected elements into a first text and a second text, wherein the first text and the second text have the common elements and the difference elements;

[0233] The first text and the second text are input into an image generation model, and a first image and a second image are output, where the first image and the second image have a paired relationship based on preset content.

[0234] In one embodiment, the processing module 22 is specifically configured to:

[0235] An image generation model takes a first text, a second text and indication information as input, and outputs a first image and a second image. The indication information is used to instruct the image generation model that the difference between the first attention weight used when generating the first image based on the first text and the second attention weight used when generating the second image based on the second text is less than a preset threshold.

[0236] In one embodiment, M is greater than 1, the target information further includes M, the text set includes a plurality of texts, and the processing module 22 is specifically configured to:

[0237] Determining, based on the text set and the first indication information, common elements and difference elements for generating paired relationship images, where the elements are used to describe the images to be generated;

[0238] Selecting elements that match the common elements and the difference elements from a pre-stored element pool, and combining the selected elements into a first text and a second text, wherein the first text and the second text have the common elements and the difference elements;

[0239] The first text, the second text and M are input into the image generation model, where M is used to instruct the image generation model to generate images M times and output M groups of images.

[0240] In one embodiment, the target information further includes a target image, and the processing module 22 is configured to:

[0241] M groups of images are generated according to the text set, the target image, the image generation model and the first indication information.

[0242] In one embodiment, the processing module 22 is specifically configured to:

[0243] Extract characteristic elements of the target image;

[0244] determining, according to the characteristic elements of the target image and the first indication information, difference elements corresponding to some elements in the characteristic elements;

[0245] Get the target element of the text collection;

[0246] Selecting elements that match the characteristic element, the target element, and the difference element from a pre-stored element pool, and forming a third text with the selected elements;

[0247] The third text and M are input into the image generation model, where M is used to instruct the image generation model to generate images M times and output M images, thereby obtaining M groups of images based on the target image and the M images.

[0248] In one embodiment, the processing module 22 is specifically configured to:

[0249] The target image is subjected to noise processing, and characteristic elements of the target image after noise processing are extracted.

[0250] It should be understood that the device embodiments and method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device shown in Figure 11 can execute the method embodiment corresponding to the instant messaging client, and the aforementioned and other operations and / or functions of the various modules in the device shown in Figure 11 are respectively for implementing the method embodiment corresponding to the instant messaging client. For the sake of brevity, they will not be described in detail here.

[0251] The image generation device of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0252] Figure 16 is a schematic block diagram of an image generation device provided in an embodiment of the present application. The image generation device may be a terminal device or a server.

[0253] As shown in FIG16 , the image generating device may include:

[0254] The memory 710 and the processor 720 are configured to store computer programs and transmit the program code to the processor 720. In other words, the processor 720 can call and run the computer program from the memory 710 to implement the method in the embodiment of the present application.

[0255] For example, the processor 720 may be configured to execute the above method embodiments according to instructions in the computer program.

[0256] In some embodiments of the present application, the processor 720 may include but is not limited to:

[0257] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0258] In some embodiments of the present application, the memory 710 includes but is not limited to:

[0259] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0260] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 710 and executed by the processor 720 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the image generation device.

[0261] As shown in FIG16 , the image generating device may further include:

[0262] The transceiver 730 may be connected to the processor 720 or the memory 710 .

[0263] The processor 720 may control the transceiver 730 to communicate with other devices. Specifically, the processor 720 may send information or data to other devices or receive information or data sent by other devices. The transceiver 730 may include a transmitter and a receiver. The transceiver 730 may further include one or more antennas.

[0264] It should be understood that the various components in the image generating device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0265] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.

[0266] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0267] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

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

[0269] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.

[0270] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An image generation method, characterized in that: include: Acquire target information for image generation, wherein the target information includes a text set; In response to an image generation operation for the target information, sending an image generation request to a server, wherein the image generation request carries the target information; Receiving M groups of images sent by the server, each group of images in the M groups of images includes two images having a paired relationship in preset content, the M groups of images are generated by the server according to the target information and a pre-trained image generation model, and M is a positive integer; The M groups of images are displayed.

2. The image generation method according to claim 1, characterized in that: The obtaining of target information for image generation includes: receiving the text set input by the target object in a text box on the image generation page; or, Receiving a first text input by a target object in a text box on an image generation page; In response to the target object's selection operation on the recommended tag displayed on the image generation page, writing a second text corresponding to the recommended tag selected by the target object into the text box; The text set is obtained according to the first text and the second text corresponding to the recommended tag selected by the target object; or In response to a selection operation of a target object on a recommended tag displayed on the image generation page, writing text corresponding to the recommended tag selected by the target object into the text box; The text set is obtained according to the text corresponding to the recommended tag selected by the target object.

3. The image generation method according to claim 2, characterized in that: The target information further includes M, where M is used to indicate the number of images generated. The image generation method further includes: The text set and the M are combined into the target information.

4. The image generation method according to claim 2, characterized in that: Before acquiring target information for image generation, the image generation method further includes: In response to the target object inputting a preset keyword in the target browser input box, displaying a search result page, the search result page including a first view and a second view, the first view including at least one group of images that have been generated, each group of images including two images that have a paired relationship based on the preset content, and the second view including an entrance for entering the image generation page; In response to the image generation operation triggered by the target object in the first view, displaying the image generation page; or, In response to the image generation operation triggered by the target object in the second view, the image generation page is displayed.

5. The image generation method according to claim 4, characterized in that: The step of displaying the image generation page in response to the image generation operation triggered by the target object in the first view comprises: In response to a target operation of a target object on any target image in at least one group of images in the first view, displaying an image display page, the image display page including the target image, target information for generating the target image, and a third view, the third view including an entrance for entering the image generation page; In response to the image generation operation triggered by the target object in the third view, the image generation page is displayed. The text box on the image generation page displays target information for generating the target image.

6. The image generation method according to claim 4, characterized in that: The image generation page includes an image generation type switching view, the image generation type includes single image generation and paired image generation, and the display of the image generation page includes: In response to the target object selecting an operation of generating a paired relationship image, a first type of image generation page is displayed, and the image generation request also carries first indication information, and the first indication information is used to indicate generating a first type of paired relationship image or generating a second type of paired relationship image.

7. The image generation method according to claim 6, characterized in that: The image generation method further comprises: In response to the target object selecting an operation of generating a single image, displaying a second type of image generation page, wherein the image generation request further carries second indication information, and the second indication information is used to indicate generating a single image; receiving N images sent by the server, where N is a positive integer; The N images are displayed.

8. The image generation method according to any one of claims 2 to 6, characterized in that: The image generation page further includes an image upload entry, the target information further includes a target image, and the image generation method further includes: Receive the target image uploaded by the target object through the image upload entrance.

9. The image generation method according to claim 8, characterized in that: Each group of images in the M groups of images includes the target image and a first image, the first image and the target image have a paired relationship on the preset content, and the first image is generated by the server according to the text set, the target image and the image generation model.

10. The image generation method according to claim 8, characterized in that: The image generation method further comprises: Receiving the M first images sent by the server, wherein the first images have a paired relationship with the target image in the preset content, and the first images are generated by the server according to the text set, the target image and the image generation model; Displaying the M first images; or, The target image and each first image are respectively combined into a group of images to obtain the M groups of images; The M groups of images are displayed.

11. An image generation method, characterized in that: include: Receiving an image generation request sent by a terminal device, wherein the image generation request carries target information, and the target information includes a text set; Generate M groups of images according to the target information and a pre-trained image generation model, wherein each group of the M groups of images includes two images having a paired relationship in terms of preset content; The M groups of images are sent to the terminal device.

12. The image generation method according to claim 11, characterized in that: The image generation request further carries first indication information, where the first indication information is used to indicate generating a first type of paired relationship image or generating a second type of paired relationship image; The step of generating M groups of images according to the target information and a pre-trained image generation model includes: The M groups of images are generated according to the target information, the image generation model and the first indication information.

13. The image generation method according to claim 12, characterized in that: The M is equal to 1, the text set includes a plurality of texts, and the generating the M groups of images according to the target information, the image generation model and the first indication information includes: Determine, according to the text set and the first indication information, common elements and difference elements used to generate paired relationship images, wherein the elements are used to describe the image to be generated; Selecting elements that match the common elements and the difference elements respectively from a pre-stored element pool, and forming a first text and a second text with the selected elements, wherein the first text and the second text have common elements and difference elements; The first text and the second text are input into the image generation model, and a first image and a second image are output, wherein the first image and the second image have a paired relationship based on the preset content.

14. The image generation method according to claim 13, characterized in that: The step of inputting the first text and the second text into the image generation model and outputting a first image and a second image comprises: The first text, the second text and indication information are used as inputs of the image generation model, and the first image and the second image are output. The indication information is used to instruct the image generation model that the difference between the first attention weight used when generating the first image based on the first text and the second attention weight used when generating the second image based on the second text is less than a preset threshold.

15. The image generation method according to claim 12, characterized in that: The M is greater than 1, the target information further includes the M, the text set includes a plurality of texts, and generating the M groups of images according to the target information, the image generation model and the first indication information includes: Determine, according to the text set and the first indication information, common elements and difference elements used to generate paired relationship images, wherein the elements are used to describe the image to be generated; Selecting elements that match the common elements and the difference elements respectively from a pre-stored element pool, and forming a first text and a second text with the selected elements, wherein the first text and the second text have common elements and difference elements; The first text, the second text and M are input into the image generation model, and M is used to instruct the image generation model to perform the M-times image generation and output the M groups of images.

16. The image generation method according to claim 12, characterized in that: The target information also includes a target image, and generating the M groups of images according to the target information, the image generation model and the first indication information includes: The M groups of images are generated according to the text set, the target image, the image generation model and the first indication information.

17. The image generation method according to claim 16, characterized in that: The generating the M groups of images according to the text set, the target image, the image generation model and the first indication information comprises: Extracting characteristic elements of the target image; Determining, according to the characteristic elements of the target image and the first indication information, difference elements corresponding to some elements in the characteristic elements; Get the target element of the text collection; Selecting elements that match the characteristic element, the target element, and the difference element respectively from a pre-stored element pool, and forming a third text with the selected elements; The third text and the M are input into the image generation model, the M is used to instruct the image generation model to perform the M image generation and output the M images, and the M groups of images are obtained according to the target image and the M images.

18. The image generation method according to claim 17, characterized in that: The step of extracting characteristic elements of the target image comprises: The target image is subjected to noise processing, and characteristic elements of the target image after the noise processing are extracted.

19. An image generating device, characterized in that: include: An acquisition module, used for acquiring target information for image generation, wherein the target information includes a text set; A sending module, configured to send an image generation request to a server in response to an image generation operation for the target information, wherein the image generation request carries the target information; A receiving module, configured to receive M groups of images sent by the server, each group of images in the M groups of images includes two images having a paired relationship in preset content, the M groups of images are generated by the server according to the target information and a pre-trained image generation model, and M is a positive integer; A display module is used to display the M groups of images.

20. An image generating device, characterized in that: include: A receiving module, configured to receive an image generation request sent by a client, wherein the image generation request carries target information, and the target information includes a text set; A processing module, configured to generate M groups of images according to the target information and a pre-trained image generation model, wherein each group of the M groups of images includes two images having a paired relationship in terms of preset content; A sending module is used to send the M groups of images to the client.

21. An image generating device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the image generation method according to any one of claims 1-10 or 11-18.

22. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the image generating method according to any one of claims 1-10 or 11-18.

23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the image generating method according to any one of claims 1 to 10 or 11 to 18 are implemented.

Citation Information

Patent Citations

  • Pairing image generation method and device, electronic equipment and storage medium

    CN112464009A

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

    CN114904270A

  • Image generation method and device, equipment and storage medium

    CN116977486A

  • Generation of story videos corresponding to user input using generative models

    US20230118966A1