The dataset viewer is not available for this split.
Error code: FeaturesError Exception: ArrowInvalid Message: JSON parse error: Column(/answer/[]/[]) changed from string to number in row 4 Traceback: Traceback (most recent call last): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 145, in _generate_tables dataset = json.load(f) File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 1026) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 240, in compute_first_rows_from_streaming_response iterable_dataset = iterable_dataset._resolve_features() File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2216, in _resolve_features features = _infer_features_from_batch(self.with_format(None)._head()) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1239, in _head return _examples_to_batch(list(self.take(n))) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1389, in __iter__ for key, example in ex_iterable: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1044, in __iter__ yield from islice(self.ex_iterable, self.n) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 282, in __iter__ for key, pa_table in self.generate_tables_fn(**self.kwargs): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables raise e File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables pa_table = paj.read_json( File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Column(/answer/[]/[]) changed from string to number in row 4
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.
WikiDT: Wikipedia Table Document dataset for table extraction and visual question answering
Dataset Summary
The WikiDT contains multi-level annotations and labels for the question-answering task based on images. Meanwhile, as the questions are answered from some table on the image, and WikiDT provides the table annotation to facilitate the diagnosis of the models and decompose the problem, WikiDT can be also directly used as a table recognition dataset.
The dataset contains 16,887 Wikipedia screenshot, which are segmented to 54,032 subpages since the full screenshots are potentially long. In total, there's 159,905 tables in the dataset. The number of question-answer samples is 70,652. Each QA sample contains triplets of <question, answer, full-page screenshot filename>, and is additionally annotated with retrieval labels (which subpage, and which table). 53,698 QA samples also have SQL annotation.
For each subpage, OCR and table extraction annotations from two sources are available. While rendering the screenshots, the ground truth table annotation is recorded. Meanwhile, to make the dataset realistic, we also requested OCR and table extraction from Amazon Textract for each subpage (results obtained during Feb.28, 2023 - Mar.6, 2023).
Languages
English
Dataset Structure
Once downloaded, the WikiDT has the following parts. The downloaded files are around 77GB. Please ensure you have at least 160GB since we will be extract individual files from the tars.
.
βββ WikiTableExtraction
β βββ detection.partaa
β βββ detection.partab
β βββ detection.partac
β βββ detection.partad
β βββ detection.partae
β βββ detection.partaf
β βββ detection.partag
β βββ structure.partaa
β βββ structure.partab
β βββ structure.partac
β βββ structure.partad
β βββ structure.partae
βββ images.partaa
βββ images.partab
βββ images.partac
βββ images.partad
βββ images.partae
βββ images.partaf
βββ images.partag
βββ images.partah
βββ images.partai
βββ ocr.tar
βββ samples
β βββ test.json
β βββ train.json
β βββ val.json
βββ tsv.tar
Please concat the part files and extract them into respective folder. For example, run
cd WikiTableExtraction/
cat detection.parta* | tar x
to extract the detection
folder.
Once you extracted all the tar files, the WikiDT dataset has the following file structure.
+--WikiDT-dataset
| +--WikiTableExtraction
| | +--detection
| | | +--images # sub page images
| | | +--train # xml table bbox annotation
| | | +--test # xml table bbox annotation
| | | +--val # xml table bbox annotation
| | | images_filelist.txt # index of 54,032 images
| | | test_filelist.txt # index of 5,410 test samples
| | | train_filelist.txt # index of 43,248 train samples
| | | val_filelist.txt # index of 5,347 val samples
| | +--structure
| | | +--images # images cropped to table region
| | | +--train # xml table bbox annotation
| | | +--test # xml table bbox annotation
| | | +--val # xml table bbox annotation
| | | images_filelist.txt # index of 159,898 images
| | | test_filelist.txt # index of 15,989 test samples
| | | train_filelist.txt # index of 129,980 train samples
| | | val_filelist.txt # index of 15,991 val samples
| +--samples # in total 70,652 TableVQA samples from the three json files
| | +--train.json #
| | +--test.json #
| | +--val.json #
| +--images # full page image
| +--ocr # text and bbox for the table content
| | +--textract # detected by Amazon Textract API
| | +--web # extracted from HTML information
| +--tsv # extracted table in tsv format
| | +--textract # detected by Amazon Textract API
| | +--web # extracted from HTML information
Table VQA annotation example
Here is an example of an xml table bbox annotation from WikiDT-dataset/samples/[train|test|val].json/
.
{'all_ocr_files_textract': ['ocr/textract/16301437_page_seg_0.json',
'ocr/textract/16301437_page_seg_1.json'],
'all_ocr_files_web': ['ocr/web/16301437_page_seg_0.json',
'ocr/web/16301437_page_seg_1.json'],
'all_table_files_textract': ['tsv/textract/16301437_page_0.tsv',
'tsv/textract/16301437_page_1.tsv'],
'all_table_files_web': ['tsv/web/16301437_1.tsv', 'tsv/web/16301437_0.tsv'],
'answer': [['don johnson buckeye st. classic']],
'image': '16301437_page.png',
'ocr_retrieval_file_textract': 'ocr/textract/16301437_page_seg_0.json',
'ocr_retrieval_file_web': 'ocr/web/16301437_page_seg_0.json',
'question': 'Name the Event which has a Score of 209-197?',
'sample_id': '14190',
'sql_str': "SELECT `event` FROM cur_table WHERE `score` = '209-197' ",
'sub_page': ['16301437_page_seg_0.png', '16301437_page_seg_1.png'],
'sub_page_retrieved': '16301437_page_seg_0.png',
'subset': 'TFC',
'table_id': '2-16301437-1',
'table_retrieval_file_textract': 'tsv/textract/16301437_page_0.tsv',
'table_retrieval_file_web': 'tsv/web/16301437_1.tsv'}
Table Detection annotation example
Here is an example of an xml table bbox annotation from WikiDT-dataset/WikiTableExtraction/structure/[train|test|val]/
.
<annotation>
<folder />
<filename>204_147_page_crop_5.png</filename>
<source>WikiDT Dataset</source>
<size>
<width>788</width>
<height>540.0</height>
<depth>3</depth>
</size>
<object>
<name>table</name>
<rowspan />
<colspan />
<bndbox>
<xmin>10</xmin>
<ymin>10</ymin>
<xmax>778</xmax>
<ymax>530</ymax>
</bndbox>
</object>
<object>
<name>header row</name>
<rowspan />
<colspan />
<bndbox>
<xmin>10</xmin>
<ymin>10</ymin>
<xmax>778</xmax>
<ymax>33</ymax>
</bndbox>
</object>
<object>
<name>header cell</name>
<rowspan />
<colspan>10</colspan>
<bndbox>
<xmin>12</xmin>
<ymin>35</ymin>
<xmax>776</xmax>
<ymax>58</ymax>
</bndbox>
</object>
<object>
<name>table row</name>
<rowspan />
<colspan />
<bndbox>
<xmin>10</xmin>
<ymin>60</ymin>
<xmax>778</xmax>
<ymax>530</ymax>
</bndbox>
</object>
</annotation>
Licensing Information
CC BY SA 3.0
Contributors
Hui Shi (Work done during her internship at Amazon)
Yusheng Xie (corresponding person)
- Downloads last month
- 119