Analysis of object detection fashions boils down to at least one factor: figuring out if a detection is legitimate or not
Figuring out whether or not detection is legitimate requires understanding the Intersection over Union metric (IoU).
This text covers the next:
- Fundamentals of IoU — What’s IoU?
- Find out how to compute (theoretically and in Python code) IoU for a single pair of detection and floor fact bounding packing containers
- Computing IoU for a number of units of predicted and floor fact bounding packing containers.
- How to interpret IoU worth?
IoU is a core metric for the analysis of object detection fashions. It measures the accuracy of the item detector by evaluating the diploma of overlap between the detection field and the bottom fact field.
- A floor fact field or label is an annotated field exhibiting the place the item is (the annotation is commonly finished by hand, and the bottom fact field is taken into account the item’s precise place).
- The detection field or predicted bounding field is the prediction from the item detector.
Formally, IoU is the world of intersection between the bottom fact (gt) and predicted field (pd) divided by the union of the 2 packing containers.
Let’s begin off with a easy instance. Computing IoU for one detection and a floor fact.
To do this, we’ll want the top-left (x1, y1) and bottom-right (x2, y2) coordinates of the 2 packing containers.
Within the Determine beneath (proper), we’ve got two bounding packing containers:
Predicted bounding field (p-box): (px1, py1, px2, py2) = (859, 31, 1002, 176)
Floor fact bounding field (t-box): (tx1, ty1, tx2, ty2) = (860, 68, 976, 184)