Finetuned from PaddleOCR. Every model in this repository is a finetune of a PaddleOCR model (PaddleOCR v3.7.0, Apache-2.0) and is released under the same licence — see the per-model
MODEL_CARD.mdfor each lineage.All reported CER figures are in-house evaluation on our own test sets: measured, but vendor-reported and not independently verified. The benchmark harness is not shipped; methodology is documented in the GitHub repo.
Training weights (
.pdparams) and training configs are not published. This is a release of inference-ready ONNX models, not a reproducible training pipeline.
paddleocr-hebrew — models
Built by Rivok Labs — Article and benchmarks · ronen@rivoklabs.com · code on GitHub
ONNX weights for Hebrew OCR (finetuned from PaddleOCR / SVTRv2). Runnable pipeline code, quickstart, benchmark, and docs are on GitHub: https://github.com/RivoksLab/paddleocr-hebrew.
All recognizers share one byte-identical 120-char charset
(charset_v2f.txt, md5 e17ce22e7b4ab8224a3dad9e4c85b6ae). Each folder has a
MODEL_CARD.md + md5sums.txt. Split-ONNX pairs (nrtr-encoder + nrtr-decstep)
are one logical model — the attention decode loop runs on the host.
config.json describes every model's files, input format and decoding
in machine-readable form.
Hebrew is RTL — output is LOGICAL Unicode order. Apply
python-bidiget_display()only when rendering, never before storing/scoring. This is the #1 way to get garbage out. See the GitHubdocs/charset.md.
Contents
| folder | role | files | size |
|---|---|---|---|
server-svtrv2/ | flagship server REC (SVTRv2, CTC + NRTR) | ctc.onnx (or ctc.int8.onnx), nrtr-encoder.onnx, nrtr-decstep.onnx | 77 (INT8: 20) + 72 + 27 MB |
light-svtrv2small/ | edge/CPU REC (NRTR-only KD student) | nrtr-encoder.onnx, nrtr-decstep.onnx | 28 + 27 MB |
server-v5/ | alt word-level server REC (PPHGNetV2-B4) | rec.onnx | 73 MB |
server-v6/ | alt word-level server REC (PPLCNetV4) | rec.onnx | 60 MB |
mobile-word/ | mobile word REC (PPLCNetV3 KD) | rec.onnx | 7.4 MB |
word-det/ | word detector (mobile DBNet) | det.onnx | 4.6 MB |
line-det/ | line detector (situational) | det.onnx | 4.6 MB |
Smaller CTC option: server-svtrv2/ctc.int8.onnx (20 MB). An INT8-quantized copy of
the CTC head, a quarter of the size with practically the same accuracy (within 0.2 CER points of
ctc.onnx on every slice of 1,861 real line crops; 10.39% vs 10.42% overall). Same input, output and charset, so it
drops in wherever ctc.onnx does. With the GitHub package:
HebrewOCR(models_dir, ctc="server-svtrv2/ctc.int8.onnx").
Quickstart
Requires Python 3.9 or later (developed and tested on 3.11).
pip install "git+https://github.com/RivoksLab/paddleocr-hebrew" huggingface_hub
hf download Rivok/paddleocr-hebrew \
--include "config.json" "charset_v2f.txt" "word-det/*" "server-svtrv2/*" \
--local-dir hebrew-ocr-models
from paddleocr_hebrew import HebrewOCR
ocr = HebrewOCR(models_dir="hebrew-ocr-models")
for line in ocr.read("page.png")["lines"]:
print(line["text"]) # logical order
Benchmark (headline)
- Clean pure-Hebrew (perfect GT): SVTRv2 NRTR 0.35% CER vs Tesseract 1.34%.
- Real bilingual heb+lat (n=233): cascade/NRTR 2.33% vs Tesseract 16.14%.
- Page-level (71-page GCV): word-DET + SVTRv2 7.56% vs Tesseract 14.20%.
Full tables, methodology, and the CTC-vs-attention finding: see GitHub and the article.
Used by
- ocrmypdf-hebrew (ours): an
OCRmyPDF plugin. With
-l heb, OCRmyPDF reads scanned PDFs with these models in place of Tesseract and adds a searchable Hebrew text layer. It downloads the models from this repo on first use.pip install ocrmypdf-hebrew. - docling-hebrew-ocr (ours): a Hebrew OCR
engine for Docling.
pip install docling-hebrew-ocr.
Other projects using the models are listed on GitHub.
Fine-tuning
Released as ONNX only (inference-ready, portable — CPU/CUDA/Jetson). Paddle training weights + configs are not published. To fine-tune on your own Hebrew data or collaborate, open an issue on the GitHub repo or reach out: ronen@rivoklabs.com.
About Rivok Labs
Rivok Labs builds computational intelligence and automation tools, with a particular focus on Hebrew and other right-to-left languages that mainstream tooling handles badly.
We released these models because there was no open-source Hebrew OCR with a commercial-friendly licence that held up on real documents. If they are useful to you, or if they fail on your documents, we would like to hear about it.
Using paddleocr-hebrew in a project or product? We'd love to hear about it: ronen@rivoklabs.com, or open an issue on GitHub, and we'll add it to the list of projects there.
- Web: rivoklabs.com
- Contact: ronen@rivoklabs.com
- Issues and discussions: github.com/RivoksLab/paddleocr-hebrew
License
Apache-2.0: see LICENSE and NOTICE in this repository. Finetuned from
PaddleOCR (Apache-2.0). If you redistribute the model files, please keep both files with them.
If you use it, a credit or a link back to the repository is appreciated.