# R30 · DIAMORPH against previously inspected public cutouts

## Labeled-crop diagnostic · 2026-12-01

Run the same DIAMORPH species classifier and preprocessing as R28 against 79 previously retrieved UDE DIATOMS in the Wild images: the 18 selected crops in R7 (six filename-derived slide identifiers) and the 61 complete crops from the nonrandom single-slide prefix in R14. The [UDE dataset paper](https://doi.org/10.1093/gigascience/giae087) states that its cutouts are grayscale at **0.09 µm/pixel**. Rescale with that value to the model's requested 0.1 µm/pixel before the same vertical-axis, flip, center-crop and seamless-padding preprocessing. Nineteen images require a center crop after resizing; all 19 are from the single-slide prefix, and cropping can remove diagnostically relevant content. No model inference failures occurred.

Compare the top class's DIATLAS genus and species names to the UDE metadata by case-insensitive exact string equality. **This is not a taxonomic reconciliation:** synonyms, name changes, infra-specific rank, uncertain annotations and errors in the source labels can change the apparent result. A model class is treated as represented when its DIATLAS species name exactly matches the recorded UDE species. This audit does not establish that those names have the same current biological meaning. The model's training-set overlap with the source images is not independently verified.

| Previously inspected group | Top-1 exact genus / genus-labeled crops | Top-1 exact species / species-labeled crops | Top-1 exact species / crops with an exactly represented species |
|---|---:|---:|---:|
| R7 selected gallery and query images | 4 / 18 | 2 / 17 | 2 / 17 |
| R14 single-slide prefix | 0 / 61 | 0 / 59 | 0 / 29 |
| Combined | 4 / 79 | 2 / 76 | 2 / 46 |

The UDE metadata has three literal `None` species labels, which are excluded from species denominators, while their usable genus labels remain in genus denominators. Thirty of 76 species-labeled crops lack an **exact-name** species class in the checkpoint; they remain in the all-species denominator and cannot match exactly. The known-species conditional counts are shown separately, not substituted for the overall figures. Top-five exact species matches are 5/76 overall and 5/46 for the exact-known-species subset. Of 61 single-slide crops, 19 require a center crop and 42 do not; neither subset has a top-1 exact genus match. Unmatched names are not automatically biologically different species: reconciliation is needed. [Inspect fixed example cases](/results/pilot/diamorph-ude-diagnostic/) and [per-crop labels and predictions](/results/pilot/diamorph-ude-diagnostic/diagnostic.json).

**Preprocessing audit.** An initial direct comparison against the [author's script](https://raw.githubusercontent.com/ai4os-hub/diamorph-classification/main/scripts/square-pad.py) found five UDE crops with differing pixels. Floating-point operation order caused one-pixel differences in rounded resize dimensions. After changing our code to compute the resize factor before multiplication, the rerun matches the author's grayscale outputs pixel-for-pixel on all 79 UDE crops. This does not prove identical author deployment/runtime, solve taxonomy, or establish parity on other source formats. [Parity data](/results/pilot/diamorph-ude-diagnostic/parity.json). The earlier six Academy crop preprocessing checks and R29 robustness outputs were rerun after the fix and retained their reported results.

**Interpretation.** These poor exact-name matches are a clear reason not to promote this model to automatic identification for the Academy. They do not provide a defensible estimate of performance against the 95% genus and 60% species goals: the sets are tiny, nonrandom and repeatedly inspected; 61 images share one slide and may be correlated; public and model taxonomy may differ; images are expert-created cutouts rather than detector proposals; many include background or adjacent objects; DIATLAS atlas images and UDE focus-stacked scans have different optics and processing. There is no local Academy expert ground truth, no source-sample-level independence proof, no detection or overlap-group scoring, and no abstention policy. Even with perfect label harmonization, the exact-known conditional counts for these selected crops remain a warning, not a broad performance estimate.

**Source-domain follow-up.** In R32, all six preselected DIATLAS atlas controls matched their recorded species codes at top one; those images may have been in model training or validation. This checks basic code mapping and local inference on a few source images but does not identify the cause of the UDE mismatch or validate transfer. [View R32](/results/pilot/diamorph-atlas-controls/).

**R31 follow-up:** Direct pasting and fitting large crops changed some model outputs but did not change the exact-name match counts in either subset. Inverting contrast raised exact genus matches in the selected 18-image subset but not the 61-image single-slide prefix. None of these exploratory controls establish a general solution. [See the comparison](/results/pilot/diamorph-input-controls/).

**Next.** Reconcile the most common mismatches with a diatom taxonomist and inspect preprocessing on held-out atlas controls, retaining a frozen independent test set. Compare domain-adapted models, physically scaled focal-stack inputs, robust orientation strategies and open-set abstention using sample-separated validation; then measure the full detection/segmentation/classification pipeline on expert-reviewed Academy overlaps and partials. Reproduce with `YOLO_CONFIG_DIR=/tmp/diatom-yolo-config MPLCONFIGDIR=/tmp/mpl-diatom /tmp/diatom-research-venv/bin/python diatom_pilot/diamorph_ude_diagnostic.py` and the existing public cutouts, taxonomy table and temporary checkpoint. Re-run parity with `diatom_pilot/diamorph_ude_parity.py --author-script /tmp/diamorph-source-square-pad.py`; that file is executed after its recorded hash is checked and must be inspected and trusted.
