Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
495
image
imagewidth (px)
408
3.89k
image_base64
stringlengths
28.2k
18.3M
assistant
stringlengths
8
18.3k
assistant_without_json
stringlengths
39
18.2k
0
"iVBORw0KGgoAAAANSUhEUgAABIgAAAcFCAYAAADr6ulYAAEAAElEQVR4nOzde3wU9b0//teua4xhG5YQSCmmKbeU2pQSYwAphxQ(...TRUNCATED)
"{\"text\": \"Luís X & I (Paris, - Vincennes, ), também conhecido como Luís, o Teimoso, foi o Re(...TRUNCATED)
"Luís X & I (Paris, - Vincennes, ), também conhecido como Luís, o Teimoso, foi o Rei de Navarra (...TRUNCATED)
1
"iVBORw0KGgoAAAANSUhEUgAACwgAABCsCAAAAAAnFqklAAEAAElEQVR4nCT918623ZqYaV3XyOOOT3jTF/44Q5WrnAp3G7UaRAs(...TRUNCATED)
"{\"text\": \" Os carbetos ou carbonetos (também carburetos) são compostos inorgânicos binários,(...TRUNCATED)
"Os carbetos ou carbonetos (também carburetos) são compostos inorgânicos binários, classificados(...TRUNCATED)
2
"iVBORw0KGgoAAAANSUhEUgAAAfAAAAKwCAIAAADofrpAAADJFklEQVR4nOzddVxU2f8/8PfMMHQjDQIGiNixdmAXxtrdit3d3b1(...TRUNCATED)
"{\"text\": \"\\n\\n\\n\\n\\n\\n\\n\\nO CAÇADOR\\nFEROZ. \\n\\n\\n\\n(\\nBurger\\n). \\n\\n\\n\\n\\(...TRUNCATED)
"O CAÇADOR\nFEROZ. \n\n\n\n(\nBurger\n). \n\n\n\n\nSua buzina tocára \n\n\nO conde, altivo senhor:(...TRUNCATED)
3
"iVBORw0KGgoAAAANSUhEUgAABIgAAAcFCAYAAADr6ulYAAEAAElEQVR4nOzde3iU9Zn4/zsREFSEpYEYESEICFFJKWbBQ401SLN(...TRUNCATED)
"{\"text\": \"Anatólia (do grego antigo , - \\\"leste\\\" ou \\\"erguer/nascer do sol\\\"), ou pen(...TRUNCATED)
"Anatólia (do grego antigo , - \"leste\" ou \"erguer/nascer do sol\"), ou península anatoliana, t(...TRUNCATED)
4
"iVBORw0KGgoAAAANSUhEUgAABIgAAAcFCAYAAADr6ulYAAEAAElEQVR4nOzdeZQU9bn4/2dAEYHgDTEa9avESAwxXgMhiQQJJoq(...TRUNCATED)
"{\"text\": \"A história da França tem suas raízes no período Paleolítico, ainda na Pré-histó(...TRUNCATED)
"A história da França tem suas raízes no período Paleolítico, ainda na Pré-história. As cultu(...TRUNCATED)
5
"iVBORw0KGgoAAAANSUhEUgAADzEAABagCAAAAAAXO4YUAAEAAElEQVR4nET923LkyJKmiX4GKBQGoztiEZkRVdPz/g+1RWZERrb(...TRUNCATED)
"{\"text\": \"Ponta Porã é um município brasileiro do estado de Mato Grosso do Sul, Região Centr(...TRUNCATED)
"Ponta Porã é um município brasileiro do estado de Mato Grosso do Sul, Região Centro-Oeste do pa(...TRUNCATED)
6
"iVBORw0KGgoAAAANSUhEUgAAAlUAAANTCAIAAAAISn9MAAEAAElEQVR4nLz927IsSXYYiK2Le0Tm3udSqK7uBkCQIIciQVFG49g(...TRUNCATED)
"{\"text\": \"MARCHA FUNEBRE 57\\n\\n que foi\\narredar o somno de si, tão aborrecido ficou este re(...TRUNCATED)
"MARCHA FUNEBRE 57\n\n que foi\narredar o somno de si, tão aborrecido ficou este reformador de can(...TRUNCATED)
7
"iVBORw0KGgoAAAANSUhEUgAABOwAAAcUCAIAAAB0Dgs7AAEAAElEQVR4nOzdBVgTbxwH8BujEcVAAYMYICEiFnagiN1dWNitf1t(...TRUNCATED)
"DOUTRINA NACIONAL\n179\n132/2023, que nos seus vários dispositivos enfrenta diretamente os erros h(...TRUNCATED)
Erro: A entrada deve ser um dicionário.
8
"iVBORw0KGgoAAAANSUhEUgAADzEAABagCAAAAAAXO4YUAAEAAElEQVR4nET923LkyJKmiX4GKBQGoztiEZkRVdPz/g+1RWZERrb(...TRUNCATED)
"{\"text\": \"De acordo com a teoria cinética dos gases um gás ideal é constituído por um grande(...TRUNCATED)
"De acordo com a teoria cinética dos gases um gás ideal é constituído por um grande número de p(...TRUNCATED)
9
"iVBORw0KGgoAAAANSUhEUgAAB5MAAAV1CAIAAAC+mX75AAEAAElEQVR4nNT93Y4sPa42iD1kZK3uPXP/12IDNuBDG7ABH9gHA/g(...TRUNCATED)
"{\"text\": \"Zheng He () (1371-1433) foi um explorador chinês do século XV. Realizou viagens por (...TRUNCATED)
"Zheng He () (1371-1433) foi um explorador chinês do século XV. Realizou viagens por mar pelo sudo(...TRUNCATED)
End of preview. Expand in Data Studio

