Skip to content

dice2

Compute the DICE2 metric for a labelled mask.

Parameters

true : np.ndarray
    Ground truth (labelled mask). Shape (H, W).
pred : np.ndarray
    Predicted (labelled mask). Shape (H, W).
eps : float, default=1e-8:
    Epsilon to avoid zero div errors.

Returns

float:
    The computed dice2 metric.