torchcell.sga.quantify_plate_image_cellpose
- quantify_plate_image_cellpose(path: str, model: Any, cfg: CellposeSegConfig | None = None, overlay_path: str | None = None, return_masks: bool = False, precomputed_masks: ndarray | None = None) PlateSegResult[source]
Segment a backlit plate with Cellpose-SAM and quantify colonies onto the fitted array grid.
Returns a
PlateSegResultwhosetablematches the classicalquantify_plate_imageschema (row, col, size, circularity, flags, cx, cy);flagscodes:Clow circularity,Estraddles gel edge,Mmultiple colonies on the well (rejected downstream).precomputed_masksskips the Cellpose forward pass and re-runs only the grid/gel/assignment/scoring on a given instance-mask array (modelmay beNone) – for re-deriving the grid (e.g. relaxation) from cached masks without a GPU. If those masks are already Otsu-tightened, passtighten_size=Falseso they are not tightened twice.