From 496887f83ffc07c8d26aab1c4356497541b52509 Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Thu, 17 Mar 2022 14:20:41 +0000 Subject: [PATCH] change print to logger.debug --- doc/doc_ch/whl.md | 2 +- doc/doc_en/whl_en.md | 2 +- paddleocr.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/doc_ch/whl.md b/doc/doc_ch/whl.md index 3b88709a..2d524b83 100644 --- a/doc/doc_ch/whl.md +++ b/doc/doc_ch/whl.md @@ -418,7 +418,7 @@ im_show.save('result.jpg') | det | 前向时使用启动检测 | TRUE | | rec | 前向时是否启动识别 | TRUE | | cls | 前向时是否启动分类 (命令行模式下使用use_angle_cls控制前向是否启动分类) | FALSE | -| show_log | 是否打印det和rec等信息 | FALSE | +| show_log | 是否打印logger信息 | FALSE | | type | 执行ocr或者表格结构化, 值可选['ocr','structure'] | ocr | | ocr_version | OCR模型版本,可选PP-OCRv2, PP-OCR。PP-OCRv2 目前仅支持中文的检测和识别模型,PP-OCR支持中文的检测,识别,多语种识别,方向分类器等模型 | PP-OCRv2 | | structure_version | 表格结构化模型版本,可选 STRUCTURE。STRUCTURE支持表格结构化模型 | STRUCTURE | diff --git a/doc/doc_en/whl_en.md b/doc/doc_en/whl_en.md index 62aa452d..2671fbb9 100644 --- a/doc/doc_en/whl_en.md +++ b/doc/doc_en/whl_en.md @@ -365,7 +365,7 @@ im_show.save('result.jpg') | det | Enable detction when `ppocr.ocr` func exec | TRUE | | rec | Enable recognition when `ppocr.ocr` func exec | TRUE | | cls | Enable classification when `ppocr.ocr` func exec((Use use_angle_cls in command line mode to control whether to start classification in the forward direction) | FALSE | -| show_log | Whether to print log in det and rec | FALSE | +| show_log | Whether to print log| FALSE | | type | Perform ocr or table structuring, the value is selected in ['ocr','structure'] | ocr | | ocr_version | OCR Model version number, the current model support list is as follows: PP-OCRv2 support Chinese detection and recognition model, PP-OCR support Chinese detection, recognition and direction classifier, multilingual recognition model | PP-OCRv2 | | structure_version | table structure Model version number, the current model support list is as follows: STRUCTURE support english table structure model | STRUCTURE | diff --git a/paddleocr.py b/paddleocr.py index f0938c67..b3776ec2 100644 --- a/paddleocr.py +++ b/paddleocr.py @@ -42,7 +42,7 @@ __all__ = [ ] SUPPORT_DET_MODEL = ['DB'] -VERSION = '2.4' +VERSION = '2.4.0.1' SUPPORT_REC_MODEL = ['CRNN'] BASE_DIR = os.path.expanduser("~/.paddleocr/") @@ -338,7 +338,7 @@ class PaddleOCR(predict_system.TextSystem): params.rec_char_dict_path = str( Path(__file__).parent / rec_model_config['dict_path']) - print(params) + logger.debug(params) # init det_model and rec_model super().__init__(params) @@ -438,7 +438,7 @@ class PPStructure(OCRSystem): params.table_char_dict_path = str( Path(__file__).parent / table_model_config['dict_path']) - print(params) + logger.debug(params) super().__init__(params) def __call__(self, img): @@ -499,4 +499,4 @@ def main(): for item in result: item.pop('img') - logger.info(item) + logger.info(item) \ No newline at end of file -- GitLab