Brush Your Text: Synthesize Any Scene Text on Images via Diffusion Model

Lingjun Zhang, Xinyuan Chen, Yaohui Wang, Yue Lu, Yu Qiao
12/19/2023
cs.CV

No official code found. Best implementation: ecnuljzhang/brush-your-text (98 stars, last commit 2024-01-03).

Abstract

Recently, diffusion-based image generation methods are credited for their remarkable text-to-image generation capabilities, while still facing challenges in accurately generating multilingual scene text images. To tackle this problem, we propose Diff-Text, which is a training-free scene text generation framework for any language. Our model outputs a photo-realistic image given a text of any language along with a textual description of a scene. The model leverages rendered sketch images as priors, thus arousing the potential multilingual-generation ability of the pre-trained Stable Diffusion. Based on the observation from the influence of the cross-attention map on object placement in generated images, we propose a localized attention constraint into the cross-attention layer to address the unreasonable positioning problem of scene text. Additionally, we introduce contrastive image-level prompts to further refine the position of the textual region and achieve more accurate scene text generation. Experiments demonstrate that our method outperforms the existing method in both the accuracy of text recognition and the naturalness of foreground-background blending.

View on arXivView PDF

Code Implementations(1)

9810Python2 years ago

Similar Papers

Cite this paper

@article{zhang2023brush,
  title  = {Brush Your Text: Synthesize Any Scene Text on Images via Diffusion Model},
  author = {Lingjun Zhang and Xinyuan Chen and Yaohui Wang and Yue Lu and Yu Qiao},
  year   = {2023},
  eprint = {2312.12232},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.12232v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.12232.svg)](https://codeofpaper.com/paper/2312.12232)

Discussion