license: apache-2.0
library_name: onnx
pipeline_tag: image-to-text
tags:
- ocr
- paddleocr
- onnx
- onnxruntime
- text-detection
- text-recognition
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