From 89cab814d79a40a1d312e6a3bc4718ec7dc9c7b2 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 21 May 2021 09:58:29 +0800 Subject: [PATCH] fix doc of prune --- deploy/slim/prune/README.md | 4 ++-- deploy/slim/prune/README_en.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/slim/prune/README.md b/deploy/slim/prune/README.md index bc121467..bdea2394 100644 --- a/deploy/slim/prune/README.md +++ b/deploy/slim/prune/README.md @@ -49,14 +49,14 @@ python3 setup.py install 进入PaddleOCR根目录,通过以下命令对模型进行敏感度分析训练: ```bash -python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" +python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/ ``` ### 4. 导出模型、预测部署 在得到裁剪训练保存的模型后,我们可以将其导出为inference_model: ```bash -pytho3.7 deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=inference_model +pytho3.7 deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=./prune/prune_inference_model ``` inference model的预测和部署参考: diff --git a/deploy/slim/prune/README_en.md b/deploy/slim/prune/README_en.md index 0d04c7ea..d2fb593b 100644 --- a/deploy/slim/prune/README_en.md +++ b/deploy/slim/prune/README_en.md @@ -54,7 +54,7 @@ Enter the PaddleOCR root directory,perform sensitivity analysis on the model w ```bash -python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" +python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model="your trained model" Global.save_model_dir=./output/prune_model/ ``` @@ -63,7 +63,7 @@ python3.7 deploy/slim/prune/sensitivity_anal.py -c configs/det/ch_ppocr_v2.0/ch_ We can export the pruned model as inference_model for deployment: ```bash -python deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=inference_model +python deploy/slim/prune/export_prune_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o Global.pretrained_model=./output/det_db/best_accuracy Global.save_inference_dir=./prune/prune_inference_model ``` Reference for prediction and deployment of inference model: -- GitLab