Skip to content

Commit

Permalink
Make filter threshold an argument (#11)
Browse files Browse the repository at this point in the history
Allow user to control the post-processing score filter threshold.
  • Loading branch information
CloudyOverhead authored Apr 27, 2021
1 parent 835d8c8 commit 7dcdcc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acrosome_counter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main(args):
cfg = build_cfg(
is_training, args.batch_size, args.learning_rate, args.qty_iters,
)
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = .3
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = args.threshold
predictor = Predictor(cfg)
predictor(dataset, plot=args.plot)
predictor.export_xml()
Expand All @@ -45,6 +45,7 @@ def main(args):
parser.add_argument('-bs', '--batch_size', default=1, type=int)
parser.add_argument('-it', '--qty_iters', default=1, type=int)
parser.add_argument('-lr', '--learning_rate', default=2.5E-4, type=float)
parser.add_argument('-t', '--threshold', default=.1, type=float)
parser.add_argument('--train', action='store_true')
parser.add_argument('--infer', action='store_true')
parser.add_argument('--plot', action='store_true')
Expand Down

0 comments on commit 7dcdcc0

Please sign in to comment.