Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
dataset: string
dataset_version: string
document_id: string
split: string
source_index_in_split: int64
source: string
source_revision: string
license: string
citation: string
role: string
selection_reason: string
selection: struct<rule: string, rank: int64, n_eligible: int64, n_words: int64>
  child 0, rule: string
  child 1, rank: int64
  child 2, n_eligible: int64
  child 3, n_words: int64
model: string
model_revision_at_generation: string
ocr: string
image_note: string
expected_prediction_generator: string
sha256: struct<image.png: string, ocr.json: string, expected_prediction.json: string>
  child 0, image.png: string
  child 1, ocr.json: string
  child 2, expected_prediction.json: string
model_revision_note: string
attribution: struct<dataset: string, source: string, revision: string, license: string, citation: string, source_ (... 22 chars omitted)
  child 0, dataset: string
  child 1, source: string
  child 2, revision: string
  child 3, license: string
  child 4, citation: string
  child 5, source_index_in_split: int64
doc_id: string
image: string
prediction: struct<model: string, n_words: int64, n_words_scored: int64, n_words_truncated: int64, fields: list< (... 799 chars omitted)
  child 0, model: string
  child 1, n_words: int64
  child 2, n_words_scored: int64
  child 3, n_words_truncated: int64
  child 4, fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, bbox: list<item: int64>, (... 207 chars omitted)
      child 0, item: struct
...
in: int64
      child 2, route: string
  child 7, calibration: struct<alpha: double, m0: int64, temperature: double, pooled_lambda: double, threshold_mode: string, (... 175 chars omitted)
      child 0, alpha: double
      child 1, m0: int64
      child 2, temperature: double
      child 3, pooled_lambda: double
      child 4, threshold_mode: string
      child 5, fallback_fields: list<item: string>
          child 0, item: string
      child 6, guarantee: string
      child 7, status_definitions: struct<covered: string, ambiguous_review: string, conflict_review: string, empty_abstain: string>
          child 0, covered: string
          child 1, ambiguous_review: string
          child 2, conflict_review: string
          child 3, empty_abstain: string
redistribution_cleared: bool
ground_truth: struct<fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, covered_b (... 103 chars omitted)
  child 0, fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, covered_by_calibrated_se (... 10 chars omitted)
      child 0, item: struct<type: string, text: string, word_span: list<item: int64>, covered_by_calibrated_sets: bool>
          child 0, type: string
          child 1, text: string
          child 2, word_span: list<item: int64>
              child 0, item: int64
          child 3, covered_by_calibrated_sets: bool
  child 1, n_gold_fields: int64
  child 2, n_missed: int64
  child 3, document_field_miss_fraction: double
