Week 06 · lesson
Investigation: Measure Localization Before Judging It
system flow
From Vision Output to a Bounded Localization Claim
Image Representation
Begin with supplied pixels and declared coordinate space.
Output Type
Separate category, bounding box, semantic mask, and instance mask.
Reference Annotation
Declare the supplied comparison target and its policy boundary.
Overlap Calculation
Measure intersection and union before interpreting localization.
Error Comparison
Compare shifted, missing, and extra predicted regions.
Claim Boundary
Do not infer class, annotation quality, safety, or general performance from overlap alone.
Read this concept flow as plain text
- Image Representation. Begin with supplied pixels and declared coordinate space. INPUT: FIXED FICTIONAL IMAGE.
- Output Type. Separate category, bounding box, semantic mask, and instance mask. LAB: BOX OR MASK.
- Reference Annotation. Declare the supplied comparison target and its policy boundary. TARGET: HUMAN-SUPPLIED.
- Overlap Calculation. Measure intersection and union before interpreting localization. METRIC: IoU.
- Error Comparison. Compare shifted, missing, and extra predicted regions. CASES: TIGHT · SHIFTED · EXTRA.
- Claim Boundary. Do not infer class, annotation quality, safety, or general performance from overlap alone. ACTION: REPAIR CLAIM.
A bounding box and a segmentation mask can both localize something, but their geometry differs. A box covers a rectangle. A mask identifies selected pixels. Both can be compared with a reference annotation using intersection over union:
IoU = overlap area ÷ (predicted area + target area - overlap area)
Completed box example
A target box covers 16 square units. A shifted prediction also covers 16, but only 12 overlap.
union = 16 + 16 - 12 = 20
IoU = 12 / 20 = 0.600
Equal box size did not mean equal location. The shift reduced overlap.
False-positive and false-negative regions
An oversized prediction may include the entire target while adding background. An undersized mask may avoid background while missing true target pixels. IoU penalizes both because false-positive and false-negative regions enlarge the union or shrink the intersection.
Annotation is part of the system
The target is not unquestionable truth. People or procedures created it. Ambiguous boundaries, inconsistent policies, occlusion, and class definitions can change the annotation. A high IoU with a poor target is still agreement with a poor target.
Investigation
- Predict whether a shifted or oversized box will have higher IoU.
- Calculate both using every operand.
- Compare an under-segmented and over-segmented mask.
- Name one annotation disagreement that IoU cannot resolve.
- Repair: “The IoU is above 0.5, so the object was detected correctly.”
Vocabulary lab
Flip the idea, not just the card
Explain the term before you reveal the back. Then compare your explanation with the definition, example, and warning.
Read all terms without animation
- object detection
- A task producing object categories and spatial locations, commonly bounding boxes. Example: A bottle label paired with four box coordinates. Do not confuse it with: It is more than image classification but less spatially precise than a mask.
- semantic segmentation
- Assigning a class to each pixel without separating same-class instances. Example: All road pixels share one road class. Do not confuse it with: It does not distinguish two separate objects of the same class.
- instance segmentation
- Assigning pixels to both a class and a particular object instance. Example: Two sheep receive separate masks. Do not confuse it with: It requires instance identity beyond semantic class.
- intersection over union
- Overlap divided by the union of predicted and target regions. Example: Twelve overlap units divided by twenty union units equals 0.600. Do not confuse it with: IoU does not establish class correctness or annotation quality.
- reference annotation
- A supplied target box or mask used for comparison. Example: The fixed 16-unit target box in the Lab. Do not confuse it with: A reference can contain human or policy error.