DharmaOCR-Benchmark

Dharma-AI

Overview

DharmaOCR-Benchmark is a 496-instance evaluation suite for OCR models focused on Brazilian Portuguese documents. It covers printed text, handwritten text, and legal/administrative documents — domains underrepresented in existing benchmarks like OCRBench and olmOCR-Bench.

This benchmark evaluates not only transcription quality, but also text degeneration rate and unit inference cost as first-class metrics.

Released alongside the DharmaOCR family of models. For the full methodology and analysis, see our paper: DharmaOCR: Specialized Small Language Models for Structured OCR that Outperform Open-Source and Commercial Baselines.

Why this benchmark?

Existing OCR benchmarks do not reliably predict performance on Brazilian Portuguese documents. Language-specific orthography, domain vocabulary, and document formatting shift error profiles and amplify text degeneration in ways that general-purpose benchmarks fail to capture.

DharmaOCR-Benchmark fills this gap with a focused, reproducible evaluation protocol.

Dataset Composition

Subset Samples Description
ESTER-Pt 363 Printed text recognition in Brazilian Portuguese
Legal 83 Legal and administrative documents (publicly sourced, fully human-audited)
BRESSAY 50 Handwritten text recognition in Brazilian Portuguese
Total 496

⚠️ This benchmark was not used for training, model selection, DPO pair construction, or quantization calibration of any DharmaOCR model.

Evaluation Protocol

Score

DharmaOCR-Benchmark Score = (LevenshteinRatio + BLEU) / 2
Component What it captures
LevenshteinRatio Character-level fidelity (misspellings, missing accents, punctuation)
BLEU N-gram sequence preservation (reorderings, dropped spans)

Additional Metrics

  • Text degeneration rate (%): Requests that hit the output-token limit and exhibit repeated text spans (n-gram criterion). A critical operational metric — degenerate requests inflate cost and reduce throughput system-wide.
  • Unit cost per page: Enables fair comparison between self-hosted models and commercial APIs.

Inference Setup

Parameter Value
GPU NVIDIA L40S (48GB GDDR6)
Instance AWS g6e.2xlarge
Engine vLLM
Max output tokens 8,192
Temperature 0

🏆 Benchmark Results

Model Score ↑ Degeneration Rate (%) ↓ Time/Page (s) ↓
🥇 DharmaOCR Full (7B, ours) 0.925 0.40 2.132
🥈 DharmaOCR Lite (3B, ours) 0.911 0.20 ✨ 1.464

Commercial APIs
Claude Opus 4.6 0.833
Gemini 3.1 Pro 0.820
GPT-5.4 0.750
Google Vision 0.686
Google Document AI 0.640
GPT-4o 0.635
Amazon Textract 0.618
Mistral OCR 3 0.574

Open-Source Models
Qwen2.5-VL-7B-Instruct 0.839 2.42 3.101
Qwen3-VL-8B 0.829 5.65 7.250
olmOCR-2-7B 0.823 1.41 4.306
Nanonets-OCR2-3B 0.791 2.62 1.911
Dots OCR 0.738 6.85 2.526
GLM-OCR 0.710 11.69 1.480
Qwen3-VL-2B-Instruct 0.623 11.69 3.566
Qwen2.5-VL-3B-Instruct 0.549 0.60 1.500
gemma-3-4b-it 0.214 33.96 2.182
DeepSeek-OCR 0.196 21.98 1.213

Score = (LevenshteinRatio + BLEU) / 2. Time/page on NVIDIA L40S. ✨ = lowest degeneration rate across all models.

Usage

from datasets import load_dataset

dataset = load_dataset("dharma-ai/DharmaOCR-Benchmark")

Citation

@misc{cardoso2026dharmaocrspecializedsmalllanguage,
      title={DharmaOCR: Specialized Small Language Models for Structured OCR that outperform Open-Source and Commercial Baselines}, 
      author={Gabriel Pimenta de Freitas Cardoso and Caio Lucas da Silva Chacon and Jonas Felipe da Fonseca Oliveira and Paulo Henrique de Medeiros Araujo},
      year={2026},
      eprint={2604.14314},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2604.14314}, 
}

Contact

For technical questions, benchmark usage, research inquiries, or paper-related discussions:

[email protected]

Downloads last month
93

Paper for Dharma-AI/DharmaOCR-Benchmark