PaddleOCR/doc/doc_en/ppocr_introduction_en.md

10 KiB
Raw Blame History

English | 简体中文

PP-OCR

1. Introduction

PP-OCR is a self-developed practical ultra-lightweight OCR system, which is slimed and optimized based on the reimplemented academic algorithms, considering the balance between accuracy and speed.

PP-OCR is a two-stage OCR system, in which the text detection algorithm is DB, and the text recognition algorithm is CRNN. Besides, a text direction classifier is added between the detection and recognition modules to deal with text in different directions.

PP-OCR pipeline is as follows:

PP-OCR system is in continuous optimization. At present, PP-OCR and PP-OCRv2 have been released:

[1] PP-OCR adopts 19 effective strategies from 8 aspects including backbone network selection and adjustment, prediction head design, data augmentation, learning rate transformation strategy, regularization parameter selection, pre-training model use, and automatic model tailoring and quantization to optimize and slim down the models of each module (as shown in the green box above). The final results are an ultra-lightweight Chinese and English OCR model with an overall size of 3.5M and a 2.8M English digital OCR model. For more details, please refer to the PP-OCR technical article (https://arxiv.org/abs/2009.09941).

[2] On the basis of PP-OCR, PP-OCRv2 is further optimized in five aspects. The detection model adopts CML(Collaborative Mutual Learning) knowledge distillation strategy and CopyPaste data expansion strategy. The recognition model adopts LCNet lightweight backbone network, U-DML knowledge distillation strategy and enhanced CTC loss function improvement (as shown in the red box above), which further improves the inference speed and prediction effect. For more details, please refer to the technical report of PP-OCRv2 (https://arxiv.org/abs/2109.03144).

[3] PP-OCRv3 is further upgraded on the basis of PP-OCRv2. The detection model is still based on DB algorithm, and the optimization strategies include a newly proposed FPN structure with residual attention mechanism named with RSEFPN, a PAN structure with enlarged receptive field named with LKPAN, and better teacher model based on DML training; The recognition model replaces the base model from CRNN with IJCAI 2022 paper SVTR, and adopts lightweight SVTR, guided training of CTC, data augmentation strategy RecConAug, better pre-trained model by self-supervised training, and the use of unlabeled data to accelerate the model and improve the effect. For more details, please refer to PP-OCRv3 technical report.

PP-OCRv3 pipeline is as follows:

2. Features

  • Ultra lightweight PP-OCRv3 series models: detection (3.6M) + direction classifier (1.4M) + recognition 12M) = 17.0M
  • Ultra lightweight PP-OCRv2 series models: detection (3.1M) + direction classifier (1.4M) + recognition 8.5M) = 13.0M
  • Ultra lightweight PP-OCR mobile series models: detection (3.0M) + direction classifier (1.4M) + recognition (5.0M) = 9.4M
  • General PP-OCR server series models: detection (47.1M) + direction classifier (1.4M) + recognition (94.9M) = 143.4M
  • Support Chinese, English, and digit recognition, vertical text recognition, and long text recognition
  • Support multi-lingual recognition: about 80 languages like Korean, Japanese, German, French, etc

3. benchmark

For the performance comparison between PP-OCR series models, please check the benchmark documentation.

4. Visualization more

PP-OCRv2 English model
PP-OCRv2 Chinese model
PP-OCRv2 Multilingual model

5. Tutorial

5.1 Quick start

5.2 Model training / compression / deployment

For more tutorials, including model training, model compression, deployment, etc., please refer to tutorials

6. Model zoo

PP-OCR Series Model ListUpdate on 2022.04.28

Model introduction Model name Recommended scene Detection model Direction classifier Recognition model
Chinese and English ultra-lightweight PP-OCRv3 model16.2M ch_PP-OCRv3_xx Mobile & Server inference model / trained model inference model / trained model inference model / trained model
English ultra-lightweight PP-OCRv3 model13.4M en_PP-OCRv3_xx Mobile & Server inference model / trained model inference model / trained model inference model / trained model
Chinese and English ultra-lightweight PP-OCRv2 model11.6M ch_PP-OCRv2_xx Mobile & Server inference model / trained model inference model / trained model inference model / trained model
Chinese and English ultra-lightweight PP-OCR model (9.4M) ch_ppocr_mobile_v2.0_xx Mobile & server inference model / trained model inference model / trained model inference model / trained model
Chinese and English general PP-OCR model (143.4M) ch_ppocr_server_v2.0_xx Server inference model / trained model inference model / trained model inference model / trained model

For more model downloads (including multiple languages), please refer to PP-OCR series model downloads.

For a new language request, please refer to Guideline for new language_requests.