Models and pretrained weights#

Weights follow torchvision’s API: each architecture has a *_Weights enum whose entries carry a hash-checked URL, the matching transforms() and a meta dict (task, backbone, parameter count, training source, license, post-processing and decoder settings, benchmark results).

from torchocr.models import DBNet, DBNet_ResNet18_VD_Weights, get_model, list_models

weights = DBNet_ResNet18_VD_Weights.ICDAR2015
model = DBNet(weights=weights).eval()
preprocess = weights.transforms()
weights.meta["_metrics"]

list_models()                                    # registered builders
get_model("dbnet_resnet18_vd", weights="DEFAULT")

The tables below are generated from weights.meta at build time.

Text detection#

Detection hmean on the ICDAR-2015 test set, IoU protocol with don’t-care regions.

Weights

Params

ICDAR-2015 hmean

DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_CH

0.6 M

0.422

DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_EN

0.6 M

0.441

DBNet_MobileNetV3_Large_05_Weights.ICDAR2015

0.6 M

0.734

DBNet_ResNet18_VD_Weights.PPOCR_SERVER_V2

12.4 M

0.414

DBNet_ResNet18_VD_Weights.ICDAR2015

12.4 M

0.809

DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_CH

Trained by PaddleOCR on line-level annotations of mostly Chinese/English document and scene text, then converted to PyTorch. ICDAR-2015 scores word boxes in low-resolution street scenes, so adjacent words merged into one line count as misses; use this number to compare checkpoints, not as the accuracy you will see on documents. ICDAR-2015 test (500 images, 2077 care words), official IoU protocol on rotated quads; transforms() preset, DBPostProcessor(**meta[‘postprocess’]). Reproduce with references/detection/evaluate.py –weights <this enum>.

Source: PaddleOCR ch_PP-OCRv3_det_distill_train (Student), via scripts/convert_paddle_dbnet_v3.py

License: Apache-2.0

DBNet_MobileNetV3_Large_05_Weights.PPOCR_V3_EN

Trained by PaddleOCR on line-level annotations of mostly Chinese/English document and scene text, then converted to PyTorch. ICDAR-2015 scores word boxes in low-resolution street scenes, so adjacent words merged into one line count as misses; use this number to compare checkpoints, not as the accuracy you will see on documents. ICDAR-2015 test (500 images, 2077 care words), official IoU protocol on rotated quads; transforms() preset, DBPostProcessor(**meta[‘postprocess’]). Reproduce with references/detection/evaluate.py –weights <this enum>.

Source: PaddleOCR en_PP-OCRv3_det_distill_train (Student), via scripts/convert_paddle_dbnet_v3.py

License: Apache-2.0

DBNet_MobileNetV3_Large_05_Weights.ICDAR2015

Word-level detector for incidental scene text (street-level photos, Latin script). box_thresh=0.45 maximizes hmean on the training split (references/detection/calibrate.py) and was applied once to the test split; with PaddleOCR’s box_thresh=0.6 this checkpoint scores 0.688. Weights are the last epoch – no checkpoint was selected on the test set. Expect lower recall on dense documents and on non-Latin scripts. ICDAR-2015 test (500 images, 2077 care words), official IoU protocol on rotated quads; transforms() preset, DBPostProcessor(**meta[‘postprocess’]). Reproduce with references/detection/evaluate.py –weights <this enum>.

Source: torchocr: PPOCR_V3_EN fine-tuned 300 epochs on the 1000 ICDAR-2015 training images with references/detection/train.py

License: Apache-2.0 (base weights); fine-tuned on ICDAR 2015, released for research use

DBNet_ResNet18_VD_Weights.PPOCR_SERVER_V2

Trained by PaddleOCR on line-level annotations of mostly Chinese/English document and scene text, then converted to PyTorch. ICDAR-2015 scores word boxes in low-resolution street scenes, so adjacent words merged into one line count as misses; use this number to compare checkpoints, not as the accuracy you will see on documents. ICDAR-2015 test (500 images, 2077 care words), official IoU protocol on rotated quads; transforms() preset, DBPostProcessor(**meta[‘postprocess’]). Reproduce with references/detection/evaluate.py –weights <this enum>.

Source: PaddleOCR ch_ppocr_server_v2.0_det_train, via scripts/convert_paddle_dbnet.py

License: Apache-2.0

DBNet_ResNet18_VD_Weights.ICDAR2015

Word-level detector for incidental scene text (street-level photos, Latin script). box_thresh=0.5 maximizes hmean on the training split (references/detection/calibrate.py) and was applied once to the test split; with PaddleOCR’s box_thresh=0.6 this checkpoint scores 0.794. Weights are the last epoch – no checkpoint was selected on the test set. Expect lower recall on dense documents and on non-Latin scripts. ICDAR-2015 test (500 images, 2077 care words), official IoU protocol on rotated quads; transforms() preset, DBPostProcessor(**meta[‘postprocess’]). Reproduce with references/detection/evaluate.py –weights <this enum>.

Source: torchocr: PPOCR_SERVER_V2 fine-tuned 300 epochs on the 1000 ICDAR-2015 training images with references/detection/train.py

License: Apache-2.0 (base weights); fine-tuned on ICDAR 2015, released for research use

Text recognition#

Case-insensitive word accuracy on the test words, cropped from the full images along their ground-truth quadrilaterals (torchocr.ops.crop_quads()).

Weights

Params

ICDAR-2015 word acc.

