zychen-ustc / PSD-Principled-Synthetic-to-Real-Dehazing-Guided-by-Physical-Priors

Zeyuan Chen, Yangchao Wang, Yang Yang and Dong Liu. "PSD: Principled Synthetic-to-Real Dehazing Guided by Physical Priors". IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
MIT License
120 stars 19 forks source link

训练验证的一些问题 #8

Closed xiaoyuan1996 closed 2 years ago

xiaoyuan1996 commented 3 years ago

您好,感谢您的工作为去雾工作提供了一个很好的框架,我们向您表示真诚的感谢。在复现您的代码时,我们直接使用了您所提供的FFA预训练模型PSD-FFANET,加载后用来对RESIDE/SOTS/indoor进行验证,但验证结果十分不理想。中间有什么bug方便说一下吗?

我们仅进行了如下修改: 1.由于RESIDE/SOTS/indoor内的clear和hazy尺寸不对应,我们对真值进行了resize:

    H, W, C = np.shape(haze_img)
    gt_img = gt_img.resize((W, H), Image.ANTIALIAS)

2.其他的修改都是程序运行的修改。

另外是否方便对代码的错误进行一些修改并进行提交,如

  1. utilis.py 第 112 行 应改为: dehaze = net(haze, haze_A, True)
  2. utilis.py 96、97行 代码应该隐去
  3. ......

再次感谢您的贡献。

zychen-ustc commented 3 years ago

您好!非常抱歉这么晚才回复。请问您能展示一些不理想的结果图片吗?我猜测可能是处理数据的过程出现了问题。

xiaoyuan1996 commented 3 years ago

