Skip to main content

Large-scale multi-hypotheses cell tracking

Project description

Ultrack Logo

tests codecov PyPI version Downloads Downloads Python version Licence: BSD-3 Contributors GitHub stars GitHub forks

Large-scale cell tracking under segmentation uncertainty.

Overview

Ultrack is a versatile and scalable cell tracking method designed to address the challenges of tracking cells across 2D, 3D, and multichannel timelapse recordings, especially in complex and crowded tissues where segmentation is often ambiguous. By evaluating multiple candidate segmentations and employing temporal consistency, Ultrack ensures robust performance under segmentation uncertainty. Ultrack's methodology is explained here.

https://github.com/royerlab/ultrack/assets/21022743/10aace9c-0e0e-4310-a103-f846683cfc77

Zebrafish imaged using DaXi whole embryo tracking.

Features

  • Versatile Cell Tracking: Supports 2D, 3D, and multichannel datasets.
  • Robust Under Segmentation Uncertainty: Evaluates multiple candidate segmentations.
  • High Performance: Scales from small in vitro datasets to terabyte-scale developmental time-lapses.
  • Integration: Compatible with FiJi, napari, and high-performance clusters via SLURM.

Installation

Install or update conda.

To avoid conflicts between different packages, we recommend using conda to create an isolated environment:

conda create -n ultrack python=3.11 higra gurobi pytorch pyqt -c pytorch -c gurobi -c conda-forge
conda activate ultrack
pip install ultrack

The installation should take a few minutes, depending on your internet speed and conda.

NOTE: gurobi and -c gurobi are optional but recommended; they can be installed later, as shown below.

Optionally, we provide multiple Docker images. For instructions, see the docker folder.

Usage

ATTENTION: every time you need to run this software, you'll have to activate this environment

conda activate ultrack

Here is a basic example to get you started:

import napari
from ultrack import MainConfig, Tracker

# __main__ is recommended to avoid multi-processing errors
if __name__ == "__main__":
      # Load your data
      foreground = ...
      contours = ...

      # Create config
      config = MainConfig()

      # Run tracking
      tracker = Tracker(config)
      tracker.track(foreground=foreground, edges=contours)

      # Visualize results in napari
      tracks, graph = tracker.to_tracks_layer()
      napari.view_tracks(tracks[["track_id", "t", "z", "y", "x"]], graph=graph)
      napari.run()

More usage examples can be found here, including their environment files and installation instructions.

Documentation

Comprehensive documentation is available here.

These additional developer documentation are available:

Gurobi Setup

Install Gurobi using Conda

In your existing Conda environment, install Gurobi with the following command:

conda install -c gurobi gurobi

Obtain and Activate an Academic License

  1. Register at Gurobi's website with your academic email.
  2. Navigate to the Gurobi's named academic license page
  3. Follow the instructions to get your license key.
  4. Activate your license, In your Conda environment, run:
grbgetkey YOUR_LICENSE_KEY
  1. Replace YOUR_LICENSE_KEY with the key you received. Follow the prompts to complete activation.

Verify Installation

Verify Gurobi's installation by running:

ultrack check_gurobi

Depending on the operating system, the gurobi library might be missing and you need to install it from here.

Who is using Ultrack?

You can find a list of projects and papers that have used ultrack on this page.

Contributing

We welcome contributions from the community! To get started, please read our contributing guidelines. Then, report issues and submit pull requests on GitHub.

License

This project is licensed under the BSD-3 License - see the LICENSE file for details.

Citing

If you use ultrack in your research, please cite the following papers, the algorithm and the biological applications and software.

@inproceedings{bragantini2024ucmtracking,
  title={Large-scale multi-hypotheses cell tracking using ultrametric contours maps},
  author={Bragantini, Jord{\~a}o and Lange, Merlin and Royer, Lo{\"\i}c},
  booktitle={European Conference on Computer Vision},
  pages={36--54},
  year={2024},
  organization={Springer}
}

@article{bragantini2024ultrack,
  title={Ultrack: pushing the limits of cell tracking across biological scales},
  author={Bragantini, Jord{~a}o and Theodoro, Ilan and Zhao, Xiang and Huijben, Teun APM and Hirata-Miyasaki, Eduardo and VijayKumar, Shruthi and Balasubramanian, Akilandeswari and Lao, Tiger and Agrawal, Richa and Xiao, Sheng and others},
  journal={bioRxiv},
  pages={2024--09},
  year={2024},
  publisher={Cold Spring Harbor Laboratory}
}

And the respective auxiliary methods according to your use, a non-exhaustive list being:

Acknowledgements

We acknowledge the contributions of the community and specific individuals. Detailed acknowledgments can be found in our documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultrack-0.7.2.tar.gz (189.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultrack-0.7.2-py3-none-any.whl (270.0 kB view details)

Uploaded Python 3

File details

Details for the file ultrack-0.7.2.tar.gz.

File metadata

  • Download URL: ultrack-0.7.2.tar.gz
  • Upload date:
  • Size: 189.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for ultrack-0.7.2.tar.gz
Algorithm Hash digest
SHA256 34579a69ed193e9fa231218c59cfe960378113409b56f4a2632cfbbee92106c4
MD5 6ce638bee64f5f57010d9c64b5b95a32
BLAKE2b-256 dcb76aaf32a3248ff94daccae70d57d83be834013d5d70d264f1f725c62724e7

See more details on using hashes here.

File details

Details for the file ultrack-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: ultrack-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 270.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for ultrack-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 41c37b805161f5f1b710d0904a3e1dc300285227a2a2494f998f20dc933e90dc
MD5 7b038cf098196605c93ebf5f4ef23bc9
BLAKE2b-256 3d7caeaba7fbf630b83e6ab488d58fe9f5582e1d01db82e2dd794c0522163cb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page