-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Is your feature request related to a problem? Please describe.
The docstring descriptions for DiceLoss, DiceMetric, DiceHelper, and compute_dice should include more information about the expectations of inputs, implications of various arguments, and better examples. There's been some confusion about why results from the loss don't match expectations given the value of metrics, this is related to the extra features in the loss such as the smoothing values as well as misunderstanding about activation or thresholding/one-hot formatting.
Describe the solution you'd like
A few things should be changed or added:
- Docstring for
DiceMetricshould make it clear the ground truth and prediction can be either single-channel label maps or multi-channel one-hot tensors. - The values of the inputs do matter since no thresholding is done in the metrics themselves.
- The
softmaxparameter ofDiceHelperis confusing in that it appears to indicatesoftmaxwill be applied if it's true, rather than the expectation that this was already done to the prediction. This should be renamed toargmaxand the old name deprecated. It should also be noted that this parameter becomes the opposite value tosigmoidif not given a value. - Using
compute_diceprobably should be discouraged in favour of theDiceMetricclass, and it should be mentioned that they do the same computation. It's possible this function isn't used by anyone and can be deprecated entirely. - An example in the docstring of how to use the metric and the loss to get expected results should be included.
innat and surajpaib
Metadata
Metadata
Assignees
Labels
No labels