MCPcopy Create free account
hub / github.com/Tsinghua-MARS-Lab/CVT-Occ / parse_args

Function parse_args

tools/test.py:28–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected