torchcell.sga.CellposeSegConfig
- class CellposeSegConfig(*, n_rows: int = 14, n_cols: int = 22, polarity: str = 'auto', node_tol: float = 0.55, stray_tol: float = 1.0, circularity_flag: float = 0.8, circularity_reject: float = 0.65, neighbor_invalidate: bool = True, neighbor_dist: float = 0.85, gel_detect: bool = True, edge_policy: str = 'flag', flow_threshold: float = 0.4, cellprob_threshold: float = 0.0, diameter: float | None = None, contrast: str = 'none', clahe_clip: float = 0.01, min_instance_area: int = 20, tighten_size: bool = True, tighten_min_frac: float = 0.2, tighten_grow_px: int = 3, relax_grid: bool = True, homography_refit: bool = True, correct_row_shift: bool = True, edge_margin_frac: float = 0.5, multi_min_frac: float = 0.35, multi_min_sep_frac: float = 0.3, recover_missed_wells: bool = True, recover_depth_thresh: float = 12.0)[source]
Bases:
BaseModelParameters for Cellpose-SAM plate segmentation.
node_tol/stray_tolare fractions of the fitted colony pitch: an instance whose centroid is withinnode_tol * pitchof a grid node is that well’s colony; one withinstray_tol * pitch(but farther thannode_tol) is a near-stray that INVALIDATES the well (flagM); one farther thanstray_tolfrom every node is an off-grid contaminant colony (counted, assigned to no well).diameter=Noneuses Cellpose-SAM’s diameter-agnostic default; set it (px) only if faint colonies under-segment.- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].