MCPcopy
hub / github.com/hustvl/Vim / parse_args

Function parse_args

seg/test.py:25–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def parse_args():
26 parser = argparse.ArgumentParser(
27 description='mmseg test (and eval) a model')
28 parser.add_argument('config', help='test config file path')
29 parser.add_argument('checkpoint', help='checkpoint file')
30 parser.add_argument(
31 '--work-dir',
32 help=('if specified, the evaluation metric results will be dumped'
33 'into the directory as json'))
34 parser.add_argument(
35 '--aug-test', action='store_true', help='Use Flip and Multi scale aug')
36 parser.add_argument('--out', help='output result file in pickle format')
37 parser.add_argument(
38 '--format-only',
39 action='store_true',
40 help='Format the output results without perform evaluation. It is'
41 'useful when you want to format the result to a specific format and '
42 'submit it to the test server')
43 parser.add_argument(
44 '--eval',
45 type=str,
46 nargs='+',
47 help='evaluation metrics, which depends on the dataset, e.g., "mIoU"'
48 ' for generic datasets, and "cityscapes" for Cityscapes')
49 parser.add_argument('--show', action='store_true', help='show results')
50 parser.add_argument(
51 '--show-dir', help='directory where painted images will be saved')
52 parser.add_argument(
53 '--gpu-collect',
54 action='store_true',
55 help='whether to use gpu to collect results.')
56 parser.add_argument(
57 '--gpu-id',
58 type=int,
59 default=0,
60 help='id of gpu to use '
61 '(only applicable to non-distributed testing)')
62 parser.add_argument(
63 '--tmpdir',
64 help='tmp directory used for collecting results from multiple '
65 'workers, available when gpu_collect is not specified')
66 parser.add_argument(
67 '--options',
68 nargs='+',
69 action=DictAction,
70 help="--options is deprecated in favor of --cfg_options' and it will "
71 'not be supported in version v0.22.0. Override some settings in the '
72 'used config, the key-value pair in xxx=yyy format will be merged '
73 'into config file. If the value to be overwritten is a list, it '
74 'should be like key="[a,b]" or key=a,b It also allows nested '
75 'list/tuple values, e.g. key="[(a,b),(c,d)]" Note that the quotation '
76 'marks are necessary and that no white space is allowed.')
77 parser.add_argument(
78 '--cfg-options',
79 nargs='+',
80 action=DictAction,
81 help='override some settings in the used config, the key-value pair '
82 'in xxx=yyy format will be merged into config file. If the value to '

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected