kaelrenc commited on
Commit
5b1e135
1 Parent(s): 32e7c82
Files changed (1) hide show
  1. README.md +58 -49
README.md CHANGED
@@ -1,103 +1,112 @@
1
  ---
2
- license: Apache License 2.0
 
 
 
 
 
 
 
3
  ---
4
 
5
- # 说明
6
 
7
- 浮动体是在学术文献和书籍等正式出版物中常见的一种页面元素类型。在LaTeX中,浮动体通常指的是可以包含文本、图片、表格、代码、算法等的容器。这些容器在文档中的位置可以由LaTeX自动调整以适应页面布局。为了便于索引和阅读,通常浮动体会在主体(图片、表格、代码块、算法块)之外,增加类型、编号、标题等信息,以使得阅读相对顺畅。在复杂的情况下,一个浮动体可能还会包含多个子元素,每个子元素可能有各自的编号。在LaTeX中,常见的浮动体有如下几种:
8
 
9
- - 插图(Figure)。插图是用于包含图片的浮动体,通常在`\begin{figure}`和`\end{figure}`环境中定义;
10
- - 附表(Table)。附表是用于包含表格的浮动体,通常在`\begin{table}`和`\end{table}`环境来定义;
11
- - 算法(Algorithm)。算法环境是用于描述算法的浮动体,通常使用额外的algorithm, algorithm2e, algorithmicx来定义;
12
- - 代码(Code)。代码环境是用于包含代码的浮动体,通常使用listingsminted等宏包来定义。
13
 
14
- 长期以来,版面结构分析(Document Layout Analysis)任务所检测出来的元素数量都极为有限,表格、图片等一般单独处理。这种方式主要存在以下缺点:
15
 
16
- 1. 浮动体的标题和主体内容之间的关系未得到标题,不能将他们作为一个整体来看待;
17
- 2. 所支持的浮动体的类型有限,比如代码块还有算法块经常被DLA模型识别为多个段落文本,从而影响了准确性;
18
- 3. 可扩展性有限,无法适应日益多样的排版表达样式,比如更加复杂的小页等环境。于是版面分析模型的适应性差。
19
 
20
- 为此,在现有版面结构分析的基础上,增加了浮动体位置检测和浮动体结构分析两项任务。其中:
21
 
22
- - 浮动体位置检测(FLD)任务旨在从文档图像中检测出整个浮动体的位置及类型信息,包括五种类型的浮动体:插图、附表、算法、代码、其他。
23
- - 浮动体结构分析(FSA)任务旨在从包含整个页面或者浮动体的文档图像中检测出浮动体的各个子结构,当有子图子表等元素时,也可以识别出各个浮动主体的位置及类型,以及对应各自标题的位置。包括以下六种:插图、附表、算法、代码、标题、其他。
24
 
25
- 针对上述两种任务,参考DocGenome数据,寻找arXiv文档,使用X-AnyLabel分别标注,形成浮动体检测数据集(FLD)以及浮动体结构分析数据集(FSA),各600张。
26
 
 
27
 
28
- # 下载方法
29
 
30
- 浮动体结构分析数据集下载:
31
 
32
- :modelscope-code[]{type="sdk"}
33
- :modelscope-code[]{type="git"}
34
 
35
- # 标注标准
36
 
37
- ## 算法
38
 
39
- 算法环境用于以伪代码的形式描述程序性操作。实践中为了简洁起见,通常会使用伪代码、Pascal或者C的形式描述,通常包含for, while, if等控制条件,也带编号。并且上方通常显示算法的编号和标题信息。本数据集在标注时,将算法的编号、标题、主体等部分视为一个整体,完整地包含了上述要素。
40
 
41
- ![算法环境标注示例](images/paste-1.png)
42
 
43
- 算法结构分析作为浮动体结构分析(FSA)的子任务,主要用于分析算法块的结构,将算法块分成标题和主体两个部分。如下所示:
44
 
45
- ![算法环境结构分析标注示例](images/paste-9.png)
46
 
