From b3fbfc31093f9fe694c52004c5c8d60914f5410c Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Wed, 30 Mar 2022 09:24:24 +0000 Subject: [PATCH] rename OCRSystem to StructureSystem --- paddleocr.py | 4 ++-- ppstructure/predict_system.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddleocr.py b/paddleocr.py index dc96a5b6..3a06158b 100644 --- a/paddleocr.py +++ b/paddleocr.py @@ -39,7 +39,7 @@ from ppocr.utils.utility import check_and_read_gif, get_image_file_list from ppocr.utils.network import maybe_download, download_with_progressbar, is_link, confirm_model_dir_url from tools.infer.utility import draw_ocr, str2bool, check_gpu from ppstructure.utility import init_args, draw_structure_result -from ppstructure.predict_system import OCRSystem, save_structure_res +from ppstructure.predict_system import StructureSystem, save_structure_res __all__ = [ 'PaddleOCR', 'PPStructure', 'draw_ocr', 'draw_structure_result', @@ -398,7 +398,7 @@ class PaddleOCR(predict_system.TextSystem): return rec_res -class PPStructure(OCRSystem): +class PPStructure(StructureSystem): def __init__(self, **kwargs): params = parse_args(mMain=False) params.__dict__.update(**kwargs) diff --git a/ppstructure/predict_system.py b/ppstructure/predict_system.py index 3ae52fdd..f6703e1a 100644 --- a/ppstructure/predict_system.py +++ b/ppstructure/predict_system.py @@ -35,7 +35,7 @@ from ppstructure.utility import parse_args, draw_structure_result logger = get_logger() -class OCRSystem(object): +class StructureSystem(object): def __init__(self, args): self.mode = args.mode if self.mode == 'structure': @@ -139,7 +139,7 @@ def main(args): image_file_list = image_file_list image_file_list = image_file_list[args.process_id::args.total_process_num] - structure_sys = OCRSystem(args) + structure_sys = StructureSystem(args) img_num = len(image_file_list) save_folder = os.path.join(args.output, structure_sys.mode) os.makedirs(save_folder, exist_ok=True) -- GitLab