This code repository contains the implementations of the paper LGPMA: Complicated Table Structure Recognition with Local and Global Pyramid Mask Alignment (ICDAR 2021).
Original images can be downloaded from: pubtabnet.
The test datalist and the example of formatted training datalist can be found in demo/table_recognition/datalist/
The whole formatted training datalist can be downloaded from: PubTabNet_train_datalist_all.json [extraction code is 7gto].
Modified the paths of "ann_file", "img_prefix", "pretrained_model" and "work_space" in the config files demo/table_recognition/lgpma/config/lgpma_pub.py
.
Run the following bash command in the command line,
cd $DAVAR_LAB_OCR_ROOT$/demo/table_recognition/lgpma/
bash dist_train.sh
We provide a demo of forward inference and evaluation on PubTabNet dataset. You can modify the paths (savepath
, config_file
, checkpoint_file
) in test script, and start testing:
python test_pub.py
Some visualization of detection results are shown:
The offline evaluation tool can be found in demo/table_recognition/lgpma/tools/eval_pub/
All of the models are re-implemented and well trained in the based on the opensourced framework mmdetection. So, the results might be slightly different from reported results.
Results on various datasets and trained models download:
Dataset | Test Scale | TEDS-struc | Links |
---|---|---|---|
PubTabNet(reported) | L-768 | 96.7 | |
PubTabNet | 1.5x | 96.7 | config, pth (Access Code: gygm) |
The release model only contains structure-level result. You may use the text recognition module for the complete result.
The Trained Model on dataset SciTSR and ICDAR 2013 will release soon.
Note: Models are stored in BaiduYunPan, and can also be downloaded from Google Drive
If you find this repository is helpful to your research, please feel free to cite us:
@inproceedings{qiao2021icdar21,
title={LGPMA: Complicated Table Structure Recognition with Local and Global Pyramid Mask Alignment},
author={Qiao, Liang and Li, Zaisheng and Cheng, Zhanzhan and Zhang, Peng and Pu, Shiliang and Niu, Yi and Ren, Wenqi and Tan, Wenming and Wu, Fei},
booktitle={Document Analysis and Recognition-ICDAR 2021, 16th International Conference, Lausanne, Switzerland, September 5–10, 2021, Proceedings, Part I},
pages={99-114},
year={2021}
}
This project is released under the Apache 2.0 license
If there is any suggestion and problem, please feel free to contact the author with qiaoliang6@hikvision.com, lizaisheng@hikvision.com or chengzhanzhan@hikvision.com.