I’m currently exploring how to apply Dice metric to a multiclass segmentation problem with fastai. I checked the concepts and discovered that Dice is really similar to the F1Score. Following this, I have two questions regarding their implementation in fastai.metrics :
dice()
and fbeta(beta=1)
outputs ?MultiLabelFbeta
class okay for multilabel image segmentation use cases ?Thank you very much and have a good day !
The Dice metric should normally be equal to FBeta
(beta=1
). Depending on the framework, there may be slight differences in the implementation. However, since these are by nature very similar, they can be used interchangeably as metrics for your problem.
MultiLabelFBeta
can be used if you have multiple overlapping masks. That is, if your segmentation labels are not mutually exclusive.
For example, a dog and a cat have pixels that are mutually exclusive(i.e. a pixel belonging to a cat will never belong to a dog and vice-versa). However, if you have the class 'T-shirt' and 'Human' then it is evident that you have overlapping: people wear t-shirts, so a pixel that belongs to T-Shirt may very well belong to a human being.
MultiLabel
is different from MultiClass
. In case of the latter, the labels are mutually exclusive; in case of the former, they are not (T-Shirt + Human example).If you have a multi-class segmentation problem, then Dice
/FBeta
are relevant metrics. If you have a multi-label segmentation problem, then MultiLabelFbeta
is a good metric.