baby.crawler.BabyCrawler¶
- class baby.crawler.BabyCrawler(baby_brain)¶
Bases:
object
Coordinates incremental segmentation and tracking over a timelapse
- Parameters
baby_brain – an instantiated BabyBrain defining the models
Methods
step
(bf_img_batch[, with_edgemasks, ...])Process the next batch of input images
- __init__(baby_brain)¶
Methods
__init__
(baby_brain)step
(bf_img_batch[, with_edgemasks, ...])Process the next batch of input images
- step(bf_img_batch, with_edgemasks=False, assign_mothers=False, return_baprobs=False, refine_outlines=False, with_volumes=False, parallel=False, **kwargs)¶
Process the next batch of input images
- Parameters
bf_img_batch – a list of ndarray with shape (X, Y, Z), or equivalently an ndarray with shape (N_images, X, Y, Z)
- Yields
for each image in bf_img_batch a dict with - centres: list of float pairs corresponding to (x, y) coords for
each detected cell,
angles: list of lists of floats corresponding, for each cell, to angles (radians) used to form active contour outline in radial space
radii: list of lists of floats corresponding, for each cell, to radii used to form active contour outline in radial space
cell_label: list of int corresponding to tracked global ID for each cell detected in this image (indexed from 1)
mother_assign: (optional) list of int specifying for each (global) cell label ID, the cell label ID of the corresponding mother (0 if no mother was found)
p_bud_assign: (optional) matrix as a list of lists of floats, specifying the probability that a cell (outer list) is a mother to another cell (inner lists) in this image
edgemasks: (optional) an ndarray of dtype “bool” with shape (N_cells, X, Y) specifying the rasterised edge for each segmented cell