mmiakashs commited on
Commit
b5176dd
·
verified ·
1 Parent(s): a8fc1c6

Update docs to reference HF hosting instead of private S3 bucket

Browse files
Files changed (1) hide show
  1. README.md +329 -0
README.md CHANGED
@@ -1,3 +1,332 @@
1
  ---
 
 
2
  license: cc-by-nc-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: cc-by-nc-4.0
5
+ task_categories:
6
+ - document-question-answering
7
+ - image-to-text
8
+ task_ids:
9
+ - document-understanding
10
+ - information-extraction
11
+ pretty_name: FCC Invoices Verified Augmented
12
+ size_categories:
13
+ - 1K<n<10K
14
+ annotations_creators:
15
+ - expert-generated
16
+ source_datasets:
17
+ - https://indicodatasolutions.github.io/RealKIE/
18
+ tags:
19
+ - document-understanding
20
+ - invoice
21
+ - ocr
22
+ - noise-augmentation
23
+ - confidence-calibration
24
+ - information-extraction
25
+ - kie
26
+ dataset_info:
27
+ features:
28
+ - name: doc_id
29
+ dtype: string
30
+ - name: pipeline_name
31
+ dtype: string
32
+ - name: original_pdf
33
+ dtype: string
34
+ - name: noisy_pdf
35
+ dtype: string
36
+ - name: ground_truth
37
+ dtype:
38
+ struct:
39
+ - name: document_class
40
+ dtype:
41
+ struct:
42
+ - name: type
43
+ dtype: string
44
+ - name: inference_result
45
+ dtype:
46
+ struct:
47
+ - name: Agency
48
+ dtype: string
49
+ - name: Advertiser
50
+ dtype: string
51
+ - name: GrossTotal
52
+ dtype: float64
53
+ - name: PaymentTerms
54
+ dtype: string
55
+ - name: AgencyCommission
56
+ dtype: float64
57
+ - name: NetAmountDue
58
+ dtype: float64
59
+ - name: LineItems
60
+ sequence:
61
+ struct:
62
+ - name: LineItemDescription
63
+ dtype: string
64
+ - name: LineItemStartDate
65
+ dtype: string
66
+ - name: LineItemEndDate
67
+ dtype: string
68
+ - name: LineItemDays
69
+ dtype: string
70
+ - name: LineItemRate
71
+ dtype: float64
72
+ splits:
73
+ - name: test
74
+ num_examples: 1346
75
  ---
