cyto.segmentation¶
Deep-learning and classical segmentation models. StarDist requires TensorFlow; Cellpose requires PyTorch.
- class cyto.segmentation.base.SegmentationBase(name: str, verbose: bool = True, execution_config: Dict[str, Any] | None = None)[source]¶
Bases:
PipelineTask- run_baremetal(data: Dict[str, Any]) Dict[str, Any][source]¶
Main segmentation pipeline for baremetal execution.
- Parameters:
data (Dict) – Dictionary containing ‘image’ key with image data
- Returns:
Dictionary with ‘image’ and ‘label’ keys
- Return type:
Dict
- run_container(data: Dict[str, Any]) Dict[str, Any][source]¶
Run segmentation in a container using the configured runner.
This method handles the container execution by:
Getting the appropriate runner (Docker/Singularity) from execution_config.
Passing the task (self) and data to the runner.
The runner serializes the task and data, runs them in a container, and deserializes the result.
Inside the container, the container_worker calls run_baremetal().
- class cyto.segmentation.stardist.StarDist(model_name='2D_versatile_fluo', prob_thresh=0.479071, nms_thresh=0.3, verbose=True)[source]¶
Bases:
SegmentationBase
- class cyto.segmentation.cellpose.Cellpose(model_type='cyto', cellprob_thresh=-3, model_matching_thresh=10.0, gpu=True, channels=[0, 0], batch_size=16, diameter=16.18, verbose=True, execution_config=None)[source]¶
Bases:
SegmentationBase