Table Recognition Algorithm-TableMASTER¶
1. Introduction¶
Paper:
TableMaster: PINGAN-VCGROUP’S SOLUTION FOR ICDAR 2021 COMPETITION ON SCIENTIFIC LITERATURE PARSING TASK B: TABLE RECOGNITION TO HTML Ye, Jiaquan and Qi, Xianbiao and He, Yelin and Chen, Yihao and Gu, Dengyi and Gao, Peng and Xiao, Rong 2021
On the PubTabNet table recognition public data set, the algorithm reproduction acc is as follows:
Model | Backbone | Cnnfig | Acc | Download link |
---|---|---|---|---|
TableMaster | TableResNetExtra | configs/table/table_master.yml | 77.47% | trained model/inference model |
2. Environment¶
Please refer to "Environment Preparation" to configure the PaddleOCR environment, and refer to "Project Clone"to clone the project code.
3. Model Training / Evaluation / Prediction¶
The above TableMaster model is trained using the PubTabNet table recognition public dataset. For the download of the dataset, please refer to table_datasets.
After the data download is complete, please refer to Text Recognition Training Tutorial for training. PaddleOCR has modularized the code structure, so that you only need to replace the configuration file to train different models.
4. Inference and Deployment¶
4.1 Python Inference¶
First, convert the model saved in the TableMaster table recognition training process into an inference model. Taking the model based on the TableResNetExtra backbone network and trained on the PubTabNet dataset as example (model download link), you can use the following command to convert:
Note:
- If you trained the model on your own dataset and adjusted the dictionary file, please pay attention to whether the
character_dict_path
in the modified configuration file is the correct dictionary file
Execute the following command for model inference:
After executing the command, the prediction results of the above image (structural information and the coordinates of each cell in the table) are printed to the screen, and the visualization of the cell coordinates is also saved. An example is as follows:
result:
Note:
- TableMaster is relatively slow during inference, and it is recommended to use GPU for use.
4.2 C++ Inference¶
Since the post-processing is not written in CPP, the TableMaster does not support CPP inference.
4.3 Serving¶
Not supported
4.4 More¶
Not supported
5. FAQ¶
Citation¶
@article{ye2021pingan,
title={PingAn-VCGroup's Solution for ICDAR 2021 Competition on Scientific Literature Parsing Task B: Table Recognition to HTML},
author={Ye, Jiaquan and Qi, Xianbiao and He, Yelin and Chen, Yihao and Gu, Dengyi and Gao, Peng and Xiao, Rong},
journal={arXiv preprint arXiv:2105.01848},
year={2021}
}