thomaseding
commited on
Commit
•
53cca15
1
Parent(s):
2a3e6a9
Rename to controlled_downscale.py
Browse files
mapped_downscale.py → controlled_downscale.py
RENAMED
@@ -235,7 +235,7 @@ def str2bool(value) -> bool:
|
|
235 |
raise argparse.ArgumentTypeError("Boolean value expected.")
|
236 |
|
237 |
|
238 |
-
def
|
239 |
"""
|
240 |
Downsample and rescale an image.
|
241 |
|
@@ -290,7 +290,7 @@ def main(cli_args: List[str]) -> None:
|
|
290 |
args = parser.parse_args(cli_args)
|
291 |
downsampler = Image.Resampling[args.downsampler.upper()]
|
292 |
|
293 |
-
|
294 |
control_path=args.control,
|
295 |
input_path=args.input,
|
296 |
output_downscaled_path=args.output_downscaled,
|
|
|
235 |
raise argparse.ArgumentTypeError("Boolean value expected.")
|
236 |
|
237 |
|
238 |
+
def controlled_downscale(*, control_path: str, input_path: str, output_downscaled_path: Optional[str], output_quantized_path: Optional[str], sample_radius: Optional[int], downsampler: Image.Resampling, trim_cropped_edges: bool) -> None:
|
239 |
"""
|
240 |
Downsample and rescale an image.
|
241 |
|
|
|
290 |
args = parser.parse_args(cli_args)
|
291 |
downsampler = Image.Resampling[args.downsampler.upper()]
|
292 |
|
293 |
+
controlled_downscale(
|
294 |
control_path=args.control,
|
295 |
input_path=args.input,
|
296 |
output_downscaled_path=args.output_downscaled,
|