# Third-party notice — PP-OCRv6 Tiny (Detection + Recognition)

This directory contains two unmodified pretrained model checkpoints, published directly by the
upstream maintainer in ONNX format, redistributed under their original license.

- **Models**: PP-OCRv6_tiny_det (text detection, 0.43M params) and PP-OCRv6_tiny_rec (text
  recognition, 1.1M params) — a two-stage OCR pipeline: detection locates text regions,
  recognition reads the text inside each one.
- **Original project**: PaddleOCR (PaddlePaddle / Baidu)
- **Source repository**: https://github.com/PaddlePaddle/PaddleOCR
- **Upstream ONNX publisher**: PaddlePaddle's own Hugging Face organization (primary source,
  not a third-party re-conversion)
  - Detection: https://huggingface.co/PaddlePaddle/PP-OCRv6_tiny_det_onnx
  - Recognition: https://huggingface.co/PaddlePaddle/PP-OCRv6_tiny_rec_onnx
- **License**: Apache License 2.0 — verified via the GitHub API `/license` endpoint for
  `PaddlePaddle/PaddleOCR` (`spdx_id: Apache-2.0`) and via each Hugging Face repo's
  `license:apache-2.0` tag (see `LICENSE` in this directory, fetched verbatim from the upstream
  GitHub repository).
- **Commercial use**: Permitted. Apache-2.0 has no non-commercial restriction; it only requires
  retaining the license/copyright notice and stating any changes made to the source.
- **Modifications made**: None. `det.onnx` and `rec.onnx` are the `inference.onnx` files from
  each upstream Hugging Face repository, used exactly as published.
- **File sizes**: `det.onnx` 1,780,590 bytes · `rec.onnx` 4,462,639 bytes (6.24 MB combined)
- **SHA-256**:
  - `det.onnx`: `193bab7a04fca699a6c82e6abb5b81bdb28177f0abd4062552b04908dafb19f8`
  - `rec.onnx`: `9ef676d6ed3c88256a2d92c640c44f25b0c40947e111b14b8be8f594091563e6`
- **`dictionary.txt`**: the 6,904-entry multi-language character dictionary shipped in the
  recognition model's own `inference.yml` config (`PostProcess.character_dict`), extracted
  verbatim, one character per line, unmodified — used at inference time to map the recognition
  model's per-timestep class indices back to characters (index 0 = CTC blank, indices 1–6904 =
  this file in order, index 6905 = space).

Preprocessing/postprocessing logic used in this site's `ocr.js` was independently implemented in
JavaScript from PaddleOCR's published reference algorithm (DB text-region postprocessing —
probability-map thresholding, connected-component labeling, minimum-area rotated rectangle per
component, box scoring, and polygon "unclip" expansion; then per-box rotate-crop and CTC greedy
decoding for recognition) and verified end-to-end against real ONNX Runtime inference on a real
test image (both stages: detection correctly isolated the text region, and recognition + CTC
decode correctly reproduced the test string) before shipping. This is original code, not
redistributed from the upstream repository.
