# L18 · Neighboring-instance negative prompts on public polygons

## Three nearest annotated pairs · 2026-12-01

The R13/L13 negative-point tests used provisional Academy marks. This follow-up uses the public COCO polygons from [Khanom’s diatom dataset](https://doi.org/10.5281/zenodo.21295927), described and audited in R16. In the largest test-named annotation file for each of the two genera, 13 images have two or more annotated objects; none of their annotated polygons have overlapping raster pixels at original resolution. Thus this is a **touching/neighboring-object** test, not validation of truly overlapping valves. Other specimens may be unannotated.

After excluding filenames seen in other named split directories, rank annotated pairs by minimum polygon-pixel distance and select the three closest pairs in different images. Distances are approximately 1.0, 2.0 and 13.9 original-image pixels; all three are Gomphonema images, and the first two have related-looking filenames. See the fixed [selection](/results/r18/selection.json). The inspection considers two particular annotation variants; cross-variant filename matches and biological sample independence remain unresolved.

Resize each image to 768 × 576 and rasterize its polygons. For each reference object, choose its deepest interior pixel as an oracle positive point. Generate a mask using that point alone, then repeat using the other annotated object's oracle point as a negative prompt. The analyst's target locations are supplied by the reference annotations, so this is not automatic localization. [Inspect each pair](/results/l18/) and [download the per-instance IoUs](/results/l18/neighbor-prompts.json).

For the two closest pairs, positive-only IoUs were (0.365, 0.552) and (0.393, 0.453); adding the other point as a negative yielded (0.937, 0.782) and (0.887, 0.888). For the third, more separated pair, values changed from (0.926, 0.801) to (0.927, 0.798). These three selected pairs and six reference objects do not estimate performance on independent specimens or Academy scans, and cannot establish that negative points are generally beneficial. Resizing may change a one-pixel gap. The negative prompt presupposes that the other annotation is a separate target; incorrect user or model marks could exclude the intended valve. R13/L13 show a negative point can harm or shrink a mask. No review time was measured.

This is nevertheless a concrete, reference-annotated example where additional instance-specific point constraints visibly help two touching groups. Compare automatic proposals and independently drawn human corrections on expert-reviewed real Academy crossings and fragments, including cases where multiple objects genuinely occupy the same projected pixels. Score complete groups, false splits, lost target pixels and reviewer time; keep source planes accessible. Reproduce with `/tmp/diatom-research-venv/bin/python research/r18_select_neighbors.py`, the authorized range fetch `research/r18_fetch_neighbors.py`, and `YOLO_CONFIG_DIR=/tmp/diatom-yolo-config MPLCONFIGDIR=/tmp/mpl-diatom /tmp/diatom-research-venv/bin/python research/l18_neighbor_prompts.py`. Source reuse terms are discussed in R16.
