mlyg / unified-focal-loss

Apache License 2.0
150 stars 22 forks source link

Mismatch implementation wrt equation in the paper? #19

Closed Nelson-iitp closed 1 year ago

Nelson-iitp commented 1 year ago

In your paper "Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation" in Elviser, equation (20) is like :

SS

But, in line 277 you have multiplied cross-entrocpy of the 'common' class instead of rare class a mentioned in paper. Which one is correct?

mlyg commented 1 year ago

Hi Nelson,

That is a good spot, thank you for pointing it out! There is a mistake in the equation in the paper which should say log(pt,c) rather than log(pt,r). The code is correct :) I hope that answers your question.

Best wishes, Michael