From 6632695d142f912cd94fffd35ee1bf9272c99fb7 Mon Sep 17 00:00:00 2001 From: Eric Bezzam Date: Thu, 2 May 2024 17:14:24 +0200 Subject: [PATCH] Remove prints. --- scripts/data/upload_dataset_huggingface.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/data/upload_dataset_huggingface.py b/scripts/data/upload_dataset_huggingface.py index 9fd72475..2b212d97 100644 --- a/scripts/data/upload_dataset_huggingface.py +++ b/scripts/data/upload_dataset_huggingface.py @@ -92,7 +92,6 @@ def upload_dataset(config): def downsample(f, output_dir): img = cv2.imread(f, cv2.IMREAD_UNCHANGED) img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) - print("Original shape:", img.shape) img = cv2.resize( img, (0, 0), @@ -100,7 +99,6 @@ def downsample(f, output_dir): fy=1 / config.lensless.downsample, interpolation=cv2.INTER_LINEAR, ) - print("Downsampled shape:", img.shape) new_fp = os.path.join(output_dir, os.path.basename(f)) new_fp = new_fp.split(".")[0] + config.lensless.ext save_image(img, new_fp, normalize=False) @@ -273,7 +271,7 @@ def create_dataset(lensless_files, lensed_files, df_attr=None): print(f"Total time: {(time.time() - start_time) / 60} minutes") # delete PNG files - if config.lensless.eight_norm: + if config.lensless.eight_norm or config.lensless.downsample: os.system(f"rm -rf {tmp_dir}")