TL;DR
Recognition-Synergistic Scene Text Editing (RS-STE) unifies text recognition and text editing into a single, streamlined Transformer-based framework. By leveraging the inherent ability of text recognition models to separate style from content, RS-STE eliminates complex explicit disentanglement pipelines and achieves state-of-the-art editing quality on real-world images via a novel cyclic self-supervised training strategy.
What Problem Does This Paper Address?
Scene Text Editing (STE) focuses on modifying the textual content within an image while seamlessly preserving its original style—including font, color, background texture, and geometry.
Traditional approaches typically rely on complex, multi-stage pipelines designed to explicitly separate ("disentangle") the foreground text from the background style before fusing the style with the new target text. This explicit separation is brittle and frequently fails in complex real-world scenarios, leading to visual artifacts. Furthermore, training these models requires paired data (images with identical styles but different text), which is virtually impossible to collect from the real world. Consequently, existing models suffer from a severe domain gap when moving from synthetic training data to real-world applications.
Methods
RS-STE bypasses explicit style-content separation by introducing a unified architecture that performs text recognition and text generation simultaneously.
The architecture consists of three main components:
- Input Tokenizer: Separates and encodes the target text and the reference style image into a unified sequence of embeddings.
- Multi-modal Parallel Decoder (MMPD): A Transformer-based decoder that processes the text and image tokens concurrently. It predicts the characters of the source image (recognition) while simultaneously generating the token features of the edited target image (editing).
- Image Detokenizer: A pre-trained Variational Autoencoder (VAE) decoder that converts the generated image tokens back into a high-resolution edited image.
Two-Stage Training Strategy
To overcome the lack of real-world paired data, the authors propose a two-stage training pipeline:
- Fully-Supervised Pre-training: The model is first trained on massive paired synthetic datasets. It uses cross-entropy loss to optimize the recognition task, alongside Mean Squared Error (MSE) and perceptual losses to ensure pixel-level and semantic fidelity for the editing task.
- Cyclic Self-Supervised Fine-tuning: To adapt to real-world images without ground truth, the model employs a twice-cyclic editing process. Given an image with text $A$, the model edits it to a random text $B$. It then takes this intermediate image and edits it back to text $A$. The final reconstructed image is supervised against the original source image, allowing the model to learn real-world styles without explicit pairs.
Datasets
The model was trained and evaluated on a mix of synthetic and real-world datasets:
- Training: Tamper-train (150k synthetic images) augmented with 4 million engine-generated paired synthetic samples. Real-world fine-tuning was conducted using MLT-2017 and Union14M-L.
- Evaluation: Tamper-Syn2k (paired synthetic benchmark), ScenePair (paired real-world benchmark), and Tamper-Scene (7,725 unpaired real-world images).
- Downstream Evaluation: Six standard text recognition benchmarks (IIIT 5K, IC13, SVT, IC15, SVTP, CUTE80) and the Union-benchmark were used to test how well the edited images could boost downstream OCR performance.
Key Insights and Ideas
- The Synergy of Recognition: The core "aha moment" of the paper is that text recognition models already implicitly separate style from content. As shown in Figure 2, images with identical text but wildly different backgrounds naturally cluster together in a recognition model's feature space. RS-STE exploits this intrinsic property to guide the generation process, eliminating the need for separate foreground/background separation modules.
- Cyclic Consistency Prevents Collapse: When training on unpaired real data, models often collapse into an identity mapping (simply outputting the input image). The forward-and-reverse cyclic training loop forces the model to actually alter the text content while keeping the background style invariant.
- STE as Targeted Data Augmentation: Beyond aesthetic editing, RS-STE can act as a generator for "hard cases" to train downstream OCR models. By identifying text images that existing OCR models fail to recognize and generating stylistic variations of them, RS-STE creates highly effective training data.
Key Results
RS-STE achieves state-of-the-art performance across both synthetic and real-world datasets, outperforming heavy diffusion-based and explicit-disentanglement models.
- Real-World Paired Performance (ScenePair): RS-STE achieved a Recognition Accuracy (RecAcc) of 91.80% on edited images, significantly outperforming the previous state-of-the-art, TextCtrl (84.67%). It also achieved the best scores in structural similarity (SSIM: 46.09) and peak signal-to-noise ratio (PSNR: 17.35).
- Real-World Unpaired Performance (Tamper-Scene): The model achieved an 86.12% RecAcc, marking a 7.32% improvement over the competitive STEEM model.
- Downstream OCR Boost: When used as a data augmentation tool on the Union14M benchmark, the synthetic hard cases generated by RS-STE improved the average accuracy of standard recognition models substantially: ABINet accuracy increased by 2.2% and MAERec-S increased by 2.5%.
Limitations and Future Work
The authors note a primary limitation: RS-STE struggles when editing images containing extremely curved text. This is largely a data-driven limitation, as the synthetic pre-training datasets lack sufficient examples of highly warped or curved text geometries.
To demonstrate this, the authors trained an experimental variant called RS-STE+ by intentionally adding synthetic curved text to the training mix, which yielded robust improvements. Future work will likely focus on integrating more diverse geometric text layouts into the self-supervised fine-tuning stage.
Summary updated