47
- 特别地,对于算法主体,**不考虑算法的边框线,以描述算法的伪代码在文档图像中的实际位置范围作为参考标准**。其他浮动体元素(比如图片、表格、代码主体),也与此标准相一致。
 
 
48
 
49
  ![](images/paste-10.png)
50
 
51
- ## 代码
52
 
53
- 代码环境通常以编程语言或者接近于编程语言的形式描述程序,强调可执行性。因此通常会绑定一种实际的编程语言或归约语言。代码环境中的主体部分,绝大部分采用等宽字体排版(也有不使用等宽字体的),以英文和符号为主,遵循比较清晰的缩进准则(所以对识别的要求比较高)。本数据集在标注时,将代码环境的编号、标题(如果有的话)、主体等部分视为一个整体,完整地包含上述要素。
54
 
55
- ![代码环境标注示例](images/paste-2.png)
56
 
57
- 除此之外,代码环境也可能像行间数学公式那样具有编号信息,这通常是为了正文表述的需要。此类元素虽然一般不再浮动,但是也一并视为浮动体。
58
 
59
- ![行间公式形式的代码环境](images/paste-3.png)
60
 
61
- 需要注意的是,有时候代码环境与插图等浮动体环境复用编号。此时,虽然标题是Figure,但就整体而言,该浮动体的类型应仍为代码。如下图所示。
62
 
63
  ![](images/paste-6.png)
64
 
65
- 在标注代码环境结构分析时,将代码环境中的标题和代码主体区分开。标题和代码主体的范围均为去掉各类装饰线之后的实际范围。
66
 
67
- ![代码环境结构分析标注示例](images/paste-11.png)
68
 
69
- 对于非浮动的代码行,将代码主体与编号分别标注,并将编号的类型标为“其他”。
70
 
71
  ![](images/paste-12.png)
72
 
73
- ## 插图
74
 
75
- 本数据集中认为插图是以图形而非符号化的方式展示相关信息的元素,其中的图形可以是自然的图像或绘制的图形(示意图)。本数据集中以说明一个或多个图片为目的的浮动体,将其类型视为“插图”。本数据集在标注时,将插图的编号、标题(如果有的话)、主体等部分视为一个整体,完整地包含上述要素。
76
 
77
- ![](images/paste-4.png)
78
 
79
- 在插图环境结构分析任务中,每个图形单独标注,标为“插图”,每个子图的标题以及浮动体的子标类,类型标为“标题”。如下所示。
80
 
81
  ![](images/paste-13.png)
82
 
83
- ## 附表
84
 
85
- 表格是将所展示的信息以二维单元格的形式进行展示的元素,通常包括行、列、脚注等概念。本数据集中以说明一个或多个表格为目的的浮动体,将其类型视为“附表”。本数据集在标注时,将附表的编号、标题(如果有的话)、主体等部分视为一个整体,完整地包含上述要素。
86
 
87
- ![](images/paste-7.png)
88
 
89
- ![附表环境标注示例](images/paste-8.png)
90
 
91
- 对于附表环境结构分析任务,标注标准与其他的结构分析任务保持一致。主体标为“附表”,每个表格标题标为“标题”
92
 
93
  ![](images/paste-14.png)
94
 
95
- ## 其他
96
 
97
- 除图片、表格、代码块、算法块之外,又符合浮动体基本特征的元素,或者混合两种及以上不同主体类型的浮动体区域,被标注为“其他”。然而由于排版原因,这些元素也可能与插图、附表使用��同的标题类型。
98
 
99
- ![其他类型的标注示例](images/paste-5.png)
100
 
101
- 在其他类型的结构分析任务中,除算法、代码、图片、附表、标题之外的元素被标为其他。常见情况包括行间代码的编号、表格的脚注等区域。如下青色区域所示。
102
 
103
- ![](images/paste-15.png)
 
1
  ---
2
+ license: apache-2.0
3
+ title: Towards Unified Solution for Floatings in Document Layout Analysis
4
+ subtitle: A Definition for Floating Object Localization (FLD) and Floating Object Structure Analysis (FSA) Tasks
5
+ author: Chengxiang Ren
6
+ date: 2024-10-19
7
+ format:
8
+ nwa-cea-docx: default
9
+ lang: en
10
  ---
