MeanDice#
- class MeanDice[source]#
Metric that calculates the mean Dice metric for each class.
See more: https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient
- Parameters
- threshold: float, default: 0.5
prediction value per pixel above which the pixel is considered True.
- smooth: float, default: 1e-3
smoothing factor to prevent division by zero when the mask is empty.
- average: str, default: none
The method for averaging over the classes. If none, returns the result per class.
- __new__(*args, **kwargs)#
Attributes
Methods
|
Attaches current metric to provided engine. |
|
Helper method to compute metric's value and put into the engine. |
Compute metric value. |
|
|
Detaches current metric from the engine and no metric's computation is done during the run. |
|
Checks if current metric is attached to provided engine. |
|
Helper method to update metric's computation. |
|
Method replaces internal state of the class with provided state dict data. |
Reset metric state. |
|
|
Helper method to start data gathering for metric's computation. |
Method returns state dict with attributes of the metric specified in its _state_dict_all_req_keys attribute. |
|
|
Update metric with batch of samples. |