Toxoplasma plaque segmentation — round 5 (Cellpose-SAM)
Segments Toxoplasma gondii plaques in crystal-violet plaque assays. Round 5 is the first
model trained across all four domains at once: whole-well microscope scans (two fixations),
wells cropped from published figures, and phone-camera wells. Built for
spaCR.
488 curated fields, 27,582 plaques, deduplicated by pixel content.
Split by FIGURE (literature) and by PLATE (microscope) so no figure or plate straddles;
malnio's own held-out 20 are forced into test.
| set |
fields |
plaques |
| train |
332 |
18,532 |
| valid |
75 |
4,756 |
| test |
81 |
4,294 |
Results — test set, F1 at IoU 0.5
| domain |
train |
valid |
test |
r3 |
r4 |
r5 |
| literature |
208 |
45 |
45 |
0.8197 |
0.8188 |
0.8185 |
| malnio |
62 |
14 |
20 |
0.2494 |
0.2167 |
0.4148 |
| patrick |
47 |
10 |
10 |
0.8361 |
0.822 |
0.8076 |
| bigbean |
15 |
6 |
6 |
0.8718 |
0.8806 |
0.8755 |
| all |
332 |
75 |
81 |
0.6818 |
0.6745 |
0.7106 |
Read the incumbent columns with care. r3 and r4 trained on every microscope well and on
most of the literature, so their scores there measure memorisation. qc/summary.json also
reports every model on the subset neither incumbent ever trained on (malnio plus the
literature curated after round 4), which is the only fair comparison; qc/*_test_perimage.csv
flags each field with incumbent_trained_on.
Round 5 gains -0.0012 literature F1 over round 3 on the shared test set, which does NOT clear the bar of 0.02 fixed before the run, so round 3 REMAINS production.
Empty wells carry no F1 (undefined on empty truth); objects predicted on them are counted as
hallucinations in qc/summary.json.
Contents
weights/cpsam_plaque_r5 — final weights
training/epoch_history.csv — per-epoch loss, pixel accuracy, precision, recall, Dice, IoU, MCC
training/loss_history.csv, splits.csv, manifest.csv, test_by_domain.csv, run.json
qc/ — per-image metrics for r5, r3 and r4, summary.json, comparison.csv
Environment
|
|
| cellpose |
4.2.1.1 |
| torch |
2.10.0+cu128 |
| GPU |
NVIDIA GeForce RTX 3090 Ti |
| base weights |
cpsam_v2 |
| recipe |
100 epochs, lr 1e-5, scale_range 0.5, min_train_masks 0 |
Use with spaCR
from huggingface_hub import hf_hub_download
from spacr.core import preprocess_generate_masks
w = hf_hub_download("einarolafsson/toxoplasma-plaque-segmentation-cpsam-r5", "weights/cpsam_plaque_r5")
preprocess_generate_masks({"src": "/path/to/plate", "custom_model": w})
spaCR · PyPI ·
conda-forge