TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Improving Text-to-Image Synthesis Using Contrastive Learning

Improving Text-to-Image Synthesis Using Contrastive Learning

Hui Ye, Xiulong Yang, Martin Takac, Rajshekhar Sunderraman, Shihao Ji

2021-07-06Text-to-Image GenerationContrastive LearningImage Generation
PaperPDFCode(official)

Abstract

The goal of text-to-image synthesis is to generate a visually realistic image that matches a given text description. In practice, the captions annotated by humans for the same image have large variance in terms of contents and the choice of words. The linguistic discrepancy between the captions of the identical image leads to the synthetic images deviating from the ground truth. To address this issue, we propose a contrastive learning approach to improve the quality and enhance the semantic consistency of synthetic images. In the pretraining stage, we utilize the contrastive learning approach to learn the consistent textual representations for the captions corresponding to the same image. Furthermore, in the following stage of GAN training, we employ the contrastive learning method to enhance the consistency between the generated images from the captions related to the same image. We evaluate our approach over two popular text-to-image synthesis models, AttnGAN and DM-GAN, on datasets CUB and COCO, respectively. Experimental results have shown that our approach can effectively improve the quality of synthetic images in terms of three metrics: IS, FID and R-precision. Especially, on the challenging COCO dataset, our approach boosts the FID signifcantly by 29.60% over AttnGAN and by 21.96% over DM-GAN.

Results

TaskDatasetMetricValueModel
Image GenerationCOCO (Common Objects in Context)FID20.79DM-GAN+CL
Image GenerationCOCO (Common Objects in Context)Inception score33.34DM-GAN+CL
Image GenerationCOCO (Common Objects in Context)FID23.93AttnGAN+CL
Image GenerationCOCO (Common Objects in Context)Inception score25.7AttnGAN+CL
Image GenerationCUBFID14.38DM-GAN+CL
Image GenerationCUBInception score4.77DM-GAN+CL
Image GenerationCUBFID16.34AttnGAN+CL
Image GenerationCUBInception score4.42AttnGAN+CL
Image GenerationCUBInception score4.77DM-GAN+CL
Text-to-Image GenerationCOCO (Common Objects in Context)FID20.79DM-GAN+CL
Text-to-Image GenerationCOCO (Common Objects in Context)Inception score33.34DM-GAN+CL
Text-to-Image GenerationCOCO (Common Objects in Context)FID23.93AttnGAN+CL
Text-to-Image GenerationCOCO (Common Objects in Context)Inception score25.7AttnGAN+CL
Text-to-Image GenerationCUBFID14.38DM-GAN+CL
Text-to-Image GenerationCUBInception score4.77DM-GAN+CL
Text-to-Image GenerationCUBFID16.34AttnGAN+CL
Text-to-Image GenerationCUBInception score4.42AttnGAN+CL
Text-to-Image GenerationCUBInception score4.77DM-GAN+CL
10-shot image generationCOCO (Common Objects in Context)FID20.79DM-GAN+CL
10-shot image generationCOCO (Common Objects in Context)Inception score33.34DM-GAN+CL
10-shot image generationCOCO (Common Objects in Context)FID23.93AttnGAN+CL
10-shot image generationCOCO (Common Objects in Context)Inception score25.7AttnGAN+CL
10-shot image generationCUBFID14.38DM-GAN+CL
10-shot image generationCUBInception score4.77DM-GAN+CL
10-shot image generationCUBFID16.34AttnGAN+CL
10-shot image generationCUBInception score4.42AttnGAN+CL
10-shot image generationCUBInception score4.77DM-GAN+CL
1 Image, 2*2 StitchiCOCO (Common Objects in Context)FID20.79DM-GAN+CL
1 Image, 2*2 StitchiCOCO (Common Objects in Context)Inception score33.34DM-GAN+CL
1 Image, 2*2 StitchiCOCO (Common Objects in Context)FID23.93AttnGAN+CL
1 Image, 2*2 StitchiCOCO (Common Objects in Context)Inception score25.7AttnGAN+CL
1 Image, 2*2 StitchiCUBFID14.38DM-GAN+CL
1 Image, 2*2 StitchiCUBInception score4.77DM-GAN+CL
1 Image, 2*2 StitchiCUBFID16.34AttnGAN+CL
1 Image, 2*2 StitchiCUBInception score4.42AttnGAN+CL
1 Image, 2*2 StitchiCUBInception score4.77DM-GAN+CL

Related Papers

SemCSE: Semantic Contrastive Sentence Embeddings Using LLM-Generated Summaries For Scientific Abstracts2025-07-17HapticCap: A Multimodal Dataset and Task for Understanding User Experience of Vibration Haptic Signals2025-07-17Overview of the TalentCLEF 2025: Skill and Job Title Intelligence for Human Capital Management2025-07-17SGCL: Unifying Self-Supervised and Supervised Learning for Graph Recommendation2025-07-17fastWDM3D: Fast and Accurate 3D Healthy Tissue Inpainting2025-07-17Synthesizing Reality: Leveraging the Generative AI-Powered Platform Midjourney for Construction Worker Detection2025-07-17FashionPose: Text to Pose to Relight Image Generation for Personalized Fashion Visualization2025-07-17A Distributed Generative AI Approach for Heterogeneous Multi-Domain Environments under Data Sharing constraints2025-07-17