[论文解读] Beyond Generation: Harnessing Text to Image Models for Object Detection and Segmentation
本文提出了一种新颖的方法,利用文本到图像扩散模型(如 Stable Diffusion)生成高质量、完全标注的物体检测与实例分割训练数据。通过将前景物体生成与上下文一致的背景合成相分离,并使用语言级干预来弥合领域差距,该方法在仅使用合成数据训练时达到与真实数据训练相当的检测性能,且在结合真实数据时表现更优。
We propose a new paradigm to automatically generate training data with accurate labels at scale using the text-to-image synthesis frameworks (e.g., DALL-E, Stable Diffusion, etc.). The proposed approach1 decouples training data generation into foreground object generation, and contextually coherent background generation. To generate foreground objects, we employ a straightforward textual template, incorporating the object class name as input prompts. This is fed into a text-to-image synthesis framework, producing various foreground images set against isolated backgrounds. A foreground-background segmentation algorithm is then used to generate foreground object masks. To generate context images, we begin by creating language descriptions of the context. This is achieved by applying an image captioning method to a small set of images representing the desired context. These textual descriptions are then transformed into a diverse array of context images via a text-to-image synthesis framework. Subsequently, we composite these with the foreground object masks produced in the initial step, utilizing a cut-and-paste method, to formulate the training data. We demonstrate the advantages of our approach on five object detection and segmentation datasets, including Pascal VOC and COCO. We found that detectors trained solely on synthetic data produced by our method achieve performance comparable to those trained on real data (Fig. 1). Moreover, a combination of real and synthetic data yields even much better results. Further analysis indicates that the synthetic data distribution complements the real data distribution effectively. Additionally, we emphasize the compositional nature of our data generation approach in out-of-distribution and zero-shot data generation scenarios. We open-source our code at https://github.com/gyhandy/Text2Image-for-Detection
研究动机与目标
- 解决物体检测与分割任务中人工标注数据集的高成本与可扩展性限制。
- 实现在极少人工干预下,实现零样本与分布外数据生成。
- 利用文本到图像模型的组合性与语义理解能力,实现高保真、准确边界框与分割掩码的可扩展数据合成。
- 在保持或提升模型性能的同时,减少对昂贵真实世界标注的依赖。
- 证明通过该流程生成的合成数据可有效补充甚至替代真实数据,用于训练鲁棒检测器。
提出的方法
- 前景物体生成使用简单的文本模板(例如,'一个 [类别]')输入至文本到图像模型,生成背景为纯色的孤立物体图像。
- 通过在生成的物体图像上应用预训练的实例分割模型,提取前景掩码。
- 上下文背景通过首先使用图像字幕模型从单个领域内图像生成多样化、描述性的字幕来合成。
- 随后将这些字幕用作文本到图像模型的提示词,生成大量上下文一致的背景图像。
- 使用剪切与粘贴技术将前景掩码合成到生成的背景上,形成具有准确实例级标注的完整、逼真的训练图像。
- 应用语言级干预(例如,将'卡通'替换为'真实')以减少领域偏移,并使合成数据分布与真实测试数据分布对齐。
实验结果
研究问题
- RQ1文本到图像模型能否被有效重用于生成物体检测与实例分割任务的完全标注训练数据?
- RQ2通过该方法生成的合成数据是否能在标准基准上实现与真实数据训练相当的性能?
- RQ3该方法在零样本与分布外设置下,仅使用极少真实数据时效果如何?
- RQ4对提示词的语言级修改是否能改善合成数据分布与真实测试数据分布之间的对齐?
- RQ5将合成数据与真实数据结合是否能带来超越单独使用任一数据源的性能提升?
主要发现
- 仅使用本方法生成的合成数据进行训练的检测器,其 mAP 分数与在完整真实数据集(如 COCO 和 Pascal VOC)上训练的模型相当。
- 在 COCO 数据集上,将合成数据与真实数据结合使用,相比仅使用真实数据训练,mAP 提升了 +22.5。
- 该方法在零样本泛化方面表现强劲,即使仅提供类别名称且无目标类别的真实图像,也能实现有效性能。
- 语言级干预(如将'卡通'替换为'真实'或移除'人物')在分布外设置下可使性能最高提升 10.2 mAP。
- 该流程的组合性使得无需重新训练文本到图像模型,即可实现有效的数据增强与领域自适应。
- 该方法具有隐私保护性、可扩展性,并且人工参与极少,适用于低资源与快速演进的视觉任务。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。