Abstract
Scene Text Editing (STE) aims to naturally modify text in images while preserving visual consistency. The decisive factors for high-quality STE can be divided into three parts: text style, text content, and background. Previous methods have struggled with incomplete disentanglement of these editable attributes, typically addressing only one aspect—such as editing text content—thus limiting controllability and visual consistency. To overcome these limitations, we propose TripleFDS, a novel framework for STE with disentangled modular attributes, and an accompanying dataset called SCB Synthesis. SCB Synthesis provides robust training data for triple feature disentanglement by utilizing the "SCB Group," a novel construct that combines three attributes per image to generate diverse, disentangled training groups. Leveraging this construct as a basic training unit, TripleFDS first disentangles triple features, ensuring semantic accuracy through inter-group contrastive regularization and reducing redundancy through intra-sample multi-feature orthogonality. In the synthesis phase, TripleFDS performs feature remapping to prevent "shortcut" phenomena during reconstruction and mitigate potential feature leakage. Trained on 125,000 SCB Groups, TripleFDS achieves state-of-the-art image fidelity (SSIM of 44.54) and text accuracy (ACC of 93.58%) on mainstream STE benchmarks. Beyond superior performance, the flexible editing of TripleFDS supports new operations such as style replacement and background transfer.
Introduction
Scene Text Editing (STE) is a specialized image-to-image translation task that involves modifying the text within a scene (e.g., changing a store sign from "Open" to "Closed") while keeping the font, color, and background perfectly consistent. The primary challenge in STE lies in the complete disentanglement of attributes. Most existing methods either treat the image as a single unit (implicit editing) or only separate it into two parts: text and everything else. This "incomplete disentanglement" often leads to "feature leakage"—where information about the background is accidentally baked into the style feature, or vice versa. The result is often blurry edges, "ghost" artifacts of the original text, and a lack of fine-grained control over specific attributes.
Methodology
Triple Feature Disentanglement
TripleFDS introduces a modular approach to separate and then synthesize three distinct features: text content ($E_C$), text style ($E_S$), and background ($E_B$). Using a Transformer-decoder architecture, the model extracts these separate feature vectors to ensure that each component can be manipulated independently.
SCB Group and Feature Remapping
To train the model effectively, we introduce the "SCB Group" construction paradigm. An SCB Group consists of images that share specific attributes (e.g., two images with the same background but different text). This structured data allows the model to learn the underlying representations of each attribute through comparison.
A critical component of our training is the Feature Remapping Strategy. In standard reconstruction tasks, models often "cheat" by taking shortcuts—hiding high-frequency details of the target image within the background feature. TripleFDS breaks this by forcing the model to reconstruct an image using background features pulled from a different image in the group (which shares the same background but has different text). This forces the disentanglement module to ensure each feature vector contains only its designated information.
Regularization and Loss Functions
To further refine the disentanglement, we employ two novel loss functions:
- Inter-group Contrastive Loss ($L_{inter}$): Ensures that features representing the same attribute (like the same font style) are similar across different image groups.
- Intra-sample Multi-feature Orthogonality ($L_{intra}$): Mathematically forces the content, style, and background vectors to be orthogonal to one another in the latent space, effectively eliminating redundancy and leakage.
Experiments and Results
Quantitative Performance
TripleFDS was evaluated on several benchmarks, including Tamper-Syn2k, ScenePair, and Tamper-Scene. It achieved state-of-the-art (SOTA) performance across all major metrics. On the ScenePair benchmark, TripleFDS reached a Word Accuracy (ACC) of 93.58%, significantly outperforming previous leaders like RS-STE (89.92%). In terms of image fidelity, it achieved an SSIM of 44.54 and a PSNR of 16.53, indicating superior structural similarity and signal quality compared to diffusion-based competitors like TextCtrl.
Qualitative Analysis
Visual results demonstrate that TripleFDS produces much cleaner text boundaries and more realistic background restoration than existing methods. It excels in cases with elaborate fonts or textured backgrounds (like wood or stone) where previous methods often left artifacts of the source text.
Furthermore, because the style and background are truly independent, TripleFDS supports "permutation-based" editing. Users can perform operations like style replacement (applying a neon sign style to handwritten text) or background transfer, which were previously impossible for standard STE frameworks.
Conclusion
TripleFDS sets a new standard for Scene Text Editing by successfully disentangling content, style, and background. Through the SCB Group paradigm and feature remapping, the model eliminates feature leakage and provides unprecedented control over text attributes. Future work will focus on narrowing the domain gap between synthetic and real-world data to further improve generalization in complex, unconstrained environments.
Summary updated