NEW
Also known as: Sørensen–Dice Coefficient, F1 for Sets
A similarity measure between sets used in segmentation evaluation.
DESCRIPTION
The Dice Coefficient measures overlap between two sets, ranging from 0 (no overlap) to 1 (identical). In computer vision, it evaluates segmentation masks’ agreement with ground truth. Dice is closely related to the F1 score and to Intersection over Union, with a monotonic relationship. It is sensitive to class imbalance and often favored in medical imaging.
ALTERNATIVE DEFINITIONS
Wikipedia
The Sørensen–Dice coefficient (or simply Dice coefficient) is a statistic used to gauge the similarity of two samples.
Defines general set similarity independent of specific application domains.
NIST Dictionary of Algorithms and Data Structures
A statistic used to gauge the similarity of two sets; twice the number of elements common to both sets divided by the sum of the number of elements in each set.
Provides the explicit formula in plain terms.
RELATED TERMS
F1 Score Precision and Recall Set Similarity Semantic Segmentation Confusion Matrix Overlap Metric Evaluation Metrics Segmentation
COMPETING TERMS
KNOWLEDGE AREAS
AI Data Science Mathematics Data Visualization
TARGET AUDIENCE
Data Scientist AI Engineer MLOps Engineer BI Specialist
EXTERNAL SOURCES
- Wikipedia - Sørensen–Dice coefficient
- MONAI - Medical imaging Dice metric implementation
- scikit-learn - Model evaluation metrics overview
TOP QUESTIONS
How is the Dice Coefficient computed?
Dice equals 2|A∩B| / (|A|+|B|). For binary masks, it’s 2TP / (2TP + FP + FN).
Category: How-to
When should I use Dice versus Intersection over Union?
Both measure overlap; Dice is more sensitive to small objects and class imbalance. Choice depends on domain conventions.
Category: Comparison
Why is Dice popular in medical imaging?
It emphasizes overlap in small, critical structures and is widely adopted in segmentation benchmarks.
Category: Relevancy
What’s a common mistake with Dice Coefficient?
Computing Dice without handling empty sets can lead to division by zero; smoothing or conventions are needed.
Category: Mistakes
Can Dice be averaged across classes?
Yes, macro- or micro-averaging across classes or instances is common in multi-class segmentation.
Category: Application
Is Dice differentiable for training?
Differentiable variants (Dice loss) are used to train segmentation networks end-to-end.
Category: Application
How does Dice relate to F1 Score?
For binary classification as sets, Dice equals the F1 score.
Category: Theory
What is the range of the Dice Coefficient?
It ranges from 0 to 1, where 1 indicates perfect overlap.
Category: Definition
How sensitive is Dice to thresholding?
Dice can vary with thresholding of probability maps; calibration and threshold selection matter.
Category: Risk