Organizations: Wuhan University · State Key Laboratory of Human-Machine Hybrid Augmented Intelligence, Institute of Artificial Intelligence and Robotics, Xi’an Jiaotong University · The Hong Kong University of Science and Technology (Guangzhou)
Cross-border e-commerce image translation is essential for global retail, where product images, banners, and detail pages need to be produced in different languages. Existing methods struggle to achieve accurate translation, faithful visual identity preservation, and easy-to-edit outputs, simultaneously. To address these challenges, we introduce TransAnyText, a structured visual code framework that reformulates image text translation as generating renderable HTML patches from source images and target languages. Our framework decouples semantic generation from pixel rendering: a vision-language model (VLM) handles visual understanding, cross-lingual translation, and structured visual generation, while a diffusion model performs background inpainting and pixel-level refinement, followed by deterministic rendering to synthesize the final image. Based on this formulation, we develop a three-stage post-training framework, where supervised fine-tuning (SFT) establishes the image-to-code mapping, privilege-gap weighted self-distillation (PWSD) improves the learning of style and layout tokens, and reinforcement learning with verifiable rewards (RLVR) further optimizes task-level performance. We further introduce TransAnyDataset and TransAnyBench, a multilingual dataset and benchmark for e-commerce image translation. Extensive experiments demonstrate competitive performance against cascaded pipelines, open-source end-to-end models, and closed-source image editing systems, providing an effective, controllable, and editable solution for cross-border e-commerce image translation.
Figures & tables
Figure 1: Comparison of paradigms: (a) the cascaded pipeline of detection, translation, erasing, and re-rendering, which suffers from error accumulation and visual artifacts; (b) the end-to-end pixel edit paradigm, which jointly performs translation and rendering but often hallucinates or distorts text; and (c) our structured visual code paradigm, which decouples semantic generation from pixel rendering to yield accurate, editable, and visually faithful results.
Figure 2: Visual comparison on e-commerce image text translation. (a) Qualitative comparison with existing methods; (b) qualitative comparison with closed-source models on multilingual outputs from a single Chinese source image.
Figure 3: Overview of the TransAnyText training framework and inference pipeline. The training consists of three stages: (1) joint SFT for structured HTML code generation and background inpainting, (2) PWSD for token-level self-distillation on style and layout tokens, and (3) RLVR for task-level alignment with verifiable rewards. At inference, the VLM and diffusion model jointly produce an editable HTML and a clean background, which are deterministically rendered into the translated image.
Figure 4: Dataset statistics of TransAnyDataset, including distributions over categories, languages, text regions, and word counts.
Figure 5: Visual comparison of TransAnyText with existing methods.
Any → Zh
Zh → Any
Any → En
En → Any
Method
COMET
T.Q.
V.F.
I.R.
COMET
T.Q.
V.F.
I.R.
COMET
T.Q.
V.F.
I.R.
COMET
T.Q.
V.F.
I.R.
Closed-source Image Editing Methods
Seedream 5.0
0.794
9.60
9.52
9.03
0.440
3.73
8.11
5.57
0.528
5.41
8.41
6.02
0.549
5.96
8.59
6.87
Nano Banana 2
0.782
9.69
9.52
9.22
0.584
8.73
9.31
8.98
0.627
8.91
9.38
8.69
0.632
9.41
9.41
9.22
GPT Image 2
0.793
9.54
9.24
9.51
0.596
8.46
9.20
9.22
0.632
9.05
9.26
9.10
0.642
9.45
9.33
9.33
Cascaded Methods
Table 1: Quantitative results on TransAnyBench. T.Q. represents Translation Quality, V.F. represents Visual Fidelity, and I.R. represents Image Realism. "Any" represents the aggregate over all languages except the target language. Best results are in bold , and second-best are underlined .
In-Image Machine Translation (IIMT) aims to translate scene text in an image and render the translated text back into the original regions while preserving the overall visual appearance. Recent unified multimodal models provide a promising solution by combining visual-text understanding and image generation within a single framework. However, directly adapting such models to IIMT remains challenging. In particular, they often suffer from understanding-generation conflicts, where the translation inferred during understanding is inconsistent with the text supervision used in generation, and spatial position misalignment, where the rendered text does not accurately match the target text regions. To address these issues, we present UniTranslator, a unified multimodal framework for IIMT that tightly couples translation understanding and text editing. Specifically, we introduce an Understand-Generation Alignment Module (UGAM) to bridge the representation gap between understanding and generation, encouraging semantic consistency between translated content prediction and text rendering. We further propose a Spatial Mask Decoder (SMD) with pixel-level supervision over text regions to improve spatial grounding, geometric alignment, and layout controllability during generation. Extensive experiments on multiple benchmarks demonstrate that UniTranslator achieves state-of-the-art performance across diverse language directions and complex real-world layouts. Moreover, our results reveal a strong mutual reinforcement effect between translation understanding and image generation, highlighting the advantage of unified translation multimodal learning. Code is available at https://github.com/SeerRay-Lab/Unitranslator.
Jiahao Lyu, Pei Fu, Zhenhang Li +6
Institute of Information Engineering, Chinese Academy of Science, China · MiLM Plus, Xiaomi Inc, China · School of Cyber Security, University of Chinese Academy of Science, China +2
This work presents a comparative evaluation of machine translation systems applied to images containing textual information, a task that lies at the intersection of computer vision and natural language processing. The study compares three main paradigms: modular pipelines that separate text detection, recognition, and translation; multi-modal large language models (MLLMs) capable of processing both image and text jointly; and an end-to-end model, Translatotron-V, which directly generates translated images. The modular systems employ state-of-the-art OCR (docTR) combined with multilingual LLMs such as Llama and EuroLLM, while the evaluated MLLMs include different configurations of Gemini 2.5. Experiments were conducted on parallel multilingual datasets covering multiple language pairs, with evaluation based on BLEU, chrF, and TER metrics. The results show that modular pipelines outperform the end-to-end approach, while MLLMs achieve the best overall performance, demonstrating superior flexibility and contextual understanding. These findings underscore the effectiveness of multi-modal reasoning for image-to-text translation and provide a solid foundation for future research on integrating visual understanding and language generation in multilingual settings.
Blai Puchol, Sergio Gómez González, Miguel Domingo +1
PRHLT Research Center - Universitat Polit`ecnica de Val`encia, Camino de Vera, s/n - Valencia · ValgrAI - Valencian Graduate School and Research Network for Artificial Intelligence, Camino de Vera s/n
End-to-end In-Image Machine Translation (IIMT) aims to convert text embedded within an image into a target language while preserving the original visual context, layout, and rendering style. However, existing IIMT benchmarks are largely synthetic and thus fail to reflect real-world complexity, while current evaluation protocols focus on single-modality metrics and overlook cross-modal faithfulness between rendered text and model outputs. To address these shortcomings, we present In-image Machine Translation Benchmark (IMTBench), a new benchmark of 2,500 image translation samples covering four practical scenarios and nine languages. IMTBench supports multi-aspect evaluation, including translation quality, background preservation, overall image quality, and a cross-modal alignment score that measures consistency between the translated text produced by the model and the text rendered in the translated image. We benchmark strong commercial cascade systems, and both closed- and open-source unified multi-modal models, and observe large performance gaps across scenarios and languages, especially on natural scenes and resource-limited languages, highlighting substantial headroom for end-to-end image text translation. We hope IMTBench establishes a standardized benchmark to accelerate progress in this emerging task.
Jiahao Lyu, Pei Fu, Zhenhang Li +7
Institute of Information Engineering, Chinese Academy of Science, China · MiLM Plus, Xiaomi Inc, China · School of Cyber Security, University of Chinese Academy of Science, China +3