lazyslide_models.segmentation.Classpose#
- class Classpose(variant='conic', model_path=None, token=None, flow_threshold=0.4, cellprob_threshold=0.0, min_size=15)#
Bases:
SegmentationModelclasspose 🤗Hugging Face GitHub Paper Params: 304M CC-BY-NC-4.0 [Mandal et al., 2025] Foundation-model-driven whole-slide-scale cell phenotyping in H&E. Cellpose-SAM with a semantic head, for joint cell segmentation and typing.
One checkpoint per training dataset; each carries its own resolution and cell-type vocabulary:
variant
mpp
cell types (class 0 is always Background)
conic
0.5
Neutrophil, Epithelial, Lymphocyte, Plasma cell, Eosinophil, Connective
consep
0.25
Other, Inflammatory, Healthy epithelial, Malignant epithelial, Stroma, Muscle
glysac
0.25
Other, Lymphocyte, Epithelial, Ambiguous
monusac
0.25
Epithelial, Lymphocyte, Macrophage, Neutrophil
nucls
0.2
Tumor, Stroma, Lymphocyte, Plasma cell, Macrophage, Other
puma
0.22
Apoptosis, Tumor, Endothelial, Stroma, Lymphocyte, Histocyte, Epithelial, Melanophage, Other
>>> import lazyslide as zs >>> zs.pp.tile_tissues(wsi, 256, mpp=0.5) >>> zs.seg.cells(wsi, model="classpose", model_kwargs={"variant": "conic"})
Upstream warns that the
nuclscheckpoint is trained largely on bounding box annotations and performs worse than the others.- Parameters:
- variantstr, default: “conic”
Which trained checkpoint to load. See the table above.
- model_pathstr, optional
Local checkpoint to load instead of downloading from Hugging Face.
- tokenstr, optional
Hugging Face access token.
- flow_threshold, cellprob_threshold, min_sizefloat, float, int
Passed through to Cellpose’s mask dynamics.