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:

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 question
  • image_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 word
    • text - string, a word itself
    • bbox - list of 4 integers, a bounding box of the word
    • block_id - integer, an index of the block, where the word is located
    • text_id - integer, an index of the set of paragraphs, where the word is located
    • par_id - integer, an index of the paragraph, where the word is located
    • line_id - integer, an index of the line, where the word is located
    • word_id - integer, an index of the word
  • question - string, containing the question
  • answer - 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:

  1. block_id - integer, an index of the block, where the word is located
  2. text_id - integer, an index of the set of paragraphs, where the word is located
  3. par_id - integer, an index of the paragraph, where the word is located
  4. line_id - integer, an index of the line, where the word is located
  5. word_id - integer, an index of the word
  6. bbox - list of 4 integers, a bounding box of the word
  7. text - 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:

  1. unique_id - an id of the question
  2. split
  3. question
  4. answer
  5. image_filename - a filename of the related image
  6. ocr_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:

  1. 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.
  2. 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
  3. InfographicsVQA - InfographicVQA, Minesh Mathew and Viraj Bagal and Rubèn Pérez Tito and Dimosthenis Karatzas and Ernest Valveny and C. V Jawahar, 2021
  4. 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
  5. 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.

  1. SlideVQA: https://github.com/nttmdlab-nlp/SlideVQA/blob/main/LICENSE
  2. PDFVQA: https://github.com/adlnlp/pdfvqa (Unknown)
  3. InfographicsVQA: https://www.docvqa.org/datasets/infographicvqa (Unknown)
  4. TAT-DQA: https://nextplusplus.github.io/TAT-DQA/ (CC BY 4.0)
  5. 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
78