ppu-paddle-ocr-models

This repository contains models necessarily use by ppu-paddle-ocr library.

We've just added Paddle OCR's PP-OCRv6 model family

It consists of layout models, text detection models, and text recognition models.

The models are onnx sourced from https://www.paddleocr.ai/main/en/index.html.

.ort files are the same models pre-serialised in ONNX Runtime's native FlatBuffers format. They load 3-5x faster than the equivalent .onnx (session creation drops from ~24 ms to ~7 ms on M1) while producing byte-identical output. Load them with session: { graphOptimizationLevel: "disabled" } so ORT doesn't re-optimise the already-optimised graph.

Where to fetch from

Fetch from the Hugging Face mirror. It serves models and dictionaries from one CDN-backed base, and unlike Git LFS it has no bandwidth budget that can run out and cut off downloads.

https://huggingface.co/snowfluke/ppu-paddle-ocr-models/resolve/main

Paths are identical on both hosts, so the base is the only part that changes:

const BASE = "https://huggingface.co/snowfluke/ppu-paddle-ocr-models/resolve/main";

const detection = `${BASE}/detection/ort/PP-OCRv6_tiny_det.ort`;
const recognition = `${BASE}/recognition/ort/PP-OCRv6_tiny_rec.ort`;
const dictionary = `${BASE}/recognition/ppocrv6_dict.txt`;

The GitHub copies stay available, because every published ppu-paddle-ocr version resolves them at runtime:

// Git LFS, subject to a bandwidth budget
export const MODEL_BASE_URL =
  "https://media.githubusercontent.com/media/PT-Perkasa-Pilar-Utama/ppu-paddle-ocr-models/main";

// plain files, not LFS
export const DICT_BASE_URL =
  "https://raw.githubusercontent.com/PT-Perkasa-Pilar-Utama/ppu-paddle-ocr-models/main";

This repository is the source of truth. The mirror is refreshed by the Publish to Hugging Face workflow, which uploads only what changed.

File tree

.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ convert
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ multi
β”‚   β”‚   └── japan_PP-OCRv3_mobile_rec_infer
β”‚   β”‚       β”œβ”€β”€ inference.json
β”‚   β”‚       β”œβ”€β”€ inference.pdiparams
β”‚   β”‚       └── inference.yml
β”‚   β”œβ”€β”€ pyproject.toml
β”‚   └── uv.lock
β”œβ”€β”€ correction
β”‚   β”œβ”€β”€ PP-LCNet_x0_25_textline_ori.onnx
β”‚   β”œβ”€β”€ PP-LCNet_x1_0_doc_ori.onnx
β”‚   β”œβ”€β”€ PP-LCNet_x1_0_textline_ori.onnx
β”‚   └── UVDoc.onnx
β”œβ”€β”€ detection
β”‚   β”œβ”€β”€ PP-OCRv4_mobile_det_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv4_server_det_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv5_mobile_det_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv5_mobile_det_infer.ort
β”‚   β”œβ”€β”€ PP-OCRv5_server_det_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_medium_det.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_small_det.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_tiny_det.onnx
β”‚   └── ort
β”‚       β”œβ”€β”€ PP-OCRv6_medium_det.ort
β”‚       β”œβ”€β”€ PP-OCRv6_small_det.ort
β”‚       └── PP-OCRv6_tiny_det.ort
β”œβ”€β”€ layout
β”‚   β”œβ”€β”€ PP-DocLayoutV2.onnx
β”‚   β”œβ”€β”€ PP-DocLayoutV2_labels.txt
β”‚   β”œβ”€β”€ PP-DocLayoutV3.onnx
β”‚   └── PP-DocLayoutV3_labels.txt
β”œβ”€β”€ recognition
β”‚   β”œβ”€β”€ PP-OCRv3_mobile_rec_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv4_mobile_rec_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv4_server_rec_doc_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv4_server_rec_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv5_server_rec_infer.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_medium_rec.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_small_rec.onnx
β”‚   β”œβ”€β”€ PP-OCRv6_tiny_rec.onnx
β”‚   β”œβ”€β”€ multi
β”‚   β”‚   β”œβ”€β”€ arabic
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ arabic_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_arabic_dict.txt
β”‚   β”‚   β”œβ”€β”€ cyrillic
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ cyrillic_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_cyrillic_dict.txt
β”‚   β”‚   β”œβ”€β”€ devanagari
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ devanagari_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_devanagari_dict.txt
β”‚   β”‚   β”œβ”€β”€ el
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ el_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_el_dict.txt
β”‚   β”‚   β”œβ”€β”€ en
β”‚   β”‚   β”‚   β”œβ”€β”€ v4
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ en_PP-OCRv4_mobile_rec_infer.onnx
β”‚   β”‚   β”‚   β”‚   └── en_dict.txt
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ en_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       β”œβ”€β”€ en_PP-OCRv5_mobile_rec_infer.ort
β”‚   β”‚   β”‚       β”œβ”€β”€ en_PP-OCRv5_mobile_rec_infer_int8.onnx
β”‚   β”‚   β”‚       β”œβ”€β”€ en_PP-OCRv5_mobile_rec_infer_int8.ort
β”‚   β”‚   β”‚       └── ppocrv5_en_dict.txt
β”‚   β”‚   β”œβ”€β”€ eslav
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ eslav_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_eslav_dict.txt
β”‚   β”‚   β”œβ”€β”€ japan
β”‚   β”‚   β”‚   └── v3
β”‚   β”‚   β”‚       β”œβ”€β”€ japan_PP-OCRv3_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── japan_dict.txt
β”‚   β”‚   β”œβ”€β”€ korean
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ korean_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_korean_dict.txt
β”‚   β”‚   β”œβ”€β”€ latin
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ latin_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”‚       └── ppocrv5_latin_dict.txt
β”‚   β”‚   β”œβ”€β”€ ta
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ ppocrv5_ta_dict.txt
β”‚   β”‚   β”‚       └── ta_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   β”œβ”€β”€ te
β”‚   β”‚   β”‚   └── v5
β”‚   β”‚   β”‚       β”œβ”€β”€ ppocrv5_te_dict.txt
β”‚   β”‚   β”‚       └── te_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”‚   └── th
β”‚   β”‚       └── v5
β”‚   β”‚           β”œβ”€β”€ ppocrv5_th_dict.txt
β”‚   β”‚           └── th_PP-OCRv5_mobile_rec_infer.onnx
β”‚   β”œβ”€β”€ ort
β”‚   β”‚   β”œβ”€β”€ PP-OCRv6_medium_rec.ort
β”‚   β”‚   β”œβ”€β”€ PP-OCRv6_small_rec.ort
β”‚   β”‚   └── PP-OCRv6_tiny_rec.ort
β”‚   β”œβ”€β”€ ppocrv3_dict.txt
β”‚   β”œβ”€β”€ ppocrv4_dict.txt
β”‚   β”œβ”€β”€ ppocrv4_doc_dict.txt
β”‚   β”œβ”€β”€ ppocrv5_dict.txt
β”‚   β”œβ”€β”€ ppocrv6_dict.txt
β”‚   └── ppocrv6_tiny_dict.txt
└── table
    β”œβ”€β”€ PP-LCNet_x1_0_table_cls.onnx
    β”œβ”€β”€ RT-DETR-L_wired_table_cell_det.onnx
    β”œβ”€β”€ RT-DETR-L_wireless_table_cell_det.onnx
    └── SLANet_plus.onnx

