Quiz: finding objects as boxes
Before this unit: From masks to objects (previous unit); Day 36: Neural networks; Day 38: Evaluation and statistics; Day 39: Variational autoencoders.
See also: Day 15: Watershed; Day 5: Deconvolution; Day 35: Gaussian mixtures.
Short questions to test your understanding. Try each on paper first, then open the answer.
Q1. Two 8 \times 8 boxes overlap in a 4 \times 8 strip. What is their IoU?
Union = area A + area B − intersection.
Intersection 32, union 64 + 64 - 32 = 96, IoU = 1/3.
Q2. Why does a detector produce several boxes for one object?
How many grid positions look at the same object?
Every grid position near the object sees it and proposes a box for it (how the grid guesses: the next day, single-shot detection). Neighbouring positions give similar, overlapping boxes: duplicates that must be removed.
Q3. In greedy NMS with threshold t, what happens if t is too low? Too high?
t is the overlap above which a box is deleted.
Too low: boxes of true neighbouring objects overlap the kept box by more than t and are deleted (missed objects). Too high: duplicates of the same object overlap by less than t and survive (false positives).
Q4. A small spot of 3 \times 3 pixels is detected with a box shifted by one pixel. Is it a TP at IoU \ge 0.5?
Intersection 2 \times 3.
Intersection 6, union 9 + 9 - 6 = 12, IoU 0.5: just at the threshold. Shifted in both directions: 4/14 = 0.29, a miss. IoU thresholds are very strict for small objects.
Q5. AP is high but F1 is low. What does that tell you about the detections?
AP depends on the ranking, F1 on the boxes above a threshold.
The true detections have the highest scores (good ranking), but many low-scored false boxes (e.g. surviving duplicates) are kept at the chosen operating point. A higher score threshold or a lower NMS threshold would raise F1.
Q6. (math) Show that 1 - \mathrm{IoU} gives no gradient for two boxes that do not overlap.
What is the intersection for small shifts?
If the boxes do not overlap, the intersection is 0 and stays 0 for any small shift, so \mathrm{IoU} = 0 and 1 - \mathrm{IoU} = 1 in a whole neighbourhood: the derivative is zero.
Q7. Name the three meanings of “non-maximum suppression” in this course.
Edges, accumulators, boxes.
Canny (keep gradient values that are maximal across the edge), peak picking (keep local maxima of a Hough accumulator or heat map), and box NMS (delete boxes that overlap a better box by more than t). Polygon NMS (next day, StarDist) is the box rule with polygon IoU.
Q8. A detector with a feature pyramid predicts boxes at strides 8 and 32. Which level should find a 10-pixel nucleus, and which a 300-pixel cell cluster? Why can the stride-8 level tell a nucleus from a bright speck of debris, although its own layers are shallow?
How many cells does each object cover at each stride? What is added to the stride-8 map?
The nucleus covers about one cell at stride 8 but a third of a cell at stride 32: the fine level. The cluster covers about 9 cells across at stride 32 but 37 at stride 8, far more than one fine cell’s view: the coarse level. The stride-8 map is not only the shallow backbone map: the top-down path has added the upsampled coarse maps, which have seen a large region and know what is there (context).