From ce21ad8357b3da70999442e9ca492ea7e7978473 Mon Sep 17 00:00:00 2001
From: WenmuZhou <572459439@qq.com>
Date: Fri, 1 Jul 2022 08:55:04 +0000
Subject: [PATCH] update docs
---
ppstructure/docs/models_list.md | 13 ++++++------
ppstructure/docs/models_list_en.md | 13 ++++++------
ppstructure/infer.sh | 4 ++++
ppstructure/vqa/README.md | 25 +++++++++++-----------
ppstructure/vqa/README_ch.md | 33 +++++++++++++++---------------
5 files changed, 44 insertions(+), 44 deletions(-)
create mode 100644 ppstructure/infer.sh
diff --git a/ppstructure/docs/models_list.md b/ppstructure/docs/models_list.md
index 71d0566b..dabce3a5 100644
--- a/ppstructure/docs/models_list.md
+++ b/ppstructure/docs/models_list.md
@@ -1,12 +1,11 @@
# PP-Structure 系列模型列表
-- [PP-Structure 系列模型列表](#pp-structure-系列模型列表)
- - [1. 版面分析模型](#1-版面分析模型)
- - [2. OCR和表格识别模型](#2-ocr和表格识别模型)
- - [2.1 OCR](#21-ocr)
- - [2.2 表格识别模型](#22-表格识别模型)
- - [3. VQA模型](#3-vqa模型)
- - [4. KIE模型](#4-kie模型)
+- [1. 版面分析模型](#1-版面分析模型)
+- [2. OCR和表格识别模型](#2-ocr和表格识别模型)
+ - [2.1 OCR](#21-ocr)
+ - [2.2 表格识别模型](#22-表格识别模型)
+- [3. VQA模型](#3-vqa模型)
+- [4. KIE模型](#4-kie模型)
diff --git a/ppstructure/docs/models_list_en.md b/ppstructure/docs/models_list_en.md
index b3a07555..e133a0bb 100644
--- a/ppstructure/docs/models_list_en.md
+++ b/ppstructure/docs/models_list_en.md
@@ -1,12 +1,11 @@
# PP-Structure Model list
-- [PP-Structure Model list](#pp-structure-model-list)
- - [1. Layout Analysis](#1-layout-analysis)
- - [2. OCR and Table Recognition](#2-ocr-and-table-recognition)
- - [2.1 OCR](#21-ocr)
- - [2.2 Table Recognition](#22-table-recognition)
- - [3. VQA](#3-vqa)
- - [4. KIE](#4-kie)
+- [1. Layout Analysis](#1-layout-analysis)
+- [2. OCR and Table Recognition](#2-ocr-and-table-recognition)
+ - [2.1 OCR](#21-ocr)
+ - [2.2 Table Recognition](#22-table-recognition)
+- [3. VQA](#3-vqa)
+- [4. KIE](#4-kie)
diff --git a/ppstructure/infer.sh b/ppstructure/infer.sh
new file mode 100644
index 00000000..a08cbadf
--- /dev/null
+++ b/ppstructure/infer.sh
@@ -0,0 +1,4 @@
+python3.7 vqa/predict_vqa_token_ser.py --vqa_algorithm=LayoutXLM --ser_model_dir=../models/ser_LayoutXLM_xfun_zh/infer --ser_dict_path=../train_data/XFUND/class_list_xfun.txt --image_dir=docs/vqa/input/zh_val_42.jpg
+
+
+python3.7 tools/infer_vqa_token_ser_re.py -c configs/vqa/re/layoutxlm.yml -o Architecture.Backbone.checkpoints=models/re_LayoutXLM_xfun_zh/ Global.infer_img=ppstructure/docs/vqa/input/zh_val_21.jpg -c_ser configs/vqa/ser/layoutxlm.yml -o_ser Architecture.Backbone.checkpoints=models/ser_LayoutXLM_xfun_zh/
\ No newline at end of file
diff --git a/ppstructure/vqa/README.md b/ppstructure/vqa/README.md
index cfb42100..05635265 100644
--- a/ppstructure/vqa/README.md
+++ b/ppstructure/vqa/README.md
@@ -1,16 +1,15 @@
English | [简体中文](README_ch.md)
-- [Document Visual Question Answering](#document-visual-question-answering)
- - [1 Introduction](#1-introduction)
- - [2. Performance](#2-performance)
- - [3. Effect demo](#3-effect-demo)
- - [3.1 SER](#31-ser)
- - [3.2 RE](#32-re)
- - [4. Install](#4-install)
- - [4.1 Install dependencies](#41-install-dependencies)
- - [5.3 RE](#53-re)
- - [6. Reference Links](#6-reference-links)
- - [License](#license)
+- [1 Introduction](#1-introduction)
+- [2. Performance](#2-performance)
+- [3. Effect demo](#3-effect-demo)
+ - [3.1 SER](#31-ser)
+ - [3.2 RE](#32-re)
+- [4. Install](#4-install)
+ - [4.1 Install dependencies](#41-install-dependencies)
+ - [5.3 RE](#53-re)
+- [6. Reference Links](#6-reference-links)
+- [License](#license)
# Document Visual Question Answering
@@ -212,7 +211,7 @@ python3.7 tools/export_model.py -c configs/vqa/ser/layoutxlm.yml -o Architecture
The converted model will be stored in the directory specified by the `Global.save_inference_dir` field.
* `OCR + SER` tandem prediction based on prediction engine
-
+
Use the following command to complete the tandem prediction of `OCR + SER` based on the prediction engine, taking the SER model based on LayoutXLM as an example:
```shell
@@ -268,7 +267,7 @@ python3 tools/infer_vqa_token_ser_re.py -c configs/vqa/re/layoutxlm.yml -o Archi
Finally, the prediction result visualization image and the prediction result text file will be saved in the directory configured by the `config.Global.save_res_path` field. The prediction result text file is named `infer_results.txt`.
* export model
-
+
cooming soon
* `OCR + SER + RE` tandem prediction based on prediction engine
diff --git a/ppstructure/vqa/README_ch.md b/ppstructure/vqa/README_ch.md
index 52113b80..b421a82d 100644
--- a/ppstructure/vqa/README_ch.md
+++ b/ppstructure/vqa/README_ch.md
@@ -1,20 +1,19 @@
[English](README.md) | 简体中文
-- [文档视觉问答(DOC-VQA)](#文档视觉问答doc-vqa)
- - [1. 简介](#1-简介)
- - [2. 性能](#2-性能)
- - [3. 效果演示](#3-效果演示)
- - [3.1 SER](#31-ser)
- - [3.2 RE](#32-re)
- - [4. 安装](#4-安装)
- - [4.1 安装依赖](#41-安装依赖)
- - [4.2 安装PaddleOCR(包含 PP-OCR 和 VQA)](#42-安装paddleocr包含-pp-ocr-和-vqa)
- - [5. 使用](#5-使用)
- - [5.1 数据和预训练模型准备](#51-数据和预训练模型准备)
- - [5.2 SER](#52-ser)
- - [5.3 RE](#53-re)
- - [6. 参考链接](#6-参考链接)
- - [License](#license)
+- [1. 简介](#1-简介)
+- [2. 性能](#2-性能)
+- [3. 效果演示](#3-效果演示)
+ - [3.1 SER](#31-ser)
+ - [3.2 RE](#32-re)
+- [4. 安装](#4-安装)
+ - [4.1 安装依赖](#41-安装依赖)
+ - [4.2 安装PaddleOCR(包含 PP-OCR 和 VQA)](#42-安装paddleocr包含-pp-ocr-和-vqa)
+- [5. 使用](#5-使用)
+ - [5.1 数据和预训练模型准备](#51-数据和预训练模型准备)
+ - [5.2 SER](#52-ser)
+ - [5.3 RE](#53-re)
+- [6. 参考链接](#6-参考链接)
+- [License](#license)
# 文档视觉问答(DOC-VQA)
@@ -211,7 +210,7 @@ python3.7 tools/export_model.py -c configs/vqa/ser/layoutxlm.yml -o Architecture
转换后的模型会存放在`Global.save_inference_dir`字段指定的目录下。
* 基于预测引擎的`OCR + SER`串联预测
-
+
使用如下命令即可完成基于预测引擎的`OCR + SER`的串联预测, 以基于LayoutXLM的SER模型为例:
```shell
@@ -266,7 +265,7 @@ python3 tools/infer_vqa_token_ser_re.py -c configs/vqa/re/layoutxlm.yml -o Archi
最终会在`config.Global.save_res_path`字段所配置的目录下保存预测结果可视化图像以及预测结果文本文件,预测结果文本文件名为`infer_results.txt`。
* 模型导出
-
+
cooming soon
* 基于预测引擎的`OCR + SER + RE`串联预测
--
GitLab