Module contrib.semseg.visuals

Propose features for manual verification.

Functions

def axis_unique(a: jaxtyping.Shaped[ndarray, '*axes'],
axis: int = -1,
return_counts: bool = True,
*,
null_value: int = -1) ‑> jaxtyping.Shaped[ndarray, '*axes'] | tuple[jaxtyping.Shaped[ndarray, '*axes'], jaxtyping.Int[ndarray, '*axes']]

Calculate unique values and their counts along any axis of a matrix.

Arguments

a: Input array axis: The axis along which to find unique values. return_counts: If true, also return the count of each unique value

Returns

unique
Array of unique values, with zeros replacing duplicates
counts
(optional) Count of each unique value (only if return_counts=True)
def main(cfg: Visuals)