arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.18583cs.CVcs.AI
收藏

基于GPT-4的可控文本到图像生成

Controllable Text-to-Image Generation with GPT-4

UC Berkeley(加州大学伯克利分校);Microsoft Research(微软研究院)

Tianjun Zhang, Yi Zhang, Vibhav Vineet, Neel Joshi, Xin Wang

AI总结:

本文提出Control-GPT,利用GPT-4生成TikZ程序化草图来引导扩散模型,通过将实例掩码转为多边形解决训练数据缺失问题,显著提升文本到图像生成的空间可控性并刷新最优水平。

摘要:

当前的文本到图像生成模型在遵循文本指令方面常常存在困难,尤其是那些需要空间推理的指令。另一方面,诸如GPT-4这样的大型语言模型(LLMs)在生成用于以图形方式勾勒文本输入的代码片段(例如通过TikZ)方面表现出了卓越的精确性。在这项工作中,我们引入了Control-GPT,利用GPT-4生成的程序化草图来引导基于扩散的文本到图像流程,从而增强其指令遵循能力。Control-GPT的工作原理是查询GPT-4编写TikZ代码,生成的草图与文本指令一起作为扩散模型(例如ControlNet)的参考,以生成照片级真实感的图像。训练该流程的一个主要挑战是缺乏包含对齐的文本、图像和草图的数据集。我们通过将现有数据集中的实例掩码转换为多边形来模拟测试时使用的草图,从而解决了这一问题。因此,Control-GPT极大地提升了图像生成的可控性。它在空间布局和物体定位生成方面建立了新的最优水平,并增强了用户对物体位置、大小等的控制,准确率几乎达到先前模型的两倍。我们的工作作为首次尝试,展示了利用LLMs提升计算机视觉任务性能的潜力。

英文摘要:

Current text-to-image generation models often struggle to follow textual instructions, especially the ones requiring spatial reasoning. On the other hand, Large Language Models (LLMs), such as GPT-4, have shown remarkable precision in generating code snippets for sketching out text inputs graphically, e.g., via TikZ. In this work, we introduce Control-GPT to guide the diffusion-based text-to-image pipelines with programmatic sketches generated by GPT-4, enhancing their abilities for instruction following. Control-GPT works by querying GPT-4 to write TikZ code, and the generated sketches are used as references alongside the text instructions for diffusion models (e.g., ControlNet) to generate photo-realistic images. One major challenge to training our pipeline is the lack of a dataset containing aligned text, images, and sketches. We address the issue by converting instance masks in existing datasets into polygons to mimic the sketches used at test time. As a result, Control-GPT greatly boosts the controllability of image generation. It establishes a new state-of-art on the spatial arrangement and object positioning generation and enhances users' control of object positions, sizes, etc., nearly doubling the accuracy of prior models. Our work, as a first attempt, shows the potential for employing LLMs to enhance the performance in computer vision tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