File size: 5,637 Bytes
c39bf9e
de606a1
 
 
 
 
 
 
c39bf9e
4e8902a
c39bf9e
 
 
 
 
 
 
 
 
488365c
 
 
8f47c49
 
 
 
 
4e8902a
 
 
 
 
 
 
 
 
 
f8ec971
 
 
5d2fdc9
 
 
 
 
0add847
 
 
 
 
 
 
 
 
 
188e225
 
 
d2fb376
 
 
 
 
de606a1
 
 
 
 
 
 
 
 
 
8d04219
 
 
54ced44
 
 
 
 
c39bf9e
 
 
 
 
488365c
 
8f47c49
 
4e8902a
 
 
 
f8ec971
 
5d2fdc9
 
0add847
 
 
 
188e225
 
d2fb376
 
de606a1
 
 
 
8d04219
 
54ced44
 
fbb8afd
 
de606a1
65bddda
 
 
0baebf1
65bddda
 
40732c7
65bddda
3c7db3b
65bddda
40732c7
65bddda
 
 
 
 
 
 
 
 
40732c7
65bddda
 
 
 
 
 
 
 
40732c7
65bddda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
language:
- en
- es
license: mit
task_categories:
- token-classification
- image-to-text
dataset_info:
- config_name: en-digital-seq
  features:
  - name: image
    dtype: image
  - name: ground_truth
    dtype: string
  splits:
  - name: train
    num_bytes: 3422825072.42
    num_examples: 7324
  - name: test
    num_bytes: 1800300619.069
    num_examples: 4349
  - name: validation
    num_bytes: 867013113.894
    num_examples: 1831
  download_size: 6044707011
  dataset_size: 6090138805.383
- config_name: en-render-seq
  features:
  - name: image
    dtype: image
  - name: ground_truth
    dtype: string
  splits:
  - name: train
    num_bytes: 19131026017.588
    num_examples: 7324
  - name: test
    num_bytes: 11101342722.574
    num_examples: 4349
  - name: validation
    num_bytes: 4749558423.85
    num_examples: 1831
  download_size: 34947880371
  dataset_size: 34981927164.012
- config_name: es-digital-seq
  features:
  - name: image
    dtype: image
  - name: ground_truth
    dtype: string
  splits:
  - name: train
    num_bytes: 3515604711.065
    num_examples: 8115
  - name: test
    num_bytes: 2068684395.052
    num_examples: 4426
  - name: validation
    num_bytes: 880373678.928
    num_examples: 2028
  download_size: 6392517545
  dataset_size: 6464662785.045
- config_name: es-render-seq
  features:
  - name: image
    dtype: image
  - name: ground_truth
    dtype: string
  splits:
  - name: train
    num_bytes: 20956369016.935
    num_examples: 8115
  - name: test
    num_bytes: 11530001568.862
    num_examples: 4426
  - name: validation
    num_bytes: 5264019060.636
    num_examples: 2028
  download_size: 37775576850
  dataset_size: 37750389646.433
configs:
- config_name: en-digital-seq
  data_files:
  - split: train
    path: en-digital-seq/train-*
  - split: test
    path: en-digital-seq/test-*
  - split: validation
    path: en-digital-seq/validation-*
- config_name: en-render-seq
  data_files:
  - split: train
    path: en-render-seq/train-*
  - split: test
    path: en-render-seq/test-*
  - split: validation
    path: en-render-seq/validation-*
- config_name: es-digital-seq
  data_files:
  - split: train
    path: es-digital-seq/train-*
  - split: test
    path: es-digital-seq/test-*
  - split: validation
    path: es-digital-seq/validation-*
- config_name: es-render-seq
  data_files:
  - split: train
    path: es-render-seq/train-*
  - split: test
    path: es-render-seq/test-*
  - split: validation
    path: es-render-seq/validation-*
tags:
- synthetic
---


<p align="center" style="margin-top: 50px; margin-bottom: 50px;">
  <img src="figs/merit-dataset.png" alt="Visual Abstract" width="500" />
</p>

# The MERIT Dataset ๐ŸŽ’๐Ÿ“ƒ๐Ÿ†

The MERIT Dataset is a multimodal dataset (image + text + layout) designed for training and benchmarking Large Language Models (LLMs) on Visually Rich Document Understanding (VrDU) tasks. It is a fully labeled synthetic dataset generated using our opensource pipeline available on [GitHub](https://github.com/nachoDRT/MERIT-Dataset). You can explore more details about the dataset and pipeline reading our [paper](https://arxiv.org/abs/2409.00447).

## Introduction โ„น๏ธ
AI faces some dynamic and technical issues that push end-users to create and gather their own data. In addition, multimodal LLMs are gaining more and more attention, but datasets to train them might be improved to be more complex, more flexible, and easier to gather/generate.

In this research project, we identify school transcripts of records as a suitable niche to generate a synthetic challenging multimodal dataset (image + text + layout) for Token Classification or Sequence Generation.

<p align="center" style="margin-top: 50px; margin-bottom: 50px;">
  <img src="figs/demo-samples.gif" alt="demo" width="200" />
</p>


## Hardware โš™๏ธ
We ran the dataset generator on an MSI Meg Infinite X 10SF-666EU with an Intel Core i9-10900KF and an Nvidia RTX 2080 GPU, running on Ubuntu 20.04. Energy values in the table refer to 1k samples, and time values refer to one sample.

| Task                         | Energy (kWh) | Time (s) |
|------------------------------|--------------|----------|
| Generate digital samples     | 0.016        | 2        |
| Modify samples in Blender    | 0.366        | 34       |


## Benchmark ๐Ÿ’ช

We train the LayoutLM family models on Token Classification to demonstrate the suitability of our dataset. The MERIT Dataset poses a challenging scenario with more than 400 labels.

We benchmark on three scenarios with an increasing presence of Blender-modified samples.

+ Scenario 1: We train and test on digital samples.
+ Scenario 2: We train with digital samples and test with Blender-modified samples.
+ Scenario 3: We train and test with Blender-modified samples.



|                  | **Scenario 1** | **Scenario 2** | **Scenario 3** | **FUNSD/** | **Lang.** | **(Tr./Val./Test)** |
|------------------|----------------|----------------|----------------|------------|-----------|----------------------|
|                  | Dig./Dig.      | Dig./Mod.      | Mod./Mod       | XFUND      |           |                      |
|                  | F1         | F1         | F1         | F1     |           |                      |
| **LayoutLMv2**       | 0.5536         | 0.3764         | 0.4984         | 0.8276     | Eng.      | 7324 / 1831 / 4349       |
| **LayoutLMv3**       | 0.3452         | 0.2681         | 0.6370         | 0.9029     | Eng.      | 7324 / 1831 / 4349       |
| **LayoutXLM**        | 0.5977         | 0.3295         | 0.4489         | 0.7550     | Spa.      | 8115 / 2028 / 4426       |