Masks represent an area. Simliar to IoU for bounding boxes, there is a metric for masks too called MaskIoU. You could google more about that. Since we've defined an IoU, we can also define True Positives, True Negatives, False Positives and False Negatives. With that, we can compute F1 scores and Confusion Matrices.