Pre-trained Models

July 15, 2026 · View on GitHub

OAROCR provides pre-trained models for OCR and document understanding tasks. Download them manually from the GitHub Releases page (linked in the tables below), or have the library fetch them on demand from ModelScope. See Auto-download at the bottom.

Text Detection Models

Choose between mobile and server variants based on your needs:

  • Mobile: Smaller, faster models suitable for real-time applications
  • Server: Larger, more accurate models for high-precision requirements
VersionCategoryModel FileSizeDescription
PP-OCRv4Mobilepp-ocrv4_mobile_det.onnx4.6 MiBMobile variant for real-time applications
PP-OCRv4Serverpp-ocrv4_server_det.onnx108.2 MiBServer variant for high-precision
PP-OCRv5Mobilepp-ocrv5_mobile_det.onnx4.6 MiBMobile variant for real-time applications
PP-OCRv5Serverpp-ocrv5_server_det.onnx84.0 MiBServer variant for high-precision

Text Recognition Models

Chinese/General Models

VersionCategoryModel FileSizeDescription
PP-OCRv3Mobilepp-ocrv3_mobile_rec.onnx10.2 MiBLegacy mobile variant
PP-OCRv4Mobilepp-ocrv4_mobile_rec.onnx10.4 MiBMobile variant
PP-OCRv4Serverpp-ocrv4_server_rec.onnx86.3 MiBServer variant
PP-OCRv4Documentpp-ocrv4_server_rec_doc.onnx90.5 MiBOptimized for documents
PP-OCRv5Mobilepp-ocrv5_mobile_rec.onnx15.8 MiBMobile variant
PP-OCRv5Serverpp-ocrv5_server_rec.onnx80.6 MiBServer variant
SVTRv2Serverch_svtrv2_rec.onnx80.3 MiBHigh accuracy variant
RepSVTRServerch_repsvtr_rec.onnx24.2 MiBBalanced accuracy/speed

Language-Specific Models

VersionLanguageModel FileSizeDescription
PP-OCRv3Arabicarabic_pp-ocrv3_mobile_rec.onnx8.6 MiBArabic text recognition
PP-OCRv5Arabicarabic_pp-ocrv5_mobile_rec.onnx7.7 MiBArabic text recognition
PP-OCRv3Chinese Traditionalchinese_cht_pp-ocrv3_mobile_rec.onnx10.6 MiBTraditional Chinese text recognition
PP-OCRv3Cyrilliccyrillic_pp-ocrv3_mobile_rec.onnx8.6 MiBCyrillic script recognition
PP-OCRv5Cyrilliccyrillic_pp-ocrv5_mobile_rec.onnx7.7 MiBCyrillic script recognition
PP-OCRv3Devanagaridevanagari_pp-ocrv3_mobile_rec.onnx8.6 MiBDevanagari script recognition
PP-OCRv5Devanagaridevanagari_pp-ocrv5_mobile_rec.onnx7.6 MiBDevanagari script recognition
PP-OCRv5Greekel_pp-ocrv5_mobile_rec.onnx7.5 MiBGreek text recognition
PP-OCRv3Englishen_pp-ocrv3_mobile_rec.onnx8.6 MiBEnglish text recognition
PP-OCRv4Englishen_pp-ocrv4_mobile_rec.onnx7.4 MiBEnglish text recognition
PP-OCRv5Englishen_pp-ocrv5_mobile_rec.onnx7.5 MiBEnglish text recognition
PP-OCRv5Eastern Slaviceslav_pp-ocrv5_mobile_rec.onnx7.5 MiBEastern Slavic languages
PP-OCRv3Japanesejapan_pp-ocrv3_mobile_rec.onnx9.6 MiBJapanese text recognition
PP-OCRv3Georgianka_pp-ocrv3_mobile_rec.onnx8.6 MiBGeorgian text recognition
PP-OCRv3Koreankorean_pp-ocrv3_mobile_rec.onnx9.5 MiBKorean text recognition
PP-OCRv5Koreankorean_pp-ocrv5_mobile_rec.onnx12.8 MiBKorean text recognition
PP-OCRv3Latinlatin_pp-ocrv3_mobile_rec.onnx8.6 MiBLatin script recognition
PP-OCRv5Latinlatin_pp-ocrv5_mobile_rec.onnx7.7 MiBLatin script recognition
PP-OCRv3Tamilta_pp-ocrv3_mobile_rec.onnx8.6 MiBTamil text recognition
PP-OCRv5Tamilta_pp-ocrv5_mobile_rec.onnx7.5 MiBTamil text recognition
PP-OCRv3Telugute_pp-ocrv3_mobile_rec.onnx8.6 MiBTelugu text recognition
PP-OCRv5Telugute_pp-ocrv5_mobile_rec.onnx7.6 MiBTelugu text recognition
PP-OCRv5Thaith_pp-ocrv5_mobile_rec.onnx7.6 MiBThai text recognition

PP-OCRv6

PP-OCRv6 is the newest PP-OCR generation. The flat ONNX files and dictionaries are published in this project's v0.7.0 release and on ModelScope. The tables also link the original PaddlePaddle inference bundles.

Source / attribution. Published by PaddlePaddle under the PaddleOCR project (Apache-2.0).

Detection

SizeAuto-download ONNXFile sizeOfficial bundle
tinypp-ocrv6_tiny_det.onnx1.7 MiBPP-OCRv6_tiny_det_onnx_infer.tar
smallpp-ocrv6_small_det.onnx9.4 MiBPP-OCRv6_small_det_onnx_infer.tar
mediumpp-ocrv6_medium_det.onnx59.2 MiBPP-OCRv6_medium_det_onnx_infer.tar

Recognition

SizeAuto-download ONNXDictionaryFile sizeOfficial bundle
tinypp-ocrv6_tiny_rec.onnxppocrv6_tiny_dict.txt (6904 characters)4.3 MiBPP-OCRv6_tiny_rec_onnx_infer.tar
smallpp-ocrv6_small_rec.onnxppocrv6_dict.txt (18708 characters)20.2 MiBPP-OCRv6_small_rec_onnx_infer.tar
mediumpp-ocrv6_medium_rec.onnxppocrv6_dict.txt (18708 characters)73.0 MiBPP-OCRv6_medium_rec_onnx_infer.tar

Character Dictionaries

Character dictionaries are required for text recognition. Choose the appropriate dictionary for your model:

General Dictionaries

VersionFileDescription
PP-OCRv4 Documentppocrv4_doc_dict.txtFor PP-OCRv4 document models
PP-OCRv5ppocrv5_dict.txtFor PP-OCRv5 models
PP-OCRv6 Tinyppocrv6_tiny_dict.txtFor PP-OCRv6 tiny recognition
PP-OCRv6 Small/Mediumppocrv6_dict.txtFor PP-OCRv6 small and medium recognition
PP-OCR Keys v1ppocr_keys_v1.txtFor PP-OCRv3 general and PP-OCRv4 general models

PP-OCRv5 Language-Specific Dictionaries

LanguageFileModel Compatibility
Arabicppocrv5_arabic_dict.txtPP-OCRv5 Arabic
Cyrillicppocrv5_cyrillic_dict.txtPP-OCRv5 Cyrillic
Devanagarippocrv5_devanagari_dict.txtPP-OCRv5 Devanagari
Greekppocrv5_el_dict.txtPP-OCRv5 Greek
Englishppocrv5_en_dict.txtPP-OCRv5 English
Eastern Slavicppocrv5_eslav_dict.txtPP-OCRv5 Eastern Slavic
Koreanppocrv5_korean_dict.txtPP-OCRv5 Korean
Latinppocrv5_latin_dict.txtPP-OCRv5 Latin script
Tamilppocrv5_ta_dict.txtPP-OCRv5 Tamil
Teluguppocrv5_te_dict.txtPP-OCRv5 Telugu
Thaippocrv5_th_dict.txtPP-OCRv5 Thai

PP-OCRv3 and PP-OCRv4 Language-Specific Dictionaries

The language-specific PP-OCRv3 dictionaries are different from the PP-OCRv5 dictionaries and are not part of the auto-download registry. Download them from PaddleOCR and pass the local path to the recognition builder. The PP-OCRv4 English checkpoint uses the same en_dict.txt file as PP-OCRv3 English.

