Open brunotakara opened 11 months ago
https://github.com/qubvel/segmentation_models/blame/e951c6747f75fa9e7240816d1c79dd2e66813123/segmentation_models/losses.py#L54
dice loss returns 1 - f_score so it is working fine but the commentary has an issue at line 59
L(tp, fp, fn) = \frac{(1 + \beta^2) \cdot tp} {(1 + \beta^2) \cdot fp + \beta^2 \cdot fn + fp}
is dividided by a term o fp that is actually tp, the term (1 + \beta^2) \cdot fp
should be L(tp, fp, fn) = \frac{(1 + \beta^2) \cdot tp} {(1 + \beta^2) \cdot tp + \beta^2 \cdot fn + fp}
https://github.com/qubvel/segmentation_models/blame/e951c6747f75fa9e7240816d1c79dd2e66813123/segmentation_models/losses.py#L54
dice loss returns 1 - f_score so it is working fine but the commentary has an issue at line 59
L(tp, fp, fn) = \frac{(1 + \beta^2) \cdot tp} {(1 + \beta^2) \cdot fp + \beta^2 \cdot fn + fp}
is dividided by a term o fp that is actually tp, the term (1 + \beta^2) \cdot fp
should be L(tp, fp, fn) = \frac{(1 + \beta^2) \cdot tp} {(1 + \beta^2) \cdot tp + \beta^2 \cdot fn + fp}