Datasets:
File size: 5,948 Bytes
71807c8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | ---
license: cc-by-nc-4.0
task_categories:
- visual-question-answering
- document-question-answering
- object-detection
language:
- en
tags:
- document-understanding
- ocr
- grounding
- bounding-boxes
- vlm
- key-information-extraction
pretty_name: BoundingDocs-Hard-10K
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
dataset_info:
features:
- name: source
dtype: large_string
- name: doc_id
dtype: large_string
- name: doc_images
large_list:
- name: bytes
dtype: large_binary
- name: path
dtype: large_string
- name: doc_ocr
large_list: large_string
- name: Q&A
dtype: large_string
splits:
- name: train
num_bytes: 41457743305
num_examples: 7774
- name: validation
num_bytes: 4489806906
num_examples: 910
- name: test
num_bytes: 7850313261
num_examples: 1316
download_size: 41993423137
dataset_size: 53797863472
---
# BoundingDocs-Hard-10K
**`OpenTensorLab/BoundingDocs-Hard-10K`** is a curated, visually challenging subset of [`letxbe/BoundingDocs`](https://huggingface.co/datasets/letxbe/BoundingDocs) filtered specifically for **real-world noisy scans, archival documents, dense bureaucratic forms, and handwritten entries**, while excluding clean synthetic templates (such as `FATURA`).
It preserves the exact original Parquet schema (`source`, `doc_id`, `doc_images`, `doc_ocr`, and `Q&A`) across dedicated `train`, `validation`, and `test` splits (**10,000 documents total**)—making it ideal for fine-tuning and benchmarking Vision-Language Models (VLMs) on **spatially grounded document QA and word-level key information extraction (KIE)**.
---
## Dataset Composition & Split Distribution
Documents were sampled independently from the upstream `train`, `validation`, and `test` Parquet shards with zero cross-split document leakage:
| Subset (`source`) | Visual Characteristics | Train Docs | Validation Docs | Test Docs | Total Docs |
| :--- | :--- | :---: | :---: | :---: | :---: |
| **`deepform`** | Low-DPI scanned/faxed political ad contracts, invoices & stamps | 3,401 | 400 | 600 | 4,401 |
| **`mp-docvqa`** | Multi-page archival industry scans, memos, tables & handwriting | 2,700 | 300 | 500 | 3,500 |
| **`vrdu`** (`vrdu-ad-buy-form`, `vrdu-registration-form`) | Dense registration filings, nested tables & checkboxes | 1,324 | 165 | 167 | 1,656 |
| **`sp-docvqa`** | Faded carbon copies, typewritten memos & handwritten notes | 200 | 26 | 28 | 254 |
| **`funsd`** | Noisy faxed/photocopied forms with handwritten entries (100% of upstream splits) | 149 | 19 | 21 | 189 |
| **Total Documents** | — | **7,774** | **910** | **1,316** | **10,000** |
*(Note: `vrdu` combines `vrdu-ad-buy-form` [512 train / 64 val / 65 test] and `vrdu-registration-form` [812 train / 101 val / 102 test]. Each document row contains multiple grounded QA pairs, expanding to ~35,000–45,000 grounded training QA pairs.)*
---
## Schema & Coordinate Conventions
Each row represents a multi-page or single-page document with the following fields:
- **`source`** (`string`): Original benchmark subset identifier (`FUNSD`, `SP-DocVQA`, `MP-DocVQA`, `deepform`, `vrdu-ad-buy-form`, `vrdu-registration-form`).
- **`doc_id`** (`string`): Unique document identifier from `letxbe/BoundingDocs`.
- **`doc_images`** (`list[Image]`): List of page images for the document.
- **`doc_ocr`** (`list[string]`): List of JSON-serialized Amazon Textract OCR outputs (one per page), containing word-level `Blocks` with normalized `[0.0, 1.0]` `[Left, Top, Width, Height]` bounding boxes.
- **`Q&A`** (`string`): JSON-serialized dictionary mapping question IDs to question text, rephrased question text, extracted answer strings, 1-indexed `page` numbers, and word/answer bounding boxes in **`[width, height, x, y]`** format on a **`[0, 1000]` top-left origin** scale.
### Converting Bounding Boxes to `[x1, y1, x2, y2]` (`0–1000` Scale)
For VLM architectures expecting `[x1, y1, x2, y2]` normalized coordinates (such as Qwen-VL / Qwen3.5):
```python
def boundingdocs_to_xyxy(box):
"""Converts [width, height, x, y] (0-1000, top-left) to [x1, y1, x2, y2] (0-1000)."""
w, h, x, y = box
return [
max(0, min(1000, int(round(x)))),
max(0, min(1000, int(round(y)))),
max(0, min(1000, int(round(x + w)))),
max(0, min(1000, int(round(y + h)))),
]
```
---
## Quickstart Usage
```python
import json
from datasets import load_dataset
ds = load_dataset("OpenTensorLab/BoundingDocs-Hard-10K")
sample = ds["train"][0]
print("Source:", sample["source"])
print("Pages :", len(sample["doc_images"]))
qa_dict = json.loads(sample["Q&A"])
first_q = next(iter(qa_dict.values()))
print("Question:", first_q.get("rephrased_question") or first_q["question"])
print("Answers :", first_q["answers"])
```
---
## Citation & Attribution
This dataset is a filtered derivative of **BoundingDocs**. Please cite the original authors when using this dataset:
```bibtex
@article{giovannini2025boundingdocs,
title={BoundingDocs: a Unified Dataset for Document Question Answering with Spatial Annotations},
author={Giovannini, Simone and Coppi, Fabio and Gemelli, Andrea and Marinai, Simone},
journal={International Journal on Document Analysis and Recognition (IJDAR)},
year={2025},
doi={10.1007/s10032-025-00563-5},
eprint={2501.03403},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
```
*(Note: While `letxbe/BoundingDocs` is released under CC-BY-4.0, upstream subsets such as `FUNSD` and `DocVQA` carry non-commercial research restrictions, so `cc-by-nc-4.0` is specified here to respect original source terms.)*
|