Total-Text word acc.

CRNN_ResNet34_VD_Weights.PPOCR_SERVER_V2

27.9 M

0.665

—

CRNN_ResNet34_VD_Weights.ICDAR2015

27.9 M

0.738

—

CRNN_ResNet34_VD_Weights.ICDAR2015_TOTALTEXT_MLT19

27.9 M

0.791

0.802

CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19

27.9 M

0.799

0.819

CRNN_ResNet34_VD_Weights.PPOCR_SERVER_V2

Chinese + English line recognizer (CTC, 6623 characters + blank) trained by PaddleOCR mostly on document and street-sign text lines. Benchmark: the 2077 alphanumeric care words of ICDAR-2015 test, cropped from the full images with torchocr.ops.crop_quads on their ground-truth quads, scored case-insensitively over letters and digits (not the official Task 4.3 crops). Axis-aligned crops of the same words score 0.5787 – rotated scene text needs quad rectification. Reproduce with references/recognition/evaluate.py.

Source: PaddleOCR ch_ppocr_server_v2.0_rec_train, via scripts/convert_paddle_crnn.py

License: Apache-2.0

CRNN_ResNet34_VD_Weights.ICDAR2015

Scene-text word recognizer (CTC). Same benchmark protocol as PPOCR_SERVER_V2: the 2077 alphanumeric care words of ICDAR-2015 test cropped with crop_quads on their ground-truth quads, case-insensitive. Last epoch, no checkpoint selected on the test set. The charset is still PaddleOCR’s Chinese + Latin one, but fine-tuning used Latin scene text only, so Chinese accuracy is not guaranteed. Reproduce with references/recognition/evaluate.py.

Source: torchocr: PPOCR_SERVER_V2 fine-tuned 30 epochs on the 4467 legible ICDAR-2015 training words (crop_quads on jittered ground-truth quads) with references/recognition/train.py

License: Apache-2.0 (base weights); fine-tuned on ICDAR 2015, released for research use

CRNN_ResNet34_VD_Weights.ICDAR2015_TOTALTEXT_MLT19

Latin scene-text word recognizer. Decoded with CTC beam search (width 10) and a case-insensitive 6-gram character language model built from the training transcriptions only; beam width and LM weight were chosen on Total-Text training words. Same benchmark protocol as PPOCR_SERVER_V2 (ground-truth quads cropped with crop_quads, case-insensitive). Last epoch, no checkpoint selected on any test set. Chinese is no longer supported in practice. Reproduce with references/recognition/evaluate.py.

Source: torchocr: PPOCR_SERVER_V2 fine-tuned 10 epochs (bf16) on 66k Latin scene words: ICDAR-2015 train (x2), Total-Text train and MLT-2019 Latin crops, with references/recognition/train.py

License: Apache-2.0 (base weights); fine-tuned on ICDAR 2015, Total-Text and MLT 2019, released for research use

CRNN_ResNet34_VD_Weights.MJSYNTH_ICDAR2015_TOTALTEXT_MLT19

Latin scene-text word recognizer, ICDAR2015_TOTALTEXT_MLT19 further trained with MJSynth synthetic words mixed into every epoch. Decoded like its parent, with the same CTC beam search (width 10) and 6-gram character language model (built from real training transcriptions only; beam width and LM weight were chosen on Total-Text training words). Same benchmark protocol as PPOCR_SERVER_V2 (ground-truth quads cropped with crop_quads, case-insensitive). Last epoch, no checkpoint selected on any test set. Chinese is no longer supported in practice. Reproduce with references/recognition/evaluate.py.

Source: torchocr: ICDAR2015_TOTALTEXT_MLT19 fine-tuned 6 more epochs (bf16), each drawing 370k words at random: the 66k real Latin scene words (ICDAR-2015 train x2, Total-Text train, MLT-2019 Latin crops) once on average, plus 300k of the 7.2M MJSynth synthetic words, with references/recognition/train.py

License: Apache-2.0 (base weights); fine-tuned on ICDAR 2015, Total-Text, MLT 2019 and MJSynth, released for research use

Page orientation#

Each of the 4999 DocLayNet test pages is fed upright and turned 90, 180 and 270 degrees. Accuracy is the classifier’s argmax; the last two columns are what torchocr.PageOrientation does at the weights’ min_confidence, which was chosen on DocLayNet validation.

Weights

Params

DocLayNet accuracy

Upright pages turned

Turned pages set upright

PPLCNet_x1_0_Weights.PPOCR_DOC_ORIENTATION

1.7 M

0.985

0.0024

0.975

PPLCNet_x1_0_Weights.PPOCR_DOC_ORIENTATION

Trained by PaddleOCR on document pages (mostly Chinese and English), converted to PyTorch. Scored on the 4999 DocLayNet test pages (financial reports, manuals, laws, patents, scientific articles, tenders), each fed upright and turned 90, 180 and 270 degrees: accuracy is the argmax; the other two numbers are PageOrientation’s decisions at min_confidence=0.7, chosen on DocLayNet validation and applied once to test. Weakest on manuals (0.973) and laws (0.979), where most errors send upright pages to 180 degrees. Not meant for scene photos: on a street photo it is unsure (p < 0.8) and can still turn it. Reproduce with references/orientation/evaluate.py.

Source: PaddleOCR PP-LCNet_x1_0_doc_ori, via scripts/convert_paddle_pplcnet.py

License: Apache-2.0