fit_a_nef.metrics.psnr

fit_a_nef.metrics.psnr(image: Array, ground_truth: Array, mean: Array, std: Array) Array

Vectorized version of psnr. Takes similar arguments as psnr but with additional array axes over which psnr is mapped.

Original documentation:

Computes the Peak Signal to Noise Ration (PSNR). Peak signal found from ground_truth and

noise is given as the mean square error (MSE) between image and ground_truth. The value is returned in decibels.

https://github.com/photosynthesis-team/piq/blob/master/piq/psnr.py

param image:

the first tensor used in the calculation.

type image:

jnp.ndarray

param ground_truth:

the second tensor used in the calculation.

type ground_truth:

jnp.ndarray

param mean:

the mean of the dataset.

type mean:

jnp.ndarray

param std:

the standard deviation of the dataset.

type std:

jnp.ndarray

return:

the mean of the PNSR of the image according to the peak signal that can be obtained in ground_truth: mean(log10(peak_signal**2/MSE(image-ground_truth))).

rtype:

jnp.ndarray