Date: 2021-10-16 23:04:22s, Time_Cost: 4230s, Epoch: [1/20], Train_PSNR: 25.57, Val_PSNR: 12.83, Val_SSIM: 0.6736 Date: 2021-10-17 00:14:56s, Time_Cost: 4233s, Epoch: [2/20], Train_PSNR: 27.18, Val_PSNR: 12.60, Val_SSIM: 0.6624 Date: 2021-10-17 01:25:30s, Time_Cost: 4235s, Epoch: [3/20], Train_PSNR: 28.84, Val_PSNR: 12.26, Val_SSIM: 0.6462 Date: 2021-10-17 02:36:02s, Time_Cost: 4232s, Epoch: [4/20], Train_PSNR: 29.62, Val_PSNR: 12.47, Val_SSIM: 0.6576 Date: 2021-10-17 03:46:32s, Time_Cost: 4230s, Epoch: [5/20], Train_PSNR: 30.62, Val_PSNR: 12.74, Val_SSIM: 0.6707 Date: 2021-10-17 04:57:03s, Time_Cost: 4230s, Epoch: [6/20], Train_PSNR: 31.25, Val_PSNR: 12.33, Val_SSIM: 0.6527 Date: 2021-10-17 06:07:32s, Time_Cost: 4229s, Epoch: [7/20], Train_PSNR: 31.68, Val_PSNR: 12.42, Val_SSIM: 0.6555 Date: 2021-10-17 07:18:05s, Time_Cost: 4233s, Epoch: [8/20], Train_PSNR: 32.59, Val_PSNR: 12.46, Val_SSIM: 0.6585 Date: 2021-10-17 08:28:38s, Time_Cost: 4233s, Epoch: [9/20], Train_PSNR: 32.78, Val_PSNR: 12.55, Val_SSIM: 0.6610 Date: 2021-10-17 09:39:11s, Time_Cost: 4234s, Epoch: [10/20], Train_PSNR: 33.52, Val_PSNR: 12.35, Val_SSIM: 0.6524 Date: 2021-10-17 10:49:44s, Time_Cost: 4233s, Epoch: [11/20], Train_PSNR: 34.26, Val_PSNR: 12.47, Val_SSIM: 0.6570 Date: 2021-10-17 12:00:19s, Time_Cost: 4235s, Epoch: [12/20], Train_PSNR: 34.60, Val_PSNR: 12.52, Val_SSIM: 0.6583 Date: 2021-10-17 13:10:58s, Time_Cost: 4239s, Epoch: [13/20], Train_PSNR: 35.25, Val_PSNR: 12.55, Val_SSIM: 0.6596 Date: 2021-10-17 14:21:42s, Time_Cost: 4243s, Epoch: [14/20], Train_PSNR: 35.57, Val_PSNR: 12.47, Val_SSIM: 0.6568 Date: 2021-10-17 22:22:51s, Time_Cost: 5649s, Epoch: [1/20], Train_PSNR: 33.87, Val_PSNR: 14.03, Val_SSIM: 0.6331 Date: 2021-10-17 23:57:00s, Time_Cost: 5649s, Epoch: [2/20], Train_PSNR: 34.73, Val_PSNR: 14.16, Val_SSIM: 0.6440 Date: 2021-10-18 01:31:09s, Time_Cost: 5649s, Epoch: [3/20], Train_PSNR: 35.13, Val_PSNR: 14.85, Val_SSIM: 0.6636 Date: 2021-10-18 03:05:21s, Time_Cost: 5652s, Epoch: [4/20], Train_PSNR: 35.55, Val_PSNR: 17.17, Val_SSIM: 0.7079 Date: 2021-10-18 04:39:33s, Time_Cost: 5652s, Epoch: [5/20], Train_PSNR: 36.00, Val_PSNR: 13.28, Val_SSIM: 0.5955 Date: 2021-10-18 06:13:46s, Time_Cost: 5653s, Epoch: [6/20], Train_PSNR: 36.29, Val_PSNR: 15.29, Val_SSIM: 0.6785 Date: 2021-10-18 07:48:03s, Time_Cost: 5657s, Epoch: [7/20], Train_PSNR: 36.62, Val_PSNR: 14.56, Val_SSIM: 0.6375 Date: 2021-10-18 09:22:24s, Time_Cost: 5661s, Epoch: [8/20], Train_PSNR: 36.83, Val_PSNR: 14.44, Val_SSIM: 0.6303 Date: 2021-10-18 10:56:37s, Time_Cost: 5653s, Epoch: [9/20], Train_PSNR: 37.10, Val_PSNR: 14.16, Val_SSIM: 0.6150 Date: 2021-10-18 12:30:57s, Time_Cost: 5660s, Epoch: [10/20], Train_PSNR: 37.44, Val_PSNR: 15.66, Val_SSIM: 0.6616 Date: 2021-10-18 14:05:37s, Time_Cost: 5680s, Epoch: [11/20], Train_PSNR: 37.74, Val_PSNR: 14.69, Val_SSIM: 0.6432

train精度在训练时是上升的 , 然而val一直不对

zychen-ustc commented 2 years ago

我认为很有可能是train和validation过程的数据预处理pipeline出现了不对齐的情况,导致性能下降,你可以检查一下。

xuyj-DL commented 2 years ago

请问您解决了么,我用作者预训练微调的FFA,再SOTS-indoor上效果也不理想,仅仅是用作者提供的测试文件,这是我哪一步出错了吗。

zychen-ustc commented 2 years ago

您好,您可以提供一些failure cases吗

xuyj-DL commented 2 years ago

哇!很感谢大佬您的认真回复! 其实总的来说并没有failure cases。

我在贵作的基础上没有作其他操作,就简单的测试了Reside SOTS上测试集图片,发现最后得出的PSRR,SSIM值比较低。

但是不得不说,视觉感知上来说,回复的效果很棒;从左到右:haze, PSD, Ground truth

但可以明显感觉到,整体的颜色对比度提升的很厉害,所以不可避免的和Ground truth 有很大的误差。所以我认为这应该是正常现象,不能单纯用PSNR/SSIM作为评估指标。不知道有没有理解错误,学生刚开始初学... 再次感觉大佬您的回复,第一次这么近距离!!!!

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年4月30日(星期六) 下午4:23 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [zychen-ustc/PSD-Principled-Synthetic-to-Real-Dehazing-Guided-by-Physical-Priors] 训练验证的一些问题 (Issue #8)

您好,您可以提供一些failure cases吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>