# R33 · Reference-oriented crops for the specialist classifier

## Previously inspected public rectangles · 2026-12-01

**Question.** Can using an annotated specimen orientation and extent reduce background and input truncation for the DIAMORPH classifier? Reuse R30's 79 UDE crop images and their [UDE metadata](https://doi.org/10.1093/gigascience/giae087). Of these, 75 have four-corner rectangle annotations; four circle annotations are excluded from this diagnostic. The rectangles are human-provided **oracle location and orientation**, not masks and not predictions of the pilot detector. Their coordinates are converted from source-slide pixels to local crop coordinates using the recorded bounding-box origin.

For each rectangle, fit its minimum-area rotated rectangle, add a margin equal to 5% of the shorter side on each edge, and warp the image to an axis-aligned crop. Compare: (1) R30's whole-cutout baseline and source-recommended preparation; (2) the rectified crop at the same source scale (0.09 µm/pixel) through the same model preparation, which can still center-crop an oversized object; and (3) the rectified crop with an extra downscale if needed to fit its full extent into the 512-pixel frame. The third method changes the effective physical scale. This transformation changes orientation, crop bounds and interpolation together; it cannot isolate the effect of any one change. No labels are used to choose the generated crop, but the reference annotation is required to locate and orient it.

| Previously inspected subset | Method | Top-1 exact genus | Top-1 exact species |
|---|---|---:|---:|
| 18 selected rectangle crops | Whole-cutout baseline | 4 / 18 | 2 / 17 |
| 18 selected rectangle crops | Rectified, native scale or fit-full | 13 / 18 | 7 / 17 |
| 57 rectangle crops from one slide | Whole-cutout baseline | 0 / 57 | 0 / 55 |
| 57 rectangle crops from one slide | Rectified, native scale or fit-full | 0 / 57 | 0 / 55 |

The second subset excludes the four circles in R30, so it has 57 rather than 61 images. Two of those 57 have no usable species label. All four initial genus matches in the 18-image subset remained matches under rectification and nine previously mismatched images became matches; both baseline species matches remained and five others became matches. None of the 57 single-slide rectangles matched exact genus under any of these variants. Twenty of those 57 rectified crops were downscaled to fit; none of the 18 selected crops needed it. The scale-preserving and fit-full variants agree in these aggregate counts, but can produce different predictions for individual images. [Inspect four examples](/results/pilot/diamorph-rectified-controls/) and [all outputs](/results/pilot/diamorph-rectified-controls/rectified.json).

These are small, selected and repeatedly inspected public development crops; 57 come from the same slide. Matching is literal-name comparison, not expert taxonomic reconciliation, and some source species have no exact model label. Labels, images or specimens could overlap the classifier's atlas training data; this has not been excluded. There is no local Academy expert truth, no held-out threshold selection, no unknown-taxon rejection, and no test of detecting each member of a true overlapping pair. The result does not estimate performance against the 95% genus or 60% species goals. The improvement on the 18 crops is a reason to investigate crop geometry, not evidence that this particular warp should be deployed.

**Next.** Replace oracle rectangles with model-derived oriented boxes, masks, or analyst-drawn axes and quantify proposal/rectification errors on separately sampled, expert-reviewed local specimens, including crossings and partial valves. Compare against the full-crop baseline on the same instances and treat missed/merged objects as failures in end-to-end scores. Confirm scale handling, 180° orientation sensitivity, actual diagnostic features retained, and vocabulary/taxonomic reconciliation. Select preparation and thresholds only on development data; evaluate the final workflow on untouched independent samples.

Reproduce using `/tmp/diatom-research-venv/bin/python diatom_pilot/diamorph_rectified_controls.py` with the R30 outputs, UDE metadata `/tmp/ude-metadata.csv`, source images and DIAMORPH checkpoint available; set `YOLO_CONFIG_DIR=/tmp/diatom-yolo-config` and `MPLCONFIGDIR=/tmp/mpl-diatom`. Public images are from UDE DIATOMS in the Wild 2024, credited in R7; DIATLAS model source and terms are in R28.
