Baselines of the CytoNucs paper
The trained baseline models of the CytoNucs paper's comparison (seed 0 of each), trained on the same splits as
CytoNucs. Code that trains, runs and scores them: https://github.com/podtyazhki1337/Cyto-Nucs-Stardist-2D-3D
(baselines/); the CytoNucs models: https://huggingface.co/Podtyazhki1337/cytonucs
Models and their test scores
AP nucleus (inner) / AP cell (outer) / linked JTPR on the test split (TissueNet: test; held-out tiles in the
paper as well). Datasets as dataset_prep/ of the code writes them.
| Folder | Method | Data | Test scores |
|---|---|---|---|
stardist/sd_e7_tissuenet_{nucleus,cytoplasm} |
StarDist, one model per level, CytoNucs' crop budget | TissueNet | 0.629 / 0.512 / 0.837 |
stardist/sd_tissuenet_{nucleus,cytoplasm} |
StarDist, default recipe | TissueNet | 0.584 / 0.464 / 0.816 |
stardist/sd_e7_helacytonuc_clean_{nucleus,cytoplasm} |
StarDist, CytoNucs' crop budget | HeLaCytoNuc (cleaned) | 0.478 / 0.235 / 0.682 |
stardist/sd_helacytonuc_clean_{nucleus,cytoplasm} |
StarDist, default recipe | HeLaCytoNuc (cleaned) | 0.477 / 0.253 / 0.702 |
stardist/sd_e7_bbbc020_{nucleus,cytoplasm} |
StarDist, CytoNucs' crop budget | BBBC020 | 0.506 / 0.339 / 0.606 |
stardist/sd_bbbc020_{nucleus,cytoplasm} |
StarDist, default recipe | BBBC020 | 0.549 / 0.325 / 0.712 |
stardist/sd_kits_d4_{mass,kidney} |
StarDist 3D | KiTS23 | 0.000 / 0.073 / 0.000 |
hydrastardist/hsd_tissuenet |
HydraStarDist | TissueNet | 0.642 / 0.515 / 0.839 |
hydrastardist/hsd_helacytonuc_clean |
HydraStarDist | HeLaCytoNuc (cleaned) | 0.484 / 0.274 / 0.698 |
hydrastardist/hsd_wbr_helacytonuc_clean |
HydraStarDist + WBR (made differentiable) | HeLaCytoNuc (cleaned) | 0.475 / 0.273 / 0.718 |
hydrastardist/hsd_bbbc020 |
HydraStarDist | BBBC020 | 0.544 / 0.309 / 0.683 |
cellpose/cp_tissuenet |
Cellpose 3, fine-tuned, one model per level | TissueNet | 0.608 / 0.501 / 0.836 |
cellpose/cp_helacytonuc_clean |
Cellpose 3, fine-tuned | HeLaCytoNuc (cleaned) | 0.488 / 0.333 / 0.683 |
cellpose/cp_bbbc020 |
Cellpose 3, fine-tuned | BBBC020 | 0.577 / 0.562 / 0.885 |
cellpose/cp3d_kits |
Cellpose 3, fine-tuned, 3D | KiTS23 | 0.014 / 0.151 / 0.144 |
instanseg/instanseg_tissuenet |
InstanSeg, trained from scratch | TissueNet | 0.637 / 0.504 / 0.859 |
instanseg/instanseg_helacytonuc_clean |
InstanSeg, trained from scratch | HeLaCytoNuc (cleaned) | 0.496 / 0.282 / 0.708 |
instanseg/instanseg_bbbc020_px4 |
InstanSeg, trained from scratch on images downscaled 4x (--pixel-size 0.125) |
BBBC020 | 0.509 / 0.343 / 0.904 |
nnunet/Dataset501_KiTSCytoNucs |
nnU-Net v2, 3d_fullres, fold 0 (kidney / tumour / cyst, instances by the CytoNucs rule) | KiTS23 | 0.247 / 0.919 / 0.733 |
HeLaCytoNuc scores: the hand-drawn test split; the CellProfiler test split and the means over three seeds are in the paper.
Usage
Download a folder into the --basedir of the script (default runs/<method>), then run the script with the folder
name. Every script prints its options with --help; predictions are scored with score_predictions.py.
hf download Podtyazhki1337/cytonucs-baselines --include "hydrastardist/hsd_helacytonuc_clean/*" --local-dir models
# StarDist (one model per level; CytoNucs environment)
python baselines/stardist3d/run_files.py --data data/HeLaCytoNuc/cytonucs_clean --basedir models/stardist --patch 256 256 \
--score --inner nucleus:sd_e7_helacytonuc_clean_nucleus --outer cytoplasm:sd_e7_helacytonuc_clean_cytoplasm --split test
# HydraStarDist (CytoNucs environment)
python baselines/hydrastardist/run_hsd.py --data data/HeLaCytoNuc/cytonucs_clean --basedir models/hydrastardist \
--score --name hsd_helacytonuc_clean --split test
# Cellpose (cellpose 3 environment); channels: TissueNet --cell-channels 3 2 --nucleus-channel 2
python baselines/cellpose/run_cellpose.py --data data/HeLaCytoNuc/cytonucs_clean --basedir models/cellpose \
--name cp_helacytonuc_clean --cell-channels 1 3 --nucleus-channel 3 --predict-only --split test
# InstanSeg (instanseg-torch environment); channels: TissueNet --nucleus-channel 2 --cytoplasm-channel 3
python baselines/instanseg/run_instanseg.py --data data/HeLaCytoNuc/cytonucs_clean --basedir models/instanseg \
--name instanseg_helacytonuc_clean --nucleus-channel 3 --cytoplasm-channel 1 --predict-only --split test
- Cellpose:
training.jsonholds each level's diameter and the cellprob / flow thresholds chosen on val. The weights path in it is relative to the model folder. - Cellpose 3D (KiTS23):
training.jsonalso holds the 3D mode chosen on val; load each level withCellposeModel(pretrained_model=...). - InstanSeg:
model/holds the weights (model_weights.pth,experiment_log.csv) and a TorchScript export (instanseg.pt). - nnU-Net:
- Set
nnUNet_resultsto the downloadednnunet/folder. - Run
nnUNetv2_predict -d 501 -c 3d_fullres -f 0. - Turn the semantic output into kidney and mass instances with
baselines/nnunet/to_instances.py.
- Set
Licence
Weights for research use. Models trained on data with a non-commercial licence inherit its terms:
- TissueNet (modified Apache 2.0, non-commercial);
- KiTS23 (CC BY-NC-SA 4.0).
The methods keep their own licences:
- StarDist, HydraStarDist and Cellpose: BSD-3-Clause;
- InstanSeg and nnU-Net: Apache 2.0.