arXiv:2610.27592cs.CVOct 2026

Manuscript Offprint

arXiv:2610.27592

Real In, Real Out: What If We Only Use Real Data for Scene Text Editing?

Xingsong Ye, Yongkun Du, Jiaxin Zhang, Chong Sun, Zhineng Chen

Abstract

Aiming to modify textual content while preserving the original style, Scene Text Editing (STE) has significant practical value in many applications. STE typically requires paired images before and after editing for training. However, recent approaches rely heavily on synthetic paired data and complex disentanglement strategies. They struggle to faithfully capture the diversity and complexity of natural scenes, often producing artifacts or hallucinations. In this work, we challenge the common practice and investigate whether STE can be driven by turning each real sample into its own paired supervision. Concretely, we explore multiple ways to disrupt the original image (e.g., Crop, Shuffle, Mask) to construct self-paired training data, and build a strong baseline (TextRIRO) upon a conditional diffusion architecture. Our experiments show that combining character-column shuffling with image cropping (Shuffle&Crop) effectively destroys text semantics while preserving key style cues, enabling the model to learn editing behaviors directly from the real text image. With this concise yet real-oriented design, TextRIRO achieves promising performance in both accuracy and visual realism across real-world benchmarks, substantially mitigating the synthetic-to-real domain gap. Furthermore, we leverage TextRIRO to build TextRIRO-3M, a large-scale realistic dataset for long-text recognition by concatenating edited and original images. Experimental results show that training recognition models with TextRIRO-3M significantly improves recognition accuracy, demonstrating that TextRIRO provides highly useful training resources for downstream tasks. Overall, TextRIRO lifts STE to realistic, reliable, and widely applicable new levels.

Correspondence: zhinchen@fudan.edu.cn

Code: https://github.com/YesianRohn/TextRIRO

1 Introduction

Scene Text Editing (STE) aims to extract the style of the given text and replace it with a new string, while maintaining both visual realism and style consistency [36]. STE is typically formulated as a generative task, and its applications grow with the advancement of generative models. It addresses practical needs such as replacing text in images for artistic creation and also facilitates various downstream scene text tasks. Notably, STE shows significant potential in generating data [39] for scene text recognition (STR) [6, 10, 11, 48], as it can generate samples with the same style but different content from existing images.

†^{\dagger}Corresponding authors.

Accepted as a conference paper at NeurIPS 2026.

Figure

(a) Previous paired synthetic training data

Figure

(b) Semi-supervised with unpaired real data

Figure

(c) Inpainting-based training on real data

Figure

(d) Our TextRIRO

Figure

(e) Bad cases of (a) and (b)

Figure

(f) Inpainting without scene text around

Figure

(g) Our results

Figure 1 A data-centric view of Scene Text Editing. The comparison of the previous methods and TextRIRO between the data utilization paradigm (left) and the editing results (right). In (e), we present the artifacts and hallucinations of the wrong editing results in (a) and (b).

However, it is hardly possible to get different texts with the same background style in real-world scenarios. To address this, previous methods [20, 29, 36, 38, 43] rely heavily on synthetic data, as shown in Fig. 1(a). On the one hand, two-stage explicit disentanglement methods [29, 36, 38] use rendering tools to synthesize paired images with identical style but different text over a background image, followed by foreground-background separation and fusion. But they fail to separate text from the background, resulting in incomplete removal of the source text, as shown in cases (1) and (2) in Fig. 1(e). On the other hand, implicit disentanglement approaches [20, 43] leverage various pre-trained models to extract features for directly generating target images, which is less controllable, resulting in hallucinations such as case (3), with misspelled or missing characters. Recent efforts [9, 22, 26] have explored semi-supervised learning with real data by erasing itself and writing back or paired training using pseudo-labeled data, as illustrated in Fig. 1(b). Nevertheless, synthetic data still remains dominant. As evident from the editing results in Fig. 1(e), this branch of methods easily leads to case (4): even when the target text is generated, it often appears mismatched in style or contains visible artifacts. Furthermore, inpainting-based STE paradigms (Fig. 1(c)) mask the text region and attempt to restore it using surrounding context [2, 4, 15, 39]. However, the lack of sufficient style cues makes it difficult to recover the desired appearance, as shown in Fig. 1(f).

We are motivated by an observation that prior work has under-emphasized: the domain gap in STE is primarily a data problem, and only secondarily an architecture problem. We therefore ask the simplest possible version of the question:

What if we only use real data for scene text editing, with neither synthetic triplets nor expensive paired collection?

The core challenge is to extract stable style guidance from the source text image while suppressing the side effect from semantic text content. Our key insight is that scene text style mainly lies in low-level cues such as color, texture, and illumination, while semantic text is a high-level sequential structure. Based on this, we explore multiple self-paired real-data schemes that force the model to focus on style rather than semantics. Specifically, we experiment with (i) shuffling and recombining the text region either column-wise or block-wise (Shuffle), (ii) cropping local sub-regions (Crop), and (iii) masking parts of the original image (Mask). Empirically, we find that combining column-wise Shuffle with Crop (Shuffle&Crop) achieves the best performance.

To realize the idea, we propose TextRIRO, a conditional diffusion model that takes only Real data as Input and produces Realistic Output for scene Text editing. During training, TextRIRO applies “Shuffle&Crop” to a real text image to separate its style and semantics, and then reconstructs the original image. By removing the reliance on synthetic data, it overcomes the bottleneck of high-quality generation during inference. For style features, we process them into multi-scale representations and then inject them into the conditional U-Net using the ControlNet-like process [45] for efficient integration. For text encoding, we use an STR pre-trained encoder [16] to extract character-level features, which improves text understanding and enables robust STE transfer.

TextRIRO removes the need for explicit or implicit disentanglement and avoids using the synthetic domain as the main training support. On real benchmarks for STE, it produces more realistic results with markedly reduced “synthetic flavor.” It also achieves higher accuracy on equal-length editing and variable-length editing tasks. These results show that self-paired training on real data effectively moves STE toward realistic generation. We further ask whether STE can help STR data generation [39, 40, 42]. We find that TextRIRO already outperforms existing STE methods, but the editing accuracy still limits direct use as training data. We then use STE as data expansion by concatenating the original image with its edited counterpart. This preserves style but adds content, which yields high-quality, scene-consistent samples for long-text recognition. Starting from the labeled real dataset U14M-Filter [7, 16], we build a 3M-scale dataset, TextRIRO-3M. On Union14M-Benchmark [16], training an STR model on mixed TextRIRO-3M and real data improves overall accuracy by 1.91% over a real-only baseline, and improves the Multi-words subset by 3.28%. These gains indicate that current STR training data are not saturated and STE-based synthetic data substantially boost STR.

In summary, our main contributions are as follows:

• We propose TextRIRO, a novel STE method that trains solely on real data via self-paired supervision. It performs realistic editing without explicit or implicit disentanglement, and it alleviates artifacts and hallucinations caused by the synthetic-to-real domain gap.

• TextRIRO achieves more realistic and accurate edits on real benchmarks and attains state-of-the-art (SOTA) performance under the stronger criterion of “training with edited data.”

• Built on TextRIRO, we create TextRIRO-3M, a large-scale realistic composite dataset for long-text recognition. It significantly improves STR, which validates both the realism and the utility of our edited data and demonstrates that STE effectively benefits STR.

References (47)