LanguageOfficial dictionaryModel compatibility
Arabicarabic_dict.txtPP-OCRv3 Arabic
Traditional Chinesechinese_cht_dict.txtPP-OCRv3 Traditional Chinese
Cyrilliccyrillic_dict.txtPP-OCRv3 Cyrillic
Devanagaridevanagari_dict.txtPP-OCRv3 Devanagari
Englishen_dict.txtPP-OCRv3 and PP-OCRv4 English
Japanesejapan_dict.txtPP-OCRv3 Japanese
Georgianka_dict.txtPP-OCRv3 Georgian
Koreankorean_dict.txtPP-OCRv3 Korean
Latinlatin_dict.txtPP-OCRv3 Latin script
Tamilta_dict.txtPP-OCRv3 Tamil
Telugute_dict.txtPP-OCRv3 Telugu

Preprocessing Models

Models for document preprocessing and orientation detection:

TypeModel FileSizeDescription
Document Orientationpp-lcnet_x1_0_doc_ori.onnx6.5 MiBDetect document rotation
Text Line Orientation (Light)pp-lcnet_x0_25_textline_ori.onnx995 KiBFast text line orientation
Text Line Orientationpp-lcnet_x1_0_textline_ori.onnx6.5 MiBAccurate text line orientation
Document Rectificationuvdoc.onnx30.2 MiBFix perspective distortion

Document Structure Models

Models for document structure analysis with OARStructureBuilder:

Layout Detection

ModelModel FileSizeDescription
PicoDet-L 17clspicodet-l_layout_17cls.onnx22.4 MiB17-class layout detection
PicoDet-L 3clspicodet-l_layout_3cls.onnx22.4 MiB3-class layout detection
PicoDet-S 17clspicodet-s_layout_17cls.onnx4.7 MiBFast 17-class layout
PicoDet-S 3clspicodet-s_layout_3cls.onnx4.7 MiBFast 3-class layout
PicoDet 1xpicodet_layout_1x.onnx7.2 MiBLegacy layout model
PicoDet 1x Tablepicodet_layout_1x_table.onnx7.2 MiBTable-focused layout
PP-DocLayout-Spp-doclayout-s.onnx4.7 MiBSmall variant
PP-DocLayout-Mpp-doclayout-m.onnx22.4 MiBMedium variant
PP-DocLayout-Lpp-doclayout-l.onnx123.4 MiBLarge variant
PP-DocLayout_plus-Lpp-doclayout_plus-l.onnx123.7 MiBEnhanced large variant
PP-DocLayoutV2pp-doclayoutv2.onnx204.1 MiBV2 with reading order (col, row)
PP-DocLayoutV3pp-doclayoutv3.onnx123.9 MiBV3 with single order key
PP-DocBlockLayoutpp-docblocklayout.onnx123.3 MiBHierarchical ordering
RT-DETR-H 17clsrt-detr-h_layout_17cls.onnx469.3 MiBHigh accuracy 17-class
RT-DETR-H 3clsrt-detr-h_layout_3cls.onnx469.2 MiBHigh accuracy 3-class

Table Recognition

ComponentModel FileSizeDescription
Table Classificationpp-lcnet_x1_0_table_cls.onnx6.5 MiBWired vs wireless
Cell Detection (Wired)rt-detr-l_wired_table_cell_det.onnx123.3 MiBRT-DETR for wired tables
Cell Detection (Wireless)rt-detr-l_wireless_table_cell_det.onnx123.3 MiBRT-DETR for wireless tables
Structure (SLANet)slanet.onnx7.4 MiBBasic structure recognition
Structure (SLANet+)slanet_plus.onnx7.4 MiBWireless table structure
Structure (SLANeXt Wired)slanext_wired.onnx350.7 MiBHigh accuracy wired structure
Structure (SLANeXt Wireless)slanext_wireless.onnx350.7 MiBHigh accuracy wireless structure
Structure Dictionarytable_structure_dict_ch.txt-Required for structure recognition

Formula Recognition

