Skip to main content
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

pip install ultrack

We recommend installing into a virtual environment to avoid package conflicts. gurobi is optional but recommended for best performance; see the installation guide for details on Gurobi setup and GPU acceleration.

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

Usage

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.

Metadata

Release files for ultrack 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ultrack 0.8.0
File Size Uploaded Provenance
ultrack-0.8.0.tar.gz 193.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ultrack 0.8.0
File Interpreter ABI Platform
ultrack-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 467.4 kB

Release files / ultrack-0.8.0.tar.gz

Download URL ultrack-0.8.0.tar.gz
Size 193.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9e11193dabd6398f8d27d5b024a51f92c0364e32493afaed1c470f5f7b70d511
BLAKE2b-256 checksum
How to use checksums
e21f120af2a543438fb4f411b0cdea6b6fe055b41679c2826d0684e8c8ef820b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.4

Release files / ultrack-0.8.0-py3-none-any.whl

Download URL ultrack-0.8.0-py3-none-any.whl
Size 274.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7226f4e1c7cee3cdb0f61f358f1bb2a917d53d09eefe5b85221413d5ed40cab6
BLAKE2b-256 checksum
How to use checksums
322b811db2da0eb6c7f4b02630952216c7f84b2dd8e23a92b18fdf086dcd3b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.4

Security for ultrack 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page