blimp.processing.segment.segment_nuclei_cellpose
- blimp.processing.segment.segment_nuclei_cellpose(intensity_image, nuclei_channel=0, pretrained_model=None, diameter=None, threshold=0, flow_threshold=0.4, normalize=True, gpu=False)[source]
Segment nuclei in 2D images across all timepoints using cellpose 4.
- Parameters:
intensity_image (
AICSImage) – intensity image in 5D format “TCZYX” where Z=1nuclei_channel (
int) – channel number corresponding to nuclear stainpretrained_model (
Union[str,Path,None]) – path to custom pretrained model, if None uses default “cpsam” modeldiameter (
Optional[int]) – estimated diameter of nuclei in pixels, if None cellpose estimatesthreshold (
float) – cellprob_threshold, float between [-6,+6] after which objects are discardedflow_threshold (
float) – flow error threshold for filtering masksnormalize (
Union[bool,dict]) – normalization settings, can be bool or dict of parametersgpu (
bool) – whether to use GPU acceleration, by default False
- Returns:
label image with segmented nuclei for all timepoints
- Return type:
AICSImage
- Raises:
ValueError – If input image has Z dimension > 1 (3D images not supported)