From d8c0dbdaaedf2d8da0ac4fd31a6f8248ca47a419 Mon Sep 17 00:00:00 2001 From: zhoujun Date: Tue, 31 Jan 2023 19:25:48 +0800 Subject: [PATCH] Add custom detection and recognition model usage instructions in re (#8930) * Add custom detection and recognition model usage instructions in re * update * Add custom detection and recognition model usage instructions in re --- ppstructure/kie/README.md | 7 +++++++ ppstructure/kie/README_ch.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ppstructure/kie/README.md b/ppstructure/kie/README.md index d8e18443..6717aa0c 100644 --- a/ppstructure/kie/README.md +++ b/ppstructure/kie/README.md @@ -186,6 +186,10 @@ python3 ./tools/infer_kie_token_ser_re.py \ The visual result images and the predicted text file will be saved in the `Global.save_res_path` directory. +If you want to use a custom ocr model, you can set it through the following fields +- `Global.kie_det_model_dir`: the detection inference model path +- `Global.kie_rec_model_dir`: the recognition inference model path + If you want to load the text detection and recognition results collected before, you can use the following command to predict. @@ -257,6 +261,9 @@ python3 kie/predict_kie_token_ser_re.py \ The visual results and text file will be saved in directory `output`. +If you want to use a custom ocr model, you can set it through the following fields +- `--det_model_dir`: the detection inference model path +- `--rec_model_dir`: the recognition inference model path ### 4.3 More diff --git a/ppstructure/kie/README_ch.md b/ppstructure/kie/README_ch.md index 7a8b1942..2efb49fd 100644 --- a/ppstructure/kie/README_ch.md +++ b/ppstructure/kie/README_ch.md @@ -170,6 +170,10 @@ python3 ./tools/infer_kie_token_ser_re.py \ `Global.save_res_path`目录中会保存可视化的结果图像以及预测的文本文件。 +如果想使用自定义OCR模型,可通过如下字段进行设置 +- `Global.kie_det_model_dir`: 设置检测inference模型地址 +- `Global.kie_rec_model_dir`: 设置识别inference模型地址 + 如果希望加载标注好的文本检测与识别结果,仅预测可以使用下面的命令进行预测。 @@ -239,6 +243,9 @@ python3 kie/predict_kie_token_ser_re.py \ 可视化结果保存在`output`目录下。 +如果想使用自定义OCR模型,可通过如下字段进行设置 +- `--det_model_dir`: 设置检测inference模型地址 +- `--rec_model_dir`: 设置识别inference模型地址 ### 4.3 更多 -- GitLab