Table of Contents
Fetching ...

A U-Net and Transformer Pipeline for Multilingual Image Translation

Siddharth Sahay, Radhika Agarwal

TL;DR

The paper tackles translating multilingual text directly from images by building an end-to-end pipeline that combines a U-Net for text detection, Tesseract for recognition, and a from-scratch Seq2Seq Transformer for translation across five languages. It emphasizes customization over reliance on large pre-trained models and demonstrates a complete workflow trained on a 2.2 million translation-pair corpus. Key contributions include synthetic data generation for robust text detection, a from-scratch multilingual NMT model, and empirical analysis showing data-volume impacts on translation quality as measured by standard metrics. The work highlights the practical viability of modular OCR-NMT systems for education and real-time translation tasks and outlines concrete avenues for improving fluency and OCR accuracy through subword tokenization, alternative OCR backends, and domain adaptation.

Abstract

This paper presents an end-to-end multilingual translation pipeline that integrates a custom U-Net for text detection, the Tesseract engine for text recognition, and a from-scratch sequence-to-sequence (Seq2Seq) Transformer for Neural Machine Translation (NMT). Our approach first utilizes a U-Net model, trained on a synthetic dataset , to accurately segment and detect text regions from an image. These detected regions are then processed by Tesseract to extract the source text. This extracted text is fed into a custom Transformer model trained from scratch on a multilingual parallel corpus spanning 5 languages. Unlike systems reliant on monolithic pre-trained models, our architecture emphasizes full customization and adaptability. The system is evaluated on its text detection accuracy, text recognition quality, and translation performance via BLEU scores. The complete pipeline demonstrates promising results, validating the viability of a custom-built system for translating text directly from images.

A U-Net and Transformer Pipeline for Multilingual Image Translation

TL;DR

The paper tackles translating multilingual text directly from images by building an end-to-end pipeline that combines a U-Net for text detection, Tesseract for recognition, and a from-scratch Seq2Seq Transformer for translation across five languages. It emphasizes customization over reliance on large pre-trained models and demonstrates a complete workflow trained on a 2.2 million translation-pair corpus. Key contributions include synthetic data generation for robust text detection, a from-scratch multilingual NMT model, and empirical analysis showing data-volume impacts on translation quality as measured by standard metrics. The work highlights the practical viability of modular OCR-NMT systems for education and real-time translation tasks and outlines concrete avenues for improving fluency and OCR accuracy through subword tokenization, alternative OCR backends, and domain adaptation.

Abstract

This paper presents an end-to-end multilingual translation pipeline that integrates a custom U-Net for text detection, the Tesseract engine for text recognition, and a from-scratch sequence-to-sequence (Seq2Seq) Transformer for Neural Machine Translation (NMT). Our approach first utilizes a U-Net model, trained on a synthetic dataset , to accurately segment and detect text regions from an image. These detected regions are then processed by Tesseract to extract the source text. This extracted text is fed into a custom Transformer model trained from scratch on a multilingual parallel corpus spanning 5 languages. Unlike systems reliant on monolithic pre-trained models, our architecture emphasizes full customization and adaptability. The system is evaluated on its text detection accuracy, text recognition quality, and translation performance via BLEU scores. The complete pipeline demonstrates promising results, validating the viability of a custom-built system for translating text directly from images.

Paper Structure

This paper contains 31 sections, 3 figures, 5 tables, 2 algorithms.

Figures (3)

  • Figure 1: Loss Curve of the U-NET Model.
  • Figure 2: Text detection and extraction.
  • Figure 3: Loss Curve of the translator model.