Chandra

Chandra

WHAT IS IT?

Chandra is an OCR model that turns images and PDFs into Markdown, HTML or JSON while preserving layout. It's a vision-language model: instead of just extracting flat text, it detects structure (headings, columns, tables, figures) and rebuilds a clean document. It comes from Datalab, the team behind Marker and Surya.

WHY IS IT INTERESTING?

  • Structured output: Markdown, HTML or JSON with layout preserved, not a jumbled wall of text.
  • Strong on the hard stuff: tables, math formulas, dense layouts, diagrams and captions are reconstructed well.
  • Handwriting and forms: cursive handwriting recognition and form parsing, checkboxes included.
  • Multilingual: 90+ languages, including non-Latin scripts (Arabic, Japanese, Hindi, Russian).
  • Several ways to run it: CLI (pip install chandra-ocr), locally via Hugging Face Transformers, or on a vLLM server, plus a small Streamlit app to try it out.
  • License to note: the code is Apache 2.0, but the model weights are under OpenRAIL-M (restricted use, commercial license available). Worth checking before production use.

USE CASES

  • Digitize scans, PDFs or handwritten forms into usable documents.
  • Cleanly pull out financial tables or math-heavy academic papers.
  • Feed a RAG pipeline with clean Markdown instead of raw OCR text.
  • Process multilingual documents without switching tools per language.