Hi, everyone, I am pretty new to pytorch. Now I am stuck in how to write the dataloader for my task.
I have a haze image dataset. In the dataset, it has a folder of clear images, and a folder of haze images. All of these haze images are synthesized from the clear images, and one clear image will generate 30 haze images.
For example, there is a city.png image in clear folder, then there will have city_a1, city_a2, …, city_a30 images in haze folder. So the number of haze images are much larger than that of clear images.
I want to train a network to dehaze. Basically, I need the pairs image of (clear image, related haze image), that is the haze image has to match the clear image. So this is a one to many problem.
I only used datasets.ImageFolder before, but I do not think this will work for my task. So could anyone give some hint on how to design my own DataLoader to read pairs image? Thanks!