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 1405, 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 982, 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
{ "blocks": [ { "bottom_right_x": 206, "bottom_right_y": 38, "confidence_scores": null, "content": "شركة البنيان للمقاولات والبناء", "reading_index": 1, "top_left_x": 10, "top_left_y": 14, "type": "text", "table_id": null }, { "bottom_right_x": 2...
sample_0000000
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 353, "bottom_right_y": 23, "confidence_scores": null, "content": "شركة الجودة للتصنيع والإنتاج", "reading_index": 1, "top_left_x": 10, "top_left_y": 10, "type": "text", "table_id": null }, { "bottom_right_x": 353...
sample_0000001
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 671, "bottom_right_y": 77, "confidence_scores": null, "content": "شركة القمة للحلول الهندسية", "reading_index": 1, "top_left_x": 44, "top_left_y": 44, "type": "text", "table_id": null }, { "bottom_right_x": 671, ...
sample_0000002
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 674, "bottom_right_y": 101, "confidence_scores": null, "content": "\\frac{\\partial n}{\\partial j} = \\lim_{h \\to 0} \\frac{\\cos(j + h) - \\cos(j)}{h}", "reading_index": 1, "top_left_x": 40, "top_left_y": 46, "type": "text", ...
sample_0000003
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 677, "bottom_right_y": 86, "confidence_scores": null, "content": "مؤسسة الولاء للخدمات العقارية", "reading_index": 1, "top_left_x": 50, "top_left_y": 50, "type": "text", "table_id": null }, { "bottom_right_x": 67...
sample_0000004
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 776, "bottom_right_y": 156, "confidence_scores": null, "content": "الإطار النظري والمفاهيمي للدراسة", "reading_index": 1, "top_left_x": 40, "top_left_y": 40, "type": "title", "table_id": null }, { "bottom_right_x...
sample_0000005
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 696, "bottom_right_y": 206, "confidence_scores": null, "content": "الرؤية المستقبلية وخارطة الطريق", "reading_index": 1, "top_left_x": 40, "top_left_y": 40, "type": "title", "table_id": null }, { "bottom_right_x"...
sample_0000006
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 315, "bottom_right_y": 894, "confidence_scores": null, "content": "ثريا بنت عبد الله الخلوف", "reading_index": 1, "top_left_x": 193, "top_left_y": 876, "type": "text", "table_id": null } ], "confidence_scores": { "...
sample_0000007
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 550, "bottom_right_y": 90, "confidence_scores": null, "content": "\\prod_{n=1}^{n} (1 \\times x_n) = 0 + \\frac{i}{\\alpha^2}", "reading_index": 1, "top_left_x": 20, "top_left_y": 26, "type": "text", "table_id": null }, ...
sample_0000008
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 473, "bottom_right_y": 528, "confidence_scores": null, "content": "قال الحافظ ابن حجر رحمه الله: \"ومناسبة", "reading_index": 1, "top_left_x": 243, "top_left_y": 503, "type": "text", "table_id": null }, { "bottom...
sample_0000009
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 309, "bottom_right_y": 40, "confidence_scores": null, "content": "مؤسسة البشرى للتجارة الإلكترونية", "reading_index": 1, "top_left_x": 10, "top_left_y": 14, "type": "text", "table_id": null }, { "bottom_right_x":...
sample_0000010
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 825, "bottom_right_y": 36, "confidence_scores": null, "content": "مجموعة العروبة للصناعات التحويلية", "reading_index": 1, "top_left_x": 606, "top_left_y": 10, "type": "header", "table_id": null }, { "bottom_right...
sample_0000011
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 718, "bottom_right_y": 86, "confidence_scores": null, "content": "شركة الثبات للمواد الإنشائية", "reading_index": 1, "top_left_x": 50, "top_left_y": 50, "type": "text", "table_id": null }, { "bottom_right_x": 718...
sample_0000012
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 808, "bottom_right_y": 197, "confidence_scores": null, "content": "التوصيات والمقترحات التنفيذية", "reading_index": 1, "top_left_x": 40, "top_left_y": 40, "type": "title", "table_id": null }, { "bottom_right_x": ...
sample_0000013
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 60, "bottom_right_y": 60, "confidence_scores": null, "content": "![image](img-0)", "reading_index": 1, "top_left_x": 14, "top_left_y": 14, "type": "image", "table_id": null }, { "bottom_right_x": 283, "bott...
sample_0000014
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 334, "bottom_right_y": 24, "confidence_scores": null, "content": "مؤسسة الأمانة للخدمات المالية", "reading_index": 1, "top_left_x": 10, "top_left_y": 10, "type": "text", "table_id": null }, { "bottom_right_x": 33...
sample_0000015
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
{ "blocks": [ { "bottom_right_x": 766, "bottom_right_y": 70, "confidence_scores": null, "content": "فلسفة العلوم ونظرية المعرفة", "reading_index": 1, "top_left_x": 30, "top_left_y": 30, "type": "text", "table_id": null }, { "bottom_right_x": 746,...
sample_0000016
hf://datasets/OCR-Data-new/ocr_data@7394494eb876df9d253feb141e72f282d907ee47/data/Nihvll_001.tar
End of preview.

ocr_data

Synthetic Arabic document images with layout annotations, for OCR training.

Layout

WebDataset .tar shards. Files sharing a basename are one sample, so the image becomes the image column and the annotation the json column.

data/<contributor>_<NNN>.tar            originals (PNG + JSON)
data_aug/<contributor>_<NNN>_aug<K>.tar augmented variants (JPEG/PNG + JSON)

Each shard holds up to 9990 samples (~1.2 GB). data/ and data_aug/ are separate so you can train on clean originals alone.

Loading

from datasets import load_dataset

# one shard
ds = load_dataset("webdataset",
                  data_files="hf://datasets/OCR-Data-new/ocr_data/data/<contributor>_001.tar",
                  split="train", streaming=True)

# a range of shards
ds = load_dataset("webdataset",
                  data_files="hf://datasets/OCR-Data-new/ocr_data/data/<contributor>_{001..010}.tar",
                  split="train", streaming=True)

# everything, originals + augmented
ds = load_dataset("webdataset", data_files={"train": [
        "hf://datasets/OCR-Data-new/ocr_data/data/*.tar",
        "hf://datasets/OCR-Data-new/ocr_data/data_aug/*.tar"]},
      split="train", streaming=True)

To get loose files back, use unpack_shard.py from the generator repo.

Annotation schema

{
  "dimensions": {"width": 0, "height": 0},
  "blocks":  [{"type": "...", "text": "...", "top_left_x": 0, "top_left_y": 0,
                "bottom_right_x": 0, "bottom_right_y": 0, "reading_index": 0}],
  "images":  [{"top_left_x": 0, "...": 0}],
  "meta":    {"template": "...", "hybrid": null, "page_font": "...",
               "language": "ar", "script": "arabic", "direction": "rtl",
               "augmentation": null}
}

meta.augmentation is null for originals and {"name": ..., "params": {...}} for augmented variants.

Downloads last month
34