tools.psnr#
- bartorch.tools.psnr()#
Peak signal-to-noise ratio of the magnitudes, in decibels, averaged over images.
Per image over
(z, y, x):20 log10 max|reference| - 10 log10 mean (|input| - |reference|)², magnitudes being the root sum of squares over the coil axis; then the mean over every other axis.- Parameters:
reference (torch.Tensor) –
(..., coils, z, y, x), or a(y, x)image.input (torch.Tensor) –
(..., coils, z, y, x), or a(y, x)image.
- Returns:
PSNR in decibels.
- Return type:
float