# Diatom identification: strategy for regrouping

> **Feasibility decision (2026-12-02):** Human-level performance has not been demonstrated, and the current research trajectory alone does not justify expecting it. Focus on an assisted workflow, representative references, measured candidate burden and a comparative human benchmark. See the [feasibility assessment](research/FEASIBILITY_ASSESSMENT.md) and its [visual page](results/feasibility/).

> **Current assessment (2026-12-02):** Too much recent work has reused small, previously examined or synthetic cases. Human-level performance and real Academy overlap recovery are unverified. Prioritize a bounded, consistent real-slide comparison and specific observed failure modes. See the [evidence assessment](research/ASSESSMENT.md) and [visual assessment](results/assessment/). The detailed sequence below is historical context where it conflicts with this priority; provisional user review follows useful local tests, and independent specialist review is needed eventually to substantiate performance.

Research resumed at the user's request. This document consolidates the existing work; it does not start another experiment or certify the system. The objective remains an end-to-end freshwater diatom system that can identify partial and overlapping specimens, with genus identification for 95% and species identification for 60% of cases. Neither accuracy target nor overlap recovery has been established.

## Current priority: segmentation

Develop distinct instance masks for crowded microscopy fields, including partial and overlapping diatoms, while retaining original planes, masks and usable crops for later genus/species classification. Use existing local and public resources to test approaches before requesting more feedback; after local experiments have been exhausted, incorporate the user's amateur reviews, with a path to use specialist corrections later. Human-level segmentation is not established, and synthetic scenes and unreviewed model agreements cannot establish it. The [performance monitor](results/performance/) links ongoing tests and visual artifacts.

## Steps to unblock progress

1. **Project owner, optional:** Update review-time and microscope constraints when convenient; local segmentation experiments need not wait.
2. **Project owner:** In the [review queue](results/review-queue.html), record the earlier DINOv3 checkpoint and code paths, variant, preprocessing and inference settings if known. Meta permission was already granted; do not include credentials. This enables reproduction; missing details do not prevent provisional review or, after resumption, YOLO comparisons.
3. **Someone familiar with the slides:** Use the [sample registry](results/pilot/sample-registry/) to assign the same sample ID to related slides, leave unknowns blank, and download the registry JSON into the project's `results` directory. This enables sample-separated splits; filenames alone do not establish independence.
4. **User, optional now:** Mark possible whole, partial and overlapping specimens on the [scan practice page](results/pilot/development-practice/), enter a reviewer ID, and download the provisional annotations JSON. Put it in `results` or open it in the [matching field review](results/pilot/field-01/). The static site cannot upload it. This supports workflow improvement and provisional examples; the previously viewed practice field is not a held-out benchmark.
5. **Patrick Center scientist, later when needed:** Define the counting unit, overlap and partial rules, rank-specific eligibility, taxonomy and voucher sources, unresolved labels, and denominators for the 95% and 60% targets. Review and adjudicate an independently selected, sample-separated reference set. This enables reliable local labels and an independent performance measurement. Nonexpert feedback can begin earlier.

After those inputs, freeze split and evaluation rules, compare agreed methods on development data, and evaluate the frozen system on held-out samples. Browser data stays local until downloaded; transfer exported JSON back to the project machine. Record unknowns rather than guessing.

## What the evidence says

- **Detection needs a stronger instance proposal path.** In the four provisional practice fields, one-to-one matching of original boxes covered 8 of 54 nonexpert marks; a large box could contain multiple marks and still receive at most one assignment. Marks are incomplete and may not correspond one-to-one to real diatoms. This is not recall. [R1](research/R1.md)
- **Use complementary views for review, not automatic counting.** Existing tiled and cross-plane proposals identify different locations, but can duplicate or merge specimens. On one practice field the original and tiled boxes each contained a different one of two marks. Cross-field duplicate suggestions also need human decisions. [R3](research/R3.md), [R5](research/R5.md), [field comparison](results/pilot/tile-practice/comparison.html)
- **Do not promote the current fine-tuned models.** The public two-taxon detector and decoder adaptations had mixed results on small previously inspected sets. The negative-point pair examples were not true overlapping polygons. Their training samples and labels are not a representative Academy benchmark. [R21](research/R21.md), [R22](research/R22.md)
- **Species classification is a major risk.** On 79 selected UDE crops, the full-vocabulary DIAMORPH model had 4 exact genus matches among 79 genus-labeled crops and 2 exact species matches among 76 species-labeled crops; taxonomy and domain differences complicate interpretation. A separate closed-set four-species pilot found 15/16 and 13/16 validation species matches for generic and specialist feature centroids respectively; the frozen generic method then matched 10/16 species and 16/16 genera on two held-out filename-derived slide groups. These tiny, selected crop results exclude unknown taxa and do not establish biological independence. These are development diagnostics, not Academy performance. [R30](research/R30.md), [R36](research/R36.md)
- **DINOv3 remains a priority to reproduce.** The user reports Meta granted experimental use and that their out-of-the-box run segmented reasonably well. The precise checkpoint, code and settings are not yet in this workspace; no local reproduction has been performed. [R2](research/R2.md)

