# generalizedDice

Generalized Sørensen-Dice similarity coefficient for image segmentation

## Syntax

## Description

The generalized Dice similarity coefficient measures the overlap between two segmented images. Generalized Dice similarity is based on Sørensen-Dice similarity and controls the contribution that each class makes to the similarity by weighting classes by the inverse size of the expected region. When working with imbalanced data sets, class weighting helps to prevent the more prevalent classes from dominating the similarity score.

calculates the generalized Sørensen-Dice similarity coefficient between test image
`similarity`

= generalizedDice(`X`

,`target`

)`X`

and target image `target`

.

also specifies the dimension labels, `similarity`

= generalizedDice(`X`

,`target`

,'DataFormat',`dataFormat`

)`dataFormat`

, of unformatted
image data. You must use this syntax when the input are unformatted `dlarray`

(Deep Learning Toolbox)
objects.

## Examples

## Input Arguments

## Output Arguments

## More About

## References

[1] Crum, William R., Oscar
Camara, and Derek LG Hill. "Generalized overlap measures for evaluation and validation
in medical image analysis." *IEEE Transactions on Medical Imaging*.
25.11, 2006, pp. 1451–1461.

[2] Sudre, Carole H., et al.
"Generalised Dice overlap as a deep learning loss function for highly unbalanced
segmentations." *Deep Learning in Medical Image Analysis and Multimodal
Learning for Clinical Decision Support*. Springer, Cham, 2017, pp.
240–248.

[3] Milletari, Fausto, Nassir
Navab, and Seyed-Ahmad Ahmadi. "V-Net: Fully Convolutional Neural Networks for
Volumetric Medical Image Segmentation". *Fourth International Conference on 3D
Vision (3DV)*. Stanford, CA, 2016: pp. 565–571.

## Extended Capabilities

## Version History

**Introduced in R2021a**

## See Also

`dice`

| `dlarray`

(Deep Learning Toolbox) | `dicePixelClassificationLayer`

| `semanticseg`

| `onehotencode`

(Deep Learning Toolbox)