Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember to change the dataLoader before running #25

Open
chocologic opened this issue May 7, 2023 · 0 comments
Open

Remember to change the dataLoader before running #25

chocologic opened this issue May 7, 2023 · 0 comments

Comments

@chocologic
Copy link

chocologic commented May 7, 2023

我不知道是上传的代码版本有问题还是别的原因,但是DataLoader确实有问题,它没有返回hazy and gt, 而是hazy和正则化的hazy(名字为clear)。 这就是为什么指标很好,但是视觉上看没有效果的原因:因为dataloader的问题,模型拟合的目标一开始就是错的。
Error in class dataloader , it should return hazy image and clear image, but dataloader returns normalized hazy image and hazy image. This is why the metrics are good, but visually ineffective: because of the dataloader, the goal of the model fitting was wrong in the first place.

Code below looks normal but "clear" is actually hazy image.

clear_name = img    
clear = Image.open(os.path.join(self.clear_dir, clear_name))  

Advised Solution:

(__init__)
self.clear_imgs_dir = os.listdir(os.path.join(path, 'GT'))
self.clear_imgs = [os.path.join(path, 'GT', img) for img in self.clear_imgs_dir]                  
(__getitem__)
clear = Image.open(self.clear_imgs[index])
@chocologic chocologic changed the title DataLoader的问题 Remember to change the dataLoader before running Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant