baby.morph_thresh_seg.MorphSegGrouped¶
- class baby.morph_thresh_seg.MorphSegGrouped(flattener, cellgroups=None, 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, edge_sub_dilations=None, containment_thresh=0.8, containment_func=<function mask_containment>, return_masks=False, return_coords=False, return_volume=False)¶
Bases:
object
Methods
contains
(a, b)extract_edges
(pred, shape, refine_outlines, ...)Resolve any cells duplicated across adjacent groups:
segment
(pred[, refine_outlines, return_volume])Take the output of the neural network and turn it into an instance segmentation output.
- __init__(flattener, cellgroups=None, 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, edge_sub_dilations=None, containment_thresh=0.8, containment_func=<function mask_containment>, return_masks=False, return_coords=False, return_volume=False)¶
- Parameters
flattener –
cellgroups –
interior_threshold –
nclosing –
nopening –
connectivity –
min_area –
pedge_thresh –
fit_radial –
use_group_thresh –
group_thresh_expansion –
edge_sub_dilations –
containment_thresh –
containment_func –
return_masks –
return_coords –
Methods
__init__
(flattener[, cellgroups, ...])- param flattener
contains
(a, b)extract_edges
(pred, shape, refine_outlines, ...)Resolve any cells duplicated across adjacent groups:
segment
(pred[, refine_outlines, return_volume])Take the output of the neural network and turn it into an instance segmentation output.
- remove_duplicates()¶
Resolve any cells duplicated across adjacent groups:
- Parameters
group_segs –
- Returns
The group segmentations with duplicates removed
- segment(pred, refine_outlines=False, return_volume=False)¶
Take the output of the neural network and turn it into an instance segmentation output.
- Parameters
pred – list of prediction images (ndarray with shape (x, y))
matching self.flattener.names() :return: 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.