What does IoU stand for in segmentation evaluation?
IoU stands for Intersection over Union. It measures how much the predicted segmentation overlaps with the true segmentation compared to their combined area.
Click to reveal answer
beginner
How is the Dice coefficient calculated?
Dice coefficient = 2 × (Area of Overlap) / (Total number of pixels in both predicted and true segments). It ranges from 0 (no overlap) to 1 (perfect overlap).
Click to reveal answer
intermediate
Why do we use both IoU and Dice for segmentation evaluation?
IoU and Dice both measure overlap but emphasize different aspects. Dice is more sensitive to small objects, while IoU is stricter. Using both gives a fuller picture of model performance.
Click to reveal answer
beginner
What does an IoU score of 0.7 mean?
An IoU of 0.7 means the predicted and true segments overlap by 70% of their combined area. This indicates good but not perfect segmentation.
Click to reveal answer
intermediate
Write the formula for IoU using sets A (prediction) and B (ground truth).
IoU = |A ∩ B| / |A ∪ B|, where |A ∩ B| is the number of pixels in both prediction and ground truth, and |A ∪ B| is the number of pixels in either prediction or ground truth.
Click to reveal answer
What does a Dice coefficient of 1 indicate?
ANo overlap between prediction and ground truth
BPrediction is half the size of ground truth
CPrediction is twice the size of ground truth
DPerfect overlap between prediction and ground truth
✗ Incorrect
A Dice coefficient of 1 means the predicted and true segments perfectly overlap.
Which metric is calculated as the intersection over the union of predicted and true segments?
AAccuracy
BIoU
CDice coefficient
DPrecision
✗ Incorrect
IoU is defined as the intersection area divided by the union area of prediction and ground truth.
If the predicted segmentation is completely outside the true segmentation, what is the IoU score?
A0
B1
C0.5
DCannot be determined
✗ Incorrect
No overlap means intersection is zero, so IoU is zero.
Which metric tends to give higher values for small objects in segmentation?
AIoU
BAccuracy
CDice coefficient
DRecall
✗ Incorrect
Dice coefficient is more sensitive and tends to give higher scores for small objects.
What is the range of values for both IoU and Dice coefficient?
A0 to 1
B0 to 100
C-1 to 1
D-100 to 100
✗ Incorrect
Both IoU and Dice range from 0 (no overlap) to 1 (perfect overlap).
Explain in your own words what Intersection over Union (IoU) measures in segmentation tasks.
Think about how much the predicted area and true area share in common compared to their total combined area.
You got /4 concepts.
Describe the difference between Dice coefficient and IoU and why both are useful for evaluating segmentation models.
Consider how each metric treats overlap and size differences.
You got /5 concepts.
Practice
(1/5)
1. What does the Intersection over Union (IoU) metric measure in image segmentation?
easy
A. The overlap between predicted and true masks divided by their union
B. The difference between predicted and true masks
C. The total number of pixels in the predicted mask
D. The ratio of true positives to false negatives
Solution
Step 1: Understand IoU definition
IoU measures how much the predicted mask and true mask overlap compared to their combined area.
Step 2: Apply IoU formula
IoU = (Area of Overlap) / (Area of Union) between predicted and true masks.
Final Answer:
The overlap between predicted and true masks divided by their union -> Option A
Quick Check:
IoU = Overlap / Union [OK]
Hint: IoU = Overlap divided by combined area [OK]
Common Mistakes:
Confusing IoU with difference or subtraction
Using only predicted mask area
Mixing IoU with accuracy or precision
2. Which of the following is the correct formula for Dice coefficient between predicted mask P and true mask T?
easy
A. Dice = |P| / |T|
B. Dice = (2 * |P ∩ T|) / (|P| + |T|)
C. Dice = |P ∪ T| / (|P| + |T|)
D. Dice = |P ∩ T| / |P ∪ T|
Solution
Step 1: Recall Dice coefficient formula
Dice coefficient is defined as twice the overlap divided by the sum of sizes of predicted and true masks.
Dice = 2 * intersection / (sum of sizes). The code misses multiplying intersection by 2.
Step 2: Check code calculation
Code returns intersection / sum, which is half the correct Dice score.
Final Answer:
Missing multiplication by 2 in numerator -> Option D
Quick Check:
Dice needs 2*intersection [OK]
Hint: Dice numerator must be 2 times intersection [OK]
Common Mistakes:
Forgetting to multiply intersection by 2
Confusing intersection with union
Using wrong data types for masks
5. A segmentation model predicts a mask with 80 pixels, the true mask has 100 pixels, and their overlap is 60 pixels. What is the Dice score and IoU score respectively?