<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>TableParser: Automatic Table Parsing with Weak Supervision from Spreadsheets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Susie Xi Rao</string-name>
          <email>srao@ethz.ch</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Johannes Rausch</string-name>
          <email>johannes.rausch@inf.ethz.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter Egger</string-name>
          <email>pegger@ethz.ch</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ce Zhang</string-name>
          <email>ce.zhang@inf.ethz.ch</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Chair of Applied Economics, Department of Management, Technology, and Economics (ETH Zurich)</institution>
          ,
          <addr-line>Leonhardstrasse 21, 8092 Zurich</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Systems Group, Department of Computer Science (ETH Zurich)</institution>
          ,
          <addr-line>Stampfenbachstrasse 114, 8092 Zurich</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Tables have been an ever-existing structure to store data. There exist now diferent approaches to store tabular data physically. PDFs, images, spreadsheets, and CSVs are leading examples. Being able to parse table structures and extract content bounded by these structures is of high importance in many applications. In this paper, we devise TableParser, a system capable of parsing tables in both native PDFs and scanned images with high precision. We have conducted extensive experiments to show the eficacy of domain adaptation in developing such a tool. Moreover, we create TableAnnotator and ExcelAnnotator, which constitute a spreadsheet-based weak supervision mechanism and a pipeline to enable table parsing. We share these resources with the research community to facilitate further research in this interesting direction.</p>
      </abstract>
      <kwd-group>
        <kwd>table structure parsing</kwd>
        <kwd>table annotation</kwd>
        <kwd>Mask R-CNN</kwd>
        <kwd>weak supervision</kwd>
        <kwd>domain adaptation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        of the labeling complexity through this weak supervision
alleviated through a novel weak supervision approach
that automatically generates training data from
structures, DocParser [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] was recently introduced. It presents
a robust way to parse complete document structures from
rendered PDFs. Such learning-based systems require
large amounts of labeled training data. This problem is
nEvelop-O
LGOBE
      </p>
      <p>
        0000-0003-2379-1506 (S. X. Rao); 0000-0002-9409-4401
the literature about table processing in PDFs, namely,
table detection, table structure parsing/recognition [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].1
      </p>
      <p>1Table detection is a task to draw the bounding boxes of tables
ditional) identification of the structural (row and column layout)
information of tables. We distinguish between bottom-up and
topdown approaches in table structure detection. Bottom-up typically
refers to structure detection by recognizing formatting cues such as
text, lines, and spacing, while top-down entails table cell detection</p>
      <p>
        Table detection is a popular task with a large body of
literature, table structure parsing and table recognition
were revisited2 after the pioneering work of [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] using
state-of-the-art deep neural networks. Before DL started
to gain success in object detection, table structure
parsing was done by bottom-up approaches, using heuristics
or ML-based methods like [
        <xref ref-type="bibr" rid="ref8">8, 9</xref>
        ]. See [
        <xref ref-type="bibr" rid="ref4">4, 10</xref>
        ] for
