Jaccard Index: Intersection over union (IoU)

When using bounding for object detection, the evaluation is often done using intersection over union (IoU) or the Jaccard Index.

  • Compute intersection over bounding boxes
  • Compute union
  • IoU: ratio intersection / union.

This measure is always 0 <= IoU <=1.

The typical "hit criterion" is an IoU > 0.5, which gives confidence your bounding box has correctly identified the target object.

In segmentation tasks you can define "foreground" as a true positive (TP) and "background" as a true negative (TN), so that you can express the IoU as such:

$$\frac{TP}{TP+FP+FN}$$

The Dice coefficient is highly similar, but puts emphasis on true positives (so replace all occurrences of TP with 2TP to get the Dice formula).