--- 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___p.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} } ```