Abstract segmentation into a general structure
Summary
To allow us to use segmentation algorithms other than BABY, we need a standard interface for inputing image to the segmentation algorithm, and a fixed expected output that can be used by modules downstream.
Current behaviour/setbacks
Currently, the ALIBY Pipeline considers BABY as an atomic unit that does segmentation, tracking, and lineage assignment. This means that none of these parts can be independently modified or removed.
Desired behaviour/advantages
The full data flow (up until lineage assignment) is described below. Nothing in extraction or post-processing needs to be changed.
graph LR;
Data-->Registration;
Registration-->Tiling;
Tiling-->Segmentation;
Segmentation-->Tracking;
Segmentation-->Lineage;
Tracking-->Lineage;
The main changes in this situation would be:
-
Segmentation
can be multiple modules. Each takes an array of tiles and produces a dictionary of named masks- BABY produces a cell outline and a bud neck mask
- e.g. MABY produces a nucleus mask and a vacuole mask
- The outputs to the
Segmentation
-
Tracking
takes a dictionary of named masks as input
Implementation sketch
- Define an abstract class that defines the expectations that we have of
Segmentation
modules. See here for an example. - Define a standard for mask names (e.g.
cell_mask
,bud_neck_mask
) that can be used by a downstreamTracker
orLineage
object - Update the pipeline to separate the segmentation configuration from the tracking configuration and the lineage assignment configuration
- Instantiate a
Segmentation
module for BABY - (Optional) Instantiate a
Segmentation
module for a different algorithm