iou_matrix#

static rlemasklib.RLEMask.iou_matrix(masks1, masks2)[source][C source]#

Compute the intersection-over-union (IoU) between two sets of masks.

Parameters:
  • masks1 (Sequence[RLEMask]) – a sequence of RLE masks

  • masks2 (Sequence[RLEMask]) – a sequence of RLE masks

Returns:

A 2D numpy array of shape (len(masks1), len(masks2)) with the IoU values.

Return type:

ndarray

See also

iou() for computing the IoU between two masks.