Skip to main content
QUICK REVIEW

[论文解读] Image Captions are Natural Prompts for Text-to-Image Models

Shiye Lei, Hao Chen|arXiv (Cornell University)|Jul 17, 2023
Multimodal Machine Learning ApplicationsComputer Science被引用 3
一句话总结

本文提出Caption in Prompt(CiP),一种无需训练的方法,通过使用预训练图像字幕模型对真实图像进行字幕生成,从而获得高质量、与类别相关的文本提示,再将这些提示与类别名称拼接,用于文本到图像模型的提示生成。该方法显著提升了合成数据的质量,在ImageNet-100、ImageNet-1K和ImageNette的下游图像分类任务中,平均准确率提升约10%。

ABSTRACT

With the rapid development of Artificial Intelligence Generated Content (AIGC), it has become a common practice to train models on synthetic data due to data-scarcity and privacy leakage problems. Owing to massive and diverse information conveyed in real images, it is challenging for text-to-image generative models to synthesize informative training data with hand-crafted prompts. Considering the impressive ability of large generative models, could such models directly synthesize good training images for prediction tasks with proper prompts? We offer an affirmative response to this question by proposing a simple yet effective method, validated through ImageNet classification. Specifically, we caption each real image with the advanced captioning model to obtain informative and faithful prompts that extract class-relevant information and clarify the polysemy of class names. The image captions and class names are concatenated to prompt generative models for training image synthesis. We show that this simple caption incorporation significantly boosts the informativeness of synthetic data therefore enhancing downstream model generalization. More importantly, besides improvements in data augmentation and privacy preservation, our experiments demonstrate that synthesized images can exceed real data in terms of out-of-distribution robustness.

研究动机与目标

  • 为解决为下游视觉模型生成信息丰富且多样化的合成训练数据的挑战。
  • 克服在文本到图像生成中手工设计提示所导致的泛化能力差的问题。
  • 开发一种理论基础扎实、可扩展且无需训练的合成数据生成提示设计方法。
  • 探究提示质量对生成数据分布和模型泛化能力的影响。
  • 通过将图像语义提炼为紧凑、高质量的文本表示,实现隐私保护且高效的合成数据生成。

提出的方法

  • 利用现成的图像字幕模型(例如BLIP-2)从真实图像中生成描述性强、与类别相关的字幕。
  • 将生成的字幕与类别名称拼接,形成用于文本到图像(T2I)模型的增强提示。
  • 使用生成的提示通过预训练的T2I模型(例如Stable Diffusion)生成合成训练数据,无需微调。
  • 开展理论分析,建立提示质量与生成数据分布复杂度及分布距离之间的关联,指导有效的提示设计。
  • 探索零样本变体,即对合成图像进行字幕生成以构建提示,并评估基于大语言模型(LLM)的字幕优化对提示质量的提升效果。
  • 利用生成的提示集,将图像级语义提炼为紧凑、隐私保护的文本表示,实现可扩展的合成数据生成。

实验结果

研究问题

  • RQ1提示质量如何影响合成训练数据的分布特性及泛化性能?
  • RQ2从真实图像中提取的图像字幕是否能作为比仅使用类别名称更丰富、更多样化的提示用于文本到图像生成?
  • RQ3提示设计对生成数据分布复杂度及其与原始数据分布的接近程度有何影响?
  • RQ4使用大语言模型(LLM)优化字幕是否能提升提示质量及下游模型性能?
  • RQ5该方法是否可在无真实图像访问的零样本设置下有效应用?

主要发现

  • CiP在ImageNette、ImageNet-100和ImageNet-1K上,使基于合成数据训练的模型平均分类准确率提升约10%。
  • 通过从真实图像中提取背景、物体关系和行为等与类别相关的信息,显著提升了数据的多样性和信息量。
  • 在提示生成前对真实图像进行字幕生成,其性能优于使用LLM重写字幕的方法,后者常导致描述过于通用或类似定义。
  • 零样本CiP(即通过合成图像生成字幕作为提示)仅在高引导系数下获得微弱提升,且在最优设置下仍不及基础提示。
  • 理论分析证实,提示质量同时影响分布复杂度和分布距离,为有效提示设计提供了理论基础。
  • 该方法计算效率高且可扩展,无需模型微调或耗时的反演操作,适用于联邦学习等大规模、隐私敏感的应用场景。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。