baby.segmentation.morph_seg_grouped

baby.segmentation.morph_seg_grouped(pred, flattener, cellgroups=['large', 'medium', 'small'], interior_threshold=0.5, nclosing=0, nopening=0, connectivity=2, min_area=10, pedge_thresh=None, fit_radial=False, use_group_thresh=False, group_thresh_expansion=0.0, ingroup_edge_segment=False, containment_thresh=0.8, containment_func=<function mask_containment>, refine_outlines=False, return_masks=False, return_coords=False)

Morphological segmentation for model predictions of flattener targets

Parameters
  • pred – list of prediction images (ndarray with shape (x, y)) matching flattener.names()

  • flattener – an instance of SegmentationFlattening defining the prediction targets pred

  • cellgroups – list of flattener group names to be used for the segmentation task. Tuples of group names can also be included in the list, in which case, those groups will be merged, generating a new group.

Returns

a list of boolean edge images (ndarray shape (x, y)), one for each cell identified. If return_masks and/or return_coords are true, the output will be a tuple of edge images, filled masks, and/or radial coordinates.