ykdai / Flare7K

Official Implementation of "Flare7K: A Phenomenological Nighttime Flare Removal Dataset"
https://ykdai.github.io/projects/Flare7K
Other
119 stars 16 forks source link

Is there an error in your data_loader.py? #11

Closed Shanxing1 closed 8 months ago

Shanxing1 commented 8 months ago

In your data_loader.py, class Flare_Image_Loader, there are some codes to transform the PIL image to tensor: if self.transform_base is not None: base_img=to_tensor(base_img) base_img=adjust_gamma(base_img) base_img=self.transform_base(base_img) else: base_img=to_tensor(base_img) base_img=adjust_gamma(base_img) base_img=base_img.permute(2,0,1)

in the ELSE branch, is 'base_img=base_img.permute(2,0,1)' still needed? I think the to_sensor function already did this, when I didn't use transform_base, there was an error about dimension.

ykdai commented 8 months ago

Thank you so much for your correction. I think you are right, I have removed this line in the dataloader. Thank you again for your kind feedback : )