comma-indra-ocr-10k

A fine-tune of the line recognizer in Datalab's Indra OCR.

Not affiliated with or endorsed by Datalab. This is an independent derivative of their model. Indra OCR and its weights are © Datalab; this repo is distributed under their license, below.

What was changed, and what was not

Indra is a pipeline of small ONNX models. Only the line recognizer was retrained.

file status
rec.onnx MODIFIED — recognizer weights fine-tuned; classifier head widened from 1,678 to 1729 classes
meta.json MODIFIED — vocab extended by 51 characters; all other fields unchanged
det.onnx, order.onnx, orient.onnx, script.onnx, rec_cjk.onnx unmodified copies of Datalab's files
LICENSE Datalab's license, verbatim

The weights were written back into Datalab's original graph rather than re-exported, so masking, sequence lengths and decoding are theirs. Characters added: ɨ ʳ ˡ ˢ ̃ ̇ ̈ ̧ ̨ ̵ ̶ ̾ ͣ ͤ ͥ ͦ ͧ ͨ ͫ ͬ ͭ ᵃ ᵇ ᵈ ᵉ ᵐ ᵒ ᵗ ᵘ ᶜ ᷑ ᷝ ᷠ ᷤ ‸ ⁊ ⁱ ℥ ⟦ ꝑ ꝓ ꝗ Ꝙ ꝙ ꝟ ꝥ ꝭ Ꝯ ꝯ ꝰ ꝵ

Results

End to end with Datalab's unchanged detector and reading-order models, on 243 held-out pages. CER after NFD normalisation.

model CER (NFD) macro WER (NFD) line recall
Indra OCR, as shipped 0.5834 0.5691 0.9716 0.0003
this model 0.1499 0.1469 0.4130 0.1290
Qwen3.5-0.8B full fine-tune, same 9,906 pages 0.1458
LightOnOCR-3-0.8B full fine-tune, same 9,906 pages 0.1206

On ground-truth line crops the recognizer scores 0.1048 (shipped: 0.5575). The gap to the end-to-end figure is Indra's line detector, which this fine-tune does not change.

Usage

# pip install indra-ocr
import indra_ocr
from huggingface_hub import snapshot_download

conv = indra_ocr.load(path=snapshot_download("wjbmattingly/comma-indra-ocr-10k"), furniture=True)
for _, page in conv.convert("page.jpg"):
    print(page.text)

furniture=True keeps page headers and footers, which Indra drops by default. Runs on CPU.

Training

CTC fine-tune on 389,770 line crops from 9,906 pages, 6 epochs (37 minutes). Checkpoint: the final epoch.

License and use restrictions

Distributed under Datalab's modified OpenRAIL-M license — see LICENSE, included verbatim. It is share-alike: this model, any derivative of it, and its output are governed by that same license.

By using this model you agree to the use-based restrictions in Attachment A of the License, which apply to it as an enforceable provision. In summary — the License governs, not this summary — you may not use it, its derivatives or its output: unlawfully or to infringe intellectual-property rights; for any purpose if you or your employer have over US$20M in annual gross revenue or over US$20M in funding, except where your use is limited to personal use or research purposes; or if you or your employer offer a product or service that competes with Datalab's. Broader licensing is available from Datalab at https://www.datalab.to/.

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

Model tree for wjbmattingly/comma-indra-ocr-10k

Quantized
(6)
this model

Dataset used to train wjbmattingly/comma-indra-ocr-10k