# R25 · Proposal and prompt diagnostic on two public contour candidates

## Two selected pairs · 2026-12-01

L24 identified four pairs of overlapping annotation polygons in the [public Khanom dataset](https://doi.org/10.5281/zenodo.21295927). The two with four-corner rectangle annotations are excluded. Here we use the remaining two contoured pairs: `Pin_SL_011.jpg` and `image003.jpg`. Both were **selected by examining their reference annotations**; each image contains adjacent elongated structures, but genuine overlap, annotation conventions and label completeness require expert review. These are development images, not an independent or representative test, and the relationship to the detector's training data is unknown.

Resize the 1600 × 1200 source images to 768 × 576. Rasterize each annotation and resize the binary masks using nearest-neighbor interpolation. Apply the frozen diatom-trained YOLO detector at confidence 0.05. Match predicted boxes to reference-derived mask boxes one-to-one at box IoU ≥ 0.5, maximizing the number of matches first and total IoU second. This assignment uses the reference for scoring and does not choose proposals at deployment. Prompt MobileSAM with each matched box; compare each resulting mask to its assigned polygon. These are conditional mask IoUs and do not include missed reference objects.

Separately, use the deepest point inside each reference mask as a positive prompt for MobileSAM. Repeat with the other reference point as a negative prompt. The reference supplies both locations, so this is an oracle-assisted probe rather than automatic detection or a measured human annotation workflow. All thresholds and methods were established during earlier development on other public pairs; this tiny post-selected sample is too small for confirmation.

| Image | Detector boxes | Distinct matched references | Mask IoUs from matched boxes | Positive point IoUs | With neighbor-negative IoUs |
|---|---:|---:|---|---|---|
| `Pin_SL_011.jpg` | 3 | 0 / 2 | — | 0.943, 0.689 | 0.929, 0.706 |
| `image003.jpg` | 10 | 2 / 2 | 0.862, 0.871 | 0.857, 0.848 | 0.854, 0.895 |

At the resized resolution the reference polygons share 306 and 13 pixels respectively. At the second pair's boundary, the negative point eliminated the three shared pixels in the two positive-only predicted masks, but not necessarily the right pixels. It can suppress a physically legitimate overlap or damage a mask. The two objects per image are not guaranteed to be the only diatoms; additional boxes are not automatically false positives. The detector's mismatched boxes could be alternative meaningful proposals that fail this particular threshold. Mask IoU depends on disputed contours, resizing and rasterization, and cannot establish species identity.

**Interpretation.** The point-prompted masks and detector box-matching results use different criteria, so they do not establish a difference in end-to-end recovery. This motivates evaluating candidate discovery and a low-friction correction workflow alongside segmentation, not a claim of general overlap accuracy. [View score chart](/results/r25/) · [Download numeric results](/results/r25/candidate-results.json). The source record currently does not specify license text; source images are retained temporarily and not republished in this result. The downloaded numeric file includes image hashes and coordinates, not source images or full contours.

**Important follow-up:** R25 measured detector recovery using box IoU and only prompted boxes that passed that box criterion. [R26](/results/r26/) instead prompts every detector box and compares masks directly: on `Pin_SL_011.jpg`, two detector-prompted masks match the contours at mask IoU ≥ 0.5 despite neither box meeting the box-IoU threshold. Therefore R25's zero box matches do **not** establish that the detector-plus-mask pipeline missed both specimens.

**Next.** Obtain expert adjudication of whether both cases are true crossings, what the boundaries mean, and whether any diatoms are unlabeled. Establish source reuse terms. Freeze independent Academy images with exhaustive count-eligible instances, real partials and crossings, then compare detection, tiled proposals, grid/SAM candidates and analyst-assisted points at a matched review budget. Report complete-group recovery, duplicates, misses, target ambiguity and review time; do not select masks by reference IoU at deployment. Classification needs a separate open-set, sample-separated expert reference.

Reproduce after L24 retrieval with `YOLO_CONFIG_DIR=/tmp/diatom-yolo-config MPLCONFIGDIR=/tmp/mpl-diatom /tmp/diatom-research-venv/bin/python research/r25_overlap_candidates.py`. Inputs and model checkpoints are temporary; original weights and caveats are recorded in R3, R6 and L24.