## Recommended sequence after regrouping

1. **Agree on what counts and what can be identified.** Have a Patrick Center scientist define the specimen/counting unit, how to handle partials, crossings, ambiguous taxa and duplicates, and what the 95% and 60% denominators mean. Record taxonomy version, sample identities, and which slides share a biological sample. The user can continue preliminary marking as nonexpert; those marks remain provisional.
2. **Create an independent local reference set.** Select fields by sample before viewing predictions. Include ordinary valves, partials, overlapping groups, debris and unrepresented taxa. Ask experts to mark every eligible instance and provide rank-specific identifications or unresolved status; adjudicate disagreements and retain both original opinions and decisions. Keep entire biological samples in one split, including all fields, slides and focus planes. Reserve an untouched final test set.
3. **Compare a small set of complementary detection approaches.** Freeze a practical baseline: current full-field YOLO, tiled YOLO, cross-plane proposals, and the user's reproducible DINOv3 setup once located. Compare at a common annotation and reviewer-effort budget. Measure misses, duplicate/false proposals, distinct-instance recovery in complete overlap groups, and partial-object recovery. Keep exact masks secondary where a rough instance boundary is sufficient.
4. **Develop classification with honest abstention.** Build a scientist-approved vocabulary with voucher images and a versioned synonym map; distinguish genus-only from species-level evidence. Compare existing DIAMORPH and locally adapted embeddings on sample-separated validation, including unknown taxa and difficult partials. Never treat similarity scores as calibrated probabilities. Establish thresholds and rules on validation before using the final test.
5. **Evaluate the whole workflow.** Use the fixed held-out set once after the protocol and models are frozen. Count detection misses in end-to-end identification fractions, report eligible denominators and abstentions, and stratify by sample, taxon, partial and overlap status. Use an appropriate independent-sample uncertainty method. Measure review time and preserve a path for an expert to override or abstain.

## Decisions and inputs for the regroup

- **Recommended first decision:** prioritize segmentation experiments on available data and reproduction of the earlier DINOv3 setup before choosing a production model; bring in the user and then a scientist as outlined above. Use the existing YOLO results as one comparison, and prioritize comparisons with clear sample separation and review budgets. This is a proposed sequence, not a claim that either model meets the target.
- **Specify the accuracy contract:** decide whether 95% and 60% mean all true specimens or only those a scientist judges identifiable at each rank, and whether a correct species identification also counts toward genus. Report both end-to-end fractions and conditional classification performance, with misses and abstentions visible. The final choice requires scientific and project-owner agreement.
- Identify the actual DINOv3 variant, checkpoint location, code and parameters from the earlier trial; permission has already been granted, but weights and method are not documented locally.
- Ask a scientist to establish counting rules, eligible genus/species cases and how to adjudicate uncertain or overlapping specimens. An expert review can follow the user's provisional training; it is not necessary to discard that feedback.
- Establish biological sample relationships and a target taxon/voucher list before drawing train, validation and test splits. The [sample registry](results/pilot/sample-registry/) provides an unassigned inventory for recording known relationships; its entries are declarations, not independent verification. A slide name alone is not evidence of sample independence.
- Decide how much review time per field is acceptable, which microscopes and acquisition formats matter, and the permitted use and redistribution of the existing model weights.

## Current tools and limitations

The [field review](results/pilot/field-01/) supports focal-plane navigation, rough outlines, partial/overlap flags and portable reviews. The [combined proposal example](results/pilot/tile-stack-practice/) includes original, tiled and cross-plane candidates; taxonomy hints are hidden initially. These are separate hypotheses and may be duplicates. The [grid example](results/pilot/grid-practice/) supports bounded multi-field runs but has no validated cross-field deduplication. The [evaluation protocol and calculator](diatom_pilot/EVALUATION.md) require externally adjudicated references; no current local expert test set is available. The frozen centroid test path evaluates preselected crops only. A prototype can freeze and score original, tiled, cross-plane and split field proposals and assemble them with explicitly supplied expert matches for the calculator; scientifically approved reference annotations and matching remain needed. Temporary models and the Python environment under `/tmp` need durable, reproducible provisioning before operational deployment.

The [review queue](results/review-queue.html) lists the DINOv3 setup, scientist guidance, and sample/voucher information needed for regrouping; the saved pilot reviews checked so far contain no genus or species names. It can export responses and reopen them on another computer. Its notes remain in that browser until downloaded; opening a saved file replaces that browser’s queue responses. If its local data is damaged, download the recovery backup before opening a valid saved file.
