Various experiments for Cell Instance Segmentation and Tracking in 3D microscopy timelapse images.
Many of the libraries has deprecated depedencies in newer versions, so use the specified versions to avoid dependency incompatibilities. I have setup multiple environments using anaconda, as some of the libraries I have been working with would cause dependency incompatibilities with eachother. I use anaconda to manage the python environments.
conda create --name fatepredict python=3.8
conda activate fatepredict
pip install -r requirements.txt
This was a bit tricky to get working on a M2 MacBook, as some of the packages are not built for this. I had to make some modifications in the pylp library to get it to install, which is why the pylp package is being installed from a local folder.
conda create --name fatepredict_linajea python=3.10 cython boost pytorch pyscipopt -c pytorch -c funkey -c conda-forge
conda activate fatepredict_linajea
- Install Gurobi solver @ https://www.gurobi.com/
pip install Repos/pylp
pip install -r requirements_linajea.txt
conda create --name fatepredict_mpunet python=3.9.18
conda activate fatepredict_mpunet
pip install -r requirements_mpunet.txt
git clone https://github.com/perslev/MultiPlanarUNet.git
- Change the tensorflow version in MultiPlanarUNet/requirements.txt to 2.5.0
pip install MultiPlanarUNet
Here I will explain some of the contents in this project folder.
Source code for solving instance segmentation and tracking using the Linajea package.
Notebook for looking at the dataset
Experiments using Watershed and WaterZ for instance segmentation. Uses the fatepredict conda environment.
Experiments using StarDist for instance segmentation. Uses the fatepredict conda environment.
Experiments using various tracking algorithms on instance segmentation results. Uses the fatepredict conda environment.
Experiments using StarDist in XYT for generating tracks. Uses the fatepredict conda environment.
Notebook for connecting the 2D tracks from #4 with the 3D instance segmented fragments. Incomplete. Uses the fatepredict conda environment.
Experiments using the Linajea method for tracking. Uses the fatepredict_linajea conda environment.
Comparison of all the tracking methods using the HOTA measure. Uses the fatepredict conda environment.
Notebook for preparing the data to use with the MultiPlanar U-Net, for creating a binary mask of the cell fragments.
Training and prediction using the U-Net was done using the mp
command, specified in the MultiPlanar U-Net GitHub Repo.
Uses the fatepredict_mpunet conda environment.
File containing various helper functions, performance measures and tracking algorithms. Tracking Algorithms:
- track_segmented: Tracking using IoU and own algorithm for assignment.
- track_segmented_hung_cent: Tracking using centroid distance and Hungarian algorithm for assignment.
- track_segmented_hung_earthmover: Tracking using wasserstein (Earthmover) distance and Hungarian Algorithm for assignment.
- track_segmented_hung: Tracking using IoU and Hungarian algorithm for assignment.
Wrapper to enable the use of the use of the TrackEval Package, implemeting the HOTA measure, with the FatePredict data format (TZYX).
The data used for these experiments is not distributed here. To gain access to the data, please contact Silja Heilmann @ [email protected].