# pdfmarkdown-ppocrv5-models

PP-OCRv5 **mobile** (multilingual) ONNX model weights + character dictionary, redistributed for [pdfmarkdown.app](https://pdfmarkdown.app)'s in-browser OCR.

These are **data files only** — there is no JavaScript entry point. They are published to npm so that [jsDelivr](https://www.jsdelivr.com/) can serve them as a fast, global, CORS-enabled CDN to the browser (the original Git-LFS host is rate-limited and times out on the ~16.6 MB recognition model).

## Files

| Path | Purpose |
| --- | --- |
| `detection/PP-OCRv5_mobile_det_infer.ort` | Text **detection** model (ORT format) |
| `recognition/PP-OCRv5_mobile_rec_infer.onnx` | Text **recognition** model (ONNX, multilingual) |
| `recognition/ppocrv5_dict.txt` | Recognition **character dictionary** |

## jsDelivr URLs

```
https://cdn.jsdelivr.net/npm/pdfmarkdown-ppocrv5-models@1.0.0/detection/PP-OCRv5_mobile_det_infer.ort
https://cdn.jsdelivr.net/npm/pdfmarkdown-ppocrv5-models@1.0.0/recognition/PP-OCRv5_mobile_rec_infer.onnx
https://cdn.jsdelivr.net/npm/pdfmarkdown-ppocrv5-models@1.0.0/recognition/ppocrv5_dict.txt
```

## Attribution & License

The models are **PP-OCRv5** from [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR), licensed under **Apache-2.0**. The ONNX/ORT exports and dictionary were sourced from [PT-Perkasa-Pilar-Utama/ppu-paddle-ocr-models](https://github.com/PT-Perkasa-Pilar-Utama/ppu-paddle-ocr-models) (the model repo used by the [`ppu-paddle-ocr`](https://www.npmjs.com/package/ppu-paddle-ocr) library), also Apache-2.0.

This package redistributes those weights unmodified for pdfmarkdown.app's browser OCR. See [`LICENSE`](./LICENSE) (Apache-2.0).
