From d91bb5e5be724e811fb975ee6445859e70e76104 Mon Sep 17 00:00:00 2001 From: MissPenguin Date: Tue, 14 Sep 2021 06:22:36 +0000 Subject: [PATCH] update hubserving default models to PP-OCRv2 --- deploy/hubserving/ocr_det/params.py | 2 +- deploy/hubserving/ocr_rec/params.py | 2 +- deploy/hubserving/ocr_system/params.py | 4 ++-- deploy/hubserving/readme.md | 6 +++--- deploy/hubserving/readme_en.md | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy/hubserving/ocr_det/params.py b/deploy/hubserving/ocr_det/params.py index bc75cc40..2587a297 100755 --- a/deploy/hubserving/ocr_det/params.py +++ b/deploy/hubserving/ocr_det/params.py @@ -13,7 +13,7 @@ def read_params(): #params for text detector cfg.det_algorithm = "DB" - cfg.det_model_dir = "./inference/ch_ppocr_mobile_v2.0_det_infer/" + cfg.det_model_dir = "./inference/ch_PP-OCRv2_det_infer/" cfg.det_limit_side_len = 960 cfg.det_limit_type = 'max' diff --git a/deploy/hubserving/ocr_rec/params.py b/deploy/hubserving/ocr_rec/params.py index f8d29114..5e11c3cf 100644 --- a/deploy/hubserving/ocr_rec/params.py +++ b/deploy/hubserving/ocr_rec/params.py @@ -13,7 +13,7 @@ def read_params(): #params for text recognizer cfg.rec_algorithm = "CRNN" - cfg.rec_model_dir = "./inference/ch_ppocr_mobile_v2.0_rec_infer/" + cfg.rec_model_dir = "./inference/ch_PP-OCRv2_rec_infer/" cfg.rec_image_shape = "3, 32, 320" cfg.rec_char_type = 'ch' diff --git a/deploy/hubserving/ocr_system/params.py b/deploy/hubserving/ocr_system/params.py index bee53bfd..4698e8ce 100755 --- a/deploy/hubserving/ocr_system/params.py +++ b/deploy/hubserving/ocr_system/params.py @@ -13,7 +13,7 @@ def read_params(): #params for text detector cfg.det_algorithm = "DB" - cfg.det_model_dir = "./inference/ch_ppocr_mobile_v2.0_det_infer/" + cfg.det_model_dir = "./inference/ch_PP-OCRv2_det_infer/" cfg.det_limit_side_len = 960 cfg.det_limit_type = 'max' @@ -31,7 +31,7 @@ def read_params(): #params for text recognizer cfg.rec_algorithm = "CRNN" - cfg.rec_model_dir = "./inference/ch_ppocr_mobile_v2.0_rec_infer/" + cfg.rec_model_dir = "./inference/ch_PP-OCRv2_rec_infer/" cfg.rec_image_shape = "3, 32, 320" cfg.rec_char_type = 'ch' diff --git a/deploy/hubserving/readme.md b/deploy/hubserving/readme.md index 11b843fe..b52e3584 100755 --- a/deploy/hubserving/readme.md +++ b/deploy/hubserving/readme.md @@ -34,10 +34,10 @@ pip3 install paddlehub==2.1.0 --upgrade -i https://pypi.tuna.tsinghua.edu.cn/sim ``` ### 2. 下载推理模型 -安装服务模块前,需要准备推理模型并放到正确路径。默认使用的是v2.0版的超轻量模型,默认模型路径为: +安装服务模块前,需要准备推理模型并放到正确路径。默认使用的是PP-OCRv2模型,默认模型路径为: ``` -检测模型:./inference/ch_ppocr_mobile_v2.0_det_infer/ -识别模型:./inference/ch_ppocr_mobile_v2.0_rec_infer/ +检测模型:./inference/ch_PP-OCRv2_det_infer/ +识别模型:./inference/ch_PP-OCRv2_rec_infer/ 方向分类器:./inference/ch_ppocr_mobile_v2.0_cls_infer/ ``` diff --git a/deploy/hubserving/readme_en.md b/deploy/hubserving/readme_en.md index 539ad722..3bbcf98c 100755 --- a/deploy/hubserving/readme_en.md +++ b/deploy/hubserving/readme_en.md @@ -35,10 +35,10 @@ pip3 install paddlehub==2.1.0 --upgrade -i https://pypi.tuna.tsinghua.edu.cn/sim ``` ### 2. Download inference model -Before installing the service module, you need to prepare the inference model and put it in the correct path. By default, the ultra lightweight model of v2.0 is used, and the default model path is: +Before installing the service module, you need to prepare the inference model and put it in the correct path. By default, the PP-OCRv2 models are used, and the default model path is: ``` -detection model: ./inference/ch_ppocr_mobile_v2.0_det_infer/ -recognition model: ./inference/ch_ppocr_mobile_v2.0_rec_infer/ +detection model: ./inference/ch_PP-OCRv2_det_infer/ +recognition model: ./inference/ch_PP-OCRv2_rec_infer/ text direction classifier: ./inference/ch_ppocr_mobile_v2.0_cls_infer/ ``` -- GitLab