Open luyvlei opened 11 months ago
This repository uses the following code in this file. But the formula should be 10 * math.log10(255.0 / math.sqrt(mse)), The result of the calculation is 2 times larger than the normal result.
10 * math.log10(255.0 / math.sqrt(mse))
def compute_psnr(self, gen_imgs, gt_imgs): mse = np.mean((gt_imgs - gen_imgs) ** 2) if mse == 0: return 100 return 20 * math.log10(255.0 / math.sqrt(mse))
This repository uses the following code in this file. But the formula should be
10 * math.log10(255.0 / math.sqrt(mse))
, The result of the calculation is 2 times larger than the normal result.