Text recognition is a long-standing research problem for document digitalization. Existing approaches for text recognition are usually built based on CNN for image understanding and RNN for char-level text generation. In addition, another language model is usually needed to improve the overall accuracy as a post-processing step. In this paper, we propose an end-to-end text recognition approach with pre-trained image Transformer and text Transformer models, namely TrOCR, which leverages the Transformer architecture for both image understanding and wordpiece-level text generation. The TrOCR model is simple but effective, and can be pre-trained with large-scale synthetic data and fine-tuned with human-labeled datasets. Experiments show that the TrOCR model outperforms the current state-of-the-art models on both printed and handwritten text recognition tasks. The code and models will be publicly available at https://aka.ms/TrOCR.
翻译:现有的文本识别方法通常以CNN为主,用于图像理解,RNN为主,而RNN为字符级文本生成。此外,通常需要另一种语言模型来提高后处理步骤的总体准确性。在本文中,我们建议采用终端到终端文本识别方法,采用经过预先培训的图像变换器和文本变换模型,即TrROCR,利用变换器结构来生成图像理解和单字级文本。TrROCR模型简单但有效,可以预先培训大型合成数据,并精细调整人类标签数据集。实验显示,TROCR模型在印刷和手写文本识别任务上都超越了当前最先进的模型。代码和模型将在https://aka.ms/TROCR上公开。