Retrieval-based text-to-image generation with visual-semantic contrastive representation
Abstract
Systems and methods for image generation are described. Embodiments of the present disclosure receive a text phrase that describes a target image to be generated; generate text features based on the text phrase; retrieve a search image based on the text phrase; and generate the target image using an image generation network based on the text features and the search image.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 2.
Claims (8)
- Claim 1Independent Claim
A method for image processing using a computing system including at least one processor and at least one memory, the method comprising: receiving, by the computing system, a text phrase that describes a target object; generating, by the computing system, text features based on the text phrase, wherein the text features represent the target object in an embedding space; generating a random noise vector; combining the random noise vector with the text features to obtain noisy text features; upsampling the noisy text features; retrieving, by the computing system from a database, a search image using the text phrase as a search query; and generating, by the computing system using an image generation network comprising parameters stored in the at least one memory, a target image depicting the target object based on the noisy text features and the search image.
- Claim 2Depends on #1
The method of claim 1, further comprising: encoding the search image using a cross-modal encoder to obtain a search image representation; encoding the text phrase using the cross-modal encoder to obtain a text phrase representation; and selecting the search image by comparing the search image representation and the text phrase representation.
- Claim 3Depends on #1
The method of claim 1, further comprising: applying a text attention network to the text features to obtain text attention features, wherein the target image is generated based on the text attention features.
- Claim 4Depends on #1
The method of claim 1, further comprising: applying an image attention network to the search image to obtain image attention features, wherein the target image is generated based on the image attention features.
- Claim 5Depends on #1
The method of claim 1, further comprising: retrieving a plurality of search images based on the text phrase, wherein the target image is generated based on the plurality of search images.
- Claim 6Independent Claim
A method for training a machine learning model using a computing system including at least one processor and at least one memory, the method comprising: receiving, by the computing system, a text phrase that describes a target object; generating, by the computing system, text features based on the text phrase, wherein the text features represent the target object in an embedding space; generating a random noise vector; combining the random noise vector with the text features to obtain noisy text features; upsampling the noisy text features; retrieving, by the computing system from a database, a search image using the text phrase as a search query; generating, by the computing system using an image generation network comprising parameters stored in the at least one memory, a target image depicting the target object based on the noisy text features and the search image; and updating the parameters of the image generation network based on the target image.
- Claim 7Depends on #6
The method of claim 6, further comprising: computing a generator contrastive learning loss based on the target image and an original image, wherein the parameters of the image generation network are updated based on the generator contrastive learning loss.
- Claim 8Depends on #6
The method of claim 6, further comprising: determining whether the target image is a generated image using a discriminator network; computing a discriminator contrastive learning loss based on the target image and an original image; and updating parameters of the discriminator network based on the discriminator contrastive learning loss.
Technical Overview & Description
BACKGROUND The following relates generally to image processing, and more specifically to image generation using machine learning. Digital image processing refers to the use of a computer to edit a digital image or synthesize an image using an algorithm or a processing network. Image generation is a subfield in image processing. In some examples, image generation is based on natural language input from users (i.e., text-image generation). For example, a machine learning framework may take a query as input and output a generated image comprising semantic information from the query. However, text input may not include enough information for conventional image generation networks to construct a complex image. Therefore, there is a need in the art for improved image generation systems that can generate more complex images based on text inputs. SUMMARY The present disclosure describes systems and methods for image generation. Embodiments of the present disclosure include an image generation apparatus configured to generate images based on a text prompt. Embodiments of the inventive concept involve doing an image search based on the text prompt, and then using one or more retrieved images along with the text to generate a new image. A cross-modal encoder of the image generation apparatus can encode candidate search images to obtain search image representations. The same cross-modal encoder can then encode a text phrase to obtain a text phrase representation. An image search component is used to select a search image from the candidate images by comparing each of the search image representations to the text phrase representation. A search image is used as guidance along with the text phrase to generate a target image. In some examples, the image generation apparatus includes a generative adversarial network (GAN) comprising a generator and a discriminator. The generator and the discriminator are trained using contrastive learning method. A method, apparatus, and non-transit
Cited By — Indexed Forward Citations (2 of 2 total)
References Cited — Backward Prior Art (6)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Yuan, et al.,
- “
- Multimodal Contrastive Training for Visual Representation Learning,
- ”
- CVPR 2021, pp. 6995-7004.
- Zhang, et al.,
- “
- Cross-Modal Contrastive Learning for Text-to-Image Generation,
- ”
- CVPR 2021, pp. 833-842.