back to home

datalab-to / chandra

OCR model that handles complex tables, forms, handwriting with full layout.

4,950 stars
559 forks
27 issues
PythonHTML

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing datalab-to/chandra in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/datalab-to/chandra)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Datalab State of the Art models for Document Intelligence Chandra An OCR model for complex documents — handwriting, tables, math equations, and messy forms. Benchmarks Overall scores on the olmocr bench: Hosted API A hosted API with additional accuracy improvements is available at datalab.to. Try the free playground without installing. Community Join Discord to discuss development and get help. Quick Start **Python:** How it Works. • **Two inference modes**: Run locally via HuggingFace Transformers, or deploy a vLLM server for production throughput • **Layout-aware output**: Every text block, table, and image comes with bounding box coordinates • **Structured formats**: Output as Markdown, HTML, or JSON with full layout metadata • **40+ languages** supported What It Handles **Handwriting** — Doctor notes, filled forms, homework. Chandra reads cursive and messy print that trips up traditional OCR. **Tables** — Preserves structure including merged cells (colspan/rowspan). Works on financial filings, invoices, and data tables. **Math** — Inline and block equations rendered as LaTeX. Handles textbooks, worksheets, and research papers. **Forms** — Reconstructs checkboxes, radio buttons, and form fields with their values. **Complex Layouts** — Multi-column documents, newspapers, textbooks with figures and captions. Examples | | | |---|---| | **Handwriting** | **Tables** | | **Math** | **Newspapers** | More examples | Type | Name | Link | |------|------|------| | Tables | 10K Filing | View | | Forms | Lease Agreement | View | | Handwriting | Math Homework | View | | Books | Geography Textbook | View | | Books | Exercise Problems | View | | Math | Attention Diagram | View | | Math | Worksheet | View | | Newspapers | LA Times | View | | Other | Transcript | View | | Other | Flowchart | View | Installation For HuggingFace inference, we recommend installing flash attention for better performance. **From source:** Usage CLI **Options:** • : Inference method (default: vllm) • : Page range for PDFs (e.g., "1-5,7,9-12") • : Max tokens per page • : Parallel workers for vLLM • : Extract and save images (default: include) • : Include page headers/footers (default: exclude) • : Pages per batch (default: 1) **Output structure:** vLLM Server For production or batch processing: Launches a Docker container with optimized inference. Configure via environment: • : Server URL (default: ) • : Model name (default: ) • : GPU device IDs (default: ) Configuration Settings via environment variables or : Commercial Usage Code is Apache 2.0. Model weights use a modified OpenRAIL-M license: free for research, personal use, and startups under $2M funding/revenue. Cannot be used competitively with our API. For broader commercial licensing, see pricing. Credits • Huggingface Transformers • vLLM • olmocr • Qwen3 VL Support Datalab If you find this repository helpful, please consider giving it a star ⭐