hantian commited on
Commit
ba3b3cb
1 Parent(s): 28bbc69

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md CHANGED
@@ -1,3 +1,86 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+
5
+ # LayoutReader
6
+
7
+ **TODO:**
8
+ 1. upload models to huggingface
9
+ 2. explain why this repo
10
+ 3. explain the new dataset
11
+ 4. build docker image
12
+
13
+ ## Helper
14
+
15
+ ### Build Dataset
16
+
17
+ ```bash
18
+ python tools.py cache-dataset-spans --help
19
+ ```
20
+
21
+ ### Train
22
+
23
+ ```bash
24
+ bash train.sh
25
+ ```
26
+
27
+ ### Eval
28
+
29
+ ```bash
30
+ python eval.py --help
31
+ ```
32
+
33
+ ## Spans-Level Results
34
+
35
+ One bbox contains multiple tokens. Usually, parse pdf file to get bbox. Training data is generated by `tools.py`.
36
+
37
+ > only use the first part of test file
38
+
39
+ | Method | shuf | BLEU Idx | BLEU Token |
40
+ |----------------------------|------|----------|------------|
41
+ | Heuristic Method | no | 44.4 | 70.7 |
42
+ | LayoutReader (layout only) | no | 95.3 | 97.8 |
43
+ | LayoutReader (layout only) | yes | 95.0 | 97.6 |
44
+
45
+ ## Tokens-Level Results
46
+
47
+ One bbox contains only one token.
48
+
49
+ ### New eval script
50
+
51
+ > only use the first part of test file
52
+
53
+ | Method | shuf | BLEU Idx | BLEU Token |
54
+ |-----------------------------|------|----------|------------|
55
+ | Heuristic Method | no | 78.3 | 79.4 |
56
+ | LayoutReader (layout only) | no | 98.0 | 98.2 |
57
+ | LayoutReader (layout only) | yes | 97.8 | 98.0 |
58
+ | LayoutReader (public model) | no | 98.0 | 98.3 |
59
+
60
+ ### Old eval script (from original paper)
61
+
62
+ * Evaluation results of the LayoutReader on the reading order detection task, where the source-side of training/testing
63
+ data is in the left-to-right and top-to-bottom order
64
+
65
+ | Method | Encoder | BLEU | ARD |
66
+ |----------------------------|------------------------|--------|------|
67
+ | Heuristic Method | - | 0.6972 | 8.46 |
68
+ | LayoutReader (layout only) | LayoutLM (layout only) | 0.9732 | 2.31 |
69
+ | LayoutReader | LayoutLM | 0.9819 | 1.75 |
70
+
71
+ * Input order study with left-to-right and top-to-bottom inputs in evaluation, where r is the proportion of
72
+ shuffled samples in training.
73
+
74
+ | Method | BLEU | BLEU | BLEU | ARD | ARD | ARD |
75
+ |----------------------------|--------|--------|--------|--------|-------|------|
76
+ | | r=100% | r=50% | r=0% | r=100% | r=50% | r=0% |
77
+ | LayoutReader (layout only) | 0.9701 | 0.9729 | 0.9732 | 2.85 | 2.61 | 2.31 |
78
+ | LayoutReader | 0.9765 | 0.9788 | 0.9819 | 2.50 | 2.24 | 1.75 |
79
+
80
+ * Input order study with token-shuffled inputs in evaluation, where r is the proportion of shuffled samples in training.
81
+
82
+ | Method | BLEU | BLEU | BLEU | ARD | ARD | ARD |
83
+ |----------------------------|--------|--------|--------|--------|-------|--------|
84
+ | | r=100% | r=50% | r=0% | r=100% | r=50% | r=0% |
85
+ | LayoutReader (layout only) | 0.9718 | 0.9714 | 0.1331 | 2.72 | 2.82 | 105.40 |
86
+ | LayoutReader | 0.9772 | 0.9770 | 0.1783 | 2.48 | 2.46 | 72.94 |