Sllambias / yucca

Apache License 2.0
17 stars 2 forks source link

Implement minor metric improvements #199

Closed asbjrnmunk closed 3 weeks ago

asbjrnmunk commented 3 weeks ago

This PR makes the following minor improvement to how metrics are calculated during training:

  1. Calculate both aggregate and mean dice:

For class 1 and 2 respectively:

Aggregate Dice: Calculate $TP = TP_1 + TP_2$ and similar for FP and FN. Then $Dice = 2TP/(FP+FN)$. Mean Dice:: $Dice = (Dice_1 + Dice_2) / 2$.

  1. When using regions, also add dice of class 0 to wandb (that is, dont ignore index 0 when using regions)