Datasets:
File size: 10,943 Bytes
6393ebd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | ---
license: cc-by-4.0
pretty_name: Russian Real-Document OCR Benchmark
language:
- ru
task_categories:
- image-to-text
tags:
- ocr
- handwriting-recognition
- document-understanding
- russian
- cyrillic
- benchmark
size_categories:
- 1K<n<10K
configs:
- config_name: handwritten
data_files:
- split: test
path: handwritten_real_data/data.csv
- config_name: non_handwritten
data_files:
- split: test
path: non_handwritten_real_data/data.csv
---
# Russian Real-Document OCR Benchmark
A test-only benchmark for full-page OCR on real Russian documents. It has two subsets:
| Subset | Pages | Size | Text characters | Median chars / page | Max chars / page |
|---|---:|---:|---:|---:|---:|
| `handwritten` | 199 | 237 MB | 185,278 | 789 | 3,302 |
| `non_handwritten` | 1,500 | 548 MB | 834,346 | 350 | 14,812 |
| **Total** | **1,699** | **~785 MB** | **1,019,624** | | |
Each page has one plain-text transcription of the whole page. There are no
bounding boxes, line-level crops or layout annotations.
## Contents
### `handwritten`: 199 pages
Handwritten essay pages in Russian from 30 writers, taken from the
[HWR200](https://huggingface.co/datasets/AntiplagiatCompany/HWR200) dataset. Each
page appears in one of three capture conditions, shown in the file name:
| Condition | Pages |
|---|---:|
| `scan` (flatbed scan) | 75 |
| `dark` (phone photo, poor lighting) | 68 |
| `light` (phone photo, good lighting) | 56 |
File names follow the HWR200 scheme `w<writer>_<essay>_<condition>_p<page>.jpg`,
for example `w14_reuse2_scan_p3.jpg`. Pages of the same essay share a prefix, so
you can group results by writer or by capture condition.
### `non_handwritten`: 1,500 pages
Printed and digital Russian documents collected from public web image search:
- certificates and diplomas (аттестаты, дипломы, свидетельства)
- passport and ID-card specimens
- official letters, applications and contracts
- forms, invoices and tables
- school notebooks and textbook pages
- screenshots of document software
- a few pre-1918 documents in pre-reform orthography (ѣ, ъ, і)
68 pages are Kazakh or bilingual Kazakh/Russian documents, and 25 are mostly in
Latin script (for example, bilingual passport pages or software UIs).
### Images
- File extensions do not always match the real encoding:
- handwritten: all files are named `.jpg`. 181 are JPEG, 10 are PNG and 8 are
MPO.
- non-handwritten: 1,228 files are named `.jpg` and 272 are named `.png`. 91 of
them use a format that does not match their extension, mostly WebP saved as
`.jpg`.
Open images with a library that detects the format from the file contents,
such as Pillow, rather than trusting the extension.
- Sizes (sorted by pixel count):
- handwritten: median 1280 × 1280 px, smallest 607 × 800 px, largest
3456 × 4608 px
- non-handwritten: median 1141 × 720 px, smallest 75 × 100 px, largest
5307 × 7309 px
- The images are not all in the same color mode: some are RGBA, palette,
grayscale, CMYK or 1-bit. Convert them to RGB before inference.
## File layout
```
handwritten_real_data/
data.csv # columns: image_path, text
images/w0_original0_light_p1.jpg …
non_handwritten_real_data/
data.csv # columns: image_path, text
images/000002.jpg … (file numbers are not contiguous)
```
`data.csv` is UTF-8, and every field is quoted. `image_path` is relative to the
subset folder, for example `images/000002.jpg`. `text` is the reference
transcription. Every image has exactly one row, and no row is empty.
- **non_handwritten** references keep the page's line breaks. 53 short pages,
such as covers, have a single-line reference.
- **handwritten** references are a single line per page: line breaks were not
recorded. Compare them with whitespace collapsed.
## Usage
The CSVs store image paths rather than embedded images, so the most reliable way
to load the benchmark is to download the repository and read the files directly:
```python
import csv, os
from huggingface_hub import snapshot_download
from PIL import Image
root = snapshot_download("Omar-2002/ru_benchmark_data", repo_type="dataset")
def load(subset): # "handwritten_real_data" or "non_handwritten_real_data"
base = os.path.join(root, subset)
with open(os.path.join(base, "data.csv"), encoding="utf-8") as f:
for row in csv.DictReader(f):
yield Image.open(os.path.join(base, row["image_path"])).convert("RGB"), row["text"]
for image, reference in load("handwritten_real_data"):
...
```
`load_dataset("Omar-2002/ru_benchmark_data", "handwritten")` also works, but it
returns `image_path` as a string, not as a decoded image.
## Evaluation
We recommend reporting **CER** and **WER** (character and word error rate,
computed from Levenshtein distance) separately for each subset, at two levels:
- **corpus-level**: total edits divided by total reference length
- **per-page mean**
Results depend heavily on scoring choices, so state them alongside your numbers:
- **Whitespace.** Collapse all whitespace, including line breaks, to single spaces
before scoring. The handwritten references have no line breaks, so this step is
required there.
- **Text normalisation.** Say whether punctuation and case are kept, and how
Markdown/HTML in model output is stripped. Models that emit Markdown tables or
LaTeX are penalised under a plain-text reference unless their output is
converted first.
- **Runaway generations.** VLM-based OCR models sometimes loop until they hit the
token limit, which can produce per-page error rates of several thousand percent.
A few such pages can dominate an uncapped average. We suggest capping per-page
rates at 100% and reporting the number of runaway pages as a separate column.
- **Confidence intervals.** The handwritten subset is small (199 pages from 30
writers), so differences of a few CER points between models may not be
significant. A paired bootstrap over pages is a simple way to check.
## Known limitations
- **Most non-handwritten references come from a model, not from a human.**
- 1,499 of the 1,500 pages were transcribed by Gemini 2.5 (`gemini-2.5-flash`
for 872 pages, `gemini-2.5-pro` for 627), which replaced an earlier set of
PaddleOCR-VL labels.
- Page `004382` failed with Gemini and still has its PaddleOCR-VL label, which
has known errors.
- After that, the following problems were fixed by hand:
- 16 rows with literal `\n` escapes were converted to real line breaks.
- Two runaway generations were cut back to what is visible on the page: a
64,000-character `<` loop on an ID-card MRZ (`002904`) and a 3,300-character
letter loop (`004526`).
- These references have not been fully verified by a human. Read
non-handwritten scores as agreement with a strong VLM, not as true accuracy.
Small differences between strong models are not meaningful.
- **Hard pages.** Page `004526` is a 1701 cursive manuscript, and the reading
of its handwritten part is uncertain. A few other pages contain pre-reform
orthography, watermarks across the text, or small UI text.
- **Identical references for different images.** 101 pages share their
reference with at least one other page. These are covers that carry the same
short text, for example 27 different passport covers that read
`РОССИЙСКАЯ ФЕДЕРАЦИЯ ПАСПОРТ` and 15 that read `ДИПЛОМ`. The image files are
all different.
- **Reading order is ambiguous** on multi-column pages, tables, two-page spreads
and screenshots. A model can read every word correctly and still get a high
CER/WER if it chooses a different order.
- **Handwritten alignment.** The handwritten references are the HWR200 per-page
ground truth. Six pages (`w14_reuse2_scan_p3`–`p5` and `w21_reuse7_scan_p1`–`p3`)
were re-split at the page boundaries visible in the scans, because the original
split put text on the wrong page. No words were added or changed. One page whose
scan did not match any transcription was removed.
- **Possible overlap with training data.** All handwritten pages come from
HWR200. If you train or fine-tune on HWR200, remove these pages first or your
handwritten scores will be inflated.
## Source data
- **Handwritten:** [AntiplagiatCompany/HWR200](https://huggingface.co/datasets/AntiplagiatCompany/HWR200).
The images and per-page references are taken from HWR200. Only the re-split
described above was changed.
- **Non-handwritten:** images collected from public web image search (Yandex
Images), using Russian queries for document types, then filtered for
readable pages. Some images carry watermarks from their original publishers.
- **How the references were produced:** handwritten pages use the human
ground truth from HWR200. Non-handwritten pages use Gemini 2.5 output, as
described under "Known limitations".
## Personal and sensitive information
Many pages are identity documents, certificates, applications or letters. Most
of them appear to be published specimens or templates, with placeholder names
such as «Иванов Иван Иванович» and numbers such as `1234567890`. Some may still
contain real names, signatures, document numbers, e-mail addresses or phone
numbers. If you find a page that should not be public, please open a discussion
on this repository and it will be removed.
## Licensing
The annotations (`data.csv` files), the benchmark selection and this card are
released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
- **handwritten:** the images and original transcriptions come from
[HWR200](https://huggingface.co/datasets/AntiplagiatCompany/HWR200), which is
released under Apache-2.0. Please cite HWR200 as well (see Citation).
- **non_handwritten:** the images were collected from the web, and their
copyright belongs to the original publishers. CC BY 4.0 does not cover them.
They are shared here only for non-commercial research evaluation. Rights
holders can ask for removal through the repository's discussion tab.
## Citation
If you use this benchmark, please cite it:
```bibtex
@misc{polat2026russianocr,
title = {Russian Real-Document OCR Benchmark},
author = {Omar Polat},
year = {2026},
url = {https://huggingface.co/datasets/Omar-2002/ru_benchmark_data}
}
```
If you use the `handwritten` subset, please also cite HWR200:
```bibtex
@article{Potyashin2023HWR200NO,
title = {HWR200: New open access dataset of handwritten texts images in Russian},
author = {Ivan Potyashin and Mariam Kaprielova and Yury Chekhovich and Alexandr Kildyakov and Temirlan Seil and Evgeny Finogeev and Andrey Grabovoy},
journal = {Computational Linguistics and Intellectual Technologies},
year = {2023},
url = {https://api.semanticscholar.org/CorpusID:267505062}
}
```
|