Commit 1afde377 authored by Ilija Radosavovic's avatar Ilija Radosavovic Committed by Facebook Github Bot

Provide options for specifying vis thresholds for the demo tool

Reviewed By: rbgirshick

Differential Revision: D10131443

fbshipit-source-id: ee6df3147b94711eecbe558bcaf30d021976b593
parent f7d394ce
......@@ -89,9 +89,6 @@ def parse_args():
help='output image even when no object is found',
action='store_true'
)
parser.add_argument(
'im_or_folder', help='image or folder of images', default=None
)
parser.add_argument(
'--output-ext',
dest='output_ext',
......@@ -99,6 +96,23 @@ def parse_args():
default='pdf',
type=str
)
parser.add_argument(
'--thresh',
dest='thresh',
help='Threshold for visualizing detections',
default=0.7,
type=float
)
parser.add_argument(
'--kp-thresh',
dest='kp_thresh',
help='Threshold for visualizing keypoints',
default=2.0,
type=float
)
parser.add_argument(
'im_or_folder', help='image or folder of images', default=None
)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
......@@ -157,8 +171,8 @@ def main(args):
dataset=dummy_coco_dataset,
box_alpha=0.3,
show_class=True,
thresh=0.7,
kp_thresh=2,
thresh=args.thresh,
kp_thresh=args.kp_thresh,
ext=args.output_ext,
out_when_no_box=args.out_when_no_box
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment