Reads ๙ on old typewritten scans as ๙, not ๕
The Thai OCR recognizer of HippoCraft, a PDF editor that understands Thai
A fine-tune of iApp's OpenThai recognizer · a drop-in replacement for its rec.onnx
by DOJOJIN.TECH · English | ภาษาไทย
rec.onnx.pytorch/model.safetensors loads in transformers.
Pages never trained on (public Royal Gazette scans). ๙ = nine, ๕ = five.
| File | What it is |
|---|---|
hippocraft-thai-rec-v1.onnx |
The recognizer (ONNX, opset 17), what HippoCraft loads |
rec_dict.txt |
The character list, unchanged from OpenThai |
pytorch/model.safetensors, pytorch/config.json |
The same weights for further training (transformers PPOCRV6TinyRecForTextRecognition, 530 classes) |
LICENSE, NOTICE |
Apache-2.0, and the notices of OpenThai and PaddlePaddle with what was changed |
SHA256SUMS |
Checksums of the files |
README_th.md |
This card in Thai |
images/ |
The HippoCraft icon and the figure above |
x: float32 [n, 3, 48, w], one text line scaled to 48 pixels tall, dark text on white, each channel
normalized as (v − 0.5) / 0.5 with v in 0–1.probs: float32 [n, t, 530], a probability per step and class. Decode with CTC (greedy: take each
step's best class, merge repeats, drop blanks). Class 0 is the blank, classes 1–528 are the lines of
rec_dict.txt in order, and class 529 is a space.Text detection is not included: use OpenThai's det.onnx (PP-OCRv6-tiny detection) or any line detector.
pytorch/rec_weights.pt. Its PyTorch form was checked against rec.onnx on 916
recognition steps: the same best class at every step, probabilities within 0.00001.Read through HippoCraft's full OCR pipeline (detection, line handling, filters), not on crops alone.
| Test | OpenThai v2.2.0 | This model |
|---|---|---|
| 3 hand-typed reference pages (1,923 characters), accuracy | 94.44 % | 94.85 % |
| ๙ read as ๙ on those pages (8 in the text) | 1 | 8 |
| ๕ read where the text has ๙ | 7 | 0 |
| Synthetic Thai test pages, 4 scan conditions (clean 200 dpi, 150 dpi, JPEG, 2° skew), character error | — | within 0.07 points of the original |
| Three letterpress Royal Gazette decrees (1933, 1938, 1945), changes against a reader's transcription | — | 4 better, 3 worse; every year read right |
Apache-2.0. Copyright iApp Technology (OpenThai); PP-OCRv6 © PaddlePaddle Authors; modifications © 2026
DOJOJIN.TECH. See NOTICE for what was changed. OpenThai and iApp did not make or review this version.
Thank you to iApp Technology / OpenThai for the original Thai OCR model and for publishing its weights for further training, to PaddlePaddle for PP-OCRv6, and to Hugging Face for hosting it. The HippoCraft icon is DOJOJIN.TECH's own.
pytorch/model.safetensors 2 MBhippocraft-thai-rec-v1.onnx 2 MB