YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

paddleocr-js-onnx

中文说明

Model repository for paddleocr.js.

This is the Hugging Face model repository layout used by paddleocr.js. The source package and npm package do not ship large ONNX binaries. Official PaddlePaddle ONNX assets should still be downloaded from their upstream repositories; this repo provides converted or locally verified assets that do not currently have a usable official ONNX release.

The source package and npm package do not contain these model files. Users should create or download this directory next to their application, then point examples or their own scripts at it.

Set PADDLEOCR_JS_ONNX_DIR to this directory when running examples:

PADDLEOCR_JS_ONNX_DIR=/path/to/paddleocr-js-onnx bun examples/pipeline/ocr/run.ts

Directory layout

Examples and helper scripts expect this shape:

paddleocr-js-onnx/
  ppocr_v6_small/
    PP-OCRv6_small_det_infer.onnx
    PP-OCRv6_small_rec_infer.onnx
    ppocrv6_dict.txt
  pp_lcnet_x0_25_textline_ori/
    PP-LCNet_x0_25_textline_ori_infer.onnx
  slanet/
    SLANet_infer.onnx
  pp_formulanet_plus_m/
    PP-FormulaNet_plus-M_infer.onnx

You do not need every model for every task. Download only the files used by the module or pipeline you want to run.

Download policy

Area Model / preset Local path in this repo Source status Recommended download
OCR PP-OCRv6 tiny det ppocr_v6_tiny/PP-OCRv6_tiny_det_infer.onnx Official ONNX exists PaddlePaddle/PP-OCRv6_tiny_det_onnx
OCR PP-OCRv6 tiny rec ppocr_v6_tiny/PP-OCRv6_tiny_rec_infer.onnx Official ONNX exists PaddlePaddle/PP-OCRv6_tiny_rec_onnx
OCR PP-OCRv6 small det ppocr_v6_small/PP-OCRv6_small_det_infer.onnx Official ONNX exists PaddlePaddle/PP-OCRv6_small_det_onnx
OCR PP-OCRv6 small rec ppocr_v6_small/PP-OCRv6_small_rec_infer.onnx Official ONNX exists PaddlePaddle/PP-OCRv6_small_rec_onnx
OCR PP-OCRv5 mobile det/rec ppocr_v5_mobile/ Local verified ONNX bundle Download from this repo
OCR PP-OCRv4 mobile seal det ppocr_v4_mobile_seal_det/PP-OCRv4_mobile_seal_det_infer.onnx Local ONNX export Download from this repo
Classification Document orientation pp_lcnet_x1_0_doc_ori/PP-LCNet_x1_0_doc_ori_infer.onnx Official ONNX exists PaddlePaddle/PP-LCNet_x1_0_doc_ori_onnx
Classification Textline orientation pp_lcnet_x0_25_textline_ori/PP-LCNet_x0_25_textline_ori_infer.onnx Official ONNX exists PaddlePaddle/PP-LCNet_x0_25_textline_ori_onnx
Classification Table classification pp_lcnet_x1_0_table_cls/PP-LCNet_x1_0_table_cls_infer.onnx Official ONNX exists PaddlePaddle/PP-LCNet_x1_0_table_cls_onnx
Text image unwarping UVDoc uvdoc/UVDoc_infer.onnx Official ONNX exists PaddlePaddle/UVDoc_onnx
Layout PP-DocBlockLayout pp_docblocklayout/PP-DocBlockLayout_infer.onnx Official ONNX exists PaddlePaddle/PP-DocBlockLayout_onnx
Layout PP-DocLayout plus-L pp_doclayout_plus_l/PP-DocLayout_plus-L_infer.onnx Official ONNX exists PaddlePaddle/PP-DocLayout_plus-L_onnx
Layout PP-DocLayout L/M/S pp_doclayout_l/, pp_doclayout_m/, pp_doclayout_s/ Converted from official Paddle static models Download from this repo
Table structure SLANet slanet/SLANet_infer.onnx Official ONNX exists PaddlePaddle/SLANet_onnx
Table structure SLANeXt wired slanext_wired/SLANeXt_wired_infer.onnx Official ONNX exists PaddlePaddle/SLANeXt_wired_onnx
Table structure SLANeXt wireless slanext_wireless/SLANeXt_wireless_infer.onnx Official ONNX exists PaddlePaddle/SLANeXt_wireless_onnx
Table cell detection RT-DETR-L wired table cell det rt_detr_wired_table_cell_det/RT-DETR-L_wired_table_cell_det_infer.onnx Official ONNX exists PaddlePaddle/RT-DETR-L_wired_table_cell_det_onnx
Table cell detection RT-DETR-L wireless table cell det rt_detr_wireless_table_cell_det/RT-DETR-L_wireless_table_cell_det_infer.onnx Official ONNX exists PaddlePaddle/RT-DETR-L_wireless_table_cell_det_onnx
Formula PP-FormulaNet S/L PP_FormulaNet_S/, PP_FormulaNet_L/ Converted from official Paddle static models Download from this repo
Formula PP-FormulaNet plus-S/M/L PP_FormulaNet_plus_S/, pp_formulanet_plus_m/, PP_FormulaNet_plus_L/ Converted from official Paddle static models Download from this repo

Extra assets

Some modules need non-ONNX text assets:

Asset Required by Expected location
OCR dictionary OCR recognition next to the recognition model, for example ppocr_v6_small/ppocrv6_dict.txt
UniMERNet tokenizer JSON PP-FormulaNet set PADDLEOCR_FORMULA_TOKENIZER_JSON, or use the default path from a local PaddleOCR checkout

The runtime never downloads these files automatically. Keep downloads explicit so browser, Node.js, Bun, and offline deployments can all use the same API.

File naming

The local file names intentionally match the paddleocr.js presets and examples:

  • ONNX files end with _infer.onnx.
  • Official inference.yml sidecars are kept next to the ONNX file when they are useful for auditing preprocessing/postprocessing settings.
  • OCR dictionaries are kept next to their recognition models.
  • Small demo images used by examples may be kept next to model families, but runtime code never depends on them.

Example commands

Official ONNX download:

mkdir -p ppocr_v6_small
curl -L https://huggingface.co/PaddlePaddle/PP-OCRv6_small_det_onnx/resolve/main/inference.onnx \
  -o ppocr_v6_small/PP-OCRv6_small_det_infer.onnx
curl -L https://huggingface.co/PaddlePaddle/PP-OCRv6_small_rec_onnx/resolve/main/inference.onnx \
  -o ppocr_v6_small/PP-OCRv6_small_rec_infer.onnx

Converted-asset download:

mkdir -p pp_formulanet_plus_m
curl -L https://huggingface.co/X3ZvaWQ/paddleocr-js-onnx/resolve/main/pp_formulanet_plus_m/PP-FormulaNet_plus-M_infer.onnx \
  -o pp_formulanet_plus_m/PP-FormulaNet_plus-M_infer.onnx

Run an example with this directory:

cd /path/to/paddleocr.js
PADDLEOCR_JS_ONNX_DIR=/path/to/paddleocr-js-onnx bun examples/pipeline/table-recognition-v2/run.ts
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