Upload metadata.txt with huggingface_hub
Browse files- metadata.txt +89 -0
metadata.txt
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
================================================================================
|
| 2 |
+
Toxoplasma gondii — Parasitophorous Vacuole (PV) Segmentation
|
| 3 |
+
CellposeSAM (cpsam_v2) fine-tuned model
|
| 4 |
+
================================================================================
|
| 5 |
+
|
| 6 |
+
WEIGHT FILE : cpsam_v2_toxo_r2 (1,218,643,463 bytes ~1.16 GB)
|
| 7 |
+
TASK : 2D instance segmentation of intracellular Toxoplasma
|
| 8 |
+
parasitophorous vacuoles / parasite clusters in fluorescence
|
| 9 |
+
microscopy.
|
| 10 |
+
ARCHITECTURE : Cellpose-SAM
|
| 11 |
+
BASE MODEL : cpsam_v2 (cellpose 4.2.1.1; MODEL_NAMES includes cpsam_v2)
|
| 12 |
+
ROUND : 2 (production). Round 1 kept separately.
|
| 13 |
+
AUTHOR : Einar Olafsson, Carruthers Lab
|
| 14 |
+
DATE : 2026-08-31
|
| 15 |
+
FRAMEWORK : cellpose >= 4.2 (CellposeModel API)
|
| 16 |
+
|
| 17 |
+
--------------------------------------------------------------------------------
|
| 18 |
+
HOW TO LOAD
|
| 19 |
+
--------------------------------------------------------------------------------
|
| 20 |
+
from cellpose import models
|
| 21 |
+
m = models.CellposeModel(gpu=True, pretrained_model="cpsam_v2_toxo_r2")
|
| 22 |
+
masks, flows, styles = m.eval(img, normalize=True,
|
| 23 |
+
flow_threshold=0.4, cellprob_threshold=0.0)
|
| 24 |
+
|
| 25 |
+
In spacr: point the CellposeModel / MakeMasks 'pretrained_model' path at this file.
|
| 26 |
+
|
| 27 |
+
INPUT EXPECTED : single-channel fluorescence, the red / parasite channel
|
| 28 |
+
(e.g. PerkinElmer C02 or a dsRed channel). 16-bit accepted
|
| 29 |
+
(the model was trained/evaluated on raw 16-bit with
|
| 30 |
+
normalize=True). Typical well crop ~2000x2000 px.
|
| 31 |
+
|
| 32 |
+
--------------------------------------------------------------------------------
|
| 33 |
+
TRAINING DATA
|
| 34 |
+
--------------------------------------------------------------------------------
|
| 35 |
+
Round 2 total: 229 training images.
|
| 36 |
+
- 104 NAS gold wells (lab-annotated Toxoplasma vacuole masks)
|
| 37 |
+
- 125 newly curated wells across additional marker conditions
|
| 38 |
+
(RH-dsRed, RH-abTg, ME49-abTg, host-cell markers: tubulin / ESCRT /
|
| 39 |
+
cellmask), curated in the custom Qt tool. Empty wells kept as
|
| 40 |
+
negatives (min_train_masks=0).
|
| 41 |
+
Held-out (never trained on):
|
| 42 |
+
- 11 NAS wells (fixed seed=0 split, identical to round 1 -> comparable)
|
| 43 |
+
- 40 curated new-condition wells (cross-condition generalisation set)
|
| 44 |
+
Epochs 100, lr 1e-5.
|
| 45 |
+
|
| 46 |
+
--------------------------------------------------------------------------------
|
| 47 |
+
EVALUATION (held-out)
|
| 48 |
+
--------------------------------------------------------------------------------
|
| 49 |
+
NAS in-domain held-out (11 wells, ~553 objects):
|
| 50 |
+
IoU 0.5 : precision 0.843 recall 0.886 F1 0.864 AP 0.802
|
| 51 |
+
IoU 0.6 : precision 0.819 recall 0.861 F1 0.839
|
| 52 |
+
IoU 0.7 : precision 0.768 recall 0.808 F1 0.788
|
| 53 |
+
IoU 0.8 : precision 0.659 recall 0.692 F1 0.675
|
| 54 |
+
IoU 0.9 : precision 0.311 recall 0.327 F1 0.319
|
| 55 |
+
|
| 56 |
+
New-condition held-out (40 wells):
|
| 57 |
+
F1@0.5 0.885 | mAP(0.5-0.9) 0.830 | Aggregated Jaccard 0.920 | Dice 0.963
|
| 58 |
+
|
| 59 |
+
Control (base cpsam_v2, no fine-tuning) on the same NAS held-out:
|
| 60 |
+
F1@0.5 0.713 | mAP 0.322 | Aggregated Jaccard 0.426
|
| 61 |
+
=> fine-tuning raises F1 by +0.15 and boundary accuracy (AJI) by ~2x.
|
| 62 |
+
|
| 63 |
+
Round 1 vs Round 2 (same code, same held-outs):
|
| 64 |
+
NAS held-out (in-domain) : F1 0.867 -> 0.864 (tie within noise on 11 wells)
|
| 65 |
+
New-condition held-out : F1 0.863 -> 0.885 (+0.022); AJI 0.784 -> 0.920
|
| 66 |
+
|
| 67 |
+
--------------------------------------------------------------------------------
|
| 68 |
+
INTENDED USE / LIMITATIONS
|
| 69 |
+
--------------------------------------------------------------------------------
|
| 70 |
+
- Built to COUNT and SIZE Toxoplasma vacuoles per field/condition in fixed
|
| 71 |
+
fluorescence assays.
|
| 72 |
+
- Strong on parasite-rich images; host-cell-marker images (tubulin/cellmask)
|
| 73 |
+
are the weakest domain and are the focus of ongoing curation (round 3).
|
| 74 |
+
- NAS held-out is only 11 wells; the new-condition held-out shares plates/markers
|
| 75 |
+
with its training wells (within-condition generalisation, not a fresh lab).
|
| 76 |
+
- Not validated on live/brightfield imaging or on non-Toxoplasma parasites.
|
| 77 |
+
|
| 78 |
+
--------------------------------------------------------------------------------
|
| 79 |
+
FILES IN THIS FOLDER
|
| 80 |
+
--------------------------------------------------------------------------------
|
| 81 |
+
cpsam_v2_toxo_r2 the model weights (load this)
|
| 82 |
+
round2.log round-2 training composition + baselines
|
| 83 |
+
round2_heldout_metrics.csv per-IoU metrics on the NAS held-out
|
| 84 |
+
round2_vs_round1.csv round-1 vs round-2 head-to-head
|
| 85 |
+
train_report.json round-1 config + metrics + the 11 held-out names
|
| 86 |
+
vanilla_vs_finetuned.json base cpsam_v2 vs fine-tuned control
|
| 87 |
+
|
| 88 |
+
LICENSE : (choose before upload — CC-BY-4.0 suggested for weights + data-derived)
|
| 89 |
+
CITATION : Olafsson E., Carruthers Lab — Toxoplasma PV segmentation (CellposeSAM), 2026.
|