MIR.image_similarity.Dice

Dice loss and helper utilities for segmentation evaluation.

Functions

build_k_hot_from_int(y_int, idx)

Build a K-hot tensor for selected class indices.

sparse_dice_from_int_labels(src_lbl_int, ...)

Compute Dice on K sampled classes without full one-hot.

Classes

DiceLoss(*args, **kwargs)

Dice loss