einarolafsson/toxoplasma-pv-segmentation-cpsam-r6
Toxoplasma PV segmentation — round 6 (Cellpose-SAM)
Segments Toxoplasma gondii parasitophorous vacuoles. Round 6 retrains round 5 on the same 556 curated fields with cellpose 4.2.1.1, now with a held-out validation set (per-epoch validation loss and accuracy) and a separate test set. Built for spaCR.
Data
Per-field assignment: training/split.csv.
Results — test set (11 anchor wells)
Validation fold (r6): F1 0.8237, AJI 0.7927, Dice 0.8936.
5-fold cross-validation (same data, grouped by source): F1 0.8168 ± 0.028, AJI 0.7516, Dice 0.8424. Per-fold, per-image results and per-epoch histories are in cv/.
Training: 100 epochs; best validation loss 0.08639681519438185 at epoch 20; final train loss 0.0461, final validation loss 0.12872041770909468.
Contents
weights/cpsam_v2_toxo_r6— final weightstraining/epoch_history.csv— per-epoch train and validation loss, pixel accuracy, Dice, IoU, MCCtraining/split.csv,training/training_curves.png,training/report.jsonqc/— per-image metrics for r6 and stock (*_perimage.csv),summary.json,comparison_vs_stock.csvcv/— 5-fold CV: aggregate, per-fold per-image and per-IoU metrics, per-epoch histories
Pixel accuracy is foreground classification on the training crops; F1/AJI/Dice above are the segmentation-quality numbers.
Environment
Use with spaCR
pip install spacr # or: conda install -c conda-forge spacrfrom huggingface_hub import hf_hub_download
from spacr.core import preprocess_generate_masks
w = hf_hub_download("einarolafsson/toxoplasma-pv-segmentation-cpsam-r6", "weights/cpsam_v2_toxo_r6")
preprocess_generate_masks({"src": "/path/to/plate", "pathogen_channel": 2, "custom_model": w})Source: <https://github.com/EinarOlafsson/spacr> · PyPI · conda-forge · Training data: einarolafsson/toxoplasma-pv-segmentation-dataset
