IP Library Granted Patent US 12,561,852
Granted Patent B2
US 12,561,852 · App. 18/770,154 · Granted Feb 24, 2026

Cross-modal contrastive learning for text-to-image generation based on machine learning models

Inventors: Han Zhang (Sunnyvale, CA); Jing Yu Koh (Singapore, SG); Jason Michael Baldridge (Austin, TX); Yinfei Yang (Sunnyvale, CA); Honglak Lee (Ann Arbor, MI)
Assignee: Google LLC
G06T11/00G06F18/2148G06F18/22G06N3/08G10L15/26
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,561,852
App. No.
18/770,154
Granted
Feb 24, 2026
Kind
B2
Abstract

A computer-implemented method includes receiving, by a computing device, a particular textual description of a scene. The method also includes applying a neural network for text-to-image generation to generate an output image rendition of the scene, the neural network having been trained to cause two image renditions associated with a same textual description to attract each other and two image renditions associated with different textual descriptions to repel each other based on mutual information between a plurality of corresponding pairs, wherein the plurality of corresponding pairs comprise an image-to-image pair and a text-to-image pair. The method further includes predicting the output image rendition of the scene.

Claims (49)

1 . A computer-implemented method, comprising:

receiving, by a computing device, training data comprising a plurality of textual descriptions, and one or more real image renditions associated with each of the plurality of textual descriptions;

training a cross-modal contrastive generative adversarial network (GAN) for text-to-image generation based on the training data, wherein the GAN comprises:

a generator comprising one or more attentional self-modulation layers to generate one or more generated image renditions associated with each of the plurality of textual descriptions,

a contrastive discriminator to determine whether a given image is a real image rendition of the one or more real image renditions or a generated image rendition of the one or more generated image renditions, and

wherein the training is based on a plurality of contrastive losses to capture inter-modality and intra-modality correspondences; and

providing the trained GAN for text-to-image generation.

2 . The computer-implemented method of claim 1 , wherein the generator comprises a single-stage generator configured to generate, at a given resolution, a given generated image rendition of the one or more generated image renditions.

3 . The computer-implemented method of claim 1 , wherein the generator comprises a single-stage generator without object-level annotation in images.

4 . The computer-implemented method of claim 1 , wherein the contrastive discriminator is trained as an encoder to compute global image and region features for the plurality of contrastive losses.

5 . The computer-implemented method of claim 1 , wherein the plurality of contrastive losses is based on normalized temperature-scaled cross-entropy losses.

6 . The computer-implemented method of claim 1 , wherein the training of the GAN comprises causing two image renditions associated with a same textual description to attract each other and two image renditions associated with different textual descriptions to repel each other based on mutual information between a plurality of corresponding pairs, wherein the plurality of corresponding pairs comprise an image-to-image pair and a text-to-image pair.

7 . The computer-implemented method of claim 6 , wherein the text-to-image pair comprises an image and an associated textual description.

8 . The computer-implemented method of claim 6 , wherein the text-to-image pair comprises portions of an image and corresponding portions of an associated textual description.

9 . The computer-implemented method of claim 6 , wherein the mutual information is based on a contrastive loss between: (a) an image and an associated textual description, (b) a known image and a predicted image for a same associated textual description, and (c) portions of an image and corresponding portions of an associated textual description.

10 . The computer-implemented method of claim 6 , wherein the training of the GAN to cause two image renditions associated with a same textual description to attract each other and two image renditions associated with different textual descriptions to repel each other further comprises:

determining similarity measures between pairs of image renditions, and wherein the training of the GAN comprises:

causing a first similarity measure for two image renditions associated with the same textual description to be less than a first threshold value, and

causing a second similarity measure for two image renditions associated with different textual descriptions to be greater than a second threshold value.

11 . The computer-implemented method of claim 6 , wherein the training of the GAN comprises generating one or more object level pseudo-labels for an image based on the text-to-image pair.

12 . The computer-implemented method of claim 1 , wherein the contrastive discriminator generates a local feature representation for an image, and wherein a dimension of the local feature representation matches a dimension for a local feature representation of an associated textual description.

13 . A computer-implemented method, comprising:

receiving, by a computing device, a particular textual description of a scene;

applying a cross-modal contrastive generative adversarial network (GAN) for text-to-image generation to generate an output image rendition of the scene, wherein the GAN comprises:

a generator comprising one or more attentional self-modulation layers to generate one or more generated image renditions associated with the particular textual description,

a contrastive discriminator to determine whether a given image is a real image rendition or a generated image rendition, and

the GAN having been trained based on a plurality of contrastive losses to capture inter-modality and intra-modality correspondences; and

predicting the output image rendition of the scene.

14 . The computer-implemented method of claim 13 , further comprising:

obtaining, from a deep bidirectional transformer, a global feature embedding for the particular textual description, and a local feature embedding for a portion of the particular textual description.

15 . The computer-implemented method of claim 13 , wherein the scene describes virtual reality or augmented reality, and wherein the predicting of the output image rendition further comprising:

generating an image rendition of the scene as described, in a format suitable for virtual reality or augmented reality.

16 . The computer-implemented method of claim 13 , further comprising:

receiving, by the computing device, an image description in audio format, and wherein the particular textual description is a transcribed version of the audio format.

17 . The computer-implemented method of claim 16 , further comprising:

receiving, by the computing device, an image style for the image description, and

wherein the predicting of the output image rendition comprises generating the output image rendition to conform to the image style.

18 . The computer-implemented method of claim 13 , wherein the particular textual description describes a plurality of scenes, and the predicting of the output image rendition further comprising:

generating a plurality of video frames of video content corresponding to the respective plurality of scenes.

19 . The computer-implemented method of claim 13 , wherein the generator comprises a single-stage generator configured to generate, at a given resolution, a given generated image rendition of the one or more generated image renditions.

20 . A computing device, comprising:

one or more processors; and

data storage, wherein the data storage has stored thereon computer-executable instructions that, when executed by the one or more processors, cause the computing device to carry out operations comprising:

receiving, by the computing device, a particular textual description of a scene;

applying a cross-modal contrastive generative adversarial network (GAN) for text-to-image generation to generate an output image rendition of the scene, wherein the GAN comprises:

a generator comprising one or more attentional self-modulation layers to generate one or more generated image renditions associated with the particular textual description,

a contrastive discriminator to determine whether a given image is a real image rendition or a generated image rendition, and

the GAN having been trained based on a plurality of contrastive losses to capture inter-modality and intra-modality correspondences; and

predicting the output image rendition of the scene.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 15, 2024
From: ZHANG, HAN; KOH, JING YU; BALDRIDGE, JASON MICHAEL; WANG, YINFEI; LEE, HONGLAK
To: GOOGLE LLC
Reel/Frame 067986/0653 →
Continuity (2)
Continuation 17467628 · Sep 7, 2021
Related Publication 20240362830A1 · Oct 31, 2024
References Cited (30)
US 9367763B1 · Gordo Soldevila · 2016 [cited by examiner]
US 10713821B1 · Surya · 2020 [cited by examiner]
US 11756567B2 · Wilson · 2023 [cited by examiner]
US 11856276B2 · Banerjee · 2023 [cited by examiner]
US 20180173996A1 · Lim · 2018 [cited by examiner]
US 20190147371A1 · Deo · 2019 [cited by examiner]
US 20190205435A1 · Kashyap · 2019 [cited by examiner]
US 20210118447A1 · Kim · 2021 [cited by examiner]
US 20210158503A1 · Li · 2021 [cited by examiner]
US 20210158815A1 · Lee · 2021 [cited by examiner]
US 20210232705A1 · Chandelier · 2021 [cited by examiner]
US 20210256068A1 · Larlus · 2021 [cited by examiner]
US 20210272341A1 · Swaminathan · 2021 [cited by examiner]
US 20220005235A1 · Gou · 2022 [cited by examiner]
US 20220101104A1 · Chai · 2022 [cited by examiner]
US 20220108509A1 · Swaminathan · 2022 [cited by examiner]
US 20220277038A1 · Li · 2022 [cited by examiner]
US 20230215162A1 · Kim · 2023 [cited by examiner]
US 20230260164A1 · Yuan · 2023 [cited by examiner]
US 20230274479A1 · Choi · 2023 [cited by examiner]
US 20230377584A1 · Pascual · 2023 [cited by examiner]
Bau et al., “Paint by Word,” arXiv:2103.10951v2, Mar. 24, 2021, 10 pages. [cited by applicant]
Hinz, Tobias, “Generating Multiple Objects at Spatially Distinct Locations,” ICLR, 2019, 12 pages. [cited by applicant]
Hong et al., “Inferring Semantic Layout for Hierarchical Text-to-Image Synthesis,” arXiv:1801.05091v2, Jul. 26, 2018, 15 pages. [cited by applicant]
Koh et al., “Text-to-Image Generation Grounded by Fine-Grained User Attention,” IEEE Xplore, 2021, pp. 237-246. [cited by applicant]
Liang et al., “CPGAN: Full-Spectrum-Content-Parsing Generative Adversarial Networks for Text-to-Image Synthesis,” arXiv:1912.08562v1, Dec. 18, 2019, 12 pages. [cited by applicant]
Reed et al., “Generative Adversarial Text to Image Synthesis,” Proceedings of the 33rd International Conference on Machine Learning, 2016, 10 pages, vol. 48. [cited by applicant]
Xu et al., “AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks,” CVPR2018, 49 pages. [cited by applicant]
Zhang et al., “Cross-Modal Contrastive Learning for Text-to-Image Generation,” arXiv:2101.04702v4, Jun. 9, 2021, 19 pages. [cited by applicant]
Zhang et al., “StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks,” IEEE Xplore, 2017, pp. 5907-5915. [cited by applicant]