batched_jaccard(y_true, y_pred, average_over_objects=True, nb_objects=None)
Jaccard similarity over two subsets of binary elements A and B:
- y_true: Numpy Array. Array of shape (B x H x W) and type integer giving the ground truth of the object instance segmentation.
- y_pred: Numpy Array. Array of shape (B x H x W) and type integer giving the prediction of the object segmentation.
- average_over_objects: Boolean. Weather or not to average the jaccard over all the objects in the sequence. Default True.
- nb_objects: Integer. Number of objects in the ground truth mask. If
Nonethe value will be infered from
y_true. Setting this value will speed up the computation.
ndarray: Returns an array of shape (B) with the average jaccard for
all instances at each frame if
average_over_objects=False returns an array of shape (B x nObj)
with nObj being the number of objects on