--- comments: true --- # Table Structure Recognition Module Tutorial ## 1. Overview Table structure recognition is an important component of table recognition systems, capable of converting non-editable table images into editable table formats (such as HTML). The goal of table structure recognition is to identify the positions of rows, columns, and cells in tables. The performance of this module directly affects the accuracy and efficiency of the entire table recognition system. The table structure recognition module usually outputs HTML or Latex code for the table area, which is then passed as input to the table content recognition module for further processing. ## 2. Supported Model List
Model | Model Download Link | Accuracy (%) | GPU Inference Time (ms) [Normal Mode / High Performance Mode] |
CPU Inference Time (ms) [Normal Mode / High Performance Mode] |
Model Storage Size (M) | Description |
---|---|---|---|---|---|---|
SLANet | Inference Model/Training Model | 59.52 | 103.08 / 103.08 | 197.99 / 197.99 | 6.9 M | SLANet is a table structure recognition model independently developed by Baidu PaddlePaddle Vision Team. By adopting a CPU-friendly lightweight backbone network PP-LCNet, high-low level feature fusion module CSP-PAN, and SLA Head, a feature decoding module aligning structure and position information, this model greatly improves the accuracy and inference speed of table structure recognition. |
SLANet_plus | Inference Model/Training Model | 63.69 | 140.29 / 140.29 | 195.39 / 195.39 | 6.9 M | SLANet_plus is an enhanced version of the table structure recognition model SLANet independently developed by the Baidu PaddlePaddle Vision Team. Compared to SLANet, SLANet_plus has greatly improved the recognition ability for wireless and complex tables, and reduced the model's sensitivity to table positioning accuracy. Even if the table positioning is offset, it can still be accurately recognized. |
SLANeXt_wired | Inference Model/Training Model | 69.65 | -- | -- | 351M | The SLANeXt series is a new generation of table structure recognition models independently developed by the Baidu PaddlePaddle Vision Team. Compared to SLANet and SLANet_plus, SLANeXt focuses on table structure recognition, and trains dedicated weights for wired and wireless tables separately. The recognition ability for all types of tables has been significantly improved, especially for wired tables. |
SLANeXt_wireless | Inference Model/Training Model |
Mode | GPU Configuration | CPU Configuration | Acceleration Technology Combination |
---|---|---|---|
Normal Mode | FP32 precision / No TRT acceleration | FP32 precision / 8 threads | PaddleInference |
High Performance Mode | Optimal combination of prior precision type and acceleration strategy | FP32 precision / 8 threads | Selects the prior optimal backend (Paddle/OpenVINO/TRT, etc.) |
', ' | ', '|||
', ' | ', ' | ', ' | ', ' |
', ' | ', ' | ', ' | ', ' |
', ' | ', ' | ', ' | ', ' |
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
model_name |
Model name | str |
All model names supported by PaddleX | None |
model_dir |
Model storage path | str |
None | None |
device |
Model inference device | str |
Supports specifying specific GPU cards, such as “gpu:0”, other hardware such as “npu:0”, CPU as “cpu”. | gpu:0 |
use_hpip |
Whether to enable high-performance inference plugin | bool |
None | False |
hpi_config |
High-performance inference configuration | dict | None |
None | None |
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
input |
Data to be predicted, supports multiple input types | Python Var /str /list |
|
None |
batch_size |
Batch size | int |
Any integer | 1 |
Method | Description | Parameter | Type | Parameter Description | Default |
---|---|---|---|---|---|
print() |
Print result to terminal | format_json |
bool |
Whether to use JSON indentation formatting for the output |
True |
indent |
int |
Specify indentation level to beautify the output JSON data, making it more readable, effective only when format_json is True |
4 | ||
ensure_ascii |
bool |
Controls whether to escape non-ASCII characters as Unicode . When set to True , all non-ASCII characters will be escaped; False keeps the original characters. Effective only when format_json is True |
False |
||
save_to_json() |
Save result as json format file | save_path |
str |
Path to save the file. If it's a directory, the saved file will be named the same as the input file type | None |
indent |
int |
Specify indentation level to beautify the output JSON data, making it more readable, effective only when format_json is True |
4 | ||
ensure_ascii |
bool |
Controls whether to escape non-ASCII characters as Unicode . When set to True , all non-ASCII characters will be escaped; False keeps the original characters. Effective only when format_json is True |
False |
Attribute | Description |
---|---|
json |
Get the prediction result in json format |