From 671cb14af2fb31c483953333cd004970165102a0 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Mon, 9 May 2022 12:51:21 +0000 Subject: [PATCH] modified default shape --- tools/infer/predict_rec.py | 2 +- tools/infer/predict_system.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index 340ea332..3664ef2c 100755 --- a/tools/infer/predict_rec.py +++ b/tools/infer/predict_rec.py @@ -407,7 +407,7 @@ def main(args): logger.info( "In PP-OCRv3, rec_image_shape parameter defaults to '3, 48, 320', " - "if you are using an older PP-OCR, please set --rec_image_shape='3,32,320'" + "if you are using recognition model with PP-OCRv2 or an older version, please set --rec_image_shape='3,32,320" ) # warmup 2 times if args.warmup: diff --git a/tools/infer/predict_system.py b/tools/infer/predict_system.py index 7e09c66d..625d365f 100755 --- a/tools/infer/predict_system.py +++ b/tools/infer/predict_system.py @@ -59,7 +59,7 @@ class TextSystem(object): for bno in range(bbox_num): cv2.imwrite( os.path.join(output_dir, - f"mg_crop_{bno+self.crop_image_res_index}.jpg "), + f"mg_crop_{bno+self.crop_image_res_index}.jpg"), img_crop_list[bno]) logger.debug(f"{bno}, {rec_res[bno]}") self.crop_image_res_index += bbox_num @@ -134,7 +134,7 @@ def main(args): save_results = [] logger.info("In PP-OCRv3, rec_image_shape parameter defaults to '3, 48, 320', " - "if you are using an older PP-OCR, please set --rec_image_shape='3,32,320'") + "if you are using recognition model with PP-OCRv2 or an older version, please set --rec_image_shape='3,32,320") # warm up 10 times if args.warmup: -- GitLab