76
+
77
+ # FCC Invoices Verified Augmented
78
+
79
+ ## Dataset Description
80
+
81
+ **FCC Invoices Verified Augmented** is a document understanding benchmark dataset consisting of 75 real-world Federal Communications Commission (FCC) invoice documents, each augmented with up to 18 distinct document degradation pipelines. The dataset is designed to support confidence calibration research, OCR robustness evaluation, and key information extraction (KIE) under realistic noise conditions.
82
+
83
+ Each document has:
84
+ - A clean original PDF
85
+ - Up to 18 noisy versions generated by distinct Augraphy-based degradation pipelines
86
+ - Verified ground-truth entity annotations
87
+
88
+ **Total samples**: 1,346 (75 documents × up to 18 noise pipelines)
89
+
90
+ ## Quick Start
91
+
92
+ ```python
93
+ from huggingface_hub import snapshot_download
94
+
95
+ # Download the full dataset locally
96
+ local_dir = snapshot_download(repo_id="amazon/ConfBench", repo_type="dataset")
97
+ ```
98
+
99
+ Or clone with git:
100
+
101
+ ```bash
102
+ git clone https://huggingface.co/datasets/amazon/ConfBench
103
+ ```
104
+
105
+ Or use the provided loader (see `load_dataset.py` in this release):
106
+
107
+ ```python
108
+ from load_dataset import FCCInvoicesDataset
109
+
110
+ ds = FCCInvoicesDataset(local_dir="/path/to/ConfBench")
111
+
112
+ for sample in ds:
113
+ print(sample["doc_id"], sample["pipeline_name"])
114
+ print(sample["ground_truth"]["inference_result"]["Agency"])
115
+ ```
116
+
117
+ ### Dataset Summary
118
+
119
+ | Property | Value |
120
+ |---|---|
121
+ | Domain | Legal / Broadcast Advertising |
122
+ | Document Type | FCC Invoice (multi-page PDF) |
123
+ | # Base Documents | 75 |
124
+ | # Noise Pipelines | up to 18 per document |
125
+ | # Total Samples | 1,346 |
126
+ | Avg Pages per Doc | ~2 |
127
+ | License | CC BY-NC 4.0 |
128
+
129
+ ---
130
+
131
+ ## Dataset Structure
132
+
133
+ ### Repository Layout
134
+
135
+ ```
136
+ amazon/ConfBench/
137
+ └── {doc_id}/
138
+ ├── original.pdf # Original clean PDF
139
+ ├── gt.json # Ground truth annotations
140
+ ├── metadata.json # Pipeline manifest
141
+ ├── default/
142
+ │ └── default_noisy.pdf
143
+ ├── archetype3/
144
+ │ └── archetype3_noisy.pdf
145
+ └── ... (16 more pipelines)
146
+ ```
147
+
148
+ ### Ground Truth Schema (`gt.json`)
149
+
150
+ ```json
151
+ {
152
+ "document_class": {
153
+ "type": "Invoice"
154
+ },
155
+ "split_document": {
156
+ "page_indices": [0, 1]
157
+ },
158
+ "inference_result": {
159
+ "Agency": "American Media & Advocacy Group",
160
+ "Advertiser": "National Rifle Association",
161
+ "GrossTotal": 15185.0,
162
+ "PaymentTerms": "30 Days",
163
+ "AgencyCommission": 2277.75,
164
+ "NetAmountDue": 12907.25,
165
+ "LineItems": [
166
+ {
167
+ "LineItemDescription": "M-F 1135p-1205a",
168
+ "LineItemStartDate": "10/09/12",
169
+ "LineItemEndDate": "10/09/12",
170
+ "LineItemDays": "-T-----",
171
+ "LineItemRate": 600.0
172
+ }
173
+ ]
174
+ }
175
+ }
176
+ ```
177
+
178
+ ### Metadata Schema (`metadata.json`)
179
+
180
+ ```json
181
+ {
182
+ "doc_hash": "033f718b16cb597c065930410752c294",
183
+ "original_pdf": "original.pdf",
184
+ "ground_truth": "gt.json",
185
+ "pipelines": [
186
+ {"pipeline_name": "default", "noisy_pdf": "default/default_noisy.pdf"},
187
+ {"pipeline_name": "archetype3", "noisy_pdf": "archetype3/archetype3_noisy.pdf"}
188
+ ]
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Noise Pipelines
195
+
196
+ 18 distinct Augraphy-based degradation pipelines covering a wide range of real-world scan/print artifacts:
197
+
198
+ ### Augraphy Archetypes (pre-built pipelines)
199
+
200
+ | Pipeline | Description |
201
+ |---|---|
202
+ | `default` | Balanced general-purpose degradation |
203
+ | `archetype3` | Heavy post-processing effects |
204
+ | `archetype4` | Minimal geometric distortions |
205
+ | `archetype7` | Color and lighting variations |
206
+ | `archetype9` | Texture-based degradations |
207
+ | `archetype10` | Scanner artifact simulation |
208
+ | `archetype11` | Complex multi-phase pipeline |
209
+
210
+ ### Custom Pipelines (research-designed)
211
+
212
+ | Pipeline | Key Augmentations | Simulates |
213
+ |---|---|---|
214
+ | `custom12` | DirtyDrum + DirtyRollers | Scanner roller artifacts |
215
+ | `custom13` | Stains + Folding | Physical document damage |
216
+ | `custom14` | BleedThrough + InkMottling | Ink bleed and mottling |
217
+ | `custom15` | Moire + ColorPaper | Scanning/aging effects |
218
+ | `custom16` | ShadowCast + LightingGradient | Uneven lighting |
219
+ | `custom17` | Jpeg + SubtleNoise | Compression artifacts |
220
+ | `custom18` | Geometric + PageBorder | Alignment issues |
221
+ | `custom19` | BindingsAndFasteners + Letterpress | Binding shadows |
222
+ | `custom20` | Brightness + BadPhotoCopy | Photocopy quality |
223
+ | `custom21` | WaterMark + NoisyLines | Overlaid artifacts |
224
+ | `custom22` | Dithering + DotMatrix | Dot-matrix printing |
225
+
226
+ ---
227
+
228
+ ## Entity Fields
229
+
230
+ | Field | Type | Description |
231
+ |---|---|---|
232
+ | `Agency` | string | Advertising agency name |
233
+ | `Advertiser` | string | Client/advertiser name |
234
+ | `GrossTotal` | float | Total invoice amount (USD) |
235
+ | `PaymentTerms` | string | Payment terms (e.g., "30 Days") |
236
+ | `AgencyCommission` | float | Agency commission amount (USD) |
237
+ | `NetAmountDue` | float | Net amount after commission (USD) |
238
+ | `LineItems` | list | Individual line items |
239
+ | `LineItemDescription` | string | Program/slot description |
240
+ | `LineItemStartDate` | string | Airing start date (MM/DD/YY) |
241
+ | `LineItemEndDate` | string | Airing end date (MM/DD/YY) |
242
+ | `LineItemDays` | string | Days of week pattern (e.g., "-T-----") |
243
+ | `LineItemRate` | float | Cost per line item (USD) |
244
+
245
+ ---
246
+
247
+ ## Usage
248
+
249
+ ### Loading with huggingface_hub
250
+
251
+ ```python
252
+ from huggingface_hub import snapshot_download
253
+ import json
254
+ from pathlib import Path
255
+
256
+ local_dir = Path(snapshot_download(repo_id="amazon/ConfBench", repo_type="dataset"))
257
+
258
+ doc_ids = [p.name for p in local_dir.iterdir() if p.is_dir()]
259
+
260
+ # Load ground truth for a single document
261
+ def load_gt(doc_id):
262
+ return json.loads((local_dir / doc_id / "gt.json").read_text())
263
+
264
+ # List noisy PDFs for a document
265
+ def list_pipelines(doc_id):
266
+ meta = json.loads((local_dir / doc_id / "metadata.json").read_text())
267
+ return meta["pipelines"]
268
+ ```
269
+
270
+ ### Using the Provided Loading Script
271
+
272
+ ```python
273
+ # See load_dataset.py in this release
274
+ from load_dataset import FCCInvoicesDataset
275
+
276
+ ds = FCCInvoicesDataset(local_dir="/path/to/ConfBench")
277
+
278
+ # Iterate over all (doc, pipeline) pairs
279
+ for sample in ds:
280
+ print(sample["doc_id"], sample["pipeline_name"])
281
+ print(sample["ground_truth"]["inference_result"]["Agency"])
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Intended Use
287
+
288
+ This dataset is intended for:
289
+
290
+ 1. **Confidence calibration research** — Measuring model confidence under varying degrees of document degradation.
291
+ 2. **OCR robustness evaluation** — Benchmarking OCR and KIE systems on realistic noisy documents.
292
+ 3. **Document understanding** — Evaluating models on structured information extraction from invoices (evaluation/benchmark use only; no training split is provided).
293
+ 4. **Noise impact analysis** — Studying how specific noise types affect extraction accuracy per field.
294
+
295
+ ---
296
+
297
+ ## Source Data
298
+
299
+ The original clean FCC invoices are derived from the [RealKIE benchmark](https://indicodatasolutions.github.io/RealKIE/) (FCC Invoices subset). Ground truth annotations were verified and the documents augmented using the [Augraphy](https://github.com/sparkfish/augraphy) library with OCR-safe parameter settings.
300
+
301
+ ---
302
+
303
+ ## How to Cite This Dataset
304
+
305
+ If you use this dataset, please cite:
306
+
307
+ ```bibtex
308
+ @misc{islam2026confidencecalibration,
309
+ title = {FCC Invoices Verified Augmented: A Benchmark for Confidence Calibration in Document Understanding under Noise},
310
+ author = {Md Mofijul Islam and Mohammad Rostami and others},
311
+ year = {2026},
312
+ note = {Dataset available at Hugging Face},
313
+ url = {https://huggingface.co/datasets/amazon/ConfBench}
314
+ }
315
+ ```
316
+
317
+ Also cite the original RealKIE dataset:
318
+
319
+ ```bibtex
320
+ @inproceedings{realkie2023,
321
+ title = {RealKIE: Five Novel Datasets for Key Information Extraction},
322
+ author = {Indico Data Solutions},
323
+ year = {2023},
324
+ url = {https://indicodatasolutions.github.io/RealKIE/}
325
+ }
326
+ ```
327
+
328
+ ---
329
+
330
+ ## License
331
+
332
+ This dataset is released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). The original FCC invoice documents are public records.