Scene text editing is a challenging task that involves modifying or inserting specified texts in an image while maintaining its natural and realistic appearance. Most previous approaches to this task rely on style-transfer models that crop out text regions and feed them into image transfer models, such as GANs. However, these methods are limited in their ability to change text style and are unable to insert texts into images. Recent advances in diffusion models have shown promise in overcoming these limitations with text-conditional image editing. However, our empirical analysis reveals that state-of-the-art diffusion models struggle with rendering correct text and controlling text style. To address these problems, we propose DIFFSTE to improve pre-trained diffusion models with a dual encoder design, which includes a character encoder for better text legibility and an instruction encoder for better style control. An instruction tuning framework is introduced to train our model to learn the mapping from the text instruction to the corresponding image with either the specified style or the style of the surrounding texts in the background. Such a training method further brings our method the zero-shot generalization ability to the following three scenarios: generating text with unseen font variation, e.g., italic and bold, mixing different fonts to construct a new font, and using more relaxed forms of natural language as the instructions to guide the generation task. We evaluate our approach on five datasets and demonstrate its superior performance in terms of text correctness, image naturalness, and style controllability. Our code is publicly available. https://github.com/UCSB-NLP-Chang/DiffSTE


翻译:场景文本编辑是一项具有挑战性的任务,涉及在图像中修改或插入指定文本,同时保持其自然逼真的外观。以往大多数方法依赖风格迁移模型,通过裁剪文本区域并将其输入图像迁移模型(如生成对抗网络)进行处理。然而,这些方法在改变文本风格的能力上存在局限,且无法在图像中插入文本。扩散模型的最新进展在文本条件图像编辑方面展现出克服这些限制的潜力。然而,我们的实证分析表明,最先进的扩散模型在正确渲染文本和控制文本风格方面仍存在困难。为解决这些问题,我们提出DIFFSTE,通过双编码器设计改进预训练扩散模型,该设计包含一个用于提升文本可读性的字符编码器和一个用于增强风格控制的指令编码器。我们引入指令微调框架来训练模型,使其学习从文本指令到对应图像的映射,这种映射能生成具有指定风格或与背景中周围文本风格一致的图像。这种训练方法进一步赋予模型在以下三种场景中的零样本泛化能力:生成具有未见字体变体(如斜体、粗体)的文本、混合不同字体构建新字体,以及使用更宽松的自然语言形式作为指令来引导生成任务。我们在五个数据集上评估了该方法,并展示了其在文本正确性、图像自然度和风格可控性方面的优越性能。我们的代码已公开,可通过 https://github.com/UCSB-NLP-Chang/DiffSTE 获取。

0
下载
关闭预览

相关内容

扩散模型是近年来快速发展并得到广泛关注的生成模型。它通过一系列的加噪和去噪过程,在复杂的图像分布和高斯分布之间建立联系,使得模型最终能将随机采样的高斯噪声逐步去噪得到一张图像。
【ICML2023】基于自然语言指令的受控文本生成
专知会员服务
29+阅读 · 2023年4月28日
近期必读的7篇 CVPR 2019【视觉问答】相关论文和代码
专知会员服务
37+阅读 · 2020年1月10日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
vae 相关论文 表示学习 1
CreateAMind
12+阅读 · 2018年9月6日
【SIGIR2018】五篇对抗训练文章
专知
12+阅读 · 2018年7月9日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
3+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
VIP会员
最新内容
马赛克战:俄乌战场透析
专知会员服务
11+阅读 · 今天4:12
《利用人工智能增强军事决策》
专知会员服务
2+阅读 · 今天4:09
《自动机器学习在军事数据耕耘法中的应用》
专知会员服务
4+阅读 · 今天4:02
为何指挥所生存能力要求范式转变
专知会员服务
2+阅读 · 今天3:54
打造“新蛛网”模式与高科技动员
专知会员服务
2+阅读 · 今天3:33
“蛛网”行动一周年:远程无人机战争
专知会员服务
2+阅读 · 今天3:23
【剑桥博士论文】智能体-环境协同优化
专知会员服务
6+阅读 · 6月9日
为初级军官战术训练设计生成式人工智能平台
专知会员服务
8+阅读 · 6月9日
《美军条令:作战伤员后送保障》
专知会员服务
6+阅读 · 6月9日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
3+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员