comprehensive reviews on ML methods. The purposes of table
structure detection are either layout detection [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or
information retrieval [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] from tabular structures, usually
with the former as a preprocessing step for the latter.
      </p>
      <p>
        The DL-based methods in [
        <xref ref-type="bibr" rid="ref7">7, 11</xref>
        ] are among the first to
apply neural networks designed for object detection to
table parsing. Typically, taking pretrained object
detection models e.g., Faster RCNN [12, 13] on benchmarking Figure 1: TableAnnotator.
datasets like ImageNet [14], Pascal VOC [15], and
Microsoft COCO [ 16], they fine-tune the pretrained models
with in-domain images for table detection and table struc- ate training instances, we develop ExcelAnnotator to
ture parsing (domain adaption and transfer learning). In interact with spreadsheets and produce annotations for
some best performing frameworks [17, 18, 19], they all weak supervision.
jointly optimize the structure detection and entity rela- With ExcelAnnotator, we have compiled a
spreadtions in the structure, as in DocParser. sheet dataset ZHYearbooks-Excel, which is processed
      </p>
      <p>
        However, a key problem in training DL-based systems via a Python library on Excel (PyWin324) to leverage
is the labeling complexity of generating high-quality in- the structured information stored in the spreadsheets.
domain annotations. More generally, an essential limit- TableParser is trained with 16’041 Excel-rendered tables
ing factor is the lack of large amounts of training data. using detectron2 ([21, 22]) and fine-tuned with 17
highEforts have been put into generating datasets to enable quality manual annotations in each domain. We have
tasks with weak supervision. TableBank [20] is built conducted extensive experiments of domain adaptation.
upon a data set of Word and LaTeX files and extracts Finally, we evaluate diferent TableParsers in two
doannotations directly from the sources. They use 4-gram mains and make the following observations:
BLEU score to evaluate the cell content alignments.
However, the table layout structure is not of particular focus 1. In general, domain adaptation works well with
in TableBank. PubTabNet [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] enables table detection ifne-tuning the pretrained model (    in
Figand table cell content detection. arXivdocs-target and ure 2) with high-quality in-domain data.
arXivdocs-weak by DocParser [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] enables an end-to-end 2. On the test set of 20 tables rendered by Excel,
document parsing system of the hierarchical document with ModernTableParser we are able to achieve an
structure. average precision score (IoU ≥ 0.5) of 83.53% and
      </p>
      <p>
        In this paper, we devise TableParser with inspiration 73.28% on table rows and columns, respectively.
from DocParser, due to its flexibility in processing both ta- 3. We have tested our HistoricalTableParser on
bles and more general documents. We demonstrate that scanned tables in both historical
(mediumTableParser is an efective tool for recognizing table quality, scan-based) and modern tables.
Overstructures and content. The application of TableParser to all, HistoricalTableParser works better than
Moda new target domain requires newly generated training ernTableParser on tables stored in image scans.
data. Depending on the target domain, we specify two 4. Interestingly, we find that ModernTableParser
TableParsers: ModernTableParser fine-tuned with na- built on top of DocParser [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is very robust in
tive PDFs and HistoricalTableParser fine-tuned with adapting to new domains, such as scanned
historscan images. TableParser works in conjunction with ical tables.
      </p>
      <p>TableAnnotator (Figure 1) which eficiently assists
developers in visualizing the output, as well as help users
to generate high-quality human annotations.3 To
gener</p>
      <p>
        We are willing to open source the ZHYearbook-Excel
dataset, TableAnnotator, TableParser system, and its
pipeline to the research communities.5 Moreover, we
2Some recent works on Cascade R-CNN [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ] manage to push
the frontier of table detection. See [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for a general review on table
detection and [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for a general review on table recognition.
      </p>
      <p>3For a live demo of table annotations using our annotation tool,
refer to the video under https://github.com/DS3Lab/TableParser/
blob/main/demo/2021-06-15%2002-05-58.gif.</p>
      <p>4https://pypi.org/project/pywin32/ (last accessed: Sep. 30, 2021).</p>
      <p>5The source code, data, and/or other artifacts for the complete
TableParser pipeline have been made available at https://github.com/</p>
      <p>DS3Lab/TableParser.</p>
      <p>Weak Supervision</p>
      <p>Document Rendering</p>
      <p>Excel
Annotator</p>
      <p>Annotations</p>
      <p>Parsed Table Structure
DocParser</p>
      <p>MWS</p>
      <p>HistoricalTableParser</p>
      <sec id="sec-1-1">
        <title>2.2. System Components</title>
        <sec id="sec-1-1-1">
          <title>We introduce the main system components in TableParser, incl. TableAnnotator, ExcelAnnotator, ModernTableParser, and HistoricalTableParser.</title>
          <p>2.2.1. TableAnnotator.
1. We present TableParser which is a robust tool
for parsing modern and historical tables stored
in native PDFs or image scans.
2. We conduct experiments to show the eficacy of
domain adaptation in TableParser.
3. We contribute a new pipeline (using
ExcelAnnotator as the main component) to automatically
generate weakly labeled data for DL-based table
parsing.
4. We contribute TableAnnotator as a graphical
interface to assist table structure understanding
and manual labeling.
5. We open-source the spreadsheet weak
supervision dataset and the pipeline of TableParser to
encourage further research in this direction.</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>In Figure 1 we show TableAnnotator, which is mainly</title>
          <p>composed of two parts: image panel (left) and document
tree (right). In the code repository7, there is a manual
describing its functionalities in details. In a nutshell,
annotators can draw bounding boxes on the left panel
and create their entities and relationships on the right.</p>
          <p>
            In Figure 1, the highlighted bounding box (the red thick
contour on the left) corresponds to the table_cell on the
2. TableParser System second row and second column, indexed by 1-1, 1-1 (the
blue highlight on the right). Note that TableAnnotator
2.1. Problem Description is versatile and can be used to annotate not only tables,
but also generic documents. The output of the tree is in
Following the hierarchical document parsing in Doc- JSON format, as shown in the following code snippet.
Parser, our objective is to generate a hierarchical struc- 1 [{"id": 28,
ture for a table which consists of the entities (table, tabu- 2 "category": "table_cell",
lar, table_caption, table_row, table_column, table_footnote) 34 ""rporwo_prearntgiee"s"::[1"1,-11],,1-1",
and their relations in the document tree. 5 "col_range": [
            <xref ref-type="bibr" rid="ref1 ref1">1,1</xref>
            ],
          </p>
          <p>
            Our ultimate goal of table structure parsing is (1) to es- 6 "parent": 9},
tablish row/column relationships between the table cells, 7 {"id": 29,
and (2) post-process the established structure and cell 8 "category": "box",
content (e.g., with PDFMiner6 or OCR engines) to enable 109 ""bpbaogxe"":: 0[
            <xref ref-type="bibr" rid="ref3">3,65,332,299,27</xref>
            ],
a CSV export function. In this paper, we emphasize (1) 11 "parent": 28}]
and are still in development to enable (2). Our work will
          </p>
          <p>6https://pypi.org/project/pdfminer/ (last accessed: Nov. 11,
2021).</p>
        </sec>
        <sec id="sec-1-1-3">
          <title>7TableAnnotator repo: https://anonymous.4open.science/r/doc_</title>
          <p>annotation-SDU-AAAI22.
(a) Example worksheet from ZHYearbook-Excel-WS.
(b) Annotations with DeExcelerator.
(c) Representing bounding boxes in Excel.</p>
          <p>(d) Visualization of bounding boxes with TableAnnotator.
2.2.2. ModernTableParser. We utilize DeExcelerator to categorize the content, such
that we can diferentiate among table captions, table
footWe train ModernTableParser using the data generated notes and tabular data and create a correct auxiliary file
by weak supervision signals from Excel sheets and fine- to each PDF containing the structural information of the
tuned by high-quality manual annotations in this domain. represented table(s). Illustrated in Figure 3 (b), in this
In Figure 2, we show the system design following the case we annotate the table caption and footnote as ‘meta’,
underlying components of DocParser.8 We denote the and mark the range of content with ‘content’ and ‘empty’.
model that produces ModernTableParser as M1. We use PyWin32 in Python to interact with Excel, so that
intermediate representations like Figure 3 (c) can be
creWeak Supervision with ExcelAnnotator. Now we ated to retrieve entity locations in the PDF rendering.
present the crucial steps in generating weak supervision Concretely, we mark neighboring cells with distinct
col(the model    in Figure 2) for TableParser. These steps ors, remove all borders, and set the font color to white.
are mainly conducted by ExcelAnnotator in Figure 2 (left). To summarize, ExcelAnnotator detects spreadsheet
metaTake a worksheet-like Figure 3 (a) from our ZHYearbook- data and cell types, as well as retrieves entity locations
Excel-WS dataset (cf. Section 3), where we see caption, via intermediate representations. Finally, we are able to
tabular, and footnote areas. We subsequently use DeEx- load the annotations into TableAnnotator to inspect the
celerator [23] to extract relations from the spreadsheets. quality of weak supervision (Figure 3 (d)).</p>
        </sec>
        <sec id="sec-1-1-4">
          <title>8The model structure of DocParser is sketched in Figure 11 of</title>
          <p>
            the DocParser paper [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ], see https://arxiv.org/pdf/1911.01702.pdf.
          </p>
          <p>The model structure (Mask R-CNN) can also be found here.</p>
          <p>(a) Bad quality of OCR (left).
(b) Good quality of OCR (left).
2.2.3. HistoricalTableParser. bounding boxes of individual cells.
In Figure 2 (lower right), we show the system design
We use the OCR engine from Google Vision API to rec- by adding an OCR component and a fine-tuning
compoognize the text bounding boxes. Then we convert bound- nent for domain adaptation. We denote the model that
ing boxes into the input format TableParser requires. produces HistoricalTableParser as M2. Take Figure 5 (a)
Now we are able to manually adjust the bounding boxes as input, TableParser can produce a parsed layout-like
in TableAnnotator to produce high-quality annotations. Figure 5 (b) which can be combined with the OCR
boundNote that the quality of OCR highly depends on the ta- ing boxes in the subsequent steps and export as a CSV
ble layout (see (a) vs. (b) in Figure 4), we often need to
adjust the locations of bounding boxes and redraw the
ifle (Figure 5 (c)).9</p>
          <p>For domain adaptation, we assume that an
outof-domain model performs worse than an in-domain
model in one domain. Namely, we would expect
ModernTableParser to work better on Excel-rendered PDFs
or tables created similarly; on the contrary, we would
expect HistoricalTableParser to perform better on older
table scans.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>4. Computational Setup</title>
      <sec id="sec-2-1">
        <title>4.1. Mask R-CNN</title>
        <sec id="sec-2-1-1">
          <title>In line with DocParser, we use the same model but with</title>
          <p>
            an updated backend implementation. Namely, we utilize
Detectron2 to apply an updated version of Mask R-CNN
[25]. For technical details of Mask R-CNN, we refer to
DocParser [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ]. In Appendix A, we illustrate the
architecture of Mask R-CNN used in this paper.
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Datasets</title>
      <p>4.1.1. Training Procedure: Weak Supervision +
Fine-Tuning.</p>
      <sec id="sec-3-1">
        <title>We have compiled various datasets to train, fine-tune, test, and evaluate TableParser.</title>
        <p>ZHYearbooks-Excel. We create three datasets All neural models are initialized with weights trained on
from this source: ZHYearbooks-Excel-WS, ZHYearbooks- the MS COCO dataset. We first pretrain on the weak
suExcel-FT, and ZHYearbooks-Excel-Test, with 16’041, 17, pervision data ZHYearbook-Excel-WS for 540k iterations,
and 20 tables in each set. On average, it takes 3 minutes then fine-tune on our target datasets
ZHYearbook-Excel30 seconds for an annotator to produce high-quality anno- FT and EUYearbook-OCR-FT for M1 and M2, respectively.
tations of a table. The manual annotations are done with We then fine-tune each model across three phrases for
automatically generated bounding boxes and document a total of 30k iterations. This is split into 22k, 4k, 4k
tree as aid. iterations, respectively. The performance is measured</p>
        <p>ZHYearbooks-OCR. We create the dataset every 500 iterations via the IoU with a threshold of 0.5.
ZHYearbook-OCR-Test, with 20 tables. On average, it We train all models in a multi-GPU setting, using 8 GPUs
takes 2 minutes and 45 seconds to annotate a table with with a vRAM of 12 GB. Each GPU was fed with one
imthe similar annotation aids mentioned above. age per training iteration. Accordingly, the batch size</p>
        <p>EUYearbooks-OCR. We create two datasets from per training iteration is set to 8. Furthermore, we use
this source: EUYearbook-OCR-FT and EUYearbook-OCR- stochastic gradient descent with a learning rate of 0.005
Test, with 17 and 10 tables, respectively. Note that these and learning momentum of 0.9.
datasets contain various languages like Hungarian and
German, with various formats depending on the language. 4.1.2. Parameter Settings.</p>
        <p>On average, it takes 8 minutes and 15 seconds to annotate During training, we sampled randomly 100 entities from
a table with the similar annotation aids mentioned above. the ground truth per document image (i.e., up to 100</p>
        <p>Miscellaneous historical yearbooks. We ran Mod- entities, as some document images might have less). In
ernTableParser and HistoricalTableParser on Chinese (in Mask R-CNN, the maximum number of entity predictions
Simplified Chinese) and South Korean historical year- per image is set to 100. During prediction, we only keep
books (in Classical Chinese) and inspect their outputs entities with a confidence score of 0.5 or higher.
qualitatively (see Section 5.2).</p>
        <p>Human labeling eforts. We observe a large
variance in labeling intensity across the datasets. The 5. Results and Discussion
EUYearbooks-OCR datasets require more corrections per
table compared to the datasets of modern tables. More- Here, we evaluate the performance of TableParser in two
over, they also require more iterations of human annota- domains quantitatively and qualitatively.
tions with heuristics as aid.</p>
      </sec>
      <sec id="sec-3-2">
        <title>9c.f. The performance of LayoutParser is quite poor on the tab</title>
        <p>ular data in Figure 5 (d) using the best model from its model zoo
(PubLayNet/faster_rcnn_R_50_FPN_3x). Input and annotated
figures of original size can be found under https://github.com/DS3Lab/
TableParser/tree/main/figures.</p>
        <sec id="sec-3-2-1">
          <title>5.1. Quantitative assessment</title>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Metric. We first introduce the evaluation metric for</title>
        <p>the object detection/classification tasks. The metric we
report is Average Precision (AP), which corresponds to
an Intersection over Union rate of IoU=.50:.05:.95.10 IoU
ranges from 0 to 1 and specifies the amount of overlap
between the predicted and ground truth bounding box.</p>
        <p>It is a common metric used when calculating AP.</p>
        <p>
          10We refer readers to https://cocodataset.org/#detection-eval for
more details on the evaluation metrics (last accessed: Nov. 1, 2021).
Performances in various domains. As we discussed run M1 (fine-tuned by modern tables) on
EUYearbookin Section 2, we have developed ModernTableParser to OCR-FT (column (7) in Table 1), its performance is worse
parse tables with input images rendered by Excel (M1). than fine-tuning; and if we run M2 (fine-tuned by
hisThen, to work with historical tables in scans, we adapt torical tables) on ZHYearbook-Excel-FT (column (4) in
the pretrained TableParser by fine-tuning it on scanned Table 1), it performs worse than fine-tuning.
Interestdocuments (M2). Now, we present the performances of ingly, if we compare the performance of M2 on modern
M1 and M2 in two diferent domains in the following tables (column (4) in Table 1) with the performance of
aspects: M1 on historical tables (column (7) in Table 1), we clearly
1. (P1) the performances on fine-tuning sets on M1 see that the latter has a better performance in all other
and M2 in Table 1; categories than the class of table_row. This can be
explained by the fact that the model trained on modern
2. (P2) the performances on fine-tuning sets as test tables is robust in annotating historical tables, at least on
sets on M1 and M2 in Table 1;11 the column level. We see this in Figures 9 and 10, where
3. (P3) the performances on three test sets from two ModernTableParser clearly performs better. However,
domains on M1 and M2 in Table 2. the algorithm has problems in delineating narrow
(P1) &amp; (P2). We want to study the impact of fine- and less clearly separated rows. This could be due to
tuning of a pretrained model (using a large body of tables the setting of the maximum number of entities being 100
generated by weak supervision signals). The instances when predicting per table (Section 4.1).
used to fine-tune must be high-quality in-domain data. (P3). In Table 2, we show the performances of
Concretely, we create in-domain annotations for mod- three test sets from two domains (Excel-rendered PDFs
ern tables (rendered by Excel) and historical tables (from and historical scans), namely, ZHYearbook-Excel-Test,
scans) with high human eforts assisted by automatic ZHYearbook-OCR-Test, and EUYearbook-OCR-Test. We
preprocessing: ZHYearbook-Excel-FT and EUYearbook- see that M2 which is fine-tuned by historical scans
perOCR-FT, each with 17 tables. Note that the latter has forms worse than M1 on both ZHYearbook-Excel-Test
much denser rows and columns than the former (see and ZHYearbook-OCR-Test. Vice versa, M1 that is
finethe tables in Figures 3 (a) vs. 5 (a) for an illustration). tuned by Excel-rendered PDFs performs worse than M2
It is apparent from Table 1 that the AP performance on EUYearbook-OCR-Test. This suggests that domain
of models on the fine-tuning sets is highly optimized adaptation by fine-tuning the pretrained TableParser
(columns (3) and (8) in Table 1), and it should be better with in-domain high-quality data works well.
than using those datasets as test sets. This means, if we Additionally, if we compare the Δ |( 1− 2)| under
each test set (e.g., the diferences of columns (3) and (4),
of (7) and (8), of (11) and (12) in Table 2), the Δ on
11This means we evaluate the performance of M1 on the
finetuned set for M2 (as a test set for M1) and vice versa.
*-OCR-Test in all categories is smaller than ZHYearbook- The success of DL has marked the revisiting of
taExcel-Test, with M1 already achieving medium-high per- ble structure parsing by [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], which inspired follow-up
formance on the test set. Although M1 is not fine-tuned research [
          <xref ref-type="bibr" rid="ref1 ref2 ref6">27, 1, 6, 2, 28, 29, 30, 19, 31, 18, 32, 17</xref>
          ]. To
highby in-domain historical images, ModernTableParser is light a few, [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] proposed EDD (encoder-dual-decoder) to
still able to parse historical scans with moderate perfor- covert table images into HTML code, and they evaluate
mance. This suggests that TableParser trained on modern table recognition (parsing both table structures and cell
table structures can be used to parse the layout of tabular contents) using a newly devised metric, TEDS
(Tree-Edithistorical scans. Because the cost is often too high in Distance-based Similarity). [29] proposed TGRNet as an
generating a large amount of training data of historical efective end-to-end trainable table graph construction
scans (see Section 3 for the discussion of labeling eforts), network, which encodes a table by combining the cell
loour approach shows a promising direction in first devel- cation detection and cell relation prediction. [28] used
bioping TableParser that works well for modern tables, and LSTM on table cell detection by encoding rows/columns
then adapting TableParser to the historical domain by in neural networks before the softmax layer. Researchers
ifne-tuning on only a few manually annotated historical also started discussing efectively parsing tables in the
scans of good quality. wild [30], which is relevant to the perturbation tests we
want to conduct for historical tables. TabCellNet by [19]
5.2. Qualitative Assessment adopts a Hybrid Task Cascade network, interweaving
object detection and instance segmentation tasks to
progressively improve model performance. We see from the
previous works, the most efective methods [ 17, 18, 19]
always jointly optimize the cell locations and cell
relationships. In our work, we consider these two aspects by
learning the row and column alignments in a hierarchical
structure, where we know the relationship of entities in
the table (row, column, cell, caption, footnote).
        </p>
        <p>In Figures 7, 8, 9, and 10 in Appendix C, we show the
qualitative outputs of ModernTableParser and
HistoricalTableParser on various types of inputs.12 The quality
of structure parsing varies across inputs, but overall, the
quality is high. Even if we simply use ModernTableParser
to parse old scans, it achieves a moderate performance,
sometimes better than HistoricalTableParser (see Figures
9 and 10). This substantiates our claim that knowing the
table structure (caption, tabular, row, column, multi-cell,
etc.) is of foremost importance for parsing tables. We see
that the performance of LayoutParser is quite poor on
the tabular data in Figure 5 (d) using the best model from
its model zoo (PubLayNet/faster_rcnn_R_50_FPN_3x).</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>7. Discussion and Conclusion</title>
      <sec id="sec-4-1">
        <title>7.1. Eficiency</title>
        <sec id="sec-4-1-1">
          <title>PyWin32 uses the component object model (COM), which</title>
          <p>only supports single-thread processing and only runs
un6. Related Work der Windows. But with 20 VMs, we managed to process
a large amount of files. This is a one-time development
Table Annotation. TableLab [26] provides an active cost. On average – on the fastest machine used (with
learning based annotation GUI for users to jointly opti- 16 GB memory, 6 cores, each of 4.8GHz max (2.9 base)) –
mize the model performance under the hood. Layout- it took 15.25 seconds to process one document (a
workParser [24] has also promoted an interactive document sheet in this case). To fine-tune a pretrained TableParser
annotation tool13, but the tool is not optimized for table with 17 images, it takes 3-4 hours to fine-tune the model
annotations. with 30k iterations.</p>
          <p>12Input and annotated figures of original size can be found under
https://github.com/DS3Lab/TableParser/tree/main/figures.</p>
          <p>13See https://github.com/Layout-Parser/annotation-service (last format. Because tables sometimes come with
row/colaccessed: Nov. 1, 2021). umn sums in the rendered format, this functionality can</p>
          <p>Based on our findings, we will further improve the
parsing performance on table row/column/cell. Besides, we
plan to enable a CSV-export functionality in TableParser,
which allows users to export a CSV file that attends to
both bounding boxes generated by the OCR’ed and the
hierarchical table structure. We will also benchmark this
functionality against human eforts. Another practical
functionality we add to facilitate users’ assessment of
table parsing quality, is that we enable TableParser to
compute row and column sums when exporting to the CSV
help users to assess their manual eforts in post-editing
the CSV output. We also plan to conduct perturbation
tests of table structures and quantify the robustness of
our models in those scenarios. These exercises will be
highly valuable because, as we see in Figure 7, we
often encounter scan images of tables where the rectangle
structures cannot be maintained (the upper right corner).</p>
          <p>
            This brings us to another interesting research direction:
how to eficiently annotate the non-rectangle elements in
a table, e.g., [30] have provided the benchmarking dataset
and method for parsing tables in the wild. Finally, we
would like to benchmark TableParser using the
popular benchmarking datasets such as ICDAR-2013,
ICDAR2019, TableBank, and PubTabNet. Note that since we
develop TableParser on top of the DocParser [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ], where
the reported F1 score has shown superior performance
of our method on ICDAR-2013.
          </p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>7.3. Conclusion</title>
        <sec id="sec-4-2-1">
          <title>We present in this work our DL-based pipeline to parse</title>
          <p>table structures and its components: TableAnnotator,
TableParser (Modern and Historical), and
ExcelAnnotator. We also demonstrate that pre-training TableParser
on weakly annotated data allows highly accurate parsing
of structured data in real-world table-form data
documents. Fine-tuning the pretrained TableParser in various
domains has shown large improvements in detection
accuracy. We have observed that the state-of-the-art for
table extraction is shifting towards DL-based approaches.
However, devising suitable tools to facilitate training of
such DL approaches for the research community is still
lacking. Hence, we provide a pipeline and open-source
code and data to invite the active contribution of the
community.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <sec id="sec-5-1">
        <title>Peter Egger acknowledges Swiss National Science Foun</title>
        <p>dation (Project Number 100018_204647) for supporting
this research project. Ce Zhang and the DS3Lab
gratefully acknowledge the support from Swiss National
Science Foundation (Project Number 200021_184628, and
197485), Innosuisse/SNF BRIDGE Discovery (Project
Number 40B2-0_187132), European Union Horizon 2020
Research and Innovation Programme (DAPHNE, 957407),
Botnar Research Centre for Child Health, Swiss Data
Science Center, Alibaba, Cisco, eBay, Google Focused
Research Awards, Kuaishou Inc., Oracle Labs, Zurich
Insurance, and the Department of Computer Science at
ETH Zurich. Besides, this work would not be possible
without our student assistants: We thank Ms. Ada
Langenfeld for assisting us in finding the Hungarian scans
and annotating the tables; we thank Mr. Livio Kaiser for
building an ExcelAnnotator prototype during his master
thesis. We also appreciate the users’ insights on
LayoutParser [24] shared by Mr. Cheongyeon Won. Moreover,
the comments and feedback from Sascha Becker and his
colleagues at SoDa Labs, Monash University, are
valuable in producing the current version of TableParser. We
also thank Sascha and Won for providing us with various
South Korean/European table scans. Finally, we thank
the reviewers at SDU@AAAI22 for carefully evaluating
our manuscripts and their constructive comments.
[9] W. Farrukh, A. Foncubierta-Rodriguez, A.-N. Ciub- [22] Y. Wu, A. Kirillov, F. Massa, W.-Y. Lo, R. Girshick,
otaru, G. Jaume, C. Bejas, O. Goksel, M. Gabrani, Detectron2, https://github.com/facebookresearch/
Interpreting data from scanned tables, in: 2017 detectron2, 2019.
14th IAPR International Conference on Document [23] J. Eberius, C. Werner, M. Thiele, K. Braunschweig,
Analysis and Recognition (ICDAR), volume 2, IEEE, L. Dannecker, W. Lehner, Deexcelerator: a
frame2017, pp. 5–6. work for extracting relational data from partially
[10] Y. Wang, I. T. Phillips, R. M. Haralick, Table struc- structured documents, in: 22nd ACM
Internature understanding and its performance evaluation, tional Conference on Information and Knowledge
Pattern recognition 37 (2004) 1479–1497. Management, CIKM’13, San Francisco, CA, USA,
[11] S. R. Qasim, H. Mahmood, F. Shafait, Rethink- October 27 - November 1, 2013, He, Qi; Iyengar,
ing table recognition using graph neural networks, Arun; Nejdl, Wolfgang; Pei, Jian &amp; Rastogi,
Rain: 2019 International Conference on Document jeev, 2013, pp. 2477–2480. URL: http://doi.acm.org/
Analysis and Recognition (ICDAR), IEEE, 2019, pp. 10.1145/2505515.2508210.</p>
        <p>142–147. [24] Z. Shen, R. Zhang, M. Dell, B. C. G. Lee, J. Carlson,
[12] J. Long, E. Shelhamer, T. Darrell, Fully convolu- W. Li, Layoutparser: A unified toolkit for deep
tional networks for semantic segmentation, in: Pro- learning based document image analysis, arXiv
ceedings of the IEEE conference on computer vision preprint arXiv:2103.15348 (2021).</p>
        <p>and pattern recognition, 2015, pp. 3431–3440. [25] K. He, X. Zhang, S. Ren, J. Sun, Deep residual
learn[13] S. Ren, K. He, R. Girshick, J. Sun, Faster r-cnn: ing for image recognition, in: Proceedings of the
Towards real-time object detection with region pro- IEEE conference on computer vision and pattern
posal networks, Advances in neural information recognition, 2016, pp. 770–778.</p>
        <p>processing systems 28 (2015) 91–99. [26] N. X. R. Wang, D. Burdick, Y. Li, Tablelab: An
[14] O. Russakovsky, J. Deng, H. Su, J. Krause, interactive table extraction system with adaptive
S. Satheesh, S. Ma, Z. Huang, A. Karpathy, deep learning, in: 26th International Conference
A. Khosla, M. Bernstein, et al., Imagenet large scale on Intelligent User Interfaces, 2021, pp. 87–89.
visual recognition challenge, International journal [27] Z. Chi, H. Huang, H.-D. Xu, H. Yu, W. Yin,
X.of computer vision 115 (2015) 211–252. L. Mao, Complicated table structure recognition,
[15] M. Everingham, L. Van Gool, C. K. Williams, arXiv preprint arXiv:1908.04729 (2019).</p>
        <p>J. Winn, A. Zisserman, The pascal visual object [28] Y. Li, Y. Huang, Z. Zhu, L. Pan, Y. Huang, L. Du,
classes (voc) challenge, International journal of Z. Tang, L. Gao, Rethinking table structure
recogcomputer vision 88 (2010) 303–338. nition using sequence labeling methods, in:
Inter[16] T.-Y. Lin, M. Maire, S. Belongie, L. Bourdev, R. Gir- national Conference on Document Analysis and
shick, J. Hays, P. Perona, D. Ramanan, C. L. Zitnick, Recognition, Springer, 2021, pp. 541–553.
P. Dollár, Microsoft coco: Common objects in con- [29] W. Xue, B. Yu, W. Wang, D. Tao, Q. Li, Tgrnet: A
text, 2015. arXiv:1405.0312. table graph reconstruction network for table
struc[17] S. Raja, A. Mondal, C. Jawahar, Table structure ture recognition, arXiv preprint arXiv:2106.10598
recognition using top-down and bottom-up cues, (2021).
in: European Conference on Computer Vision, [30] R. Long, W. Wang, N. Xue, F. Gao, Z. Yang, Y. Wang,
Springer, 2020, pp. 70–86. G.-S. Xia, Parsing table structures in the wild, in:
[18] X. Zheng, D. Burdick, L. Popa, X. Zhong, N. X. R. Proceedings of the IEEE/CVF International
ConferWang, Global table extractor (gte): A framework ence on Computer Vision, 2021, pp. 944–952.
for joint table identification and cell structure recog- [31] D. Nazir, K. A. Hashmi, A. Pagani, M. Liwicki,
nition using visual context, in: Proceedings of the D. Stricker, M. Z. Afzal, Hybridtabnet: Towards
IEEE/CVF Winter Conference on Applications of better table detection in scanned document images,
Computer Vision, 2021, pp. 697–706. Applied Sciences 11 (2021) 8396.
[19] J. Jiang, M. Simsek, B. Kantarci, S. Khan, Tabcellnet: [32] S. Luo, M. Wu, Y. Gong, W. Zhou, J. Poon, Deep
Deep learning-based tabular cell structure detec- structured feature networks for table detection and
tion, Neurocomputing 440 (2021) 12–23. tabular data extraction from scanned financial
doc[20] M. Li, L. Cui, S. Huang, F. Wei, M. Zhou, Z. Li, ument images, arXiv preprint arXiv:2102.10287
Tablebank: A benchmark dataset for table detection (2021).</p>
        <p>and recognition, 2019. arXiv:1903.01949.
[21] K. He, G. Gkioxari, P. Dollár, R. Girshick, Mask
r-cnn, in: 2017 IEEE International Conference
on Computer Vision (ICCV), 2017, pp. 2980–2988.</p>
        <p>doi:10.1109/ICCV.2017.322.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>A. DocParser Mask R-CNN</title>
      <sec id="sec-6-1">
        <title>For technical details of Mask R-CNN, we refer to DocParser [1]. In Figure 6, we illustrate the Mask R-CNN model used.</title>
        <p>RPN
Candidate
Regions
Input
Image
ResNet
101
FPN
Feature Maps</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>B. Online Resources</title>
      <sec id="sec-7-1">
        <title>The source code, data, and/or other artifacts for the com</title>
        <p>plete TableParser pipeline have been made available at
https://github.com/DS3Lab/TableParser.</p>
        <p>The 10-minute lightning presentation at
SDU@AAAI22 to the paper could be found under this recording,
starting at 1:42:35.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>C. Images for Qualitative</title>
    </sec>
    <sec id="sec-9">
      <title>Assessment</title>
      <p>As we have discussed in Section 5.2, we show the
qualitative outputs of ModernTableParser and
HistoricalTableParser on various types of inputs in Figures 7, 8,
9, and 10.14 The quality of structure parsing varies across
inputs, but overall, the quality is high.</p>
      <p>14Input and annotated figures of original size can be found under
https://github.com/DS3Lab/TableParser/tree/main/figures.
RoI
Align</p>
      <p>Fully
Connected</p>
      <p>Layers
Convolution</p>
      <p>Layers</p>
      <p>Bounding Box Regression</p>
      <p>Class Prediction
Mask Prediction</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Rausch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. O. Martinez</given-names>
            <surname>Bermudez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bissig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , S. Feuerriegel, Docparser:
          <article-title>Hierarchical document structure parsing from renderings</article-title>
          ,
          <source>in: 35th AAAI Conference on Artificial Intelligence (AAAI-21)(virtual)</source>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhong</surname>
          </string-name>
          , E. ShafieiBavani, A. Jimeno Yepes,
          <article-title>Imagebased table recognition: data, model, and evaluation</article-title>
          , in: Computer Vision-ECCV
          <year>2020</year>
          : 16th European Conference, Glasgow, UK,
          <year>August</year>
          23-
          <issue>28</issue>
          ,
          <year>2020</year>
          , Proceedings,
          <source>Part XXI 16</source>
          , Springer,
          <year>2020</year>
          , pp.
          <fpage>564</fpage>
          -
          <lpage>580</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kieninger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dengel</surname>
          </string-name>
          ,
          <article-title>The t-recs table recognition and analysis system</article-title>
          ,
          <source>in: International Workshop on Document Analysis Systems</source>
          , Springer,
          <year>1998</year>
          , pp.
          <fpage>255</fpage>
          -
          <lpage>270</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Pivk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cimiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sure</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gams</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Rajkovič</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Studer</surname>
          </string-name>
          ,
          <article-title>Transforming arbitrary tables into logical form with tartar</article-title>
          ,
          <source>Data &amp; Knowledge Engineering</source>
          <volume>60</volume>
          (
          <year>2007</year>
          )
          <fpage>567</fpage>
          -
          <lpage>595</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Fernandes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Simsek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kantarci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <surname>Tabledet:</surname>
          </string-name>
          <article-title>An end-to-end deep learning approach for table detection and table image classification in data sheet images</article-title>
          ,
          <source>Neurocomputing</source>
          <volume>468</volume>
          (
          <year>2022</year>
          )
          <fpage>317</fpage>
          -
          <lpage>334</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Prasad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gadpal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kapadni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Visave</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Sultanpure</surname>
          </string-name>
          ,
          <string-name>
            <surname>Cascadetabnet:</surname>
          </string-name>
          <article-title>An approach for end to end table detection and structure recognition from image-based documents</article-title>
          ,
          <source>in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>572</fpage>
          -
          <lpage>573</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S.</given-names>
            <surname>Schreiber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Agne</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Wolf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dengel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ahmed</surname>
          </string-name>
          , Deepdesrt:
          <article-title>Deep learning for detection and structure recognition of tables in document images, in: 2017 14th IAPR international conference on document analysis and recognition (ICDAR), volume 1</article-title>
          , IEEE,
          <year>2017</year>
          , pp.
          <fpage>1162</fpage>
          -
          <lpage>1167</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pinto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>McCallum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. B.</given-names>
            <surname>Croft</surname>
          </string-name>
          ,
          <article-title>Table extraction using conditional random fields</article-title>
          ,
          <source>in: Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval</source>
          ,
          <year>2003</year>
          , pp.
          <fpage>235</fpage>
          -
          <lpage>242</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>