perform the Giotto Wrapper of cellpose segmentation. This is for a model inference to generate segmentation mask file from input image. main parameters needed

doCellposeSegmentation(
  python_env = "giotto_cellpose",
  image_dir,
  mask_output,
  channel_1 = 0,
  channel_2 = 0,
  model_name = "cyto3",
  batch_size = 8,
  resample = TRUE,
  channel_axis = NULL,
  z_axis = NULL,
  normalize = TRUE,
  invert = FALSE,
  rescale = NULL,
  diameter = NULL,
  flow_threshold = 0.4,
  cellprob_threshold = 0,
  do_3D = FALSE,
  anisotropy = NULL,
  stitch_threshold = 0,
  min_size = 15,
  niter = NULL,
  augment = FALSE,
  tile = TRUE,
  tile_overlap = 0.1,
  bsize = 224,
  interp = TRUE,
  compute_masks = TRUE,
  progress = NULL,
  verbose = TRUE,
  ...
)

Arguments

image_dir

character, required. Provide a path to a gray scale or a three channel image.

mask_output

required. Provide a path to the output mask file.

channel_1

channel number for cytoplasm, default to 0(gray scale)

channel_2

channel number for Nuclei, default to 0(gray scale)

model_name

Name of the model to run inference. Default to 'cyto3', if you want to run cutomized trained model, place your model file in ~/.cellpose/models and specify your model name.

batch_size

Cellpose Parameter, Number of 224x224 patches to run simultaneously on the GPU. Can make smaller or bigger depending on GPU memory usage. Defaults to 8.

resample

Cellpose Parameter

channel_axis

Cellpose Parameter

z_axis

Cellpose Parameter

normalize

Cellpose Parameter

invert

Cellpose Parameter

rescale

Cellpose Parameter

diameter

Cellpose Parameter

flow_threshold

Cellpose Parameter

cellprob_threshold

Cellpose Parameter

do_3D

Cellpose Parameter

anisotropy

Cellpose Parameter

stitch_threshold

Cellpose Parameter

min_size

Cellpose Parameter

niter

Cellpose Parameter

augment

Cellpose Parameter

tile

Cellpose Parameter

tile_overlap

Cellpose Parameter

bsize

Cellpose Parameter

interp

Cellpose Parameter

compute_masks

Cellpose Parameter

progress

Cellpose Parameter

python_path

python environment with cellpose installed. default = "giotto_cellpose".

Value

No return variable, as this will write directly to output path provided.

Examples

# example code
doCellposeSegmentation(image_dir = input_image, mask_output = output, channel_1 = 2, channel_2 = 1, model_name = 'cyto3',batch_size=4)
#> 
#> specified py env from `envname` = 'giotto_cellpose' not found
#> Error: package 'cellpose' is not yet installed
#> 
#>  To install: