MCPcopy Create free account
hub / github.com/chenhaoxing/DiffusionInst / get_parser

Function get_parser

demo.py:43–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

demo.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected