Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    TypeError
Message:      int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1531, in _prepare_split_single
                  for key, record in generator:
                                     ^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
                  for item in generator(*args, **kwargs):
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 127, in _generate_examples
                  for example_idx, example in enumerate(self._get_pipeline_from_tar(tar_path, tar_iterator)):
                                              ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 32, in _get_pipeline_from_tar
                  for filename, f in tar_iterator:
                                     ^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/track.py", line 49, in __iter__
                  for x in self.generator(*self.args):
                           ~~~~~~~~~~~~~~^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 1400, in _iter_from_urlpath
                  with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f:
                       ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 977, in xopen
                  file_obj = fs.open(paths[0], mode)
                File "<string>", line 3, in open
                File "/usr/local/lib/python3.14/unittest/mock.py", line 1176, in __call__
                  return self._mock_call(*args, **kwargs)
                         ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/unittest/mock.py", line 1180, in _mock_call
                  return self._execute_mock_call(*args, **kwargs)
                         ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/unittest/mock.py", line 1247, in _execute_mock_call
                  result = effect(*args, **kwargs)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 786, in wrapped
                  tracker.files[urlpath] = {"read": 0, "size": int(f.size)}
                                                               ~~~^^^^^^^^
              TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1393, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1571, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

png
image
json
dict
__key__
string
__url__
string
{ "markdown": "شركة الحصن للأنظمة الأمنية\n81\nقواعد اللغة العربية المبسطة والشاملة\nالمستجدات والتطورات الراهنة\nيكن … بأرض الفضا ليل عليّ يطول ألا ليت شعري هل أبيتن ليلة … وليس لبرغوث عليّ سبيل وقد أجاد مجد الدين أبو الميمون الكناني حيث قال ملغزافي البراغيث: ومعشر يستحل الناس قتلهم … كما استحلوا دم الحجاج في الحرم ...
sample_0000000_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\n![image](img-0)\n\nعلم الاجتماع السياسي والتحولات المجتمعية\nتقول: رأيت رجلا أحب، نريد: أحبه. قال", "images": [ { "id": "img-0", "top_left_x": 245, "top_left_y": 319, "bottom_right_x": 309, "bottom_right_y": 383, "reading_index": 1 } ], "tables": [], ...
sample_0000001_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "مجموعة النماء للتطوير والبناء\n\n![image](img-0)\n\nياسين بن حميد الكثيري\n9852-3261\n\n![image](img-1)\n", "images": [ { "id": "img-0", "top_left_x": 254, "top_left_y": 62, "bottom_right_x": 298, "bottom_right_y": 118, "reading_index": 2 }, { "id...
sample_0000002_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "شركة الإنجاز للمشاريع التقنية\nINV-79519\n16/07/2026\nفاتورة إلى: أروى بنت محمود القحطاني\n\n[tbl-0.html](tbl-0.html)\n\nالإجمالي: 4,393.72", "images": [], "tables": [ { "id": "tbl-0.html", "content": "<table><tbody><tr><th>البيان</th><th>الكمية</th><th>السعر</th><th>المجموع</th></t...
sample_0000003_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "مؤسسة الأمانة للخدمات المالية\nINV-49033\n18/01/2023\nفاتورة إلى: زهرة بنت محمد الفاروق\n\n[tbl-0.html](tbl-0.html)\n\nالإجمالي: 2,889.49", "images": [], "tables": [ { "id": "tbl-0.html", "content": "<table><tbody><tr><th>البيان</th><th>الكمية</th><th>السعر</th><th>المجموع</th></tr>...
sample_0000004_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\\frac{\\partial z}{\\partial \\sigma} = \\lim_{h \\to 0} \\frac{\\min(\\sigma + h) - \\min(\\sigma)}{h} + \\frac{\\alpha}{\\lambda^2}\n\\sum_{z=0}^{M} \\frac{n^z}{z!} = e^{n}\n## ملاحظة\nعَلَيْهِ إِنْ كَانَ مِنَ الْكَاذِبِينَ (7) وَيَدْرَأُ عَنْهَا الْعَذَابَ أَنْ\n\\iint_{D} x^2 \\times \\theta^2 \\,...
sample_0000005_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\n![image](img-0)\n\nقاسم بن علي الميلود\nمستشار قانوني", "images": [ { "id": "img-0", "top_left_x": 135, "top_left_y": 14, "bottom_right_x": 181, "bottom_right_y": 60, "reading_index": 1 } ], "tables": [], "hyperlinks": [], "header": null, "foote...
sample_0000006_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "## نظرية\n\\sigma_{n+1} = \\sigma_n - \\alpha \\nabla f(\\sigma_n)\nP(A|B) = \\frac{P(A \\cap B)}{P(B)}\n\\sum_{\\beta=0}^{\\infty} \\frac{z^\\beta}{\\beta!} = e^{z}", "images": [], "tables": [], "hyperlinks": [], "header": null, "footer": null, "dimensions": { "dpi": 96, "height": ...
sample_0000007_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "شركة البيان للإعلام والتواصل\n\n![image](img-0)\n\nأروى بنت محمود القحطاني\n5892-8737\n\n![image](img-1)\n", "images": [ { "id": "img-0", "top_left_x": 313, "top_left_y": 84, "bottom_right_x": 357, "bottom_right_y": 140, "reading_index": 2 }, { "i...
sample_0000008_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\n![image](img-0)\n\nمعاذ بن عبد الله الوهيبي\nباحث علمي أول\n0728951715\nشركة الربيع للمنتجات الزراعية", "images": [ { "id": "img-0", "top_left_x": 14, "top_left_y": 14, "bottom_right_x": 60, "bottom_right_y": 60, "reading_index": 1 } ], "tables": [], ...
sample_0000009_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "مؤسسة الولاء للخدمات العقارية\nمعاذ بن عبد الله الوهيبي", "images": [], "tables": [], "hyperlinks": [], "header": null, "footer": null, "dimensions": { "dpi": 96, "height": 1213, "width": 744 }, "confidence_scores": { "word_confidence_scores": [ { "text": "...
sample_0000010_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "مؤسسة الحق للخدمات القانونية والقضائية\n18/01/2026 - 20:11\nنظام مراقبة أمني متطور\n112.00\nتوريد معدات مطبخ صناعي\n48.00\nخدمة ترجمة ونشر متخصصة\n53.00\nخدمة ترجمة ونشر متخصصة\n144.24\nخدمة تدريب وتطوير الكفاءات\n121.00\nأسطوانة غاز للاستخدام التجاري\n11.93\nبرنامج محاسبة ومالية متكامل\n17.00\nمواد تن...
sample_0000011_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "## مؤشرات الأداء والمعايير المعتمدة\nعليه السلام قال له: هل رأيت خليلاً يقبض روح خليله، فعرج إلى السماء ثم نزل فقال: إن الله يقرئك السلام ويقول لك: هل رأيت خليلاً يكره لقاء خليله. والحبيب يحبُّ الاستعجال إلى لقاء حبيبه كما كان رسول الله صلى الله عليه وسلم يقول في دعائه: \"اللهم إنِّي أسألك النظر إلى جَ...
sample_0000012_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "شركة الجودة للتصنيع والإنتاج\n\n![image](img-0)\n\nأروى بنت محمود القحطاني\n8787-8340\n\n![image](img-1)\n", "images": [ { "id": "img-0", "top_left_x": 306, "top_left_y": 63, "bottom_right_x": 350, "bottom_right_y": 119, "reading_index": 2 }, { "i...
sample_0000013_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\n![image](img-0)\n\nخولة بنت حسن الشيخ\nمسؤول الامتثال والحوكمة\n0694012104\nمؤسسة الحق للخدمات القانونية والقضائية", "images": [ { "id": "img-0", "top_left_x": 14, "top_left_y": 23, "bottom_right_x": 62, "bottom_right_y": 71, "reading_index": 1 } ], "...
sample_0000014_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "مؤسسة البلاغ للخدمات الإعلامية\nالجيزة، في 12/02/2026\nالسيد المحترم،\nالموضوع: مراجعة الأدبيات والدراسات السابقة\nبعد التحية والتقدير، يسعدني أن أطلعكم على\nفِيهِ وَقُلْنَا اهْبِطُوا بَعْضُكُمْ لِبَعْضٍ عَدُوٌّ وَلَكُمْ فِي الْأَرْضِ مُسْتَقَرٌّ وَمَتاعٌ إِلى حِينٍ (36) فَتَلَقَّى آدَمُ مِنْ رَبِّهِ ك...
sample_0000015_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "\\nabla_{i} J(i) = \\frac{1}{m} X^T ( \\sigma(X i) - Y )\n## نظرية\nالله بن كليب المرادي وهو أبو معاوية بن سعيد والقاسم بن سعيد وكان شريفا بمصر في أيامه وله وفادة على هشام بن عبد\n\\vec{F} = m\\vec{a}\n## برهان\nالملك وكان منقطعا إلى زبان (5) بن عبد العزيز بن مروان بمرو بحلقة حضرموت في فتنة حفص بن الول...
sample_0000016_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
{ "markdown": "## الأثر الاقتصادي والاجتماعي\n\n![image](img-0)\n\nالشكل (1): مقارنة أداء المحاور والأبعاد الرئيسية والتحليل النوعي للبيانات\n\n![image](img-1)\n\nالشكل (2): التوزيع الجغرافي لـالخاتمة والاستنتاجات النهائية\n\n![image](img-2)\n\nصورة توضيحية لعملية الحلول والبدائل الاستراتيجية\nرسول الله صلى الله عليه...
sample_0000017_01
hf://datasets/OCR-Data/ocr_eval@32100c7da0a3b09c3e7c16a835fc281aed4a1867/data_aug/shard_001_aug1.tar
End of preview.

OCR Eval

A small, fixed evaluation set of synthetic Arabic document images with layout annotations — the held-out companion to OCR-Data/ocr_data.

Do not train on this. It exists so OCR models trained on ocr_data can be scored on unseen pages from the same generator.

Originals 1500 (lossless PNG + JSON)
Augmented 1500 — exactly one variant per original (lossless PNG + JSON)
Shards 2 (data/shard_001.tar, data_aug/shard_001_aug1.tar)
Templates the same 14 document genres as ocr_data
Augmentations the same 10 transforms as ocr_data, same weighting
Language Arabic (RTL)

Loading

from datasets import load_dataset

clean = load_dataset("OCR-Data/ocr_eval", "original",  split="test")
noisy = load_dataset("OCR-Data/ocr_eval", "augmented", split="test")

Both configs are WebDataset shards: files sharing a basename are one sample, so the image arrives as the image column and the annotation as json.

Pairing originals with their variants

A variant's key is its original's key plus a two-digit slot:

sample_0000042      ->  data/shard_001.tar
sample_0000042_01   ->  data_aug/shard_001_aug1.tar

The shared stem is the only linkage — there is no field inside the annotation pointing back at the original. Strip the _NN suffix to join the two configs:

original_key = variant_key.rsplit("_", 1)[0]

Text is unique per image

This is the one place the eval set deliberately departs from how ocr_data was generated, and the reason it can be used for independent measurements.

In the training set, workers share a pool of 3000 consecutive corpus pages and draw from it at random, so the same page renders into many images. Here, every image is given its own private set of 10 corpus pages that no other image may use, drawn from a shuffled read across the whole 4.6M-page source corpus rather than one contiguous window. A document consumes several pages (a page runs out and the next is pulled), so the guarantee is enforced over the whole set a page may come from, not over a single page.

meta.corpus_pages lists the pages each document actually consumed, as truncated SHA-1 digests of the page text, so the property is checkable rather than merely claimed:

pages = [p for r in clean for p in r["json"]["meta"]["corpus_pages"]]
assert len(pages) == len(set(pages))   # no corpus page used by two images

Annotation schema

{
  "markdown": "...",
  "dimensions": {"dpi": 96, "width": 0, "height": 0},
  "blocks": [{"type": "title|text|table|image|header|footer",
              "content": "...", "reading_index": 0,
              "top_left_x": 0, "top_left_y": 0,
              "bottom_right_x": 0, "bottom_right_y": 0}],
  "images": [{"top_left_x": 0, "...": 0}],
  "tables": [],
  "header": null,
  "footer": null,
  "meta": {"template": "a4_report", "hybrid": null,
           "page_font": "...", "title_font": "...",
           "language": "ar", "script": "arabic", "direction": "rtl",
           "corpus_pages": ["a1b2c3d4e5f6", "..."],
           "augmentation": null}
}

meta.augmentation is null throughout the original config and {"name": ..., "params": {...}} throughout augmented. Coordinates are pixels in the image's own space; rotation is the only augmentation that changes dimensions, and its boxes are transformed to match.

Augmentation counts are the training weighting applied to 1500 draws — roughly 160 samples for each of gaussian_blur, bad_photocopy, bleed_through, color_shift, letterpress, rotation, reflected_light, shadow_cast, gaussian_noise, and ~37 watermark. Group by meta.augmentation.name to report per-transform robustness.

Caveats

  • Not deduplicated against the training set. Corpus text is unique per image and scattered across the whole source corpus, but the generator does no content hashing, so an eval layout can coincidentally resemble a training layout. This is a synthetic in-distribution eval, not a contamination-proof benchmark.
  • Not reproducible. The generator does not seed its RNG, so this exact set of 1500 cannot be regenerated. These shards are the only copy of the ground truth. Each variant's parameters are recorded in meta.augmentation.params and each page's text provenance in meta.corpus_pages.
  • Ground truth is synthetic, not human-annotated: boxes and reading order come from the renderer's own DOM, so they are exact by construction rather than by agreement.

To get loose files back out of a shard, use unpack_shard.py from the generator repo.

Downloads last month
-