PSNR
tuanlda78202 opened this issue · comments
Dear author @haochen-rye,
I would like to extend my sincere appreciation for the exceptional work you have accomplished. I am writing to seek clarification on the utilization of PSNR metrics within the model evaluation process. My understanding of this metric is that it is typically calculated using the formula 20 * torch.log10(255.0 / torch.sqrt(mse)). However, I noticed that in your code, the calculation for PSNR is represented as psnr = -10 * torch.log10(mse). Could you kindly provide an explanation for this discrepancy? Your insights would be greatly appreciated.
Thank you for your attention to this matter.
Yours sincerely,
Charles
Update: Because of the preprocessing step, the model has normalized the tensor to the range of 0 to 1, resulting in MAX=1. Therefore, the formula is simplified as above.