OCR Models and Their Supported Languages

Model Supported Languages
korean_PP-OCRv5_mobile_rec Korean, English
latin_PP-OCRv5_mobile_rec French, German, Afrikaans, Italian, Spanish, Bosnian, Portuguese, Czech, Welsh, Danish, Estonian, Irish, Croatian, Uzbek, Hungarian, Serbian (Latin), Indonesian, Occitan, Icelandic, Lithuanian, Maori, Malay, Dutch, Norwegian, Polish, Slovak, Slovenian, Albanian, Swedish, Swahili, Tagalog, Turkish, Latin, Azerbaijani, Kurdish, Latvian, Maltese, Pali, Romanian, Vietnamese, Finnish, Basque, Galician, Luxembourgish, Romansh, Catalan, Quechua
eslav_PP-OCRv5_mobile_rec Russian, Belarusian, Ukrainian, English
th_PP-OCRv5_mobile_rec Thai, English
el_PP-OCRv5_mobile_rec Greek, English
en_PP-OCRv5_mobile_rec English
cyrillic_PP-OCRv5_mobile_rec Russian, Belarusian, Ukrainian, Serbian (Cyrillic), Bulgarian, Mongolian, Abkhazian, Adyghe, Kabardian, Avar, Dargin, Ingush, Chechen, Lak, Lezgin, Tabasaran, Kazakh, Kyrgyz, Tajik, Macedonian, Tatar, Chuvash, Bashkir, Malian, Moldovan, Udmurt, Komi, Ossetian, Buryat, Kalmyk, Tuvan, Sakha, Karakalpak, English
arabic_PP-OCRv5_mobile_rec Arabic, Persian, Uyghur, Urdu, Pashto, Kurdish, Sindhi, Balochi, English
devanagari_PP-OCRv5_mobile_rec Hindi, Marathi, Nepali, Bihari, Maithili, Angika, Bhojpuri, Magahi, Santali, Newari, Konkani, Sanskrit, Haryanvi, English
ta_PP-OCRv5_mobile_rec Tamil, English
te_PP-OCRv5_mobile_rec Telugu, English

Layout models

Model use for document layout analysis includes 20 common categories: document title, paragraph title, text, page number, abstract, table, references, footnotes, header, footer, algorithm, formula, formula number, image, table, seal, figure_table title, chart, and sidebar text and lists of references

  • PP-DocLayoutV2
  • PP-DocLayoutV3

We only converted the layout analysis model, which by default already implemented layout detection. The difference is that layout analysis model doing extra for analyze the reading order. If you want an individual model that just do the layout detection, go check out: https://paddlepaddle.github.io/PaddleX/latest/en/module_usage/tutorials/ocr_modules/layout_detection.html#ii-supported-model-list

Correction models

Document Image Orientation Classification

The document image orientation classification module is aim to distinguish the orientation of document images and correct them through post-processing.

  • PP-LCNet_x1_0_doc_ori

Text Image Unwarping

Perform geometric transformations on images in order to correct issues such as document distortion, tilt, perspective deformation, etc., enabling more accurate recognition by subsequent text recognition modules.

  • UVDoc

Text Line Orientation Classification

The text line orientation classification module primarily distinguishes the orientation of text lines and corrects them using post-processing.

  • PP-LCNet_x0_25_textline_ori
  • PP-LCNet_x1_0_textline_ori

Table models

Table Structure Recognition

  • SLANet_plus

Table Classification

  • PP-LCNet_x1_0_table_cls

Table Cell Detection

  • RT-DETR-L_wired_table_cell_det
  • RT-DETR-L_wireless_table_cell_det
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support