SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.12232 · 2023

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 19 functions out of this paper's own repositories and ran 15 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ecnuljzhang/brush-your-text canonical 15 of 19
FunctionStatusWhere it lives
DST Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py
pointer only (licence: NONE) · get_code("c9b0b805d01042eb")
IDST Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py
pointer only (licence: NONE) · get_code("d999d495c22812ff")
crop_safe Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py
pointer only (licence: NONE) · get_code("d2b03b93e65deb8b")
diffusion_step Ran ecnuljzhang/brush-your-text/models/attention_utils.py
pointer only (licence: NONE) · get_code("a042902caede448b")
dir_is_rtl Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py
pointer only (licence: NONE) · get_code("e0158ea7640cafc4")
get_color_matrix Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py
pointer only (licence: NONE) · get_code("55ef9a43f542bc10")
get_font_color Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py
pointer only (licence: NONE) · get_code("968d92307b85d92d")
get_grads Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/poisson_reconstruct.py
pointer only (licence: NONE) · get_code("48688abc93b004ef")
image_grid Ran ecnuljzhang/brush-your-text/controlnet_util/util.py
pointer only (licence: NONE) · get_code("0ed50e0e68648732")
latent2image Ran ecnuljzhang/brush-your-text/models/attention_utils.py
pointer only (licence: NONE) · get_code("e3c3bb87bbe9b4a7")
level_is_rtl Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py
pointer only (licence: NONE) · get_code("6091e3efb2400b73")
level_to_dir Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/fribidi.py
pointer only (licence: NONE) · get_code("ed496f4830b5cb36")
next_step Ran ecnuljzhang/brush-your-text/controlnet_util/util.py
pointer only (licence: NONE) · get_code("1ccf7fbf45184c1a")
rect2xy Ran ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py
pointer only (licence: NONE) · get_code("adceda65e4c99e11")
text_under_image Ran ecnuljzhang/brush-your-text/models/attention_utils.py
pointer only (licence: NONE) · get_code("85d5eb123674597d")
center2size Not yet run ecnuljzhang/brush-your-text/controlnet_util/Textgen/render_text_mask.py
pointer only (licence: NONE) · get_code("beccbc79a14cc716")
colorize Not yet run ecnuljzhang/brush-your-text/controlnet_util/Textgen/colorize.py
pointer only (licence: NONE) · get_code("490ff991bd344d43")
init_prompt Not yet run ecnuljzhang/brush-your-text/controlnet_util/util.py
pointer only (licence: NONE) · get_code("a0a4d94af120c56f")
text_image Not yet run ecnuljzhang/brush-your-text/controlnet_util/synthtext.py
pointer only (licence: NONE) · get_code("5f01d7c54fa3cd2e")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.12232")
get_code_for_paper("2312.12232")
have("2312.12232")

Connect an agent — have() is free.