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:    ArrowNotImplementedError
Message:      Cannot write struct type 'realized_nested_style_counts' with no child field to Parquet. Consider adding a dummy child field.
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1539, in _prepare_split_single
                  for key, record in generator:
                                     ^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
                  for item in generator(*args, **kwargs):
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 131, 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 1419, 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 976, 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 794, 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'
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1570, in _prepare_split_single
                  num_examples, num_bytes = writer.finalize()
                                            ~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 835, in finalize
                  self._build_writer(self.schema)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 861, in _build_writer
                  self.pa_writer = pq.ParquetWriter(
                                   ~~~~~~~~~~~~~~~~^
                      self.stream,
                      ^^^^^^^^^^^^
                  ...<3 lines>...
                      **get_parquet_column_options(self._features, self._schema),
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/pyarrow/parquet/core.py", line 1125, in __init__
                  self.writer = _parquet.ParquetWriter(
                                ~~~~~~~~~~~~~~~~~~~~~~^
                      sink, schema,
                      ^^^^^^^^^^^^^
                  ...<22 lines>...
                      use_content_defined_chunking=use_content_defined_chunking,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      **options)
                      ^^^^^^^^^^
                File "pyarrow/_parquet.pyx", line 2459, in pyarrow._parquet.ParquetWriter.__cinit__
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
                  raise convert_status(status)
              pyarrow.lib.ArrowNotImplementedError: Cannot write struct type 'realized_nested_style_counts' with no child field to Parquet. Consider adding a dummy child field.
              
              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 1379, 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 956, 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 1401, 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 1579, 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.

jpg
image
json
dict
__key__
string
__url__
string
{"block_boxes":[[1316,767,1641,875],[1304,958,1641,1626],[871,958,1238,1217],[881,1556,1238,2059],[4(...TRUNCATED)
img_0
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[583,134,2460,642],[1942,678,2460,930],[1413,676,1876,930],[152,702,1292,897],[1759,(...TRUNCATED)
img_2
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[794,43,1444,1408],[855,1409,1444,1734],[839,1735,1444,1828],[74,44,728,1474],[72,14(...TRUNCATED)
img_3
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[320,148,954,204],[165,234,1158,301],[325,301,1158,361],[162,360,1158,421],[183,421,(...TRUNCATED)
img_4
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[909,92,1945,131],[711,88,823,129],[273,96,546,130],[1719,150,2210,182],[850,146,164(...TRUNCATED)
img_6
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[962,94,1106,223],[304,224,1106,381],[306,382,1106,499],[261,500,1106,853],[583,1592(...TRUNCATED)
img_7
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[132,179,1284,254],[238,255,1284,310],[190,311,1284,372],[144,372,1284,438],[208,438(...TRUNCATED)
img_8
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[41,250,989,269],[162,587,1398,619],[437,928,1519,964],[41,1281,1358,1299],[238,1627(...TRUNCATED)
img_9
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[238,83,646,175],[796,233,950,290],[561,308,756,383],[899,344,1073,397],[79,451,300,(...TRUNCATED)
img_11
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
{"block_boxes":[[1601,129,2012,160],[897,129,1358,163],[1902,210,2344,254],[1054,209,1629,261],[93,1(...TRUNCATED)
img_12
"hf://datasets/nvidia/OCR-Synthetic-Multilingual-v2@9d842c74647e2c56b3c2481d210907fefca7c938/data/Ar(...TRUNCATED)
End of preview.

OCR Synthetic Multilingual v2

Synthetic document pages for multilingual OCR and structured document parsing, covering 28 scripts and varied fonts, page layouts, and text directions. Annotations include text, semantic content classes, and bounding boxes.

7,907,809 image/annotation pairs · 12,686 WebDataset tar shards · training split

This dataset was used to train Nemotron 3.5 Parse. It supports training and adapting models for structured document understanding.

It combines the multilingual document collections used in Parse training under one annotation interface.

How it was created

Pages were rendered from sampled corpus text with varied fonts, layouts and text directions, while recording text and geometry. See GENERATION.md for the process.

Languages covered

The inventory lists 149 language/script entries across 28 scripts. View every covered language and script, or use the machine-readable LANGUAGES.json.

Format

Each record pairs an image with JSON annotations containing block_boxes, block_classes, and block_text. Boxes use pixel coordinates, and the arrays align by block. See FORMAT.md and an example annotation for the target representation.

Use the data

Install huggingface_hub, fsspec, and pillow. The dataset is public; authentication is not required to read it.

import io
import json
import runpy
from PIL import Image
from huggingface_hub import HfFileSystem, hf_hub_download

repo = "nvidia/OCR-Synthetic-Multilingual-v2"
manifest = hf_hub_download(repo, "SHARDS.jsonl", repo_type="dataset")
with open(manifest) as f:
    shard = json.loads(next(f))["path"]

reader = hf_hub_download(repo, "reader.py", repo_type="dataset")
iter_records = runpy.run_path(reader)["iter_records"]

# Stream one shard; no need to download the entire dataset.
fs = HfFileSystem()
with fs.open(f"datasets/{repo}/{shard}", "rb", block_size=1024 * 1024) as stream:
    records = iter_records(stream)
    try:
        key, parts = next(records)
    finally:
        records.close()

annotation = parts["json"]
image_bytes = next(parts[ext] for ext in ("png", "jpg", "jpeg") if ext in parts)
image = Image.open(io.BytesIO(image_bytes))
print(key, image.size, annotation["block_classes"])

Use the remaining entries in SHARDS.jsonl to iterate over more shards or partition work across workers. The manifest also provides record counts, byte sizes, and SHA-256 checksums. The bundled reader accepts a local tar path as well as an open binary stream.

For model adaptation, see the Parse SFT/RLVR fine-tuning recipe.

Terms

Upstream text and asset terms still apply.

Downloads last month
12

Article mentioning nvidia/OCR-Synthetic-Multilingual-v2