加载中…
加载中…
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 code for the table area, which is then passed as input to the table recognition pipeline for further processing.
| Model | Accuracy (%) | GPU Inference Time (ms) [Normal Mode / High Performance Mode] |
CPU Inference Time (ms) [Normal Mode / High Performance Mode] |
Model Storage Size (M) |
|---|---|---|---|---|
| SLANeXt_wired | 69.65 | -- | -- | 351M |
Note: The accuracy of SLANeXt_wired comes from the results of joint testing with SLANeXt_wireless.
pip install -U paddleocr
pip install -U onnxruntime-gpu
paddleocr table_structure_recognition -i ./demo.jpg --model_name SLANeXt_wired --engine onnxruntime
from paddleocr import TableStructureRecognition
model = TableStructureRecognition(
model_name="SLANeXt_wired",
engine="onnxruntime",
)
output = model.predict("./demo.jpg", batch_size=1)
for res in output:
res.print()
res.save_to_json(save_path="./output/res.json")