Skip to main content

Global Tracking Transformers for biological multi-object tracking.

Project description

DREEM Relates Every Entity's Motion

CI codecov Documentation code

Features

  • Command-Line & API Access: Use DREEM via a simple CLI or integrate into your own Python scripts.
  • Pretrained Models: Get started quickly with models trained specially for microscopy and animal domains.
  • Configurable Workflows: Easily customize training and inference using YAML configuration files.
  • Visualization: Visualize tracking results in your browser without any data leaving your machine, or use the SLEAP GUI for a more detailed view.
  • Examples: Step-by-step notebooks and guides for common workflows.

Installation

DREEM works best with Python 3.12. We recommend using uv for package management.

In a new directory:

   uv venv && source .venv/bin/activate
   uv pip install dreem-track

or as a system-wide package that does not require a virtual environment:

   uv tool install dreem-track

Now dreem commands will be available without activating a virtual environment.

For more installation options and details, see the Installation Guide.

Quickstart

1. Download Sample Data and Model

# Install huggingface-hub if needed
uv pip install huggingface_hub

# Download sample data
hf download talmolab/sample-flies --repo-type dataset --local-dir ./data

# Download pretrained model
hf download talmolab/animals-pretrained \
    --repo-type model \
    --local-dir ./models \
    --include "animals-pretrained.ckpt"

2. Run Tracking

dreem track ./data/inference \
    --checkpoint ./models/animals-pretrained.ckpt \
    --output ./results \
    --crop-size 70

3. Visualize Results

Results are saved as .slp files that can be opened directly in SLEAP for visualization.

For a more detailed walkthrough, check out the Quickstart Guide or try the Colab notebook.

Usage

Training a Model

Train your own model on custom data:

dreem train ./data/train \
    --val-dir ./data/val \
    --crop-size 70 \
    --epochs 10

Running Inference

Run tracking on new data with a pretrained model:

dreem track ./data/inference \
    --checkpoint ./models/my_model.ckpt \
    --output ./results \
    --crop-size 70

Evaluating Results

Evaluate tracking accuracy against ground truth:

dreem eval ./data/test \
    --checkpoint ./models/my_model.ckpt \
    --output ./results \
    --crop-size 70

For detailed usage instructions, see the Usage Guide.

Documentation

Examples

We provide several example notebooks to help you get started:

All notebooks are available on Google Colab.

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Code style and conventions
  • Submitting pull requests
  • Reporting issues

Citation

If you use DREEM in your research, please cite our paper:

@article{dreem2024,
  title={DREEM: Global Tracking Transformers for Biological Multi-Object Tracking},
  author={...},
  journal={...},
  year={2024}
}

License

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


Questions? Open an issue on GitHub or visit 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

dreem_track-0.3.2.tar.gz (17.2 MB view details)

Uploaded Source

Built Distribution

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

dreem_track-0.3.2-py3-none-any.whl (116.3 kB view details)

Uploaded Python 3

File details

Details for the file dreem_track-0.3.2.tar.gz.

File metadata

  • Download URL: dreem_track-0.3.2.tar.gz
  • Upload date:
  • Size: 17.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dreem_track-0.3.2.tar.gz
Algorithm Hash digest
SHA256 5db4e2f93cf063e8da012c380fae6546fce8c4ce77b4abea82c5d535264fe4e2
MD5 2369181791ace2101157c427848450a8
BLAKE2b-256 0688a21decab6e1c7be6e113e323b35b4c8ed3f7bd764746989f50f05aee237b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dreem_track-0.3.2.tar.gz:

Publisher: build.yml on talmolab/dreem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dreem_track-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: dreem_track-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 116.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dreem_track-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c16aaf391e69de67ca1dc55f62758c71aef17e07bef12af22417562c0fbaf24e
MD5 3f472d9244af3131ee2b6a9c4d6cbc5b
BLAKE2b-256 33db694c1aea4c614d3490a6c78fd6b36fc2a5ad9ba481f47d2cdb20fd15303d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dreem_track-0.3.2-py3-none-any.whl:

Publisher: build.yml on talmolab/dreem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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