Correct way of computing dice score for image segmentation?
In binary image segmentation, for given a set of images, it's true mask and predicted mask. How do you compute dice score? Should I compute the dice score for each image separately and then find mean across all images? Or compute the dice score for all images at once by flattening tensor? Which is the correct way?