MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / parse_args

Function parse_args

tools/test.py:27–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def parse_args():
28 parser = argparse.ArgumentParser(
29 description='MMDet test (and eval) a model')
30 parser.add_argument('config', help='test config file path')
31 parser.add_argument('checkpoint', help='checkpoint file')
32 parser.add_argument('--out', help='output result file in pickle format')
33 parser.add_argument(
34 '--fuse-conv-bn',
35 action='store_true',
36 help='Whether to fuse conv and bn, this will slightly increase'
37 'the inference speed')
38 parser.add_argument(
39 '--format-only',
40 action='store_true',
41 help='Format the output results without perform evaluation. It is'
42 'useful when you want to format the result to a specific format and '
43 'submit it to the test server')
44 parser.add_argument(
45 '--eval',
46 type=str,
47 nargs='+',
48 help='evaluation metrics, which depends on the dataset, e.g., "bbox",'
49 ' "segm", "proposal" for COCO, and "mAP", "recall" for PASCAL VOC')
50 parser.add_argument('--show', action='store_true', help='show results')
51 parser.add_argument(
52 '--show_dir', type=str, default='', help='directory where results will be saved')
53 parser.add_argument(
54 '--gpu-collect',
55 action='store_true',
56 help='whether to use gpu to collect results.')
57 parser.add_argument(
58 '--tmpdir',
59 help='tmp directory used for collecting results from multiple '
60 'workers, available when gpu-collect is not specified')
61 parser.add_argument('--seed', type=int, default=0, help='random seed')
62 parser.add_argument(
63 '--deterministic',
64 action='store_true',
65 help='whether to set deterministic options for CUDNN backend.')
66 parser.add_argument(
67 '--cfg-options',
68 nargs='+',
69 action=DictAction,
70 help='override some settings in the used config, the key-value pair '
71 'in xxx=yyy format will be merged into config file. If the value to '
72 'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
73 'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
74 'Note that the quotation marks are necessary and that no white space '
75 'is allowed.')
76 parser.add_argument(
77 '--options',
78 nargs='+',
79 action=DictAction,
80 help='custom options for evaluation, the key-value pair in xxx=yyy '
81 'format will be kwargs for dataset.evaluate() function (deprecate), '
82 'change to --eval-options instead.')
83 parser.add_argument(
84 '--eval-options',

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected