StackMap
Subscribe

chandra vs doctr

Datalab's SOTA open OCR model: images/PDFs to structured HTML/Markdown/JSON with layout, tables, forms, checkboxes, handwriting and math, in 90+ languages. Local HF or vLLM inference. — versus — docTR: two-stage OCR in PyTorch — detect words, then recognize them — with pretrained detection and recognition architectures you can mix, plus layout detection and rotated-page handling.

The curated verdict

Classic pipeline versus one big model: Chandra is a VLM that reads a page into structured HTML/Markdown including handwriting and math; docTR runs small detection and recognition nets for word boxes. Chandra for structure, docTR for cost, determinism and fine-tuning.

chandradoctr
Stars12k6.3k
Forks1.2k672
LanguagePythonPython
LicenseApache-2.0Apache-2.0
Last activity1 months ago3 days ago
Topicsocrocr
Curated connections73

chandra — the curator's take

Currently the strongest open OCR weights on the olmocr benchmark (85.8, above olmOCR 2 and dots.ocr), with handwriting, filled forms and checkboxes as the real differentiators — plus a serious self-built 90-language benchmark where it averages 72.7% vs Gemini 2.5 Flash's 60.8%. `pip install chandra-ocr`, `chandra_vllm`, done; ~2 pages/s real-world on an H100. The catch is licensing: code is Apache-2.0 but the WEIGHTS are OpenRAIL-M — free for research, personal use and sub-$2M startups, commercial self-hosting needs a Datalab license, and their paid API deliberately stays ahead of the open weights. Pick olmOCR for a fully permissive stack, MinerU when you want a whole parsing pipeline rather than the model itself.

doctr — the curator's take

The dependable choice when you want OCR as a library rather than a model to serve: pick a detector and a recognizer, call `ocr_predictor(pretrained=True)`, get word-level boxes and text from PDFs or images, with rotated-page handling and optional layout regions. It predates the VLM wave and that's the point — small models, no prompt, deterministic output, trainable on your own data, and cheap enough to run per-page at volume. Two caveats: it gives you words and boxes, not document structure, so reading order, tables and markdown are your job (pair it with a parser); and stewardship moved from Mindee to t2k GmbH, so check commit cadence against the newer VLM OCR crowd before standardizing on it.