MCPcopy Create free account
hub / github.com/Lans1ng/OSSOD / parse_args

Function parse_args

eval.py:18–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def parse_args():
19 parser = argparse.ArgumentParser(description='MMDet test (and eval) a model')
20 parser.add_argument('--config', default='',
21 help='test config file path')
22 parser.add_argument('--checkpoint', default='',
23 help='checkpoint file')
24 parser.add_argument('--out', help='output result file in pickle format')
25 parser.add_argument('--out_embeddings', help='output result file in pickle format')
26 parser.add_argument(
27 '--fuse-conv-bn',
28 action='store_true',
29 help='Whether to fuse conv and bn, this will slightly increase'
30 'the inference speed')
31 parser.add_argument(
32 '--format-only',
33 action='store_true',
34 help='Format the output results without perform evaluation. It is'
35 'useful when you want to format the result to a specific format and '
36 'submit it to the test server')
37 parser.add_argument(
38 '--eval',
39 # default='bbox',
40 type=str,
41 nargs='+',
42 help='evaluation metrics, which depends on the dataset, e.g., "bbox",'
43 ' "segm", "proposal" for COCO, and "mAP", "recall" for PASCAL VOC')
44 parser.add_argument('--show', action='store_true', help='show results')
45 parser.add_argument(
46 '--show-dir', help='directory where painted images will be saved')
47 parser.add_argument(
48 '--show-score-thr',
49 type=float,
50 default=0.3,
51 help='score threshold (default: 0.3)')
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 '--tmpdir',
58 help='tmp directory used for collecting results from multiple '
59 'workers, available when gpu-collect is not specified')
60 parser.add_argument(
61 '--cfg-options',
62 nargs='+',
63 action=DictAction,
64 help='override some settings in the used config, the key-value pair '
65 'in xxx=yyy format will be merged into config file. If the value to '
66 'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
67 'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
68 'Note that the quotation marks are necessary and that no white space '
69 'is allowed.')
70 parser.add_argument(
71 '--options',
72 nargs='+',
73 action=DictAction,
74 help='custom options for evaluation, the key-value pair in xxx=yyy '
75 'format will be kwargs for dataset.evaluate() function (deprecate), '

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected