Skip to content
BIASED

Intersection over Union

Self-study exercise. Checking on the site is not available yet. Write and download a solution to work on your computer.

Finish iou(a, b). Boxes are [x1, y1, x2, y2] (or a batch (N, 4)). IoU=inter/union\mathrm{IoU} = \mathrm{inter}/\mathrm{union}, where the intersection is the non-negative overlap area and the union is the sum of areas minus the intersection. Return 0 when the union is zero. Use NumPy.

Object detection