UNIT: Unifying Image and Text Recognition in One Vision Encoder

Yi Zhu, Yanpeng Zhou, Chunwei Wang, Yang Cao, Jianhua Han +2 more
2/3/2026

No official code found. Best implementation: yeezhu/UNIT (34 stars, Apache-2.0, last commit 2024-09-26).

Abstract

Currently, vision encoder models like Vision Transformers (ViTs) typically excel at image recognition tasks but cannot simultaneously support text recognition like human visual recognition. To address this limitation, we propose UNIT, a novel training framework aimed at UNifying Image and Text recognition within a single model. Starting with a vision encoder pre-trained with image recognition tasks, UNIT introduces a lightweight language decoder for predicting text outputs and a lightweight vision decoder to prevent catastrophic forgetting of the original image encoding capabilities. The training process comprises two stages: intra-scale pretraining and inter-scale finetuning. During intra-scale pretraining, UNIT learns unified representations from multi-scale inputs, where images and documents are at their commonly used resolution, to enable fundamental recognition capability. In the inter-scale finetuning stage, the model introduces scale-exchanged data, featuring images and documents at resolutions different from the most commonly used ones, to enhance its scale robustness. Notably, UNIT retains the original vision encoder architecture, making it cost-free in terms of inference and deployment. Experiments across multiple benchmarks confirm that our method significantly outperforms existing methods on document-related tasks (e.g., OCR and DocQA) while maintaining the performances on natural images, demonstrating its ability to substantially enhance text recognition without compromising its core image recognition capabilities.

View on arXivView PDF

Code Implementations(1)

yeezhu/UNITCommunity61%
Apache-2.0

PyTorch implementation of "UNIT: Unifying Image and Text Recognition in One Vision Encoder", NeurlPS 2024.

342PythonAug 30, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{zhu2026unit,
  title  = {UNIT: Unifying Image and Text Recognition in One Vision Encoder},
  author = {Yi Zhu and Yanpeng Zhou and Chunwei Wang and Yang Cao and Jianhua Han and Lu Hou and Hang Xu},
  year   = {2026},
  eprint = {2409.04095},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2409.04095},
  url    = {https://arxiv.org/abs/2409.04095},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.04095.svg)](https://codeofpaper.com/paper/2409.04095)

Discussion