diff --git a/apply_events.py b/apply_events.py index ec603df0..33d87ecf 100644 --- a/apply_events.py +++ b/apply_events.py @@ -100,7 +100,7 @@ def parse_args(): "-b", "--batch_size", type=int, - default=8, + default=4, help="Batch size to process input images to events", ) parser.add_argument( @@ -127,11 +127,10 @@ def parse_args(): + " In particular it must contain opts.yaml and checkpoints/", ) parser.add_argument( - "-t", - "--time", + "--no_time", action="store_true", default=False, - help="Binary flag to time operations or not. Defaults to False.", + help="Binary flag to prevent the timing of operations.", ) parser.add_argument( "-m", @@ -175,11 +174,11 @@ def parse_args(): help="Do not check for existing outdir", ) parser.add_argument( - "-c", - "--cloudy", + "--no_cloudy", action="store_true", default=False, - help="Use the cloudy intermediate image to create the flood image", + help="Prevent the use of the cloudy intermediate" + + " image to create the flood image", ) parser.add_argument( "--keep_ratio_128", @@ -210,6 +209,7 @@ def parse_args(): batch_size = args.batch_size half = args.half + cloudy = not args.no_cloudy images_paths = Path(args.images_paths).expanduser().resolve() bin_value = args.flood_mask_binarization outdir = ( @@ -218,7 +218,7 @@ def parse_args(): else None ) resume_path = args.resume_path - time_inference = args.time + time_inference = not args.no_time n_images = args.n_images xla_purge_samples = args.xla_purge_samples if args.keep_ratio_128: @@ -351,7 +351,7 @@ def parse_args(): bin_value=bin_value, half=half, xla=XLA, - cloudy=args.cloudy, + cloudy=cloudy, ) # store events to write after inference loop