Views
No views yet
1pip install chandra-ocr
2
3# With VLLM
4chandra_vllm
5chandra input.pdf ./output
6
7# With HuggingFace
8chandra input.pdf ./output --method hf
9
10# Interactive streamlit app
11chandra_app
| Model | ArXiv | Old Scans Math | Tables | Old Scans | Headers and Footers | Multi column | Long tiny text | Base | Overall | Source |
|---|---|---|---|---|---|---|---|---|---|---|
| Datalab Chandra v0.1.0 | 82.2 | 80.3 | 88.0 | 50.4 | 90.8 | 81.2 | 92.3 | 99.9 | 83.1 ± 0.9 | Own benchmarks |
| Datalab Marker v1.10.0 | 83.8 | 69.7 | 74.8 | 32.3 | 86.6 | 79.4 | 85.7 | 99.6 | 76.5 ± 1.0 | Own benchmarks |
| Mistral OCR API | 77.2 | 67.5 | 60.6 | 29.3 | 93.6 | 71.3 | 77.1 | 99.4 | 72.0 ± 1.1 | olmocr repo |
| Deepseek OCR | 75.2 | 72.3 | 79.7 | 33.3 | 96.1 | 66.7 | 80.1 | 99.7 | 75.4 ± 1.0 | Own benchmarks |
| GPT-4o (Anchored) | 53.5 | 74.5 | 70.0 | 40.7 | 93.8 | 69.3 | 60.6 | 96.8 | 69.9 ± 1.1 | olmocr repo |
| Gemini Flash 2 (Anchored) | 54.5 | 56.1 | 72.1 | 34.2 | 64.7 | 61.5 | 71.5 | 95.6 | 63.8 ± 1.2 | olmocr repo |
| Qwen 3 VL | 70.2 | 75.1 | 45.6 | 37.5 | 89.1 | 62.1 | 43.0 | 94.3 | 64.6 ± 1.1 | Own benchmarks |
| olmOCR v0.3.0 | 78.6 | 79.9 | 72.9 | 43.9 | 95.1 | 77.3 | 81.2 | 98.9 | 78.5 ± 1.1 | olmocr repo |
| dots.ocr | 82.1 | 64.2 | 88.3 | 40.9 | 94.1 | 82.4 | 81.2 | 99.5 | 79.1 ± 1.0 | dots.ocr repo |

| Type | Name | Link |
|---|---|---|
| Tables | Water Damage Form | View |
| Tables | 10K Filing | View |
| Forms | Handwritten Form | View |
| Forms | Lease Agreement | View |
| Handwriting | Doctor Note | View |
| Handwriting | Math Homework | View |
| Books | Geography Textbook | View |
| Books | Exercise Problems | View |
| Math | Attention Diagram | View |
| Math | Worksheet | View |
| Math | EGA Page | View |
| Newspapers | New York Times | View |
| Newspapers | LA Times | View |
| Other | Transcript | View |
| Other | Flowchart | View |
pip install chandra-ocr1
2from chandra.model import InferenceManager
3from chandra.model.schema import BatchInputItem
4
5# Run chandra_vllm to start a vLLM server first if you pass vllm, else pass hf
6# you can also start your own vllm server with the datalab-to/chandra model
7manager = InferenceManager(method="vllm")
8batch = [
9 BatchInputItem(
10 image=PIL_IMAGE,
11 prompt_type="ocr_layout"
12 )
13]
14result = manager.generate(batch)[0]
15print(result.markdown)1from transformers import AutoModel, AutoProcessor
2from chandra.model.hf import generate_hf
3from chandra.model.schema import BatchInputItem
4from chandra.output import parse_markdown
5
6model = AutoModel.from_pretrained("datalab-to/chandra").cuda()
7model.processor = AutoProcessor.from_pretrained("datalab-to/chandra")
8
9batch = [
10 BatchInputItem(
11 image=PIL_IMAGE,
12 prompt_type="ocr_layout"
13 )
14]
15
16result = generate_hf(batch, model)[0]
17markdown = parse_markdown(result.raw)