11
 
12
+ # Description
13
 
14
+ A *floating object* is a common type of page element found in academic literature, books, and other formal publications. In LaTeX, a floating object typically refers to a container that can hold text, images, tables, code, algorithms, and other content. The placement of these containers within the document is automatically adjusted by LaTeX to fit the page layout. To facilitate indexing and readability, floating objects are usually accompanied by additional information such as type, numbering, and captions beyond the main content (image, table, code block, algorithm block). In more complex cases, a floating object may contain multiple sub-elements, each of which may have its own numbering. In LaTeX, common floating objects include the following:
15
 
16
+ - *Figure*: A floating object for images, typically defined within the `\begin{figure}` and `\end{figure}` environment.
17
+ - *Table*: A floating object for tables, typically defined within the `\begin{table}` and `\end{table}` environment.
18
+ - *Algorithm*: A floating object for describing algorithms, often defined using additional packages such as `algorithm`, `algorithm2e`, or `algorithmicx`.
19
+ - *Code*: A floating object for code, often defined using packages such as `listings` or `minted`.
20
 
21
+ For a long time, the number of elements detected by *Document Layout Analysis* (DLA) tasks has been extremely limited, with elements like tables and figures typically handled separately. This approach has several drawbacks:
22
 
23
+ 1. The relationship between the floating object’s caption and its main content is not captured, making it difficult to treat them as a single unit.
24
+ 2. The types of supported floating objects are limited. For instance, code blocks and algorithm blocks are often mistakenly recognized by DLA models as multiple text paragraphs, thus reducing accuracy.
25
+ 3. Extensibility is limited, preventing adaptation to increasingly diverse layout styles, such as more complex small-page environments. As a result, layout analysis models exhibit poor adaptability.
26
 
27
+ To address this, two additional tasks have been introduced on top of existing document layout analysis: *Floating Object Localization* (FLD) and *Floating Object Structure Analysis* (FSA). Specifically:
28
 
29
+ - The *Floating Object Localization* (FLD) task aims to detect the position and type information of entire floating objects in document images. This includes five types of floating objects: figures, tables, algorithms, code, and others.
30
+ - The *Floating Object Structure Analysis* (FSA) task aims to detect the substructure of floating objects in document images, whether for entire pages or individual floating objects. When sub-elements such as sub-figures or sub-tables are present, their positions and types can also be identified, along with the corresponding captions. The six recognized types include figures, tables, algorithms, code, captions, and others.
31
 
32
+ For the two tasks mentioned above, the *DocGenome* dataset was used to find arXiv documents, and X-AnyLabel was employed for annotation, resulting in the creation of the *Floating Object Localization Dataset* (FLD) and the *Floating Object Structure Analysis Dataset* (FSA), each containing 600 images.
33
 
34
+ # Download Method
35
 
36
+ The **Floating Object Localization Dataset (FLD)** can be downloaded from the following Huggingface URL:
37
 
38
+ - <https://huggingface.co/datasets/irhawks/floating-det>
39
 
40
+ The **Floating Object Structure Analysis Dataset (FSA)** can be downloaded from the following Huggingface URL:
 
41
 
42
+ - <https://huggingface.co/datasets/irhawks/floating-fsa>
43
 
44
+ # Annotation Standards
45
 
46
+ ## Algorithms
47
 
48
+ The algorithm environment is used to describe procedural operations in pseudocode format. In practice, to maintain simplicity, pseudocode or programming languages such as Pascal or C are often used, typically containing control statements such as `for`, `while`, and `if`, along with line numbering. Additionally, the algorithm’s numbering and caption information are usually displayed above the algorithm. In this dataset, the algorithm’s number, caption, and main body are treated as a single unit, with all of these elements included as part of the annotation.
49
 
50
+ ![Algorithm Annotation Example](images/paste-1.png)
51
 
52
+ *Algorithm structure analysis*, as a subtask of Floating Object Structure Analysis (FSA), focuses on analyzing the structure of algorithm blocks, dividing them into two parts: the caption and the main body. An example is shown below:
53
 
