Paint a mask: IoU vs Dice
Paint a segmentation mask against a ground truth and watch IoU and Dice respond to every brush stroke — and confirm the identity linking them.
Predict first
Commit to a guess before you touch anything. Being wrong here is how it sticks.
A mask has IoU = 0.60. What's its Dice coefficient? (2 dp)
Experiment
Move the controls and watch the outputs. Goals tick off automatically when you reach them.
Paint your prediction
Dashed outline = ground truth · orange = true positive · pink = false positive · blue = missed
Explain it
Put what you saw into words. This is what the exam will ask you to do.
Why are skip connections essential in U-Net, and how do IoU and Dice differ?
Code it
Write real code against real data. Python and SQL run right here in your browser and hidden tests check your work; the AI reviews it like an examiner.
IoU, Dice and mean IoU for masks
Write:
iou(pred, gt)anddice(pred, gt)for binary masks (booleans or 0/1). If both masks are empty, return 1.0.mean_iou(pred, gt, num_classes)for multi-class label maps: average the per-class IoU over the classes that appear ingtorpred.
Verify dice == 2·iou / (1 + iou) on any example.
Challenge
Fixed variations, a new problem every day, and unlimited AI challenges built from your current settings.
IoU to Dice Conversion
A predicted segmentation mask has IoU = 0.50 with the ground truth. What is its Dice coefficient? (2 decimals)