datalab-to/chandra
OCR model that handles complex tables, forms, handwriting with full layout.
What it solves
Traditional OCR often loses the layout of a page and struggles with handwriting, math, tables, and non-Latin scripts. Chandra OCR 2 converts images and PDFs into structured HTML, Markdown, or JSON that keeps the original layout, making documents editable, searchable, and machine-readable.
How it works
Chandra OCR 2 is a deep learning model that processes each page of an image or PDF and outputs the content in a structured format. It detects layout elements like tables, forms, math expressions, and images, and adds captions and structured data. You can run it via a command-line interface (CLI) which produces Markdown, HTML, and metadata files per document. It also offers an interactive web app for single-page processing. The model runs locally with HuggingFace transformers, or on a vLLM server for faster batch processing.
Who it's for
It's for developers, researchers, and businesses that need to digitize large volumes of documents, especially those with complex layouts, multiple languages, or handwriting. It's free for research, personal use, and startups under $2 million in funding or revenue. Commercial self-hosting requires a license, and the managed Datalab platform offers an API with higher accuracy and additional features.
Highlights
- Tops the external olmocr benchmark and shows significant improvement on internal multilingual benchmarks.
- Supports 90+ languages, with strong handwriting and math handling.
- Reconstructs forms accurately, including checkboxes.
- Outputs Markdown, HTML, and JSON with detailed layout information.
- Extracts images and diagrams, adding captions and structured data.
- Two inference modes: local (HuggingFace) and remote (vLLM server) for deployment flexibility.
- CLI and interactive Streamlit web app included.
- Apache 2.0 code license; model weights under OpenRAIL-M (free for research and small startups).
Related
- Project
- Project
- Project
- Project