Automated segmentation pipeline for AFM T-cell images. A probe-aware geometry rule selects the indented cell in crowded frames, scoring 0.813 mean Dice on 39 held-out frames with zero empty outputs. Ablation shows the selection rule contributes +0.65 Dice while model fine-tuning contributes +0.02.
Solo Researcher (Undergraduate) · Fall 2025 · Team of 1 · 3 key work items · 3 evidence-backed
What I owned
Owned the full pipeline end-to-end: dataset curation and quality control, stratified train/test split design, Cellpose fine-tuning, automatic cantilever tip detection, probe-aware cell selection logic, failure handling with structured fallback paths, per-frame QC artifact generation, and a verification framework with per-frame failure logging. Also audited and corrected my own evaluation protocol after finding that the originally reported metrics were computed on a set that included training frames; all numbers here are from a held-out test set under a single global threshold configuration. AFM images provided by graduate researcher at Sulchek Lab (Georgia Tech).
The rule is the dominant source of pipeline performance: 0.813 mean Dice with probe-aware selection versus 0.140 with a largest-cell baseline on the identical model and identical 39 held-out frames. Fine-tuning the model moves the same number by 0.024. Zero pred-empty frames across all configurations; one retry fired in 39 frames; every non-normal path flagged and logged.
Fine-tuning contributes +0.024 mean Dice on held-out frames (0.813 versus 0.789 for out-of-box Cellpose-SAM under the same selection rule), consistent in direction across subsets but small. The practical implication: the pipeline may be able to run on the base model plus the selection rule, which would remove any need to distribute weights trained on lab data.
The audit found that originally reported metrics (0.889 mean Dice) had been computed over all 216 frames, including the 177 the model trained on, with per-subset thresholds selected by inspecting results on those same frames. Because every run was stamped and every frame logged, the error was reconstructible from stored outputs without re-running inference. The evaluation was re-run held-out under one global configuration and re-reported at 0.813; all public numbers were corrected.
| From | To | Type | Description |
|---|---|---|---|
| Raw AFM frame (.tif) | Preprocessing module | data | Grayscale load + percentile [2,98] intensity normalization; optional contrast normalization and morphological closing per subset config |
| Preprocessing module | Cellpose model | data | Full AFM frame passed without cropping. Corrected evaluation applies a single global cellprob_threshold and flow_threshold to every frame; per-subset overrides were used in the original run and are retained only as a tuned upper bound, not as a deployable configuration. |
| Cellpose model | Probe-aware selection logic | software | Multi-instance integer label map passed to geometry rule; probe coordinates sourced from auto-detector or PROBE_MAP fallback |
| Probe-aware selection logic | QC artifact writer | software | Single binary tip-cell mask + selected instance metadata; path taken (normal, retry, fallback) logged per frame to JSON |

6-panel grid showing ground truth vs predicted masks across three qualitative performance classes

5-panel strip showing each stage: raw AFM frame → detected cantilever tip → Cellpose multi-instance masks → geometry-aware selection → final tip-cell mask
Limitations
Lessons