This repository implements the baselines and Hi-VT5 methods for the paper Hierarchical multimodal transformers for Multipage DocVQA.
DISCLAIMER:
To use the framework please check How to use instructions.
The dataset is aimed to perform Visual Question Answering on multipage industry scanned documents. The questions and answers are reused from Single Page DocVQA (SP-DocVQA) dataset. The images also corresponds to the same in original dataset with previous and posterior pages with a limit of up to 20 pages per document.
If you want to download the dataset, you can do so in the DocVQA challenge in the RRC portal, downloads section. For this framework, you will need to download the IMDBs (which contains processed QAs and OCR) and the images. All the downloads must be performed through the RRC portal.
Average Normalized Levenshtein Similarity (ANLS)
The standard metric for text-based VQA tasks (ST-VQA and DocVQA). It evaluates the method's reasoning capabilities while smoothly penalizes OCR recognition errors.
Check Scene Text Visual Question Answering for more details.
Answer Page Prediction Accuracy (APPA)
In the MP-DocVQA task, the models can provide the index of the page where the information required to answer the question is located. For this subtask accuracy is used to evaluate the predictions: i.e. if the predicted page is correct or not.
Check Hierarchical multimodal transformers for Multi-Page DocVQA for more details.
Extended experimentation can be found in Table 2 of Hierarchical multimodal transformers for Multi-Page DocVQA. You can also check the live leaderboard at the RRC Portal.
| Model | Weights HF name | Parameters | ANLS | APPA |
|---|---|---|---|---|
| Bert large | rubentito/bert-large-mpdocvqa | 334M | 0.4183 | 51.6177 |
| Longformer base | rubentito/longformer-base-mpdocvqa | 148M | 0.5287 | 71.1696 |
| BigBird ITC base | rubentito/bigbird-base-itc-mpdocvqa | 131M | 0.4929 | 67.5433 |
| LayoutLMv3 base | rubentito/layoutlmv3-base-mpdocvqa | 125M | 0.4538 | 51.9426 |
| T5 base | rubentito/t5-base-mpdocvqa | 223M | 0.5050 | 0.0000 |
| Hi-VT5 | rubentito/hivt5-base-mpdocvqa | 316M | 0.6201 | 79.23 |
Notice that points 1 are 2 could be addressed by parallelizing the process of each page (or set of P pages) into different GPUs. But this is also not implemented.
144 commits
Python
100.0%
This repository implements the baselines and Hi-VT5 methods for the paper Hierarchical multimodal transformers for Multipage DocVQA.
DISCLAIMER:
To use the framework please check How to use instructions.
The dataset is aimed to perform Visual Question Answering on multipage industry scanned documents. The questions and answers are reused from Single Page DocVQA (SP-DocVQA) dataset. The images also corresponds to the same in original dataset with previous and posterior pages with a limit of up to 20 pages per document.
If you want to download the dataset, you can do so in the DocVQA challenge in the RRC portal, downloads section. For this framework, you will need to download the IMDBs (which contains processed QAs and OCR) and the images. All the downloads must be performed through the RRC portal.
Average Normalized Levenshtein Similarity (ANLS)
The standard metric for text-based VQA tasks (ST-VQA and DocVQA). It evaluates the method's reasoning capabilities while smoothly penalizes OCR recognition errors.
Check Scene Text Visual Question Answering for more details.
Answer Page Prediction Accuracy (APPA)
In the MP-DocVQA task, the models can provide the index of the page where the information required to answer the question is located. For this subtask accuracy is used to evaluate the predictions: i.e. if the predicted page is correct or not.
Check Hierarchical multimodal transformers for Multi-Page DocVQA for more details.
Extended experimentation can be found in Table 2 of Hierarchical multimodal transformers for Multi-Page DocVQA. You can also check the live leaderboard at the RRC Portal.
| Model | Weights HF name | Parameters | ANLS | APPA |
|---|---|---|---|---|
| Bert large | rubentito/bert-large-mpdocvqa | 334M | 0.4183 | 51.6177 |
| Longformer base | rubentito/longformer-base-mpdocvqa | 148M | 0.5287 | 71.1696 |
| BigBird ITC base | rubentito/bigbird-base-itc-mpdocvqa | 131M | 0.4929 | 67.5433 |
| LayoutLMv3 base | rubentito/layoutlmv3-base-mpdocvqa | 125M | 0.4538 | 51.9426 |
| T5 base | rubentito/t5-base-mpdocvqa | 223M | 0.5050 | 0.0000 |
| Hi-VT5 | rubentito/hivt5-base-mpdocvqa | 316M | 0.6201 | 79.23 |
Notice that points 1 are 2 could be addressed by parallelizing the process of each page (or set of P pages) into different GPUs. But this is also not implemented.
144 commits
Python
100.0%