You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the official repository of StructEqTable-Deploy, a solution that converts images of Table into LaTeX, powered by scalable data from [DocGenome benchmark](https://unimodal4reasoning.github.io/DocGenome_page/).
12
+
Welcome to the official repository of StructEqTable-Deploy, a solution that converts images of Table into LaTeX/HTML/MarkDown, powered by scalable data from [DocGenome benchmark](https://unimodal4reasoning.github.io/DocGenome_page/).
13
13
14
14
15
15
## Overview
16
16
Table is an effective way to represent structured data in scientific publications, financial statements, invoices, web pages, and many other scenarios. Extracting tabular data from a visual table image and performing the downstream reasoning tasks according to the extracted data is challenging, mainly due to that tables often present complicated column and row headers with spanning cell operation. To address these challenges, we present TableX, a large-scale multi-modal table benchmark extracted from [DocGenome benchmark](https://unimodal4reasoning.github.io/DocGenome_page/) for table pre-training, comprising more than 2 million high-quality Image-LaTeX pair data covering 156 disciplinary classes. Besides, benefiting from such large-scale data, we train an end-to-end model, StructEqTable, which provides the capability to precisely obtain the corresponding LaTeX description from a visual table image and perform multiple table-related reasoning tasks, including structural extraction and question answering, broadening its application scope and potential.
17
17
18
18
## Changelog
19
-
Tips: Current version of StructEqTable is able to process table images from scientific documents such as arXiv, Scihub papers. Times New Roman And Songti(宋体) are main fonts used in table image, other fonts may decrease the accuracy of the model's output.
20
-
-**[2024/8/22] 🔥 We have released our [latest model](https://huggingface.co/U4R/StructTable-base/tree/v0.2), fine-tuned on the DocGenome dataset. This version features improved inference speed and robustness, achieved through data augmentation and reduced image token num.**
19
+
-[2024/10/19] 🔥 We have released our **latest model [StructTable-InternVL2-1B](https://huggingface.co/U4R/StructTable-InternVL-1B/tree/main)**!
20
+
21
+
Thanks to IntenrVL2 powerful foundational capabilities, and through fine-tuning on the synthetic tabular data and DocGenome dataset, StructTable can convert table image into various common table formats including LaTeX, HTML, and Markdown. Moreover, inference speed has been significantly improved compared to the v0.2 version.
22
+
-[2024/8/22] We have released our StructTable-base-v0.2, fine-tuned on the DocGenome dataset. This version features improved inference speed and robustness, achieved through data augmentation and reduced image token num.
21
23
-[2024/8/08] We have released the TensorRT accelerated version, which only takes about 1 second for most images on GPU A100. Please follow the tutorial to install the environment and compile the model weights.
22
24
-[2024/7/30] We have released the first version of StructEqTable.
23
25
@@ -26,12 +28,10 @@ Tips: Current version of StructEqTable is able to process table images from scie
26
28
-[x] Release inference code and checkpoints of StructEqTable.
27
29
-[x] Support Chinese version of StructEqTable.
28
30
-[x] Accelerated version of StructEqTable using TensorRT-LLM.
29
-
-[ ] Expand more domains of table image to improve the model's general capabilities.
31
+
-[x] Expand more domains of table image to improve the model's general capabilities.
32
+
-[x] Efficient inference of StructTable-InternVL2-1B by [LMDepoly](https://github.com/InternLM/lmdeploy) Tookit.
30
33
-[ ] Release our table pre-training and fine-tuning code
31
34
32
-
## Efficient Inference
33
-
Our model now supports TensorRT-LLM deployment, achieving a 10x or more speedup in during inference.
34
-
Please refer to [GETTING_STARTED.md](docs/GETTING_STARTED.md) to learn how to depoly.
- HTML or Markdown format output (Only Supported by StructTable-InternVL2-1B)
73
75
74
-
Our model output Latex format code by default.
75
-
If you want to get other format like HTML or Markdown,
76
-
`pypandoc` support convert latex format code into HTML and Markdown format for simple table (table has no merge cell ).
76
+
```shell script
77
+
python demo.py \
78
+
--image_path ./demo.png \
79
+
--ckpt_path U4R/StructTable-InternVL-1B \
80
+
--output_format html markdown
81
+
```
77
82
83
+
## Efficient Inference
84
+
- Install LMDeploy Tookit
78
85
```shell script
79
-
sudo apt install pandoc
80
-
pip install pypandoc
86
+
pip install lmdeploy
87
+
```
81
88
89
+
- Run the demo/demo.py
90
+
```shell script
82
91
cd tools/demo
83
92
84
93
python demo.py \
85
94
--image_path ./demo.png \
86
-
--ckpt_path ${CKPT_PATH} \
87
-
--output_format html markdown
95
+
--ckpt_path U4R/StructTable-InternVL-1B \
96
+
--output_format latex \
97
+
--lmdeploy
88
98
```
89
99
90
100
@@ -100,9 +110,11 @@ python demo.py \
100
110
-[DocGenome](https://github.com/UniModal4Reasoning/DocGenome). An Open Large-scale Scientific Document Benchmark for Training and Testing Multi-modal Large Models.
101
111
-[ChartVLM](https://github.com/UniModal4Reasoning/ChartVLM). A Versatile Benchmark and Foundation Model for Complicated Chart Reasoning.
102
112
-[Pix2Struct](https://github.com/google-research/pix2struct). Screenshot Parsing as Pretraining for Visual Language Understanding.
113
+
-[InternVL Family](https://github.com/OpenGVLab/InternVL). A Series of Powerful Foundational Vision-Language Models.
114
+
-[LMDepoly](https://github.com/InternLM/lmdeploy). A toolkit for compressing, deploying, and serving LLM and MLLM.
103
115
-[UniMERNet](https://github.com/opendatalab/UniMERNet). A Universal Network for Real-World Mathematical Expression Recognition.
104
116
-[Donut](https://huggingface.co/naver-clova-ix/donut-base). The UniMERNet's Transformer Encoder-Decoder are referenced from Donut.
105
-
-[Nougat](https://github.com/facebookresearch/nougat). The tokenizer uses Nougat.
117
+
-[Nougat](https://github.com/facebookresearch/nougat). Data Augmentation follows Nougat.
106
118
-[TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM). Model inference acceleration uses TensorRT-LLM.
0 commit comments