ilsilfverskiold commited on
Commit
ddc01a3
·
verified ·
1 Parent(s): 50c3b7c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +100 -31
README.md CHANGED
@@ -1,33 +1,102 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: stem
7
- dtype: string
8
- - name: tier
9
- dtype: string
10
- - name: doc_type
11
- dtype: string
12
- - name: gt_text
13
- dtype: string
14
- - name: gt_json
15
- dtype: string
16
- - name: structured_gt
17
- dtype: string
18
- - name: markdown_gt
19
- dtype: string
20
- - name: geometry_gt
21
- dtype: string
22
- splits:
23
- - name: train
24
- num_bytes: 98410188
25
- num_examples: 93
26
- download_size: 97695763
27
- dataset_size: 98410188
28
- configs:
29
- - config_name: default
30
- data_files:
31
- - split: train
32
- path: data/train-*
33
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ task_categories:
4
+ - image-to-text
5
+ language:
6
+ - en
7
+ tags:
8
+ - ocr
9
+ - benchmark
10
+ - document-understanding
11
+ - table-extraction
12
+ - structured-extraction
13
+ size_categories:
14
+ - n<1K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ---
16
+
17
+ # OCR Benchmark
18
+
19
+ 93 real-world documents across 17 document types, benchmarked against 14 OCR engines on 7 evaluation legs.
20
+
21
+ ## What this dataset contains
22
+
23
+ ### Train split (93 rows)
24
+
25
+ Each row is one benchmark document with:
26
+
27
+ | Column | Type | Description |
28
+ |---|---|---|
29
+ | `image` | Image | The document page (PNG/JPG) |
30
+ | `stem` | string | Filename stem (e.g. `invoice_000`) |
31
+ | `tier` | string | Difficulty: `easy`, `medium`, or `hard` |
32
+ | `doc_type` | string | Document type (e.g. `invoice`, `receipt`, `tax_form`) |
33
+ | `gt_text` | string | Ground-truth plain text (null for 11 silver-GT docs) |
34
+ | `gt_json` | string | Ground-truth JSON with `plain_text` and `table_html` fields (serialized JSON string) |
35
+ | `structured_gt` | string | Structured extraction ground truth with `json_schema` and `true_json` (serialized JSON string, variable schema per doc type) |
36
+ | `markdown_gt` | string | Ground-truth markdown (null if not available for this doc) |
37
+ | `geometry_gt` | string | Bounding box ground truth as JSON (null if not available) |
38
+
39
+ ### Supplementary files
40
+
41
+ Beyond the train split, this repo contains the full benchmark reference run:
42
+
43
+ - `results/runs/` — JSONL results from the reference benchmark run (14 engines × 93 docs)
44
+ - `results/ocr_outputs/` — Raw OCR output per (engine, document, pass)
45
+ - `results/schema_judge_cache/` — Cached LLM judge verdicts for schema/key_value legs
46
+ - `results/table_judge_cache/` — Cached LLM judge verdicts for tables leg
47
+ - `results/markdown_judge_cache/` — Cached LLM judge verdicts for markdown leg
48
+ - `results/judge_checklists/` — Cached document judge checklists (silver-GT docs)
49
+ - `documents/manifest.json` — Corpus manifest with source dataset provenance
50
+ - `documents/gt_limitations.json` — Known ground-truth limitations
51
+
52
+ Download supplementary files with:
53
+
54
+ ```python
55
+ from huggingface_hub import snapshot_download
56
+ snapshot_download("ilsilfverskiold/ocr-benchmark", repo_type="dataset",
57
+ allow_patterns="results/**", local_dir=".")
58
+ ```
59
+
60
+ ## Document types
61
+
62
+ | Tier | Document types | Count |
63
+ |---|---|---|
64
+ | easy | receipt (6), invoice (6) | 12 |
65
+ | medium | bank_statement, shipping, tax_form, medical, payslip, lease, photo_receipt (5 each) | 35 |
66
+ | hard | form (6), handwritten (6), scanned_legacy (6), financial_table (5), chart (5), newspaper (6), legal (6), report (6) | 46 |
67
+
68
+ ## The 7 benchmark legs
69
+
70
+ | Leg | Question | Docs with GT |
71
+ |---|---|---|
72
+ | text | Did it read the words? | 82 |
73
+ | markdown | Did it preserve structure? | 57 |
74
+ | tables | Did it recover the table? | 40 |
75
+ | key_value | Did it extract label→value pairs? | ~60 |
76
+ | schema | Given a JSON schema, did it fill it correctly? | 65 |
77
+ | geometry | Does it know where each word is? | 17 |
78
+ | judge | Overall page capture (silver-GT docs) | 11 |
79
+
80
+ ## The 14 engines
81
+
82
+ tesseract, docling, textract_text, textract_structured, mistral_ocr_4, llamaparse, gemini_flash, claude_sonnet_4_6, mineru, glm_ocr, paddleocr_vl, marker, deepseek_ocr, qwen3_vl
83
+
84
+ ## Usage with the benchmark harness
85
+
86
+ ```bash
87
+ git clone https://github.com/ilsilfverskiold/ocr-benchmark
88
+ cd ocr-benchmark
89
+ pip install -r requirements.txt
90
+ python scripts/download_data.py
91
+ python run_benchmark.py --report 20260810T130609Z
92
+ ```
93
+
94
+ ## Ground-truth provenance
95
+
96
+ - **Human GT (75 docs):** Source dataset annotations
97
+ - **Model-verified GT (8 docs):** Model-transcribed, cross-checked against 14-engine consensus
98
+ - **Silver GT (11 docs):** Machine-generated (Tesseract), evaluated by LLM judge only
99
+
100
+ ## License
101
+
102
+ Code is MIT. Documents are excerpts from third-party datasets — see the benchmark repo for per-dataset licensing.