tumourkit.segmentation.hovernet.models.hovernet.utils

Functions

crop_op

Center crop image.

crop_to_shape

Centre crop x so that x has shape of y.

dice_loss

pred and true must be of torch.float32.

mse_loss

Calculate mean squared error loss.

msge_loss

Calculate the mean squared error of the gradients of horizontal and vertical map predictions.

xentropy_loss

Cross entropy loss.