MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / main

Function main

tools/eval_det.py:20–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def main():
21 FLAGS = parse_args()
22 cfg = Config(FLAGS.config)
23 FLAGS = vars(FLAGS)
24 opt = FLAGS.pop('opt')
25 cfg.merge_dict(FLAGS)
26 cfg.merge_dict(opt)
27 trainer = Trainer(cfg, mode='eval', task='det')
28
29 best_model_dict = trainer.status.get('metrics', {})
30 trainer.logger.info('metric in ckpt ***************')
31 for k, v in best_model_dict.items():
32 trainer.logger.info('{}:{}'.format(k, v))
33
34 metric = trainer.eval()
35
36 trainer.logger.info('metric eval ***************')
37 for k, v in metric.items():
38 trainer.logger.info('{}:{}'.format(k, v))
39
40
41if __name__ == '__main__':

Callers 1

eval_det.pyFile · 0.70

Calls 6

merge_dictMethod · 0.95
evalMethod · 0.95
ConfigClass · 0.90
TrainerClass · 0.90
getMethod · 0.80
parse_argsFunction · 0.70

Tested by

no test coverage detected