fishtank.scripts.cellpose#
- fishtank.scripts.cellpose(input, fov, channels, output='./cellpose_polygons', file_pattern='{series}/Conv_zscan_{fov}.dax', corrections=None, color_usage='{input}/color_usage.csv', z_slices=None, model='cpsam', diameter=None, cellprob_threshold=0.0, downsample=None, do_3D=False, model_args=None, clear_border=False, min_size=1000, filter=None, filter_args=None, gpu=False, **kwargs)#
Segment cells using Cellpose.
fishtank cellpose -i input -f 1 –channels DAPI -o cellpose_polygons
- Parameters:
fov (
int) – Field of view to process.channels (
list[str]) – Channel for segmentation (e.g., DAPI or PolyT,DAPI).output (
str|Path(default:'./cellpose_polygons')) – Output directory.file_pattern (
str(default:'{series}/Conv_zscan_{fov}.dax')) – Naming pattern for image files.corrections (
Union[str,Path,None] (default:None)) – Path to image corrections directory.color_usage (
str(default:'{input}/color_usage.csv')) – Path to color usage file.z_slices (
Union[list[int],slice,None] (default:None)) – Z-slices to use for segmentation (e.g., 1 or 1,2,3 or 1:20:5).model (
str(default:'cpsam')) – Cellpose model (e.g., cyto or nuclei).diameter (
Optional[int] (default:None)) – Cellpose diameter.cellprob_threshold (
float(default:0.0)) – Cell probability threshold.downsample (
Optional[int] (default:None)) – Downsampling factor.do_3D (
bool(default:False)) – Use 3D segmentation.model_args (
Optional[dict] (default:None)) – Additional model arguments (e.g., key1=val1,key2=val2).clear_border (
bool(default:False)) – Remove cells touching the image border.min_size (
int(default:1000)) – Minimum area or volume for a cell to be kept.filter (
Optional[str] (default:None)) – Filter to apply to the image before segmentation.filter_args (
Optional[dict] (default:None)) – Additional filter arguments (e.g., key1=val1,key2=val2).gpu (
bool(default:False)) – Use GPU.