Skip to content

aggregated_jaccard_index

aggregated_jaccard_index

aggregated_jaccard_index(
    true: ndarray,
    pred: ndarray,
    thresh: float = 0.5,
    eps: float = 1e-08,
) -> float

Compute the aggregated jaccard index (AJI) for a labelled mask.

Parameters

true : np.ndarray
    Ground truth (labelled mask). Shape (H, W).
pred : np.ndarray
    Predicted (labelled mask). Shape (H, W).
thresh : float, default=0.5
    Threshold for the iou to include the prediction as TP
eps : float, default=1e-8:
    Epsilon to avoid zero div errors.

Returns

float:
    The computed aji.