KIE Algorithm - SDMGR¶
1. Introduction¶
Paper:
Spatial Dual-Modality Graph Reasoning for Key Information Extraction
Hongbin Sun and Zhanghui Kuang and Xiaoyu Yue and Chenhao Lin and Wayne Zhang
2021
On wildreceipt dataset, the algorithm reproduction Hmean is as follows.
Model | Backbone | Cnnfig | Hmean | Download link |
---|---|---|---|---|
SDMGR | VGG6 | configs/kie/sdmgr/kie_unet_sdmgr.yml | 86.70% | trained model/inference model(coming soon) |
2. 环境配置¶
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¶
SDMGR is a key information extraction algorithm that classifies each detected textline into predefined categories, such as order ID, invoice number, amount, etc.
The training and test data are collected in the wildreceipt dataset, use following command to downloaded the dataset.
Create dataset soft link to PaddleOCR/train_data
directory.
3.1 Model training¶
The config file is configs/kie/sdmgr/kie_unet_sdmgr.yml
, the default dataset path is train_data/wildreceipt
.
Use the following command to train the model.
3.2 Model evaluation¶
Use the following command to evaluate the model:
An example of output information is shown below.
3.3 Model prediction¶
Use the following command to load the model and predict. During the prediction, the text file storing the image path and OCR information needs to be loaded in advance. Use Global.infer_img
to assign.
The visualization results and texts are saved in the ./output/sdmgr_kie/
directory by default. The results are as follows.
4. Inference and Deployment¶
4.1 Python Inference¶
Not supported
4.2 C++ Inference¶
Not supported
4.3 Serving¶
Not supported
4.4 More¶
Not supported
5. FAQ¶
Citation¶
@misc{sun2021spatial,
title={Spatial Dual-Modality Graph Reasoning for Key Information Extraction},
author={Hongbin Sun and Zhanghui Kuang and Xiaoyu Yue and Chenhao Lin and Wayne Zhang},
year={2021},
eprint={2103.14470},
archivePrefix={arXiv},
primaryClass={cs.CV}
}