to
{'dataset': Value('string'), 'doc_id': Value('string'), 'split': Value('string'), 'role': Value('string'), 'selection': {'rule': Value('string'), 'rank': Value('int64'), 'n_eligible': Value('int64'), 'n_words': Value('int64')}, 'attribution': {'dataset': Value('string'), 'source': Value('string'), 'revision': Value('string'), 'license': Value('string'), 'citation': Value('string'), 'source_index_in_split': Value('int64')}, 'ocr': Value('string'), 'redistribution_cleared': Value('bool'), 'ground_truth': {'fields': List({'type': Value('string'), 'text': Value('string'), 'word_span': List(Value('int64')), 'covered_by_calibrated_sets': Value('bool')}), 'n_gold_fields': Value('int64'), 'n_missed': Value('int64'), 'document_field_miss_fraction': Value('float64')}, 'image': Value('string'), 'prediction': {'model': Value('string'), 'n_words': Value('int64'), 'n_words_scored': Value('int64'), 'n_words_truncated': Value('int64'), 'fields': List({'type': Value('string'), 'text': Value('string'), 'word_span': List(Value('int64')), 'bbox': List(Value('int64')), 'labels': List(Value('string')), 'set_sizes': List(Value('int64')), 'max_set_size': Value('int64'), 'other_labels_in_set': List(Value('string')), 'max_token_score': Value('float64'), 'threshold': Value('float64'), 'threshold_source': Value('string'), 'status': Value('string')}), 'unassigned_field_candidates': List(Value('null')), 'summary': {'n_fields': Value('int64'), 'status_counts': {'covered': Value('int64'), 'ambiguous_review': Value('int64'), 'conflict_review': Value('int64'), 'empty_abstain': Value('int64')}, 'route': Value('string')}, 'calibration': {'alpha': Value('float64'), 'm0': Value('int64'), 'temperature': Value('float64'), 'pooled_lambda': Value('float64'), 'threshold_mode': Value('string'), 'fallback_fields': List(Value('string')), 'guarantee': Value('string'), 'status_definitions': {'covered': Value('string'), 'ambiguous_review': Value('string'), 'conflict_review': Value('string'), 'empty_abstain': Value('string')}}}}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              dataset: string
              dataset_version: string
              document_id: string
              split: string
              source_index_in_split: int64
              source: string
              source_revision: string
              license: string
              citation: string
              role: string
              selection_reason: string
              selection: struct<rule: string, rank: int64, n_eligible: int64, n_words: int64>
                child 0, rule: string
                child 1, rank: int64
                child 2, n_eligible: int64
                child 3, n_words: int64
              model: string
              model_revision_at_generation: string
              ocr: string
              image_note: string
              expected_prediction_generator: string
              sha256: struct<image.png: string, ocr.json: string, expected_prediction.json: string>
                child 0, image.png: string
                child 1, ocr.json: string
                child 2, expected_prediction.json: string
              model_revision_note: string
              attribution: struct<dataset: string, source: string, revision: string, license: string, citation: string, source_ (... 22 chars omitted)
                child 0, dataset: string
                child 1, source: string
                child 2, revision: string
                child 3, license: string
                child 4, citation: string
                child 5, source_index_in_split: int64
              doc_id: string
              image: string
              prediction: struct<model: string, n_words: int64, n_words_scored: int64, n_words_truncated: int64, fields: list< (... 799 chars omitted)
                child 0, model: string
                child 1, n_words: int64
                child 2, n_words_scored: int64
                child 3, n_words_truncated: int64
                child 4, fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, bbox: list<item: int64>, (... 207 chars omitted)
                    child 0, item: struct
              ...
              in: int64
                    child 2, route: string
                child 7, calibration: struct<alpha: double, m0: int64, temperature: double, pooled_lambda: double, threshold_mode: string, (... 175 chars omitted)
                    child 0, alpha: double
                    child 1, m0: int64
                    child 2, temperature: double
                    child 3, pooled_lambda: double
                    child 4, threshold_mode: string
                    child 5, fallback_fields: list<item: string>
                        child 0, item: string
                    child 6, guarantee: string
                    child 7, status_definitions: struct<covered: string, ambiguous_review: string, conflict_review: string, empty_abstain: string>
                        child 0, covered: string
                        child 1, ambiguous_review: string
                        child 2, conflict_review: string
                        child 3, empty_abstain: string
              redistribution_cleared: bool
              ground_truth: struct<fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, covered_b (... 103 chars omitted)
                child 0, fields: list<item: struct<type: string, text: string, word_span: list<item: int64>, covered_by_calibrated_se (... 10 chars omitted)
                    child 0, item: struct<type: string, text: string, word_span: list<item: int64>, covered_by_calibrated_sets: bool>
                        child 0, type: string
                        child 1, text: string
                        child 2, word_span: list<item: int64>
                            child 0, item: int64
                        child 3, covered_by_calibrated_sets: bool
                child 1, n_gold_fields: int64
                child 2, n_missed: int64
                child 3, document_field_miss_fraction: double
              to
              {'dataset': Value('string'), 'doc_id': Value('string'), 'split': Value('string'), 'role': Value('string'), 'selection': {'rule': Value('string'), 'rank': Value('int64'), 'n_eligible': Value('int64'), 'n_words': Value('int64')}, 'attribution': {'dataset': Value('string'), 'source': Value('string'), 'revision': Value('string'), 'license': Value('string'), 'citation': Value('string'), 'source_index_in_split': Value('int64')}, 'ocr': Value('string'), 'redistribution_cleared': Value('bool'), 'ground_truth': {'fields': List({'type': Value('string'), 'text': Value('string'), 'word_span': List(Value('int64')), 'covered_by_calibrated_sets': Value('bool')}), 'n_gold_fields': Value('int64'), 'n_missed': Value('int64'), 'document_field_miss_fraction': Value('float64')}, 'image': Value('string'), 'prediction': {'model': Value('string'), 'n_words': Value('int64'), 'n_words_scored': Value('int64'), 'n_words_truncated': Value('int64'), 'fields': List({'type': Value('string'), 'text': Value('string'), 'word_span': List(Value('int64')), 'bbox': List(Value('int64')), 'labels': List(Value('string')), 'set_sizes': List(Value('int64')), 'max_set_size': Value('int64'), 'other_labels_in_set': List(Value('string')), 'max_token_score': Value('float64'), 'threshold': Value('float64'), 'threshold_source': Value('string'), 'status': Value('string')}), 'unassigned_field_candidates': List(Value('null')), 'summary': {'n_fields': Value('int64'), 'status_counts': {'covered': Value('int64'), 'ambiguous_review': Value('int64'), 'conflict_review': Value('int64'), 'empty_abstain': Value('int64')}, 'route': Value('string')}, 'calibration': {'alpha': Value('float64'), 'm0': Value('int64'), 'temperature': Value('float64'), 'pooled_lambda': Value('float64'), 'threshold_mode': Value('string'), 'fallback_fields': List(Value('string')), 'guarantee': Value('string'), 'status_definitions': {'covered': Value('string'), 'ambiguous_review': Value('string'), 'conflict_review': Value('string'), 'empty_abstain': Value('string')}}}}
              because column names don't match

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.

