diff --git a/tools/eval.py b/tools/eval.py index 4afed469c875ef8d2200cdbfd89e5a8af4c6b7c3..9817fa75093dd5127e3d11501ebc0473c9b53365 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -59,10 +59,10 @@ def main(): eval_class = build_metric(config['Metric']) # start eval - metirc = program.eval(model, valid_dataloader, post_process_class, + metric = program.eval(model, valid_dataloader, post_process_class, eval_class, use_srn) logger.info('metric eval ***************') - for k, v in metirc.items(): + for k, v in metric.items(): logger.info('{}:{}'.format(k, v)) diff --git a/tools/export_model.py b/tools/export_model.py index 1e9526e03d6b9001249d5891c37bee071c1f36a3..f587b2bb363e01ab4c0b2429fc95f243085649d1 100755 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -31,14 +31,6 @@ from ppocr.utils.logging import get_logger from tools.program import load_config, merge_config, ArgsParser -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument("-c", "--config", help="configuration file to use") - parser.add_argument( - "-o", "--output_path", type=str, default='./output/infer/') - return parser.parse_args() - - def main(): FLAGS = ArgsParser().parse_args() config = load_config(FLAGS.config)