'dice score with 2 empty masks

Currently my understanding of dice score (in that task of semantic segmentation) is that \

we iterate over our input images 
   for each class 
       we calculate the dice score the ground truth mask of that class and the predicted mask 

now my question is what happen when the ground truth mask and the predicted mask of certain class are both empty, do we skip the calculation for the this class or do we reward the model for not predicting any false positive by setting the score to 1 directly



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source