pynif3d.loss

pynif3d.loss.eikonal_loss(x)

Computes the eikonal loss for a given set of points.

Parameters

x (torch.Tensor) – Tensor containing the point coordinates. Its shape is (batch_size, n_samples, 3) or (n_samples, 3).

Returns

Tensor containing the eikonal loss. Its shape is (1,).

Return type

torch.Tensor

pynif3d.loss.mse_to_psnr(mse_loss, max_intensity=1.0)

Converts a mean-squared error (MSE) loss to peak signal-to-noise ratio (PSNR).

Parameters
  • mse_loss (torch.Tensor) – MSE loss. Its shape is (1,).

  • max_intensity (float) – The maximum pixel intensity. Default value is 1.0.

Returns

Tensor with the corresponding PSNR loss.

Return type

torch.Tensor