[论文解读] BoxDiff: Text-to-Image Synthesis with Training-Free Box-Constrained Diffusion
BoxDiff 提出了一种无需训练的文本到图像生成方法,通过将内框、外框和角落约束直接整合到预训练扩散模型的去噪过程中,利用简单的空间约束(如边界框或草图)控制物体的位置和尺度。该方法在无需额外训练或成对布局数据的情况下,实现了高保真度、多样化的图像生成,且在 YOLO 分数和 T2I-Sim 上显著优于完全监督的基线方法。
Recent text-to-image diffusion models have demonstrated an astonishing capacity to generate high-quality images. However, researchers mainly studied the way of synthesizing images with only text prompts. While some works have explored using other modalities as conditions, considerable paired data, e.g., box/mask-image pairs, and fine-tuning time are required for nurturing models. As such paired data is time-consuming and labor-intensive to acquire and restricted to a closed set, this potentially becomes the bottleneck for applications in an open world. This paper focuses on the simplest form of user-provided conditions, e.g., box or scribble. To mitigate the aforementioned problem, we propose a training-free method to control objects and contexts in the synthesized images adhering to the given spatial conditions. Specifically, three spatial constraints, i.e., Inner-Box, Outer-Box, and Corner Constraints, are designed and seamlessly integrated into the denoising step of diffusion models, requiring no additional training and massive annotated layout data. Extensive experimental results demonstrate that the proposed constraints can control what and where to present in the images while retaining the ability of Diffusion models to synthesize with high fidelity and diverse concept coverage. The code is publicly available at https://github.com/showlab/BoxDiff.
研究动机与目标
- 在无需额外训练或大规模标注布局数据的情况下,实现文本到图像扩散模型中的细粒度空间控制。
- 通过以最少的用户提供的空间条件替代监督数据依赖,解决布局到图像生成中的数据效率瓶颈。
- 保持预训练扩散模型(如 Stable Diffusion)强大的零样本泛化能力和高保真图像生成性能。
- 为现有条件生成模型提供即插即用的解决方案,通过空间约束实现性能提升。
提出的方法
- 在每个去噪步骤中,将三种空间约束——内框、外框和角落约束——整合到去噪 U-Net 的交叉注意力特征图中。
- 仅在 16×16 的空间分辨率上应用约束,以在精度与计算成本之间取得平衡。
- 采用代表性采样方法,减轻过度约束可能在去噪过程中导致的图像质量下降问题。
- 利用 Stable Diffusion 中现有的交叉注意力机制,引导去噪过程朝向用户指定的空间条件。
- 完全在推理阶段运行,无需模型微调或重新训练。
- 将用户提供的框或草图视为隐式空间引导,以引导生成过程,而无需修改模型权重。
实验结果
研究问题
- RQ1是否可以在不微调或使用大规模成对布局数据的情况下实现文本到图像生成中的空间控制?
- RQ2如何有效利用如边界框等简单的用户输入条件,来引导扩散式图像生成中的物体定位与尺度?
- RQ3在不降低图像质量或语义保真度的前提下,空间约束能在多大程度上被整合到去噪过程中?
- RQ4该方法在封闭集训练分布之外的新物体类别上是否具备泛化能力?
- RQ5在目标检测与语义对齐指标方面,该方法与完全监督的布局到图像模型相比,其量化表现如何?
主要发现
- 当与 Stable Diffusion 配合使用时,BoxDiff 的 YOLO 分数达到 22.3,显著优于完全监督方法如 LostGAN(5.3)、LAMA(10.2)和 TwFA(10.6)。
- 该方法将 T2I-Sim 分数提升至 0.3513,表明生成图像与文本提示之间的语义对齐性更优。
- 当与 GLIGEN 集成时,BoxDiff 将 YOLO 分数从 40.2 提升至 46.2,T2I-Sim 从 0.3511 提升至 0.3513,证明其作为即插即用组件的有效性。
- 该方法成功控制了物体尺度:随着条件框的扩大,城堡从较小逐渐变大,而其他内容保持不变。
- 该方法支持多层级变化,例如在同一条件框内同时改变内容(如草原、向日葵、沼泽)与尺度。
- 视觉结果表明,即使文本提示中包含“在中间”等位置线索,物体位置也能精确根据所提供框进行调整。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。