# US 2022/0284722 A1 · End-to-end system for extracting tabular data present in electronic documents and method thereof

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0284722 A1
- Document ID: US20220284722A1
- Status: Published application
- Kind: A1
- Application number: 17/683,954
- Filed: 2022-03-01
- Published: 2022-09-08
- Earliest claimed: 2021-03-02
- Assignees: CLARITRICS INC. d.b.a BUDDI AI
- Applicants: CLARITRICS INC. d.b.a BUDDI AI
- Inventors: Nandhinee PERIYAKARUPPAN; Harinath KRISHNAMOORTHY; Anil GOYAL; Sudarsun SANTHIAPPAN
- Web page: https://patentgrep.com/patent/US20220284722A1

## CPC

- G06V 30/412: Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
- G06V 30/18: Extraction of features or characteristics of the image
- G06V 30/18057: {Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]}
- G06V 30/18105: {related to colour}
- G06V 30/184: by analysing segments intersecting the pattern
- G06V 30/19173: {Classification techniques}
- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

The present disclosure describes a method, system, and a computer readable medium for extracting tabular data present in a document. The method comprises detecting presence of at least one table in the document using a deep learning based model and a statistical method. The method further comprises identifying a type of the table based on determining a count of horizontal and vertical lines, presence of outer borders, and presence of row-column intersections in the table. The type of the table comprises a bordered table, a partially bordered table, or a borderless table. The method further comprises processing the detected table, depending on its type, to identify one or more cells present in the table. The method further comprises generating an output file by extracting the tabular data present in the table, where the extracting comprises performing optical character recognition on the identified one or more cells.

## Claims

### Claim 1

A computer implemented method for extracting tabular data present in a document, the method comprising:
detecting presence of at least one table in the document using a trained deep learning based model and a statistical method;
determining a count of horizontal and vertical lines, presence of outer borders, and presence of row-column intersections in the at least one table;
identifying, based on a result of the determination, a type of the at least one table from among a bordered table, a partially bordered table, or a borderless table;
processing the detected at least one table, depending on its type, to identify one or more cells present in the at least one table; and
generating an output file by extracting the tabular data present in the at least one table, wherein the extracting comprises performing optical character recognition (OCR) on the identified one or more cells.

### Claim 2 (depends on 1)

The method of claim 1, wherein each of the at least one table is an image comprising a table.

### Claim 3 (depends on 1)

The method of claim 1,
wherein the deep learning based model is adapted to provide multiple overlapping table predictions along with their confidence scores for the detected at least one table, and wherein the statistical method is adapted to select a single table prediction from the multiple overlapping table predictions based on the confidence scores, and
wherein the statistical method is Non Maximal Suppression (NMS) which selects the single table prediction by applying intersection over union on the confidence scores.

### Claim 4 (depends on 1)

The method of claim 1, wherein detecting the at least one table comprises determining co-ordinates of the at least one table present in the document, and wherein determining the presence of outer borders comprises:
determining the presence of outer borders of the at least one table based on the determined table co-ordinates.

### Claim 5 (depends on 2)

The method of claim 2, wherein determining a count of horizontal and vertical lines and presence of row-column intersections comprises:
inverting the at least one table image by identifying foreground and background pixels;
processing the at least one inverted table image using a dynamic parametrized horizontal image kernel to generate at least one table image with only horizontal lines (Tabhr);
processing the at least one inverted table image using a dynamic parametrized vertical image kernel to generate at least one table image with only vertical lines (Tabvr);
generating at least one table image with both horizontal and vertical lines (Tablines) based on the generated table images (Tabhr, Tabvr);
counting the number of horizontal and vertical lines in the generated table images (Tabhr, Tabvr); and
processing the generated at least one table image (Tablines) using an image kernel of fixed size to detect presence of the row-column intersections in the generated at least one table image (Tablines).

### Claim 6 (depends on 1)

The method of claim 1, wherein identifying a type of the at least one table comprises:
identifying the at least one table as a borderless table when the count of horizontal and vertical lines is zero and the outer borders are absent;
identifying the at least one table as a bordered table when the row-column intersections and the outer borders are present; and
identifying the at least one table as a partial bordered table:
when a count of row-column intersections is non-zero and the outer borders are absent; or
when a count of row-column intersections is zero and the outer borders are present.

### Claim 7 (depends on 2)

The method of claim 2, further comprising:
classifying the detected at least one table into a colored table or a non-colored table based on a difference of foreground and background pixels.

### Claim 8 (depends on 2)

The method of claim 2, wherein processing the detected at least one table to identify one or more cells comprises:
converting the detected at least one table into a bordered table, when the detected at least one table is a borderless table;
converting the detected at least one table into a borderless table and then into a bordered table, when the detected at least one table is a partially bordered table; and
identifying co-ordinates of the one or more cells present in the bordered table to extract the tabular data.

### Claim 9 (depends on 8)

The method of claim 8, wherein converting the partial bordered table into a borderless table comprises:
processing the partial bordered table using dynamic parametrized horizontal and vertical image kernels to generate a table with horizontal and vertical lines (Tablines); and
removing the horizontal and vertical lines from the table with horizontal and vertical lines (Tablines) to obtain the borderless table.

### Claim 10 (depends on 8)

