Measures Utils

class master_thesis.utils.MeasuresUtils

Bases: object

Utilities class containing measurements-related methods.

init_lpips(device)
destroy_lpips()
psnr(input, target)

Computes the PSNR between two images.

Parameters
  • input (torch.FloatTensor) – tensor of size (C,F,H,W) containing

  • images. (ground-truth) –

  • target (torch.FloatTensor) – tensor of size (C,F,H,W) containing

  • images.

ssim(input, target)

Computes the SSIM between two images.

Parameters
  • input (torch.FloatTensor) – tensor of size (C,F,H,W) containing

  • images. (ground-truth) –

  • target (torch.FloatTensor) – tensor of size (C,F,H,W) containing

  • images.

lpips(y_hat, y)

Computes the LPIPS between two images.

Parameters
  • y_hat – tensor of size (C,F,H,W) containing predicted images.

  • y – tensor of size (C,F,H,W) containing ground-truth images.