maxim-spaces / glob_p.py
sayakpaul's picture
sayakpaul HF staff
add: example images.
1f3f870
raw history blame
No virus
477 Bytes
import glob
import os
root_path = "images"
tasks = ["Deraining", "Dehazing", "Enhancement", "Deblurring", "Denoising"]
task_wise_image_paths = {}
for task in tasks:
task_path = os.path.join(root_path, task, "input")
image_paths = os.listdir(task_path)
image_paths = [os.path.join(task_path, image_path) for image_path in image_paths]
image_paths = [[i] for i in image_paths]
task_wise_image_paths.update({task: image_paths})
print(task_wise_image_paths)