Quiz: matching objects

Short questions to test your understanding. Try each on paper first, then open the answer. IoU = overlap / union of two objects; matching is one to one at an IoU threshold \tau; TP = matched pairs, FP = unmatched predictions, FN = unmatched true objects.


Q1. Why is there no “true negative” when we count objects, and what does that mean for accuracy and ROC curves?

What would a true-negative object be?

A true negative would be “background correctly not predicted as an object”, but the background is not made of countable objects. So object-level scores use only TP, FP and FN: precision, recall, F1, matching accuracy. Accuracy (TP + TN)/\text{all} and the false-positive rate FP/(FP + TN) of a ROC curve are undefined; precision–recall curves take their place.


Q2. A nucleus of radius 3 px is predicted one pixel off; a nucleus of radius 20 px too. Which prediction is more likely to fail at \tau = 0.5, and why?

Compare the lost overlap with the area of the object.

The small one. A one-pixel shift loses a strip of about one pixel times the diameter: a large fraction of a small object (IoU about 0.65 for radius 3 px) and a small fraction of a large one (about 0.94 for 20 px). With a little extra outline error the small object falls below 0.5. Small objects need a lower \tau or a different criterion (e.g. distance between centres).


Q3. At \tau = 0.6, can one true object have two predictions with IoU \ge \tau?

How much of the true object must each of them cover?

No. IoU above 0.5 means the prediction overlaps more than half of the true object. Two non-overlapping predictions cannot both cover more than half of it. So above 0.5 every object has at most one candidate, and the matching is forced: no greedy-versus-optimal question.


Q4. A true nucleus is split by the method into two halves, each with IoU 0.4 with it. What are its contributions to TP, FP and FN at \tau = 0.5? And at \tau = 0.3?

One to one: at most one half can be matched.

At \tau = 0.5: no half matches, so 0 TP, 2 FP, 1 FN. At \tau = 0.3: one half matches (TP), the other is an FP: 1 TP, 1 FP, 0 FN.


Q5. Method A has F1 0.92 at \tau = 0.5 and 0.30 at \tau = 0.8; method B has 0.80 and 0.75. Which would you use to count cells, and which to measure their areas?

What does a high \tau demand?

A finds more objects (better at 0.5) but with sloppy outlines (collapses at 0.8): better for counting. B’s outlines are tight (holds up at 0.8), but it misses or merges more objects: better for measuring areas and shapes of the objects it finds. One F1 at one \tau would have hidden this.


Q6. A method predicts 20 objects with scores; 4 low-scored specks at the end of the list are false positives. Why does removing them change F1 but hardly change AP?

Where in the sorted list are they, and what happens to recall there?

F1 counts all predictions at the chosen cut-off: 4 fewer FP raise precision and F1. AP is the area under the precision–recall curve built by walking down the list by score; the specks come after all true objects are found, so they do not increase recall and add (almost) no area. AP rewards a good ranking; a method can have a high AP and still need a good score cut-off.


Q7. Paper X reports “AP_{0.5} = 0.80” for nucleus segmentation, paper Y “AP_{0.5} = 0.88” for detection. Can you conclude that Y is better?

The same name is used for two quantities.

No. Cell-segmentation papers often write AP for TP/(TP + FP + FN) at one \tau (the matching accuracy in this course); detection papers mean the area under a precision–recall curve of scored predictions. The two numbers are on different scales even for the same result (in the lecture’s example: 0.5 versus 0.69). Besides, they are measured on different data.


Q8. (math) Show that the object F1 equals 2\,TP/(n_G + n_P), where n_G and n_P are the numbers of true and predicted objects. Why does this make F1(\tau) non-increasing?

Every predicted object is either TP or FP.

n_P = TP + FP and n_G = TP + FN, so 2\,TP + FP + FN = n_G + n_P, which does not depend on \tau. Raising \tau removes allowed pairs, so the number of matches can only stay or drop; F1 is that number divided by a constant.