Update demo.py
Browse files
demo.py
CHANGED
@@ -81,7 +81,7 @@ def experiment_to_dict(experiment, skip=False):
|
|
81 |
|
82 |
def generate_new_experiment() -> Experiment:
|
83 |
wanted_corruptions = ["spatter", "impulse_noise", "speckle_noise", "gaussian_noise", "pixelate", "jpeg_compression"]
|
84 |
-
corruption = random.choice([f for f in list(Path(f"./images/{DATASET}").glob("*/*")) if f.is_dir() and f.name in wanted_corruptions)
|
85 |
image_id = random.choice(list(corruption.glob("*")))
|
86 |
imgs_to_sample = (NUMBER_OF_IMAGES_PER_ROW * NUMBER_OF_ROWS) // 2
|
87 |
|
|
|
81 |
|
82 |
def generate_new_experiment() -> Experiment:
|
83 |
wanted_corruptions = ["spatter", "impulse_noise", "speckle_noise", "gaussian_noise", "pixelate", "jpeg_compression"]
|
84 |
+
corruption = random.choice([f for f in list(Path(f"./images/{DATASET}").glob("*/*")) if f.is_dir() and f.name in wanted_corruptions])
|
85 |
image_id = random.choice(list(corruption.glob("*")))
|
86 |
imgs_to_sample = (NUMBER_OF_IMAGES_PER_ROW * NUMBER_OF_ROWS) // 2
|
87 |
|