Upload DETAIL_README.md
Browse files- DETAIL_README.md +99 -0
DETAIL_README.md
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# File structure
|
2 |
+
|
3 |
+
Here is an example of file structure of DocGenome dataset for discipline `math.GM`.
|
4 |
+
|
5 |
+
```bash
|
6 |
+
math.GM
|
7 |
+
βββ 0906.1099
|
8 |
+
β βββ layout_annotation.json
|
9 |
+
β βββ order_annotation.json
|
10 |
+
β βββ page_xxxx.jpg
|
11 |
+
β βββ quality_report.json
|
12 |
+
β βββ reading_annotation.json
|
13 |
+
βββ 2103.02443
|
14 |
+
βββ layout_annotation.json
|
15 |
+
βββ order_annotation.json
|
16 |
+
βββ page_xxxx.jpg
|
17 |
+
βββ quality_report.json
|
18 |
+
βββ reading_annotation.json
|
19 |
+
```
|
20 |
+
|
21 |
+
Each paper folder, for example, `math.GM/2103.02443` contains five parts:
|
22 |
+
|
23 |
+
- 1) `page_xxxx.jpg`, each image represents each page of the corresponding paper, the page index is contained in the filename. Note that this might be different from the original paper.
|
24 |
+
- 2) `layout_annotation.json`, this json file contains the layout annotation bounding box of each category region using the COCO format.
|
25 |
+
- 3) `reading_annotation.json`, this json file contains LaTex source code for each block (except for the Figure category). Note that the latex source code may contain macros.
|
26 |
+
- 4) `order_annotation.json`, this json file contains the relationship between different blocks, where the key of `orders` consists of triplets. Each triplet represents the relation type and specifies the source block and the destination block.
|
27 |
+
- 5) `quality_report.json`, this json file contains the quality computing result for each page and the whole paper for further use.
|
28 |
+
|
29 |
+
# Layout annotation task
|
30 |
+
|
31 |
+
## Category definition
|
32 |
+
|
33 |
+
| **Index** | **Category** | **Notes** |
|
34 |
+
|----------------|-------------------|------------------------------------------|
|
35 |
+
| 0 | Algorithm | |
|
36 |
+
| 1 | Caption | Titles of Images, Tables, and Algorithms |
|
37 |
+
| 2 | Equation | |
|
38 |
+
| 3 | Figure | |
|
39 |
+
| 4 | Footnote | |
|
40 |
+
| 5 | List | |
|
41 |
+
| 7 | Table | |
|
42 |
+
| 8 | Text | |
|
43 |
+
| 9 | Text-EQ | Text block with inline equations |
|
44 |
+
| 10 | Title | Section titles |
|
45 |
+
| 12 | PaperTitle | |
|
46 |
+
| 13 | Code | |
|
47 |
+
| 14 | Abstract | |
|
48 |
+
|
49 |
+
## Known Issues
|
50 |
+
|
51 |
+
1. The IoU of Bounding boxes are too large, this happens when the paper template is too complex.
|
52 |
+
2. The category of the bounding boxes are not correct. This happens when user-defined macros are used. For example, some authors may use `\newcommand{\beq}{\begin{equation}}`, `\newcommand{\eeq}{\end{equation}}`, in this case, the equation may be detected as `Text` class.
|
53 |
+
3. Bounding box is missing, this happens due to rare packages are used. Some rare packages may not identified by our rule-based methods.
|
54 |
+
4. Bounding boxes are correct, but overlaps with other adjacent bounding boxe slightly, this happens due to layout adjustments, for example `vspace`, `input` commands.
|
55 |
+
|
56 |
+
# Order annotation category
|
57 |
+
|
58 |
+
## Category Definition
|
59 |
+
|
60 |
+
| **Category** | **Description** | **Example** |
|
61 |
+
|----------------|-------------------|------------------------------------------|
|
62 |
+
| identical | two blocks corresponding to the same latex code chunk | paragraphs that cross columns or pages |
|
63 |
+
| peer | two blocks are both belongs to Title | \section{introduction}, \section{method} |
|
64 |
+
| sub | one block is a child of another block logically | \section{introduction} and the first paragraph in Introduction section |
|
65 |
+
| adj | two adjacent Text blocks | Paragraph1 and Paragraph2 |
|
66 |
+
| explicit-cite | one block cites another block with `ref` | As shown in \ref{Fig: 5}. |
|
67 |
+
| implicit-cite | The caption block and the corresponding float environment | \begin{table}\\caption\{A}\\begin{tabular}B\end{tabular}\end{table}, then A implicit-cite B |
|
68 |
+
|
69 |
+
## Order annotation representation
|
70 |
+
|
71 |
+
Each `order_annotation.json` contains two keys:
|
72 |
+
|
73 |
+
- 1) `annotations`: contains the block information for each block, the `block_id` of each block is used to represent the relationship.
|
74 |
+
- 2) `orders`: contains a list of triples, the meaning of each triple is:
|
75 |
+
- 1. `type`, represents the category of the current relationship, see table above for details.
|
76 |
+
- 2. `from`, represents the `block_id` of the starting block of the relationship
|
77 |
+
- 3. `to`, represents the `block_id` of the ending block of the relationship
|
78 |
+
|
79 |
+
## Known issues
|
80 |
+
|
81 |
+
1. `reading_annotation.json` file of some papers may not contain the field `annotations` for unknown reason.
|
82 |
+
2. `reading_annotation.json` doesn't contain the `implicit-cite` relationship, the `implicit-cite` relationship is used in test-dataset for efficiency consideration.
|
83 |
+
3. `explicit-cite` only supports `Equation`, the support for `Table`, `Figrue` is developed after the training dataset is complete.
|
84 |
+
|
85 |
+
|
86 |
+
# Quality report
|
87 |
+
|
88 |
+
This file contains the rule-based quality check for further use. Explanation is as follows:
|
89 |
+
|
90 |
+
- 1) `num_pages`: the number of pages of the corresponding paper.
|
91 |
+
- 2) `num_columns`: 1 (single column) or 2 (two column), depends on the last page of the paper
|
92 |
+
- 3) `category_quality`: we record the number rendered latex code chunks for each category `reading_count`, and the number of detected bounding boxes `geometry_count`, then `missing_rate` is computed as `(reading_count - geometry_count)/reading_count`. Finally, the `Total` category is the summary of all other categories.
|
93 |
+
- 4) `page_quality` containing IoU information of each page and the whole paper:
|
94 |
+
- 1. `page`: page index
|
95 |
+
- 2. `num_blocks`: how many bounding boxes in this page
|
96 |
+
- 3. `area`: sum of area of all blocks, $\sum_i \text{area}(\text{bbox}_i)$
|
97 |
+
- 4. `overlap`: sum of intersection area of all blocks, $\sum_i\sum_{j>i} \text{area}(\text{bbox}_i\cap bbox_j)$
|
98 |
+
- 5. `ratio` the ratio between `overlap` and `area`. Note that this ratio may be very large if there is template issue.
|
99 |
+
|