fit_a_nef.metrics.iou

fit_a_nef.metrics.iou(occ1: Array, occ2: Array) ndarray

Computes the Intersection over Union (IoU) value for two sets of occupancy values.

The formula used is the following:

\[\text{IoU} = \frac{|A \cap B|}{|A \cup B|}\]
Parameters:
  • occ1 (jax.Array) – first set of occupancy values

  • occ2 (jax.Array) – second set of occupancy values

Returns:

IoU value

Return type:

np.ndarray