Datasets:
The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider
removing the
loading script
and relying on
automated data support
(you can use
convert_to_parquet
from the datasets
library). If this is not possible, please
open a discussion
for direct help.
GenDocVQA
This dataset provides a broad set of documents with questions related to their contents. These questions are non-extractive, meaning that the model, which solves our task should be generative and compute the answers by itself.
Dataset Details
Uses
Direct Use
In order to load dataset using following code:
ds = datasets.load_dataset('lenagibee/GenDocVQA')
ds is a dict consisting from two splits train
and validation
.
To open the image use following example:
from PIL import Image
im = Image.open(ds['train'][0]['image_path'])
Dataset generator: https://huggingface.co/datasets/lenagibee/GenDocVQA/resolve/main/GenDocVQA.py?download=true
Dataset Structure
All the necessary data is stored in the following archives:
- Images: https://huggingface.co/datasets/lenagibee/GenDocVQA/resolve/main/archives/gendocvqa2024_imgs.tar.gz?download=true
- OCR: https://huggingface.co/datasets/lenagibee/GenDocVQA/resolve/main/archives/gendocvqa2024_ocr.tar.gz?download=true
- Annotations: https://huggingface.co/datasets/lenagibee/GenDocVQA/resolve/main/archives/gendocvqa2024_annotations.tar.gz?download=true
Data parsing is already implemented in the attached dataset generator. Images should be processed by the user himself.
The train split contains 260814 questions and dev (validation) contains 28473.
Features of dataset
The features of the dataset are the following:
features = datasets.Features(
{
"unique_id": datasets.Value("int64"),
"image_path": datasets.Value("string"),
"ocr": datasets.Sequence(
feature={
'text': datasets.Value("string"),
'bbox': datasets.Sequence(datasets.Value("int64")),
'block_id': datasets.Value("int64"),
'text_id': datasets.Value("int64"),
'par_id': datasets.Value("int64"),
'line_id': datasets.Value("int64"),
'word_id': datasets.Value("int64")
}
),
"question": datasets.Value("string"),
"answer": datasets.Sequence(datasets.Value("string")),
}
Features description
unique_id
- integer, an id of a questionimage_path
- string, path to the image for a question (includes downloaded path)ocr
- dictionary, containing lists, where each element is an information related to a single wordtext
- string, a word itselfbbox
- list of 4 integers, a bounding box of the wordblock_id
- integer, an index of the block, where the word is locatedtext_id
- integer, an index of the set of paragraphs, where the word is locatedpar_id
- integer, an index of the paragraph, where the word is locatedline_id
- integer, an index of the line, where the word is locatedword_id
- integer, an index of the word
question
- string, containing the questionanswer
- list of strings, containing the answers to the question, can be empty (non-answerable)
Images
Are divided inside the archive into dev and train folders. Just regular images in PNG, JPG formats. You can use any image library to process them.
OCR
Same as the Images are divided into dev and train folders. Represented as JSON files.
OCR JSON Description
It is a list of elements, where each represents an information about the single word extracted by the ABBYY FineReader OCR, and contains fields in following order:
block_id
- integer, an index of the block, where the word is locatedtext_id
- integer, an index of the set of paragraphs, where the word is locatedpar_id
- integer, an index of the paragraph, where the word is locatedline_id
- integer, an index of the line, where the word is locatedword_id
- integer, an index of the wordbbox
- list of 4 integers, a bounding box of the wordtext
- string, a word itself
Annotations
dev (validation) and train splits are located in the archive. Question lists are represtened by csv files with following columns:
unique_id
- an id of the questionsplit
question
answer
image_filename
- a filename of the related imageocr_filename
- a filename of the json file, containing the related OCR data
Dataset Creation
Source Data
The data for this dataset was collected from the following datasets:
- SlideVQA - Ryota Tanaka, Kyosuke Nishida, Kosuke Nishida, Taku Hasegawa, Itsumi Saito, and Kuniko Saito. "A Dataset for Document Visual Question Answering on Multiple Images". In Proc. of AAAI. 2023.
- PDFVQA - Yihao Ding and Siwen Luo and Hyunsuk Chung and Soyeon Caren Han, PDFVQA: A New Dataset for Real-World VQA on PDF Documents, 2023
- InfographicsVQA - InfographicVQA, Minesh Mathew and Viraj Bagal and Rubèn Pérez Tito and Dimosthenis Karatzas and Ernest Valveny and C. V Jawahar, 2021
- TAT-DQA - Towards complex document understanding by discrete reasoning, Zhu, Fengbin and Lei, Wenqiang and Feng, Fuli and Wang, Chao and Zhang, Haozhou and Chua, Tat-Seng, 2022
- DUDE - Document Understanding Dataset and Evaluation (DUDE), Jordy Van Landeghem and Rubén Tito and Łukasz Borchmann and Michał Pietruszka and Paweł Józiak and Rafał Powalski and Dawid Jurkiewicz and Mickaël Coustaty and Bertrand Ackaert and Ernest Valveny and Matthew Blaschko and Sien Moens and Tomasz Stanisławek, 2023
Data Processing
The questions from each dataset were filtered by the types of the questions, leaving only non-extractive questions, related to one page. After that the questions were paraphrased.
Source Data Licenses
The dataset adheres to the licenses of its constituents.
- SlideVQA: https://github.com/nttmdlab-nlp/SlideVQA/blob/main/LICENSE
- PDFVQA: https://github.com/adlnlp/pdfvqa (Unknown)
- InfographicsVQA: https://www.docvqa.org/datasets/infographicvqa (Unknown)
- TAT-DQA: https://nextplusplus.github.io/TAT-DQA/ (CC BY 4.0)
- DUDE: https://github.com/duchallenge-team/dude/blob/main/LICENSE (GPL 3.0)
Dataset Card Contact
Please feel free to contact in the community page of this dataset or via the Telegram chat of the challenge: https://t.me/gendocvqa2024
- Downloads last month
- 84