baby.segmentation

Functions

adj_rspline_coords(adj, ref_radii, ref_angles)

Map optimisation-space radial spline params to standard values

adj_rspline_resid(adj, rho, phi, probs, ...)

Weighted residual for radial spline optimisation

bbox_overlaps(regA, regB)

Returns True if the regions have overlapping bounding boxes

binary_edge(imfill[, footprint])

Get square-connected edges from filled image:

broadcast_arg(arg, argname, ngroups[, type_])

draw_radial(radii, angles, centre, shape)

eval_radial_spline(x, rho, phi)

Evaluate a radial spline defined by radii and angles rho: vector of radii for each point defining the spline phi: angles in [-pi,pi) defining points of the spline The spline is periodic across the boundary

format_output(edge_mask_coords, return_bool)

Format lists to return, depending on whether we want to return also masks and coordinates or not.

get_edge_force(rprop, shape)

get_edge_scores(outlines, p_edge)

get_refined_outlines(group_segs, p_edges, ...)

get_regions(p_img, threshold)

Find regions in a probability image sorted by likelihood

iterative_dilation(img[, iterations])

iterative_erosion(img[, iterations])

mask_containment(a, b)

Max of intersection over a or over b

mask_iou(a, b)

Intersection over union (IoU) between boolean masks

morph_ac_seg(cnn_outputs[, ...])

morph_ellipse_seg(cnn_outputs[, ...])

Segment cell outlines from morphology output of CNN as region ellipses

morph_radial_thresh_fit(outline[, mask, rprops])

morph_radial_thresh_seg(cnn_outputs[, ...])

Segment cell outlines from morphology output of CNN by fitting radial spline to threshold output

morph_seg_grouped(pred, flattener[, ...])

Morphological segmentation for model predictions of flattener targets

morph_thresh_masks(p_interior[, p_overlap, ...])

morph_thresh_seg(cnn_outputs[, ...])

Segment cell outlines from morphology output of CNN by thresholding

outline_to_radial(outline, rprop[, ...])

prior_resid_weight(resid[, gauss_scale, ...])

Weights radial residuals to bias towards the initial guess

rc_to_radial(rr_cc, centre)

Helper function to convert row-column coords to radial coords

refine_radial_grouped(grouped_coords, ...)

Refine initial radial spline by optimising to predicted edge

region_iou(regA, regB)

single_region_prop(mask)

thresh_seg(p_int[, interior_threshold, ...])

Segment cell outlines from morphology output of CNN by fitting radial spline to threshold output

unique_masks(masks, ref_masks[, threshold, ...])

Returns a subset of masks excluding any overlaps with ref_masks