In image segmentation, a commonly used metric is Hausdorff distance. The two sets are ground truth and prediction. 0 represents the background, and 1 represents the foreground.