faustomilletari / VNet

GNU General Public License v3.0
284 stars 123 forks source link

Dice, can I use your Dice expression with probabilities instead of thresholded values? #60

Open ManuelZ opened 7 months ago

ManuelZ commented 7 months ago

TLDR: Can I use the forward expression (with squares in the denominator) with probabilities instead of thresholded values?

Hi, I saw in your thesis, page 73, that the Dice coefficient has two variants:

image

On page 74, you say:

We use the first formulation of dice in this work, exhibiting the squares of pi and gi at the denominator.

But I don't see those squared pi and gi in the code:

https://github.com/faustomilletari/VNet/blob/584c1502f369f2547e7ed384f9cc25beb09f65e1/pyLayer.py#L47

I guess that's because earlier you thresholded the values to be binary. So the squares don't matter for the calculation of the loss, but do matter for the formulation of the expression for the backward pass.

My question is, can I use the forward expression (with squares in the denominator) with probabilities instead of thresholded values?

Thanks, Manuel