rename OCRSystem to StructureSystem
parent
2471a6a1e3
commit
b3fbfc3109
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue