fingerk28 / Two-stage-Knowledge-For-Multiple-Adverse-Weather-Removal

[CVPR 2022] Learning Multiple Adverse Weather Removal via Two-stage Knowledge Learning and Multi-contrastive Regularization: Toward a Unified Model
MIT License
142 stars 16 forks source link

Metrics on RGB or Y? #11

Open jiaqixuac opened 1 year ago

jiaqixuac commented 1 year ago

Hi,

Thank you for your nice work. I want to know how you calculate the metrics for reporting.

Here are some results using your code and your model weights. 1) python inference.py --checkpoint student-setting1.pth xxx and save the restored images. 2) Calculate psnr and ssim using a) RGB: torchPSNR(pred_image, gt_image) + pytorch_ssim.ssim(pred_image, gt_image); b) Y: torchPSNR(rgb2ycbcr(pred_image[0]), rgb2ycbcr(gt_image[0])) + sk_cpt_ssim(rgb2ycbcr(pred_image[0]), rgb2ycbcr(gt_image[0]), data_range=1.0, multichannel=True).

The val data (and numbers) are: SOTS outdoor (500), Rain1400 (1400), CSD (2000).

Here are my results compared to the CVPR version:

Haze Rain Snow
RGB 31.35/0.9441 30.54/0.9004 30.10/0.9334
Y 33.39/0.9693 32.51/0.9218 31.68/0.9495
Yours 33.95/0.98 33.13/0.93 31.35/0.95

I think the metrics calculated on the Y channel are close to yours. Can you clarify this? Thanks!

huang-hz commented 1 year ago

I get the same value on Rain1400 testset

jjb202 commented 1 year ago

Do you generate the meta file for training? can you provide the generate code by dataset path?