cellmap_segmentation_challenge.predict

Contents

cellmap_segmentation_challenge.predict#

cellmap_segmentation_challenge.predict(config_path: str, crops: str = 'test', output_path: str = '/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/data/predictions/predictions.zarr/{crop}', do_orthoplanes: bool = True)[source]#

Given a model configuration file and list of crop numbers, predicts the output of a model on a large dataset by splitting it into blocks and predicting each block separately.

Parameters:
  • config_path (str) – The path to the model configuration file. This can be the same as the config file used for training.

  • crops (str, optional) – A comma-separated list of crop numbers to predict on, or “test” to predict on the entire test set. Default is “test”.

  • output_path (str, optional) – The path to save the output predictions to, formatted as a string with a placeholders for the crop number, and label class. Default is “cellmap-segmentation-challenge/data/predictions/predictions.zarr/{crop}/{label}”.

  • do_orthoplanes (bool, optional) – Whether to compute the average of predictions from x, y, and z orthogonal planes for the full 3D volume. This is sometimes called 2.5D predictions. It expects a model that yields 2D outputs. Similarly, it expects the input shape to the model to be 2D. Default is True for 2D models.