tatar-ocr-benchmark / README.md
tagay1n's picture
Update README.md
705a94d verified
|
Raw
History Blame Contribute Delete
5.79 kB
metadata
language:
  - tt
license: cc-by-4.0
pretty_name: Tatar OCR Benchmark
size_categories:
  - n<1K
task_categories:
  - image-to-text
tags:
  - ocr
  - document-understanding
  - tatar
  - historical-documents

Tatar OCR Benchmark

This dataset is a page-level OCR benchmark for 251 Tatar documents. Each item contains:

  • the original page image,
  • structured OCR/layout annotations in JSONL,
  • a visual control image for fast human verification (original | reconstructed).

Full original page images are included.

Acknowledgements

We express our appreciation to Yandex LLC for support in dataset collection.

What Is Included

Export folder structure:

  • images/... original page images
  • control/... control images (left: original, right: reconstructed)
  • dataset.jsonl one JSON object per page

JSONL Schema (dataset.jsonl)

Top-level fields per row:

  • page_id (int) stable internal page identifier
  • image (str) relative path to original image (under images/)
  • control (str) relative path to control image (under control/)
  • width (int) original image width in pixels
  • height (int) original image height in pixels
  • items (list[object]) ordered OCR/layout objects

items[] fields:

  • order (int) reading order
  • layout_id (int) stable internal bbox identifier
  • class_name (str) layout class
  • bbox (object) normalized coordinates:
    • x1, y1, x2, y2 (float, range [0,1])
  • content_format (str, optional) output format (markdown, html, latex, etc.)
  • content (str, optional) OCR content
  • caption_targets (list[int], caption-only) referenced layout_id targets

Notes:

  • picture items typically do not contain content/content_format.
  • page_id and layout_id are kept intentionally for stable linking and reproducibility.

Example Row

{
  "page_id": 42,
  "image": "images/misc/001000.png",
  "control": "control/misc/001000.png",
  "width": 1408,
  "height": 1088,
  "items": [
    {
      "order": 1,
      "layout_id": 1835,
      "bbox": {
        "x1": 0.0557,
        "y1": 0.0958,
        "x2": 0.109,
        "y2": 0.167
      },
      "class_name": "picture"
    },
    {
      "order": 2,
      "layout_id": 1829,
      "bbox": {
        "x1": 0.1144,
        "y1": 0.0966,
        "x2": 0.3049,
        "y2": 0.1648
      },
      "class_name": "text",
      "content_format": "markdown",
      "content": "БӨТЕНДӨНЬЯ ТАТАР\nЯШЬЛӘРЕ ФОРУМЫ"
    },
    {
      "order": 3,
      "layout_id": 1830,
      "bbox": {
        "x1": 0.1026,
        "y1": 0.2243,
        "x2": 0.6247,
        "y2": 0.3098
      },
      "class_name": "section_header",
      "content_format": "markdown",
      "content": "#### СЕРТИФИКАТ"
    },
    {
      "order": 4,
      "layout_id": 1834,
      "bbox": {
        "x1": 0.1199,
        "y1": 0.3424,
        "x2": 0.2885,
        "y2": 0.3751
      },
      "class_name": "text",
      "content_format": "markdown",
      "content": "ТАПШЫРЫЛА"
    },
    {
      "order": 5,
      "layout_id": 1831,
      "bbox": {
        "x1": 0.1942721496928822,
        "y1": 0.6072256985832664,
        "x2": 0.6748469959605824,
        "y2": 0.687212719636805
      },
      "class_name": "text",
      "content_format": "markdown",
      "content": "*\"Татарча диктант\" белем бирү*\n*акциясендә катнашкан өчен*"
    },
    {
      "order": 6,
      "layout_id": 1832,
      "bbox": {
        "x1": 0.6836,
        "y1": 0.7307,
        "x2": 0.9285,
        "y2": 0.9422
      },
      "class_name": "text",
      "content_format": "markdown",
      "content": "**Татарча\nдиктант**\n\n**ЯЗ.**"
    },
    {
      "order": 7,
      "layout_id": 1833,
      "bbox": {
        "x1": 0.32613049853931775,
        "y1": 0.873131134930779,
        "x2": 0.6471898772499778,
        "y2": 0.9243139940149644
      },
      "class_name": "text",
      "content_format": "markdown",
      "content": "*Ихтирам белән, Бөтендөнья татар*\n*яшьләре форумы рәисе Т.М. Яруллин*"
    }
  ]
}

Control Image Semantics

control image is horizontal:

  • left half: original image
  • right half: reconstructed rendering from the same JSON row

Reconstruction uses the same exported items as source of truth:

  • same bbox coordinates,
  • same class,
  • same order,
  • same content.

Each rendered box includes:

  • class label,
  • reading order,

Key decisions applied:

  • OCR preserves source text strictly; typos/errors are not corrected.
  • Diacritics are preserved strictly; no simplification to look-alike characters.
  • Header hierarchy is preserved; default header level may be adjusted by page context.
  • Multi-line headers preserve line breaks (e.g., with <br> in markdown workflow rules).

Intended Use

  • OCR benchmarking for Tatar historical/printed documents
  • OCR post-processing and reconstruction evaluation

Dataset Evolution Notice

This dataset is an actively evolving benchmark and is subject to change.

Possible updates in future versions include:

  • additional pages and sources,
  • annotation corrections and quality improvements,
  • updated normalization/formatting decisions.

Where possible, backward compatibility will be preserved, but consumers should treat the schema as versioned and monitor release notes.

Limitations

  • Current size is small (50 items) and will be expanded.
  • Source domain/style coverage is still limited at this stage.
  • Some hard OCR cases (quality, uncertainty, complex regions) remain challenging.

Citation

If you use this dataset, please cite:

  • yasalma/tatar-ocr-benchmark (Hugging Face)