54
+ ![Algorithm Structure Analysis Example](images/paste-9.png)
55
+
56
+ Notably, for the main body of the algorithm, the **algorithm’s bounding box is not considered; instead, the actual location of the pseudocode within the document image is used as the reference standard**. The same annotation standard is applied to other floating object elements (e.g., images, tables, code blocks).
57
 
58
  ![](images/paste-10.png)
59
 
60
+ ## Code
61
 
62
+ The code environment typically describes programs in either a programming language or a language close to one, with an emphasis on executability. Therefore, it is usually associated with a specific programming language or a reduced language format. The main body of the code is often set in a monospaced font (though some environments may not use monospaced fonts), with English and symbols being the primary content, adhering to a clear indentation structure. For accurate recognition, this is critical. In this dataset, the code environment’s number, caption (if present), and main body are treated as a single unit, and all of these elements are included as part of the annotation.
63
 
64
+ ![Code Annotation Example](images/paste-2.png)
65
 
66
+ In addition, the code environment may sometimes include numbering similar to inline mathematical formulas, primarily for the purpose of referencing within the main text. Although these elements are generally not considered floating objects, they are also annotated as floating objects.
67
 
68
+ ![Inline Formula-like Code Environment](images/paste-3.png)
69
 
70
+ It is important to note that sometimes code environments share numbering with floating objects like figures. In such cases, although the caption might be labeled as a *Figure*, the floating object’s type should still be classified as *Code*. An example is shown below.
71
 
72
  ![](images/paste-6.png)
73
 
74
+ When annotating the structure of code environments, the title and the main body of the code are differentiated. Both the caption and the code body are bounded by their actual areas, excluding decorative lines.
75
 
76
+ ![Code Structure Analysis Example](images/paste-11.png)
77
 
78
+ For non-floating code lines, the main body of the code and any accompanying numbering are annotated separately, with the numbering categorized as “other.”
79
 
80
  ![](images/paste-12.png)
81
 
82
+ ## Figures
83
 
84
+ In this dataset, a *figure* is defined as an element that visually conveys information through graphical means rather than symbolic representation. This may include natural images or schematic drawings. Floating objects whose primary purpose is to explain one or more images are classified as *figures*. In the annotation process, the figure’s number, caption (if present), and main body are treated as a single unit, with all of these elements included.
85
 
86
+ ![Figure Annotation Example](images/paste-4.png)
87
 
88
+ In the *Figure Structure Analysis* task, each individual graphic is annotated and labeled as a *figure*, while the caption for each sub-figure and any accompanying labels are classified as “captions.” An example is shown below.
89
 
90
  ![](images/paste-13.png)
91
 
92
+ ## Tables
93
 
94
+ Tables are elements that display information in a two-dimensional grid, typically composed of rows, columns, and possibly footnotes. In this dataset, floating objects that aim to explain one or more tables are categorized as *tables*. During annotation, the table’s number, caption (if present), and main body are treated as a single unit, with all elements included.
95
 
96
+ ![Table Annotation Example](images/paste-7.png)
97
 
98
+ ![Table Environment Annotation Example](images/paste-8.png)
99
 
100
+ For the *Table Structure Analysis* task, the annotation standards are consistent with those of other structure analysis tasks. The main body is labeled as *table*, while each table caption is labeled as *caption*.
101
 
102
  ![](images/paste-14.png)
103
 
104
+ ## Others
105
 
106
+ Elements other than figures, tables, code blocks, or algorithm blocks that still exhibit the basic characteristics of floating objects, or floating object regions that combine two or more types of content, are annotated as *other*. However, due to formatting conventions, these elements may also share caption styles with figures and tables.
107
 
108
+ ![Other Annotation Example](images/paste-5.png)
109
 
110
+ In the *Other Structure Analysis* task, elements that do not fall into the categories of algorithms, code, figures, tables, or captions are labeled as *other*. Common examples include inline code numbering, table footnotes, and other similar elements. An example is shown below in the cyan-colored area.
111
 
112
+ ![](images/paste-15.png)