CoolFace
Modelpublic

patcdaniel/planktoscope-phytoplankton-classifier

sourceHugging Facecc-by-4.0updated 4mo agoView on Hugging Face
0likes10downloads
Model Card

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)

  1. 1.Pad to square with fill (255, 255, 255) (light, matching the ROI background) — preserves aspect ratio so chains are not distorted.
  2. 2.Resize to 224×224.
  3. 3.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)

classsupportprecisionrecallf1
Dinophysis101.01.01.0
Phaeocystis1600.9641.00.982
Thalassionema550.9820.9820.982
Tripos250.9621.00.98
Tintinnid1420.9590.9930.976
Akashiwo2700.9890.9630.976
Zooplankton191.00.9470.973
Chaetoceros5640.970.9680.969
Detritus1400.9850.950.967
CerataulinaGuinardiaDactyliosen2440.9630.9670.965
Margalefidinium780.9280.9870.957
Tiarina330.9171.00.957
Asterionella610.9510.9510.951
Centric81.00.8750.933
Pseudo-nitzschia3390.9440.9030.923
Lioloma990.8730.970.919
Polykrikos110.8461.00.917
Protoperidinium100.8331.00.909
Eucampia120.8460.9170.88
Rhizosolenia920.9070.8480.876
Pennate160.7860.6880.733
Pleurosigma80.6670.750.706

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