diff --git a/paddleocr.py b/paddleocr.py index dc96a5b6e94bae399daef5ce07655b012ee4c0d4..3a06158b0c92ea70e4320646d38e8c9e9295e9db 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 3ae52fdd703670c4250f1b4a440004fa8b9082ad..f6703e1a419a38b51fb2cb034c6e2b1aa6d8aa90 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)