TL;DR
UniTranslator is a unified, end-to-end multimodal framework designed for In-Image Machine Translation (IIMT) that translates text embedded within images while seamlessly preserving the original visual background and layout. By introducing an Understand-Generation Alignment Module (UGAM) and a Spatial Mask Decoder (SMD), it successfully resolves the semantic conflicts and spatial misalignments that typically plague general large multimodal models.
What Problem Does This Paper Address?
In-Image Machine Translation (IIMT) goes beyond standard text translation: it requires detecting text in an image, translating it into a target language, erasing the old text, and rendering the new text back into the exact same region while maintaining the original font style, background texture, and overall layout.
Traditional approaches rely on a cascaded pipeline (OCR $\rightarrow$ Machine Translation $\rightarrow$ Image Editing), which is highly prone to error accumulation across stages. While recent Unified Multimodal Models (UMMs) offer a promising alternative by handling both understanding and generation in a single network, they suffer from two major bottlenecks:
- Understanding-Generation Conflicts: A source phrase can have multiple valid translations. If the model's text-understanding branch predicts one valid translation, but the image-generation branch is supervised to produce a slightly different ground-truth translation, the model receives conflicting training signals.
- Spatial Position Misalignment: Standard diffusion models excel at global image coherence but lack fine-grained, pixel-level control. As a result, they often render translated text in the wrong position or alter the surrounding background textures.
Methods
UniTranslator addresses these challenges by tightly coupling translation understanding and visual text editing within a single framework built on top of a Qwen2.5VL-3B backbone and a Diffusion Transformer (MMDiT) generator.
The framework introduces two novel components:
- Understand-Generation Alignment Module (UGAM): Instead of forcing the generation branch to strictly follow a rigid text string, UGAM uses a cross-attention mechanism to map the discrete text-understanding representations into a continuous, generation-compatible condition embedding. This mitigates the semantic-to-visual penalty clash.
- Spatial Mask Decoder (SMD): To enforce precise text placement, SMD predicts a pixel-level binary mask of the target text regions. Supervised by a combination of binary cross-entropy and Dice loss, it injects explicit spatial cues into the generation process, ensuring layout preservation and accurate geometric alignment.
The authors also utilize a Two-Stage Training Strategy:
- Module Warm-up: The main backbones are frozen while only the newly introduced UGAM and SMD modules are optimized to establish a stable cross-modal interface.
- Joint Fine-tuning: The entire pipeline is jointly fine-tuned using LoRA adapters to optimize end-to-end instruction following and image generation fidelity.
Datasets
The model was evaluated across several diverse benchmarks:
- Translatotron-V(ision): A synthetic IIMT benchmark covering four languages (German, English, French, Romanian) with relatively simple backgrounds but oriented text layouts.
- IIMT30k: A realistic benchmark featuring synthetic text rendered onto complex, real-world photographs with cluttered scenes and varied illumination.
- PRIM: A large-scale multilingual IIMT benchmark containing 7 million training samples and 3,000 test samples paired with real-world TED imagery.
- TextEditBench: Used specifically to test the model's task generalization capabilities on localized scene text editing.
Key Insights and Ideas
- Bidirectional Synergy: One of the paper's most compelling findings is that translation understanding and image generation are not competing tasks; they mutually reinforce each other. Adding language-side supervision improves visual consistency and text rendering, while optimizing for image generation enhances the model's translation comprehension by encouraging context-faithful representations.
- Soft Alignment over Rigid Constraints: Bridging the gap between discrete text tokens and continuous image pixels requires a "soft" representation bridge (like UGAM) rather than rigid text conditioning, which allows the diffusion model to better handle stylistic and contextual variations.
Key Results
UniTranslator achieved state-of-the-art performance across all evaluated benchmarks, outperforming both general-purpose open-source UMMs and specialized specialist models.
On the Translatotron-V benchmark (German $\leftrightarrow$ English), UniTranslator achieved a BLEU score of 25.03 and a Structure-BLEU score of 24.86, significantly outperforming specialized models like Translatotron-V (15.39 BLEU) and proprietary models like GPT-Image-1 (20.75 BLEU). It also maintained superior image fidelity, achieving an SSIM of 0.8184.
Limitations and Future Work
Despite its strong performance, the authors note a few remaining challenges:
- Highly Stylized Typography: The model occasionally struggles to perfectly preserve fine-grained font attributes under extreme styling, such as eroded graffiti or neon-glowing cursive text.
- Complex Backgrounds: In highly cluttered real-world scenes, the model can still introduce minor, unintended visual artifacts outside the target text regions.
- Low-Resource Languages: Performance drops slightly in low-resource language settings, occasionally leading to missing words or inaccurate character rendering due to the underlying foundation model's limitations.
Future work will focus on improving fine-grained style preservation and strengthening background fidelity.
Summary updated