MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / parse_args

Function parse_args

CV/SemSegPaddle/vis.py:39–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def parse_args():
40 parser = argparse.ArgumentParser(description='PaddeSeg visualization tools')
41 parser.add_argument(
42 '--cfg',
43 dest='cfg_file',
44 help='Config file for training (and optionally testing)',
45 default=None,
46 type=str)
47 parser.add_argument(
48 '--use_gpu', dest='use_gpu', help='Use gpu or cpu', action='store_true')
49 parser.add_argument(
50 '--vis_dir',
51 dest='vis_dir',
52 help='visual save dir',
53 type=str,
54 default='visual')
55 parser.add_argument(
56 '--local_test',
57 dest='local_test',
58 help='if in local test mode, only visualize 5 images for testing',
59 action='store_true')
60 parser.add_argument(
61 'opts',
62 help='See config.py for all options',
63 default=None,
64 nargs=argparse.REMAINDER)
65 if len(sys.argv) == 1:
66 parser.print_help()
67 sys.exit(1)
68 return parser.parse_args()
69
70
71def makedirs(directory):

Callers 1

vis.pyFile · 0.70

Calls 1

parse_argsMethod · 0.45

Tested by

no test coverage detected