The method of claim 8, wherein converting the borderless table into a bordered table comprises:
processing the borderless table image using a dynamic parametrized horizontal image kernel to generate a table image comprising row separators;
processing the borderless table image using a dynamic parametrized vertical image kernel to generate a table image comprising column separators;
generating a bordered table comprising horizontal and vertical lines based on the table images comprising row and column separators; and
removing the horizontal line corresponding to a table row of the bordered table image, when a number of filled cells in the table row is less than a threshold number.

### Claim 11

An end-to-end system for extracting tabular data present in a document, the system comprising:
a memory storing computer executable instructions; and
at least one processor in electronic communication with the memory and configured to:
detect presence of at least one table in the document using a trained deep learning based model and a statistical method;
determine a count of horizontal and vertical lines, presence of outer borders, and presence of row-column intersections in the at least one table;
identify, based on a result of the determination, a type of the at least one table from among a bordered table, a partially bordered table, or a borderless table;
process the detected at least one table, depending on its type, to identify one or more cells present in the at least one table; and
generate an output file by extracting the tabular data present in the at least one table, wherein the extracting comprises performing optical character recognition (OCR) on the identified one or more cells.

### Claim 12 (depends on 11)

The system of claim 11, wherein each of the at least one table is an image comprising a table.

### Claim 13 (depends on 11)

The system of claim 11,
wherein the deep learning based model is adapted to provide multiple overlapping table predictions along with their confidence scores for the detected at least one table, and wherein the statistical method is adapted to select a single table prediction from the multiple overlapping table predictions based on the confidence scores, and
wherein the statistical method is Non Maximal Suppression (NMS) which selects the single table prediction by applying intersection over union on the confidence scores.

### Claim 14 (depends on 11)

The system of claim 11, wherein to detect the at least one table, the at least one processor is configured to determine co-ordinates of the at least one table present in the document, and wherein to determine the presence of outer borders, the at least one processor is configured to:
determine the presence of outer borders of the at least one table based on the determined table co-ordinates.

### Claim 15 (depends on 12)

The system of claim 12, wherein to determine a count of horizontal and vertical lines and presence of row-column intersections, the at least one processor is configured to:
invert the at least one table image by identifying foreground and background pixels;
process the at least one inverted table image using a dynamic parametrized horizontal image kernel to generate at least one table image with only horizontal lines (Tabhr);
process the at least one inverted table image using a dynamic parametrized vertical image kernel to generate at least one table image with only vertical lines (Tabvr);
generate at least one table image with both horizontal and vertical lines (Tablines) based on the generated table images (Tabhr, Tabvr);
count the number of horizontal and vertical lines in the generated table images (Tabhr, Tabvr); and
process the generated at least one table image (Tablines) using an image kernel of fixed size to detect presence of the row-column intersections in the generated at least one table image (Tablines).

### Claim 16 (depends on 11)

The system of claim 11, to identify a type of the at least one table, the at least one processor is configured to:
identify the at least one table as a borderless table when the count of horizontal and vertical lines is zero and the outer borders are absent;
identify the at least one table as a bordered table when the row-column intersections and the outer borders are present; and
identify the at least one table as a partial bordered table:
when a count of row-column intersections is non-zero and the outer borders are absent; or
when a count of row-column intersections is zero and the outer borders are present.

### Claim 17 (depends on 12)

The system of claim 12, wherein to process the detected at least one table to identify one or more cells, the at least one processor is configured to:
convert the detected at least one table into a bordered table, when the detected at least one table is a borderless table;
convert the detected at least one table into a borderless table and then into a bordered table, when the detected at least one table is a partially bordered table; and
identify co-ordinates of the one or more cells present in the bordered table to extract the tabular data.

### Claim 18 (depends on 17)

The system of claim 17, wherein to convert the partial bordered table into a borderless table, the at least one processor is configured to:
process the partial bordered table using dynamic parametrized horizontal and vertical image kernels to generate a table with horizontal and vertical lines (Tablines); and
remove the horizontal and vertical lines from the table with horizontal and vertical lines (Tablines) to obtain the borderless table.

### Claim 19 (depends on 17)

The system of claim 17, wherein to convert the borderless table into a bordered table, the at least one processor is configured to:
process the borderless table image using a dynamic parametrized horizontal image kernel to generate a table image comprising row separators;
process the borderless table image using a dynamic parametrized vertical image kernel to generate a table image comprising column separators;
generate a bordered table comprising horizontal and vertical lines based on the table images comprising row and column separators; and
remove the horizontal line corresponding to a table row of the bordered table image, when a number of filled cells in the table row is less than a threshold number.

### Claim 20

A non-transitory computer readable media storing one or more instructions executable by at least one processor for extracting tabular data present in a document, the one or more instructions comprising:
one or more instructions for detecting presence of at least one table in the document using a trained deep learning based model and a statistical method;
one or more instructions for determining a count of horizontal and vertical lines, presence of outer borders, and presence of row-column intersections in the at least one table;
one or more instructions for identifying, based on a result of the determination, a type of the at least one table from among a bordered table, a partially bordered table, or a borderless table;
one or more instructions for processing the detected at least one table, depending on its type, to identify one or more cells present in the at least one table; and
one or more instructions for generating an output file by extracting the tabular data present in the at least one table, wherein the extracting comprises performing optical character recognition (OCR) on the identified one or more cells.
