patcdaniel/planktoscope-phytoplankton-classifier
Planktoscope Phytoplankton Classifier
A 22-class phytoplankton image classifier for Planktoscope ROIs from the Santa Cruz Municipal Wharf timeseries.
Architecture
A frozen DINOv2 ViT-S/14 backbone (timm: vit_small_patch14_dinov2.lvd142m) produces a 384-d embedding, and a single linear layer (linear probe) maps it to 22 classes. Only the linear head is trained; the backbone is unchanged.
Preprocessing (must match exactly)
- Pad to square with fill
(255, 255, 255)(light, matching the ROI background) — preserves aspect ratio so chains are not distorted. - Resize to 224×224.
- Normalize with ImageNet mean
[0.485, 0.456, 0.406]/ std[0.229, 0.224, 0.225].
Classes
Akashiwo, Asterionella, Centric, CerataulinaGuinardiaDactyliosen, Chaetoceros, Detritus, Dinophysis, Eucampia, Lioloma, Margalefidinium, Pennate, Phaeocystis, Pleurosigma, Polykrikos, Protoperidinium, Pseudo-nitzschia, Rhizosolenia, Thalassionema, Tiarina, Tintinnid, Tripos, Zooplankton
Usage
See inference_example.py (self-contained — does not require the training repo). Predictions below recommended_min_confidence (0.7) should be treated as Unassigned, important when running over raw samples that contain detritus and unfamiliar particles.
Per-class performance (held-out test)
Training data
patcdaniel/planktoscope-phytoplankton — expert-verified ROIs curated via deep-feature clustering + DINOv2 embedding-similarity mining. This model predicts the 22 classes with ≥50 training images; the dataset additionally includes rarer curated classes not yet covered by the model.
Caveats
- Abundances derived from this model are counts of particles, not biovolume — a single cell and a long chain each count once.
- A few small classes remain weak (low support); see the per-class table.
License
cc-by-4.0