CaliDoc demo examples

These are two real CORD v2 test receipts, used by the CaliDoc interactive demo (GitHub, demo/gradio/app.py and notebooks/CaliDoc_WACV2027_Demo.ipynb). Each example comes with the exact model output of the released checkpoint MHamdan/calidoc-layoutlmv3-large-cord.

This is not a benchmark or a training set. It holds two documents chosen by a deterministic rule, so the demo runs without any upload.

folder role why it was selected
cord_test_0042/ representative lower-median word count among the 100 CORD v2 test receipts, sorted by (word count, doc_id)
cord_test_0014/ review routing 90th-percentile word count under the same ordering. Contains the real Coupon 100,000 extraction that the frozen release routes to review (conflict_review)

The selection rule lives in tools/showcase_examples.py and was fixed before any prediction was inspected. Neither document was used for calibration, because CORD calibrates on validation receipts.

Files per example

file content
image.png the CORD v2 test image (RGB PNG; personal information blurred by the CORD authors)
ocr.json {"words": [...], "boxes": [[x0, y0, x1, y1], ...], "box_format": "normalized_1000"}: the dataset-provided OCR words and boxes. CaliDoc runs no OCR engine
expected_prediction.json output of tools/showcase_examples.py with the released model: predicted fields, calibrated set sizes, thresholds, statuses, and the CORD gold fields with their calibrated-set coverage
metadata.json provenance: CORD v2 source and revision, test-split index, license, selection rule, model and model revision, sha256 of the files

Source and license

  • Images and annotations come from CORD v2 (Park et al., CORD: A Consolidated Receipt Dataset for Post-OCR Parsing, Document Intelligence Workshop at NeurIPS 2019). Source: naver-clova-ix/cord-v2 at revision 7f0115a4b758a71d6473b8d085751692da2fef98, test split, indices 42 and 14. The dataset is released by its authors under CC BY 4.0, and the same license applies to the files here.
  • The model outputs come from a checkpoint licensed CC BY-NC-SA 4.0 (inherited from microsoft/layoutlmv3-large). They are distributed here only as reference outputs for the demo.

Load

import json
from huggingface_hub import hf_hub_download

path = lambda f: hf_hub_download("MHamdan/calidoc-demo-examples", f"cord_test_0014/{f}", repo_type="dataset")
ocr = json.load(open(path("ocr.json")))
expected = json.load(open(path("expected_prediction.json")))

Citation

@inproceedings{hamdan2027calidoc,
  author    = {Hamdan, Mohammed and Cheriet, Mohamed},
  title     = {{CaliDoc}: Calibrated Field-Level Risk and Annotation Auditing for Document Information Extraction},
  booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  year      = {2027}
}

@inproceedings{park2019cord,
  author    = {Park, Seunghyun and Shin, Seung and Lee, Bado and Lee, Junyeop and Surh, Jaeheung and Seo, Minjoon and Lee, Hwalsuk},
  title     = {{CORD}: A Consolidated Receipt Dataset for Post-{OCR} Parsing},
  booktitle = {Document Intelligence Workshop at Neural Information Processing Systems},
  year      = {2019}
}
Downloads last month
-