deepcell-tracking uses deep learning models from deepcell-tf within an assignment problem framework to track cells through time-lapse sequences and build cell lineages. The assignment problem is solved using the Hungarian algorithm.
deepcell-tracking is a Python package that can be installed with pip:
pip install deepcell-trackingOr it can be installed from source:
git clone https://github.com/vanvalenlab/deepcell-tracking.git
cd deepcell-tracking
# install the dependencies
pip install .fromdeepcell_trackingimportCellTracker# X and y are the time-sequence data and their corresponding segmentations (labels), respectively.# model is a deepcell-tf tracking model.tracker=CellTracker(X, y, model)
tracker.track_cells() # runs in place, builds tracks# Save all tracked data and lineage files to a .trk filetracker.dump('./results.trk')
# Open the track filefromdeepcell_tracking.utilsimportload_trksdata=load_trks('./results.trk')
lineage=data['lineages'] # linage informationX=data['X'] # raw X datay=data['y'] # tracked y data