CellposeParams
Configuration parameters for Cellpose-SAM AI model.
Import
import ScriptingApi as api
# Create parameter instance
params = api.CellposeParams()
Properties
mode
Segmentation mode ('2D' for single-slice or '3D' for volumetric). The default is '3D'.
Type: str
device
Processing device ('cpu' or 'gpu'). The default is 'cpu'.
Type: str
flow_threshold
Flow error threshold for mask acceptance. Lower values are more strict (0.1-0.3); higher values (0.5-1.0) find more objects including uncertain ones. The default is 0.4.
Type: float
cellprob_threshold
Object probability threshold. Lower values (negative) detect larger and more objects; higher values detect smaller and fewer objects. The default is 0.0.
Type: float
diameter
Expected object diameter in pixels. Set to 0 for automatic detection. The default is 0.
Type: float
min_size
Minimum object size in pixels. Objects smaller than this are removed. Set to -1 to disable. The default is 15.
Type: int
exclude_on_edges
Discard masks that touch the edges of the image. The default is False.
Type: bool
batch_size
Number of 256x256 image tiles processed simultaneously on GPU. The default is 8.
Type: int