MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / get_parser

Function get_parser

demo/demo.py:34–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def get_parser():
35 parser = argparse.ArgumentParser(description="Detectron2 demo for builtin models")
36 parser.add_argument(
37 "--config-file",
38 default="configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml",
39 metavar="FILE",
40 help="path to config file",
41 )
42 parser.add_argument("--webcam", action="store_true", help="Take inputs from webcam.")
43 parser.add_argument("--video-input", help="Path to video file.")
44 parser.add_argument(
45 "--input",
46 nargs="+",
47 help="A list of space separated input images; "
48 "or a single glob pattern such as 'directory/*.jpg'",
49 )
50 parser.add_argument(
51 "--output",
52 help="A file or directory to save output visualizations. "
53 "If not given, will show output in an OpenCV window.",
54 )
55
56 parser.add_argument(
57 "--confidence-threshold",
58 type=float,
59 default=0.5,
60 help="Minimum score for instance predictions to be shown",
61 )
62 parser.add_argument(
63 "--opts",
64 help="Modify config options using the command-line 'KEY VALUE' pairs",
65 default=[],
66 nargs=argparse.REMAINDER,
67 )
68 return parser
69
70
71if __name__ == "__main__":

Callers 1

demo.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected