Commit
·
8191154
1
Parent(s):
d9e6a85
updated demo
Browse files- .gitignore +1 -0
- demo.py +2 -1
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
unfiltered_images
|
demo.py
CHANGED
@@ -80,7 +80,7 @@ def experiment_to_dict(experiment, skip=False):
|
|
80 |
return info
|
81 |
|
82 |
def generate_new_experiment() -> Experiment:
|
83 |
-
corruption = random.choice(list(Path(f"./images/{DATASET}").glob("
|
84 |
image_id = random.choice(list(corruption.glob("*")))
|
85 |
imgs_to_sample = (NUMBER_OF_IMAGES_PER_ROW * NUMBER_OF_ROWS) // 2
|
86 |
|
@@ -95,6 +95,7 @@ def generate_new_experiment() -> Experiment:
|
|
95 |
for img in random.sample(list((image_id / "ode").glob(f"*_{corrupted_ending_index}*")), imgs_to_sample)
|
96 |
]
|
97 |
total_images = sdedit_images + odedit_images
|
|
|
98 |
|
99 |
return Experiment(
|
100 |
DATASET,
|
|
|
80 |
return info
|
81 |
|
82 |
def generate_new_experiment() -> Experiment:
|
83 |
+
corruption = random.choice([f for f in list(Path(f"./images/{DATASET}").glob("*/*")) if f.is_dir()])
|
84 |
image_id = random.choice(list(corruption.glob("*")))
|
85 |
imgs_to_sample = (NUMBER_OF_IMAGES_PER_ROW * NUMBER_OF_ROWS) // 2
|
86 |
|
|
|
95 |
for img in random.sample(list((image_id / "ode").glob(f"*_{corrupted_ending_index}*")), imgs_to_sample)
|
96 |
]
|
97 |
total_images = sdedit_images + odedit_images
|
98 |
+
random.shuffle(total_images)
|
99 |
|
100 |
return Experiment(
|
101 |
DATASET,
|