ModelModel FileSizeDescription
PP-FormulaNet-Spp-formulanet-s.onnx221.1 MiBSmall variant
PP-FormulaNet-Lpp-formulanet-l.onnx696.5 MiBLarge variant
PP-FormulaNet_plus-Spp-formulanet_plus-s.onnx221.1 MiBEnhanced small variant
PP-FormulaNet_plus-Mpp-formulanet_plus-m.onnx564.9 MiBEnhanced medium variant
PP-FormulaNet_plus-Lpp-formulanet_plus-l.onnx699.5 MiBEnhanced large variant
PP-FormulaNet Tokenizerpp-formulanet-tokenizer.json2.0 MiBRequired for PP-FormulaNet variants
UniMERNetunimernet.onnx1.7 GiBUnified Math Expression Recognition
UniMERNet Tokenizerunimernet_tokenizer.json2.0 MiBRequired for UniMERNet

Seal Text Detection

ModelModel FileSizeDescription
Seal Detection (Mobile)pp-ocrv4_mobile_seal_det.onnx4.6 MiBFast seal detection
Seal Detection (Server)pp-ocrv4_server_seal_det.onnx108.2 MiBAccurate seal detection

Auto-download

cargo add oar-ocr --features auto-download
use oar_ocr::prelude::*;
let ocr = OAROCRBuilder::new(
    "pp-ocrv5_mobile_det.onnx",   // bare name resolved through the registry
    "pp-ocrv5_mobile_rec.onnx",
    "ppocrv5_dict.txt",
).build()?;
# Ok::<(), Box<dyn std::error::Error>>(())

When the feature is enabled, registered file names are fetched from greatv/oar-ocr on ModelScope into $OAR_HOME (default ~/.oar) and verified against the expected SHA-256 before use. Subsequent runs reuse the cached copy. The bundled registry lives at oar_ocr::download::REGISTRY.

Path resolution rules

These rules apply only to path sources. Models passed as in-memory bytes (see Loading Models from Memory) bypass path resolution entirely.

For each model path argument the builder applies these checks in order:

  1. Existing file wins. If the path refers to a real file on disk it is used as-is — no registry lookup, no hash check, no network. A ./pp-ocrv5_mobile_det.onnx next to the binary always shadows the registry.
  2. Only bare names or $OAR_HOME-rooted paths are eligible for auto-download. A path is considered for registry resolution only when it has no parent component (e.g. "pp-ocrv5_mobile_det.onnx") or when its parent equals the cache directory. Explicit paths like ./models/foo.onnx or /data/foo.onnx are returned verbatim even if their file name is registered — the library never silently overrides an explicit path.
  3. Registry hit: cache or download. If the file name appears in REGISTRY:
    • The cached copy is used without network access when $OAR_HOME/<name> exists with the expected size and SHA-256.
    • Otherwise, the file is downloaded from ModelScope, verified with SHA-256, and atomically replaced.
  4. Unregistered and missing. The path is returned verbatim so the builder produces its normal "model not found" error.
InputOn diskBehaviour
"pp-ocrv5_mobile_det.onnx"./pp-ocrv5_mobile_det.onnx existsUse the local CWD file
"pp-ocrv5_mobile_det.onnx"$OAR_HOME/... exists, hash OKUse cached copy, no network
"pp-ocrv5_mobile_det.onnx"absent or hash mismatchDownload to $OAR_HOME, verify, use
"./models/det.onnx"absentReturned as-is, resulting in "model not found"
"$OAR_HOME/pp-ocrv5_mobile_det.onnx" (absolute)(any)Handled like a bare name because its parent is the cache directory

Note: the resolver compares paths verbatim — ~ is not expanded. Pass a bare filename, an absolute path under $OAR_HOME, or let your shell expand ~ for you.

Cache layout

  • Override the cache root with the OAR_HOME environment variable. Defaults to ~/.oar (resolved via the platform home directory, while the literal ~ is not expanded by the library).
  • Files land at $OAR_HOME/<name>, flat (no per-revision subdirectories).
  • Downloads stream into a unique $OAR_HOME/.<name>.<pid>.<n>.part and are renamed atomically once the SHA-256 matches, so a crash mid-download won't poison the cache and concurrent processes don't clobber each other.
  • After verification a $OAR_HOME/.<name>.sha256 sidecar records the verified hash. Future loads with a matching cache file + sidecar skip the multi-second rehash. Deleting the sidecar forces a fresh hash check.