# R26 · Detector-prompted and grid-prompted masks at common budgets

## Two-image development comparison · 2026-12-01

**Question.** Does the grid's apparent advantage over the detector survive when both are scored using masks? R25 scored detector **boxes** and only generated masks for boxes that passed box IoU ≥ 0.5. L25 scored **masks**. This difference made a direct comparison misleading.

Use the same two previously selected and inspected images, contours, resizing and MobileSAM model as R25/L25. For each frozen R25 detector box, prompt MobileSAM and retain the resulting mask; rank masks by the detector's confidence. For L25, use its retained grid-generated masks ranked by MobileSAM's quality score. For each method and budget (5, 10 or 20), take up to that many candidates, then posthoc choose a one-to-one assignment to the two source contours that maximizes matches and then IoU. Match at mask IoU ≥ 0.5 and additionally report 0.75 as a stricter sensitivity check. Labels select matches **only for evaluation**; no practical selection rule identifies the right masks. Model scores have different meanings and are used only for ordering within each method.

| Image | Method (available candidates) | Top 5, IoU ≥ .5 | Top 10, IoU ≥ .5 | Top 20, IoU ≥ .5 | Top 20, IoU ≥ .75 |
|---|---|---:|---:|---:|---:|
| `Pin_SL_011.jpg` | Detector boxes → masks (3) | 2 / 2 | 2 / 2 | 2 / 2 | 1 / 2 |
| `Pin_SL_011.jpg` | Grid → masks (37) | 0 / 2 | 2 / 2 | 2 / 2 | 1 / 2 |
| `image003.jpg` | Detector boxes → masks (10) | 2 / 2 | 2 / 2 | 2 / 2 | 2 / 2 |
| `image003.jpg` | Grid → masks (26) | 0 / 2 | 0 / 2 | 2 / 2 | 2 / 2 |

On the first image, both detector-prompted mask IoUs are approximately 0.892 and 0.654; neither original **box** met R25's box-IoU criterion. In the second image, their IoUs are 0.862 and 0.871. The grid's corresponding top-20 reference-assigned IoUs are 0.945 and 0.681, then 0.838 and 0.846. At IoU 0.75 neither method matches both first-image contours; the binary 0.5 comparison obscures that difference in mask quality. Both methods have complete reference-assigned pairs by budget 20 at the looser threshold, but the detector offers those candidates earlier on these two cases.

The budget is a **maximum** number of candidates rather than exactly equal actual counts: the first detector image has only three candidates. It does not equal review time or computational cost, which were not measured. Unmatched candidates cannot be assumed false positives because annotations may be incomplete. The two data points were picked for intersecting contours and repeatedly inspected, are not independent or expert-adjudicated, and may overlap detector training data. The smaller candidate's contour and whether either pair is physically overlapping are uncertain; a reference IoU threshold is an imperfect proxy for biological quality. This experiment does not establish the generally better method, discovery recall, precision, or effectiveness for Academy microscope data.

**Next.** Compare candidate pipelines on an independently sampled, expert-reviewed Academy set using identical reference masks, eligible-object definitions and a frozen budget/threshold protocol. Measure complete-group recovery, duplicates, partials, correction effort and uncertainty. Add truly unknown taxa and calibrated abstention for classification. [View comparison](/results/r26/) · [Scores and assignments](/results/r26/common-budget.json). The public source record's rights are unspecified; no image pixels are republished here.

Reproduce by restoring L24's temporary images, source JSONs, and checkpoints; run `research/l25_grid_overlap_candidates.py` to regenerate hashed grid outputs, then `research/r26_common_budget.py` with the R25 prediction JSON and same environment. The second script verifies image hashes against both upstream results. R25 supplies frozen detector boxes, while its matched-only mask scores are not used here.
