Cellpose Tools¶
Configuration File: cellpose_tools.json
Tool Type: Local
Tools Count: 1
This page contains all tools defined in the cellpose_tools.json configuration file.
Available Tools¶
Cellpose_segment_image (Type: CellposeTool)¶
Segment cells or nuclei in a single microscopy image LOCALLY using the deep-learning Cellpose mod…
Cellpose_segment_image tool specification
Tool Information:
Name:
Cellpose_segment_imageType:
CellposeToolDescription: Segment cells or nuclei in a single microscopy image LOCALLY using the deep-learning Cellpose model (no API, no key). Given a local image file path, returns the number of segmented objects, per-object area (pixels) and centroid (y,x), the image shape, and optionally the path to a saved integer label-mask image. Choose ‘model_type’ = ‘cyto3’/’cyto’/’cyto2’ for whole-cell/cytoplasm segmentation or ‘nuclei’ for nuclei. NOTE: cellpose 3.x honors ‘model_type’; cellpose 4.x uses a single unified model (CPSAM) and ignores ‘model_type’ (the ‘model_used’ field and a ‘note’ report what actually ran). Requires the optional ‘cellpose’ package (pip install cellpose; pulls in torch). On first use cellpose downloads model weights (small in 3.x, ~1 GB CPSAM in 4.x) and caches them, so the first call is slow; later calls reuse cached weights. Returns a clean error if cellpose is not installed or the image cannot be read.
Parameters:
image_path(string) (required) Path to a local microscopy image file (.tif, .tiff, .png, .jpg, .jpeg, .bmp).model_type(string) (optional) Cellpose model to use. ‘cyto3’/’cyto’/’cyto2’ for cells/cytoplasm, ‘nuclei’ for nuclei. Honored on cellpose 3.x; ignored by the unified model on 4.x. Default ‘cyto3’.diameter(number) (optional) Expected object diameter in pixels. Omit or 0 to let cellpose estimate it automatically.channels(array) (optional) Two-element [cytoplasm, nucleus] channel spec. Use [0,0] for a grayscale image (default). Used by cellpose 3.x; 4.x infers channels.save_mask(boolean) (optional) If true, save the integer label mask as a 16-bit PNG and return its path. Default false.mask_output_path(string) (optional) Where to write the mask when save_mask is true. Defaults to ‘<image_path>_cp_masks.png’.
Example Usage:
query = {
"name": "Cellpose_segment_image",
"arguments": {
"image_path": "example_value"
}
}
result = tu.run(query)