[Paper Review] MaskOCR: Text Recognition with Masked Encoder-Decoder Pretraining
MaskOCR unifies vision and language pre-training within an encoder-decoder text recognition framework by using masked image modeling for the encoder and masked image-language modeling for the decoder, achieving strong results on Chinese and English benchmarks.
Text images contain both visual and linguistic information. However, existing pre-training techniques for text recognition mainly focus on either visual representation learning or linguistic knowledge learning. In this paper, we propose a novel approach MaskOCR to unify vision and language pre-training in the classical encoder-decoder recognition framework. We adopt the masked image modeling approach to pre-train the feature encoder using a large set of unlabeled real text images, which allows us to learn strong visual representations. In contrast to introducing linguistic knowledge with an additional language model, we directly pre-train the sequence decoder. Specifically, we transform text data into synthesized text images to unify the data modalities of vision and language, and enhance the language modeling capability of the sequence decoder using a proposed masked image-language modeling scheme. Significantly, the encoder is frozen during the pre-training phase of the sequence decoder. Experimental results demonstrate that our proposed method achieves superior performance on benchmark datasets, including Chinese and English text images.
Motivation & Objective
- Motivate improving text recognition by jointly leveraging visual and linguistic priors instead of using a separate language model or solely visual pretraining.
- Propose a unified pretraining scheme that pre-trains the encoder with masked image modeling on unlabeled real text images and pre-trains the decoder with masked image-language modeling on synthesized text images.
- Demonstrate that fixing the encoder during decoder pre-training can bridge the gap between real and synthetic data while enhancing language modeling in the decoder.
- Show that the proposed approach yields state-of-the-art or competitive performance on Chinese and English text recognition benchmarks.
Proposed method
- Use an encoder-decoder transformer where the encoder processes vertically partitioned image patches to produce patch representations.
- Pre-train the encoder with masked image modeling (context autoencoder style) using real text images to learn strong visual representations.
- Pre-train the decoder by transforming a text corpus into synthesized text images and applying masked image-language modeling, updating only the decoder while keeping the encoder fixed.
- During language pre-training, mask some characters and corresponding image patches, letting the decoder predict the masked characters from visible patches.
- Adopt a sequential pre-training strategy to mitigate domain gaps between real and synthesized data, enabling joint vision-language pre-training within the standard encoder-decoder framework.
Experimental results
Research questions
- RQ1Can a single encoder-decoder model fully integrate vision and language pre-training for text recognition without an external language model?
- RQ2Does masked image modeling for the encoder and masked image-language modeling for the decoder improve recognition performance on Chinese and English text images compared to prior solely-vision or solely-language pre-training?
- RQ3What is the impact of fixing the encoder during decoder pre-training and of masking strategies on downstream text recognition performance?
Key findings
- Vision-language pre-training improves performance beyond both scratch and single-modality pre-training, with complementary gains observed for encoder and decoder.
- Pre-training the encoder with masked image modeling on real text images yields noticeable accuracy gains over a randomly initialized encoder.
- Language pre-training on synthesized images, with the encoder fixed, further enhances decoder performance and overall accuracy, validating the serial pre-training design.
- On Chinese text line recognition, the approach achieves state-of-the-art results, including notable improvements over prior methods on benchmarks like BCTR; the method also achieves competitive results on English text recognition tasks.
- The model demonstrates generalizability across decoding strategies (including CTC) and shows robustness to real vs. synthesized data through the proposed pre-training scheme.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.