IoU and Dice, by dragging boxes

Overlap is easier to feel than to read. Both boxes drag, and the intersection, union, IoU and Dice values update as you move them — the same overlap idea detection and segmentation both score on.

Try this

Set the boxes to half-overlap and compare the two numbers. Dice is always the more generous of the pair, and this is where you see by how much.

ground truth prediction
Drag either box.

Where this lab comes from

Segmentation Metrics: IoU, Dice, mIoU, and Panoptic Quality

Scoring masks instead of boxes: pixel IoU/Jaccard and the Dice coefficient (and why they're related), mIoU for semantic segmentation, mask-AP for instance segmentation, and Panoptic Quality for the unified task, on one running cat-mask example, with the equations and code.

More in metrics