traccuracy 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/workflows/ci.yml +22 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.gitignore +3 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.pre-commit-config.yaml +2 -2
- traccuracy-0.4.0/PKG-INFO +168 -0
- traccuracy-0.4.0/README.md +97 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/developer_notes.md +1 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/conf.py +16 -1
- traccuracy-0.4.0/docs/source/glossary.md +50 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/index.md +8 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/matchers/matchers.md +4 -0
- traccuracy-0.4.0/docs/source/metrics/basic.md +49 -0
- traccuracy-0.4.0/docs/source/metrics/chota.md +52 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/metrics/ctc.md +97 -15
- traccuracy-0.4.0/docs/source/metrics/divisions.md +59 -0
- traccuracy-0.4.0/docs/source/metrics/track_overlap.md +63 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/test_cases/divisions.md +5 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/test_cases/errors.md +19 -3
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/test_cases/index.md +1 -0
- traccuracy-0.4.0/docs/source/test_cases/larger_examples.md +99 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/test_cases/matchers.md +2 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/track_errors/basic.md +34 -8
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/track_errors/ctc.md +11 -2
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/track_errors/divisions.md +38 -8
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/ctc.ipynb +65 -33
- {traccuracy-0.3.0 → traccuracy-0.4.0}/pyproject.toml +18 -20
- {traccuracy-0.3.0 → traccuracy-0.4.0}/scripts/download_test_data.py +3 -3
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/__init__.py +0 -2
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/_run_metrics.py +4 -3
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/_tracking_graph.py +125 -79
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/cli.py +3 -3
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/loaders/__init__.py +4 -2
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/loaders/_ctc.py +82 -72
- traccuracy-0.4.0/src/traccuracy/loaders/_geff.py +101 -0
- traccuracy-0.4.0/src/traccuracy/loaders/_point.py +113 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/__init__.py +9 -9
- traccuracy-0.4.0/src/traccuracy/matchers/_base.py +76 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/_compute_overlap.py +91 -18
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/_ctc.py +17 -20
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/_iou.py +32 -3
- traccuracy-0.3.0/src/traccuracy/matchers/_base.py → traccuracy-0.4.0/src/traccuracy/matchers/_matched.py +7 -79
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/_point.py +2 -2
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/matchers/_point_seg.py +1 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/metrics/__init__.py +6 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/metrics/_base.py +35 -59
- traccuracy-0.4.0/src/traccuracy/metrics/_basic.py +149 -0
- traccuracy-0.4.0/src/traccuracy/metrics/_chota.py +221 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/metrics/_ctc.py +171 -4
- traccuracy-0.4.0/src/traccuracy/metrics/_divisions.py +238 -0
- traccuracy-0.4.0/src/traccuracy/metrics/_results.py +53 -0
- traccuracy-0.4.0/src/traccuracy/metrics/_track_overlap.py +275 -0
- traccuracy-0.4.0/src/traccuracy/track_errors/__init__.py +7 -0
- traccuracy-0.4.0/src/traccuracy/track_errors/_basic.py +205 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy/track_errors/_ctc.py +22 -5
- traccuracy-0.4.0/src/traccuracy/track_errors/_divisions.py +400 -0
- traccuracy-0.4.0/src/traccuracy/utils.py +291 -0
- traccuracy-0.4.0/src/traccuracy.egg-info/PKG-INFO +168 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy.egg-info/SOURCES.txt +16 -3
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy.egg-info/requires.txt +4 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/bench.py +52 -4
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/examples/graphs.py +89 -43
- traccuracy-0.4.0/tests/examples/larger_examples.py +113 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/examples/segs.py +67 -40
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/loaders/test_ctc.py +47 -31
- traccuracy-0.4.0/tests/loaders/test_geff.py +136 -0
- traccuracy-0.4.0/tests/loaders/test_point.py +130 -0
- traccuracy-0.4.0/tests/matchers/test_base.py +38 -0
- traccuracy-0.4.0/tests/matchers/test_compute_overlap.py +66 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/matchers/test_ctc.py +54 -10
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/matchers/test_iou.py +186 -21
- traccuracy-0.3.0/tests/matchers/test_base.py → traccuracy-0.4.0/tests/matchers/test_matched.py +2 -22
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/matchers/test_point.py +48 -25
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/matchers/test_point_seg.py +33 -22
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/metrics/test_base.py +20 -2
- traccuracy-0.4.0/tests/metrics/test_basic.py +100 -0
- traccuracy-0.4.0/tests/metrics/test_chota.py +58 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/metrics/test_ctc_metrics.py +135 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/metrics/test_divisions.py +30 -1
- traccuracy-0.4.0/tests/metrics/test_track_overlap_metrics.py +440 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/test_cli.py +1 -1
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/test_run_metrics.py +2 -2
- traccuracy-0.4.0/tests/test_tracking_graph.py +467 -0
- traccuracy-0.4.0/tests/test_utils.py +324 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/track_errors/test_basic.py +64 -8
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/track_errors/test_ctc_errors.py +33 -14
- traccuracy-0.4.0/tests/track_errors/test_divisions.py +537 -0
- traccuracy-0.3.0/PKG-INFO +0 -128
- traccuracy-0.3.0/README.md +0 -61
- traccuracy-0.3.0/docs/source/metrics/basic.md +0 -17
- traccuracy-0.3.0/docs/source/metrics/divisions.md +0 -7
- traccuracy-0.3.0/docs/source/metrics/track_overlap.md +0 -9
- traccuracy-0.3.0/docs/source/track_errors/gap_closing.rst +0 -8
- traccuracy-0.3.0/src/traccuracy/metrics/_basic.py +0 -74
- traccuracy-0.3.0/src/traccuracy/metrics/_divisions.py +0 -145
- traccuracy-0.3.0/src/traccuracy/metrics/_track_overlap.py +0 -101
- traccuracy-0.3.0/src/traccuracy/track_errors/__init__.py +0 -1
- traccuracy-0.3.0/src/traccuracy/track_errors/basic.py +0 -103
- traccuracy-0.3.0/src/traccuracy/track_errors/divisions.py +0 -263
- traccuracy-0.3.0/src/traccuracy.egg-info/PKG-INFO +0 -128
- traccuracy-0.3.0/tests/matchers/test_compute_overlap.py +0 -33
- traccuracy-0.3.0/tests/metrics/test_basic.py +0 -40
- traccuracy-0.3.0/tests/metrics/test_track_overlap_metrics.py +0 -245
- traccuracy-0.3.0/tests/test_tracking_graph.py +0 -344
- traccuracy-0.3.0/tests/test_utils.py +0 -179
- traccuracy-0.3.0/tests/track_errors/test_divisions.py +0 -293
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.gitattributes +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/ISSUE_TEMPLATE/bugs.md +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/ISSUE_TEMPLATE/features.md +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/PULL_REQUEST_TEMPLATE/new_matcher_metric.md +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/dependabot.yml +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/release.yml +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/workflows/benchmark-pr.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.github/workflows/benchmark-report.yml +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/.readthedocs.yml +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/LICENSE +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/Makefile +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/make.bat +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/_static/css/tablefix.css +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/cli.md +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/docs/source/examples/ctc.nblink +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask000.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask001.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask002.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask003.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask004.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask005.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask006.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask007.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask008.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask009.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask010.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask011.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask012.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask013.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask014.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask015.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask016.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask017.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask018.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask019.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask020.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask021.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask022.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask023.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask024.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask025.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask026.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask027.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask028.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask029.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask030.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask031.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask032.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask033.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask034.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask035.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask036.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask037.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask038.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask039.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask040.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask041.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask042.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask043.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask044.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask045.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask046.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask047.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask048.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask049.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask050.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask051.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask052.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask053.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask054.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask055.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask056.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask057.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask058.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask059.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask060.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask061.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask062.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask063.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask064.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask065.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask066.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask067.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask068.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask069.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask070.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask071.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask072.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask073.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask074.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask075.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask076.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask077.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask078.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask079.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask080.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask081.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask082.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask083.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask084.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask085.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask086.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask087.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask088.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask089.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask090.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask091.tif +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/res_track.txt +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/scripts/test_case_report.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/setup.cfg +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy.egg-info/dependency_links.txt +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy.egg-info/entry_points.txt +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/src/traccuracy.egg-info/top_level.txt +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/__init__.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/loaders/__init__.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/matchers/__init__.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/metrics/__init__.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/metrics/test_weighted_error_sums.py +0 -0
- {traccuracy-0.3.0 → traccuracy-0.4.0}/tests/track_errors/__init__.py +0 -0
|
@@ -32,6 +32,27 @@ jobs:
|
|
|
32
32
|
steps:
|
|
33
33
|
- uses: actions/checkout@v4
|
|
34
34
|
|
|
35
|
+
# downloading data, required for CHOTA metric test
|
|
36
|
+
- name: Retrieve cached data
|
|
37
|
+
uses: actions/cache/restore@v4
|
|
38
|
+
id: cache_data
|
|
39
|
+
with:
|
|
40
|
+
path: downloads
|
|
41
|
+
key: ${{ hashFiles('scripts/download_test_data.py') }}
|
|
42
|
+
|
|
43
|
+
- name: Download Samples
|
|
44
|
+
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
45
|
+
run: |
|
|
46
|
+
pip install requests
|
|
47
|
+
python scripts/download_test_data.py
|
|
48
|
+
|
|
49
|
+
- name: Cache sample data
|
|
50
|
+
uses: actions/cache/save@v4
|
|
51
|
+
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
52
|
+
with:
|
|
53
|
+
path: downloads
|
|
54
|
+
key: ${{ hashFiles('scripts/download_test_data.py') }}
|
|
55
|
+
|
|
35
56
|
- name: Set up Python ${{ matrix.python-version }}
|
|
36
57
|
uses: actions/setup-python@v5
|
|
37
58
|
with:
|
|
@@ -218,7 +239,7 @@ jobs:
|
|
|
218
239
|
uses: peter-evans/commit-comment@v3
|
|
219
240
|
with:
|
|
220
241
|
body: |
|
|
221
|
-

|
|
222
243
|
|
|
223
244
|
|
|
224
245
|
deploy:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
docs/dest
|
|
2
|
+
docs/.jupyter_cache
|
|
2
3
|
.DS_Store
|
|
3
4
|
|
|
4
5
|
# Byte-compiled / optimized / DLL files
|
|
@@ -78,6 +79,7 @@ target/
|
|
|
78
79
|
|
|
79
80
|
# pyenv
|
|
80
81
|
.python-version
|
|
82
|
+
uv.lock
|
|
81
83
|
|
|
82
84
|
# celery beat schedule file
|
|
83
85
|
celerybeat-schedule
|
|
@@ -92,6 +94,7 @@ celerybeat-schedule
|
|
|
92
94
|
.venv
|
|
93
95
|
venv/
|
|
94
96
|
ENV/
|
|
97
|
+
uv.lock
|
|
95
98
|
|
|
96
99
|
# Spyder project settings
|
|
97
100
|
.spyderproject
|
|
@@ -10,7 +10,7 @@ repos:
|
|
|
10
10
|
- id: typos
|
|
11
11
|
|
|
12
12
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
-
rev: v0.
|
|
13
|
+
rev: v0.12.7
|
|
14
14
|
hooks:
|
|
15
15
|
- id: ruff
|
|
16
16
|
args: [--fix]
|
|
@@ -22,7 +22,7 @@ repos:
|
|
|
22
22
|
- id: validate-pyproject
|
|
23
23
|
|
|
24
24
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
-
rev: v1.
|
|
25
|
+
rev: v1.17.1
|
|
26
26
|
hooks:
|
|
27
27
|
- id: mypy
|
|
28
28
|
files: "^src/"
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: traccuracy
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Utilities for computing common accuracy metrics on cell tracking challenge solutions with ground truth
|
|
5
|
+
Author-email: Draga Doncila Pop <draga.doncilapop1@monash.edu>, Caroline Malin-Mayor <cmalinmayor@gmail.com>, Morgan Schwartz <msschwartz21@gmail.com>
|
|
6
|
+
License: BSD 3-Clause License
|
|
7
|
+
Project-URL: homepage, https://github.com/live-image-tracking-tools/traccuracy
|
|
8
|
+
Project-URL: repository, https://github.com/live-image-tracking-tools/traccuracy
|
|
9
|
+
Project-URL: documentation, https://traccuracy.readthedocs.io/
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: click<8.2.0
|
|
23
|
+
Requires-Dist: numpy
|
|
24
|
+
Requires-Dist: networkx
|
|
25
|
+
Requires-Dist: pandas
|
|
26
|
+
Requires-Dist: tifffile
|
|
27
|
+
Requires-Dist: imagecodecs
|
|
28
|
+
Requires-Dist: scikit-image
|
|
29
|
+
Requires-Dist: tqdm
|
|
30
|
+
Requires-Dist: typer
|
|
31
|
+
Requires-Dist: numba
|
|
32
|
+
Requires-Dist: pyarrow
|
|
33
|
+
Requires-Dist: scipy
|
|
34
|
+
Requires-Dist: skan>=0.13
|
|
35
|
+
Requires-Dist: geff>=0.5.0
|
|
36
|
+
Provides-Extra: test
|
|
37
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
38
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
39
|
+
Requires-Dist: pytest-benchmark; extra == "test"
|
|
40
|
+
Requires-Dist: pytest-timeout; extra == "test"
|
|
41
|
+
Requires-Dist: tabulate; extra == "test"
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: ipython; extra == "dev"
|
|
44
|
+
Requires-Dist: pdbpp; extra == "dev"
|
|
45
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
46
|
+
Requires-Dist: ruff; extra == "dev"
|
|
47
|
+
Requires-Dist: traccuracy[test]; extra == "dev"
|
|
48
|
+
Requires-Dist: traccuracy[docs]; extra == "dev"
|
|
49
|
+
Requires-Dist: traccuracy[typing]; extra == "dev"
|
|
50
|
+
Provides-Extra: docs
|
|
51
|
+
Requires-Dist: myst-nb<2,>=1.2.0; extra == "docs"
|
|
52
|
+
Requires-Dist: sphinx-autoapi==3.0.0; extra == "docs"
|
|
53
|
+
Requires-Dist: sphinx-click<7,>=6.0.0; extra == "docs"
|
|
54
|
+
Requires-Dist: sphinx-rtd-theme<4,>=3.0.1; extra == "docs"
|
|
55
|
+
Requires-Dist: sphinx<8,>=7.4.7; extra == "docs"
|
|
56
|
+
Requires-Dist: matplotlib; extra == "docs"
|
|
57
|
+
Requires-Dist: jupytext<2,>=1.16.7; extra == "docs"
|
|
58
|
+
Requires-Dist: nbsphinx-link==1.3.0; extra == "docs"
|
|
59
|
+
Requires-Dist: nbsphinx==0.9.3; extra == "docs"
|
|
60
|
+
Requires-Dist: docutils==0.20.*; extra == "docs"
|
|
61
|
+
Provides-Extra: covreport
|
|
62
|
+
Requires-Dist: traccuracy[test]; extra == "covreport"
|
|
63
|
+
Requires-Dist: seaborn; extra == "covreport"
|
|
64
|
+
Provides-Extra: typing
|
|
65
|
+
Requires-Dist: mypy; extra == "typing"
|
|
66
|
+
Requires-Dist: types-networkx; extra == "typing"
|
|
67
|
+
Requires-Dist: scipy-stubs; extra == "typing"
|
|
68
|
+
Requires-Dist: pandas-stubs; extra == "typing"
|
|
69
|
+
Requires-Dist: types-tqdm; extra == "typing"
|
|
70
|
+
Dynamic: license-file
|
|
71
|
+
|
|
72
|
+
# traccuracy: Evaluate Cell Tracking Solutions
|
|
73
|
+
|
|
74
|
+
[](https://github.com/live-image-tracking-tools/traccuracy/raw/main/LICENSE)
|
|
75
|
+
[](https://pypi.org/project/traccuracy)
|
|
76
|
+
[](https://python.org)
|
|
77
|
+
[](https://github.com/live-image-tracking-tools/traccuracy/actions/workflows/ci.yml)
|
|
78
|
+
[](https://live-image-tracking-tools.github.io/traccuracy/dev/bench/)
|
|
79
|
+
[](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
|
|
80
|
+
[](https://codecov.io/gh/live-image-tracking-tools/traccuracy)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
`traccuracy` provides a suite of benchmarking functions that can be used to evaluate cell tracking solutions against ground truth annotations. The goal of this library is to provide a convenient way to run rigorous evaluation and to document and consolidate the wide variety of metrics used in the field.
|
|
84
|
+
|
|
85
|
+
`traccuracy` can compute a comprehensive set of metrics for evaluating cell linking and division performance, and can compute biologically meaningful metrics such as the number of correctly reconstructed lineages over N frames and cell cycle length accuracy. As matching ground truth and predicted lineages is a crucial step for performing evaluation, `traccuracy` includes a number of algorithms for matching ground truth and predicted lineages, both with and without segmentation masks.
|
|
86
|
+
|
|
87
|
+
Learn more in the [documentation](https://traccuracy.readthedocs.io/en/latest/) or check out the [source code](https://github.com/live-image-tracking-tools/traccuracy).
|
|
88
|
+
|
|
89
|
+
## Installation
|
|
90
|
+
`pip install traccuracy`
|
|
91
|
+
|
|
92
|
+
## How It Works
|
|
93
|
+
The `traccuracy` library has three main components: loaders, matchers, and metrics.
|
|
94
|
+
|
|
95
|
+
Loaders load tracking graphs from other formats, such as the CTC format, into a [TrackingGraph](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/index.html#traccuracy.TrackingGraph) object.
|
|
96
|
+
A `TrackingGraph` is a spatiotemporal graph backed by a `networkx.DiGraph`
|
|
97
|
+
Nodes represent a single cell in a given time point, and are annotated with a time and a location.
|
|
98
|
+
Edges point forward in time from a node representing a cell in time point `t` to the same cell or its daughter in frame `t+1` (or beyond, to represent skip edges). Additional terminology is documented in the [glossary](https://traccuracy.readthedocs.io/en/latest/glossary.html)
|
|
99
|
+
To load `TrackingGraph`s from a custom format, you will likely need to implement a loader: see
|
|
100
|
+
documentation [here](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/loaders/index.html#module-traccuracy.loaders) for more information. Alternatively you can initialize a `TrackingGraph` with a `networkx.DiGraph` and `ArrayLike` objects of segmentation masks if needed.
|
|
101
|
+
|
|
102
|
+
Matchers take a ground truth and a predicted `TrackingGraph` with optional segmentation masks and match the nodes and edges to allow evaluation to occur. A list of matchers is available [here](https://traccuracy.readthedocs.io/en/latest/matchers/matchers.html).
|
|
103
|
+
|
|
104
|
+
In order to compute metrics, `traccuracy` begins by annotating the matched graphs with error flags such as False Positive and False Negative. The annotated graph can be exported and used for visualization in other tools. Finally, metrics inspect the error annotations to report both error counts and summary statistics.
|
|
105
|
+
|
|
106
|
+
The `traccuracy` library has a flexible Python API, shown in [this](https://traccuracy.readthedocs.io/en/latest/examples/ctc.html) example notebook. Additionally there is a command line interface for running standard CTC metrics, [documented here](https://traccuracy.readthedocs.io/en/latest/cli.html).
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from traccuracy.loaders import load_ctc_data
|
|
110
|
+
from traccuracy.matchers import PointMatcher
|
|
111
|
+
from traccuracy.metrics import DivisionMetrics, BasicMetrics
|
|
112
|
+
|
|
113
|
+
# Load data in TrackingGraph objects
|
|
114
|
+
gt_data = load_ctc_data(
|
|
115
|
+
"path/to/GT/TRA",
|
|
116
|
+
"path/to/GT/TRA/man_track.txt",
|
|
117
|
+
name="GT"
|
|
118
|
+
)
|
|
119
|
+
pred_data = load_ctc_data(
|
|
120
|
+
"path/to/prediction",
|
|
121
|
+
"path/to/prediction/track.txt",
|
|
122
|
+
name="prediction"
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
results, matched = run_metrics(
|
|
126
|
+
gt_data=gt_data,
|
|
127
|
+
pred_data=pred_data,
|
|
128
|
+
matcher=PointMatcher(),
|
|
129
|
+
metrics=[DivisionMetrics(), BasicMetrics()]
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Implemented Metrics
|
|
135
|
+
|
|
136
|
+
- [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
|
|
137
|
+
- [CTC-DET](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#det)
|
|
138
|
+
- [CTC-LNK](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#lnk)
|
|
139
|
+
- [CTC-TRA](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#tra)
|
|
140
|
+
- [Branching Correctness](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#branching-correctness-bc) (BC)
|
|
141
|
+
- [Acyclic Oriented Graph Metric](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#aogm) (AOGM) from [Matula et al. 2015](https://doi.org/10.1371/journal.pone.0144959). A generalized form the CTC metrics where you can supply different weights for each component of the overall metric.
|
|
142
|
+
- [Division Performance Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/division.html#) Optionally allows detection within N frames of ground truth division.
|
|
143
|
+
- Division Precision
|
|
144
|
+
- Division Recall
|
|
145
|
+
- Division F1 score
|
|
146
|
+
- [Mitotic Branching Correctness](https://traccuracy.readthedocs.io/en/latest/metrics/division.html#mitotic-branching-score) from [Ulicna et al. 2021](https://doi.org/10.3389/fcomp.2021.734559).
|
|
147
|
+
- [Basic Connectivity Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/basic.html) highlighting performance on both nodes and edges.
|
|
148
|
+
- Node/Edge Precision
|
|
149
|
+
- Node/Edge Recall
|
|
150
|
+
- Node/Edge F1 Score
|
|
151
|
+
- [Track Overlap Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html) defined by [Bise et al. 2011](https://doi.org/10.1109/ISBI.2011.5872571), [Chen 2021](https://doi.org/10.48550/arXiv.2102.10377), and [Fukai et al. 2022](https://doi.org/10.1093/bioinformatics/btac799).
|
|
152
|
+
- [Track Purity](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#track-purity)
|
|
153
|
+
- [Track Effectiveness](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#target-effectiveness)
|
|
154
|
+
- [Track Fractions](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#track-fractions)
|
|
155
|
+
- [Complete Tracks](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#complete-tracks)
|
|
156
|
+
- [CHOTA](https://traccuracy.readthedocs.io/en/latest/metrics/chota.html#chota) from [Kaiser et al. 2024](https://doi.org/10.1007/978-3-031-91721-9_8).
|
|
157
|
+
|
|
158
|
+
## Featured Works
|
|
159
|
+
|
|
160
|
+
If you use `traccuracy` in your own work, please let us know so that we can feature it here!
|
|
161
|
+
|
|
162
|
+
- [Archit, A. et al. (2025). Segment anything for microscopy. Nature Methods.](https://doi.org/10.1038/s41592-024-02580-4)
|
|
163
|
+
- [Evans et al. (2025). Icebergs, jigsaw puzzles and genealogy: Automated multi-generational iceberg tracking and lineage reconstruction. Preprint in EGUsphere.](https://doi.org/10.5194/egusphere-2025-2886)
|
|
164
|
+
- [Seiffarth, J., & Nöh, K. (2025). PyUAT: Open-source Python framework for efficient and scalable cell tracking. arXiv preprint.](https://arxiv.org/pdf/2503.21914)
|
|
165
|
+
- [Bragantini, J. et al. (2024). Ultrack: pushing the limits of cell tracking across biological scales. bioRxiv.](https://doi.org/10.1101/2024.09.02.610652)
|
|
166
|
+
- [Gallusser, B., & Weigert, M. (2024). Trackastra: Transformer-based cell tracking for live-cell microscopy. In European Conference on Computer Vision.](https://doi.org/10.1007/978-3-031-73116-7_27)
|
|
167
|
+
- [Toma, T. T., Wang, Y., Gahlmann, A., & Acton, S. T. (2024). Deep Temporal Sequence Classification and Mathematical Modeling for Cell Tracking in Dense 3D Microscopy Videos of Bacterial Biofilms. arXiv preprint.](https://doi.org/10.48550/arXiv.2406.19574)
|
|
168
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# traccuracy: Evaluate Cell Tracking Solutions
|
|
2
|
+
|
|
3
|
+
[](https://github.com/live-image-tracking-tools/traccuracy/raw/main/LICENSE)
|
|
4
|
+
[](https://pypi.org/project/traccuracy)
|
|
5
|
+
[](https://python.org)
|
|
6
|
+
[](https://github.com/live-image-tracking-tools/traccuracy/actions/workflows/ci.yml)
|
|
7
|
+
[](https://live-image-tracking-tools.github.io/traccuracy/dev/bench/)
|
|
8
|
+
[](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
|
|
9
|
+
[](https://codecov.io/gh/live-image-tracking-tools/traccuracy)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
`traccuracy` provides a suite of benchmarking functions that can be used to evaluate cell tracking solutions against ground truth annotations. The goal of this library is to provide a convenient way to run rigorous evaluation and to document and consolidate the wide variety of metrics used in the field.
|
|
13
|
+
|
|
14
|
+
`traccuracy` can compute a comprehensive set of metrics for evaluating cell linking and division performance, and can compute biologically meaningful metrics such as the number of correctly reconstructed lineages over N frames and cell cycle length accuracy. As matching ground truth and predicted lineages is a crucial step for performing evaluation, `traccuracy` includes a number of algorithms for matching ground truth and predicted lineages, both with and without segmentation masks.
|
|
15
|
+
|
|
16
|
+
Learn more in the [documentation](https://traccuracy.readthedocs.io/en/latest/) or check out the [source code](https://github.com/live-image-tracking-tools/traccuracy).
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
`pip install traccuracy`
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
The `traccuracy` library has three main components: loaders, matchers, and metrics.
|
|
23
|
+
|
|
24
|
+
Loaders load tracking graphs from other formats, such as the CTC format, into a [TrackingGraph](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/index.html#traccuracy.TrackingGraph) object.
|
|
25
|
+
A `TrackingGraph` is a spatiotemporal graph backed by a `networkx.DiGraph`
|
|
26
|
+
Nodes represent a single cell in a given time point, and are annotated with a time and a location.
|
|
27
|
+
Edges point forward in time from a node representing a cell in time point `t` to the same cell or its daughter in frame `t+1` (or beyond, to represent skip edges). Additional terminology is documented in the [glossary](https://traccuracy.readthedocs.io/en/latest/glossary.html)
|
|
28
|
+
To load `TrackingGraph`s from a custom format, you will likely need to implement a loader: see
|
|
29
|
+
documentation [here](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/loaders/index.html#module-traccuracy.loaders) for more information. Alternatively you can initialize a `TrackingGraph` with a `networkx.DiGraph` and `ArrayLike` objects of segmentation masks if needed.
|
|
30
|
+
|
|
31
|
+
Matchers take a ground truth and a predicted `TrackingGraph` with optional segmentation masks and match the nodes and edges to allow evaluation to occur. A list of matchers is available [here](https://traccuracy.readthedocs.io/en/latest/matchers/matchers.html).
|
|
32
|
+
|
|
33
|
+
In order to compute metrics, `traccuracy` begins by annotating the matched graphs with error flags such as False Positive and False Negative. The annotated graph can be exported and used for visualization in other tools. Finally, metrics inspect the error annotations to report both error counts and summary statistics.
|
|
34
|
+
|
|
35
|
+
The `traccuracy` library has a flexible Python API, shown in [this](https://traccuracy.readthedocs.io/en/latest/examples/ctc.html) example notebook. Additionally there is a command line interface for running standard CTC metrics, [documented here](https://traccuracy.readthedocs.io/en/latest/cli.html).
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from traccuracy.loaders import load_ctc_data
|
|
39
|
+
from traccuracy.matchers import PointMatcher
|
|
40
|
+
from traccuracy.metrics import DivisionMetrics, BasicMetrics
|
|
41
|
+
|
|
42
|
+
# Load data in TrackingGraph objects
|
|
43
|
+
gt_data = load_ctc_data(
|
|
44
|
+
"path/to/GT/TRA",
|
|
45
|
+
"path/to/GT/TRA/man_track.txt",
|
|
46
|
+
name="GT"
|
|
47
|
+
)
|
|
48
|
+
pred_data = load_ctc_data(
|
|
49
|
+
"path/to/prediction",
|
|
50
|
+
"path/to/prediction/track.txt",
|
|
51
|
+
name="prediction"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
results, matched = run_metrics(
|
|
55
|
+
gt_data=gt_data,
|
|
56
|
+
pred_data=pred_data,
|
|
57
|
+
matcher=PointMatcher(),
|
|
58
|
+
metrics=[DivisionMetrics(), BasicMetrics()]
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Implemented Metrics
|
|
64
|
+
|
|
65
|
+
- [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
|
|
66
|
+
- [CTC-DET](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#det)
|
|
67
|
+
- [CTC-LNK](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#lnk)
|
|
68
|
+
- [CTC-TRA](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#tra)
|
|
69
|
+
- [Branching Correctness](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#branching-correctness-bc) (BC)
|
|
70
|
+
- [Acyclic Oriented Graph Metric](https://traccuracy.readthedocs.io/en/latest/metrics/ctc.html#aogm) (AOGM) from [Matula et al. 2015](https://doi.org/10.1371/journal.pone.0144959). A generalized form the CTC metrics where you can supply different weights for each component of the overall metric.
|
|
71
|
+
- [Division Performance Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/division.html#) Optionally allows detection within N frames of ground truth division.
|
|
72
|
+
- Division Precision
|
|
73
|
+
- Division Recall
|
|
74
|
+
- Division F1 score
|
|
75
|
+
- [Mitotic Branching Correctness](https://traccuracy.readthedocs.io/en/latest/metrics/division.html#mitotic-branching-score) from [Ulicna et al. 2021](https://doi.org/10.3389/fcomp.2021.734559).
|
|
76
|
+
- [Basic Connectivity Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/basic.html) highlighting performance on both nodes and edges.
|
|
77
|
+
- Node/Edge Precision
|
|
78
|
+
- Node/Edge Recall
|
|
79
|
+
- Node/Edge F1 Score
|
|
80
|
+
- [Track Overlap Metrics](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html) defined by [Bise et al. 2011](https://doi.org/10.1109/ISBI.2011.5872571), [Chen 2021](https://doi.org/10.48550/arXiv.2102.10377), and [Fukai et al. 2022](https://doi.org/10.1093/bioinformatics/btac799).
|
|
81
|
+
- [Track Purity](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#track-purity)
|
|
82
|
+
- [Track Effectiveness](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#target-effectiveness)
|
|
83
|
+
- [Track Fractions](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#track-fractions)
|
|
84
|
+
- [Complete Tracks](https://traccuracy.readthedocs.io/en/latest/metrics/track_overlap.html#complete-tracks)
|
|
85
|
+
- [CHOTA](https://traccuracy.readthedocs.io/en/latest/metrics/chota.html#chota) from [Kaiser et al. 2024](https://doi.org/10.1007/978-3-031-91721-9_8).
|
|
86
|
+
|
|
87
|
+
## Featured Works
|
|
88
|
+
|
|
89
|
+
If you use `traccuracy` in your own work, please let us know so that we can feature it here!
|
|
90
|
+
|
|
91
|
+
- [Archit, A. et al. (2025). Segment anything for microscopy. Nature Methods.](https://doi.org/10.1038/s41592-024-02580-4)
|
|
92
|
+
- [Evans et al. (2025). Icebergs, jigsaw puzzles and genealogy: Automated multi-generational iceberg tracking and lineage reconstruction. Preprint in EGUsphere.](https://doi.org/10.5194/egusphere-2025-2886)
|
|
93
|
+
- [Seiffarth, J., & Nöh, K. (2025). PyUAT: Open-source Python framework for efficient and scalable cell tracking. arXiv preprint.](https://arxiv.org/pdf/2503.21914)
|
|
94
|
+
- [Bragantini, J. et al. (2024). Ultrack: pushing the limits of cell tracking across biological scales. bioRxiv.](https://doi.org/10.1101/2024.09.02.610652)
|
|
95
|
+
- [Gallusser, B., & Weigert, M. (2024). Trackastra: Transformer-based cell tracking for live-cell microscopy. In European Conference on Computer Vision.](https://doi.org/10.1007/978-3-031-73116-7_27)
|
|
96
|
+
- [Toma, T. T., Wang, Y., Gahlmann, A., & Acton, S. T. (2024). Deep Temporal Sequence Classification and Mathematical Modeling for Cell Tracking in Dense 3D Microscopy Videos of Bacterial Biofilms. arXiv preprint.](https://doi.org/10.48550/arXiv.2406.19574)
|
|
97
|
+
|
|
@@ -5,7 +5,7 @@ We recommend using `pixi` for environment management while developing `traccurac
|
|
|
5
5
|
## Development
|
|
6
6
|
For local development, clone the repo and install in editable mode.
|
|
7
7
|
```
|
|
8
|
-
git clone https://github.com/
|
|
8
|
+
git clone https://github.com/live-image-tracking-tools/traccuracy.git
|
|
9
9
|
pixi install
|
|
10
10
|
```
|
|
11
11
|
|
|
@@ -46,9 +46,9 @@ extensions = [
|
|
|
46
46
|
"sphinx.ext.intersphinx",
|
|
47
47
|
"sphinx.ext.githubpages",
|
|
48
48
|
"sphinx.ext.napoleon",
|
|
49
|
-
"sphinx.ext.viewcode",
|
|
50
49
|
"IPython.sphinxext.ipython_console_highlighting", # code highlighting in notebooks
|
|
51
50
|
"autoapi.extension", # autobuild api docs
|
|
51
|
+
"sphinx.ext.viewcode",
|
|
52
52
|
"nbsphinx", # add notebooks to docs
|
|
53
53
|
"nbsphinx_link", # add notebooks to docs
|
|
54
54
|
"sphinx_click", # auto document cli
|
|
@@ -82,9 +82,24 @@ autoapi_options = [
|
|
|
82
82
|
"undoc-members",
|
|
83
83
|
"show-module-summary",
|
|
84
84
|
"imported-members",
|
|
85
|
+
"inherited-members",
|
|
85
86
|
]
|
|
86
87
|
autoapi_ignore = ["*/cli.py"]
|
|
87
88
|
|
|
89
|
+
|
|
90
|
+
def skip_str_enum_inheritance(app, what, name, obj, skip, options):
|
|
91
|
+
"""For NodeFlag and EdgeFlag we do not want to document inherited members from str and Enum"""
|
|
92
|
+
if not obj.inherited:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if "Flag" in name:
|
|
96
|
+
return True
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def setup(sphinx):
|
|
100
|
+
sphinx.connect("autoapi-skip-member", skip_str_enum_inheritance)
|
|
101
|
+
|
|
102
|
+
|
|
88
103
|
# -- Myst NB -----------------------------------------------------------------
|
|
89
104
|
nb_execution_raise_on_error = True
|
|
90
105
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Glossary
|
|
2
|
+
|
|
3
|
+
```{glossary}
|
|
4
|
+
Tracklet
|
|
5
|
+
A single non-dividing cell tracked over time. In graph terms, this is the connected component of a track between divisions (daughter to next parent). Tracklets can also start or end with a non-dividing cell at the beginning and end of the captured time or if the track leaves the field of view.
|
|
6
|
+
|
|
7
|
+
Lineage
|
|
8
|
+
A single cell and all of its progeny. In graph terms, a connected component including divisions.
|
|
9
|
+
|
|
10
|
+
Node
|
|
11
|
+
A cell in a single timpoint. For `traccuracy`, the node must have a position attribute which can either be explicitly defined as a point or derived from a segmentation mask.
|
|
12
|
+
|
|
13
|
+
Edge
|
|
14
|
+
A connection between two nodes in different timepoints. An edge implies that the two connected nodes represent the same cell in different timepoints.
|
|
15
|
+
|
|
16
|
+
Skip Edges
|
|
17
|
+
Also known as *gap closing*, these are edges that connect non-consecutive frames to signify a cell being occluded or missing for some frames, before the track continues.
|
|
18
|
+
|
|
19
|
+
`traccuracy` allows for {term}`skip edges <Skip Edges>` in both the ground truth and predicted graphs. For the purposes of standard error classification, an edge ``u -> v`` is **not** considered identical to a matching edge ``u -> w -> v``, and this will lead to errors annotated in this region. Several metrics offer options to `relax_skips_gt` and `relax_skips_pred`, allowing the previously described case to be considered correct. The exact handling of {term}`skip edges <Skip Edges>` depends on the specific track errors and metrics in question and is detailed in the other Track Error and Metrics sections.
|
|
20
|
+
|
|
21
|
+
Division
|
|
22
|
+
Divisions occur when a cell divides into two daughter cells. The cell that divides is also known as the *parent cell* and has two outgoing edges to the two daughter cells.
|
|
23
|
+
|
|
24
|
+
Parent cell
|
|
25
|
+
See {term}`division`.
|
|
26
|
+
|
|
27
|
+
Successor
|
|
28
|
+
For a given node in the graph, the successor is the connected node in the next timepoint. If the nodes are connected by a skip edge, the successors may be more than one timepoint away from the given node. If the given node is a parent node, there may be two successors.
|
|
29
|
+
|
|
30
|
+
Predecessor
|
|
31
|
+
For a given node in the graph, the predecessor is the connected node in the previous timepoint. If the nodes are connected by a skip edge, the predecessor may be more than one timepoint away from the given node.
|
|
32
|
+
|
|
33
|
+
True positive
|
|
34
|
+
An object, such as a node, edge or division, that is correctly identified or matched in the ground truth and the prediction. Abbreviated TP.
|
|
35
|
+
|
|
36
|
+
False positive
|
|
37
|
+
An object, such as a node, edge or division, that is present in the predicted graph, but does not match any such object in the ground truth. Abbreviated FP.
|
|
38
|
+
|
|
39
|
+
False negative
|
|
40
|
+
An object, such as a node, edge or division, that is present in the ground truth graph, but does not match any such object in the prediction. Abbreviated FN.
|
|
41
|
+
|
|
42
|
+
Recall
|
|
43
|
+
$ \frac{\textrm{TP}}{\textrm{TP} + \textrm{FN}} $
|
|
44
|
+
|
|
45
|
+
Precision
|
|
46
|
+
$ \frac{\textrm{TP}}{\textrm{TP} + \textrm{FP}} $
|
|
47
|
+
|
|
48
|
+
F1 Score
|
|
49
|
+
$ \frac{2 * \textrm{Recall} * \textrm{Precision}}{\textrm{Recall} + \textrm{Precision}} $
|
|
50
|
+
```
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
```{include} ../../README.md
|
|
2
2
|
```
|
|
3
3
|
|
|
4
|
+
```{toctree}
|
|
5
|
+
:maxdepth: 2
|
|
6
|
+
:hidden: true
|
|
7
|
+
|
|
8
|
+
glossary
|
|
9
|
+
```
|
|
10
|
+
|
|
4
11
|
```{toctree}
|
|
5
12
|
:maxdepth: 2
|
|
6
13
|
:hidden: true
|
|
@@ -17,7 +24,6 @@ matchers/matchers
|
|
|
17
24
|
track_errors/basic
|
|
18
25
|
track_errors/divisions
|
|
19
26
|
track_errors/ctc
|
|
20
|
-
track_errors/gap_closing
|
|
21
27
|
```
|
|
22
28
|
|
|
23
29
|
```{toctree}
|
|
@@ -29,6 +35,7 @@ metrics/basic
|
|
|
29
35
|
metrics/ctc
|
|
30
36
|
metrics/track_overlap
|
|
31
37
|
metrics/divisions
|
|
38
|
+
metrics/chota
|
|
32
39
|
```
|
|
33
40
|
|
|
34
41
|
```{toctree}
|
|
@@ -16,6 +16,10 @@ mappings. Matchers can operate on the segmentation or directly on the point loca
|
|
|
16
16
|
Below is a table summarizing the implemented matchers, what types of matchings
|
|
17
17
|
they can produce, and a brief description of behavior and any hyperparameters.
|
|
18
18
|
|
|
19
|
+
:::{warning}
|
|
20
|
+
Unless otherwise noted, matchers are written assuming that you have dense ground truth annotations. The results on sparse annotations may be unpredictable and should be interpreted cautiously.
|
|
21
|
+
:::
|
|
22
|
+
|
|
19
23
|
| Matcher | Matching Type(s) | Description |
|
|
20
24
|
----------|------------------|-------------
|
|
21
25
|
| Point | `one-to-one` | Given a maximum distance threshold, the matcher will perform hungarian matching on the points in each frame of the ground truth and predicted graphs, minimizing the overall distance while never matching any points with distance greater than the threshold. |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Basic Performance Metrics
|
|
2
|
+
|
|
3
|
+
Basic performance metrics are computed based on the error classifications described in {doc}`../track_errors/basic`.
|
|
4
|
+
|
|
5
|
+
:::{warning}
|
|
6
|
+
These metrics are written assuming that the ground truth annotations are dense. If that is not the case, interpret the numbers carefully. Consider eliminating metrics that use the number of false positives (including Precision and F1 Score).
|
|
7
|
+
:::
|
|
8
|
+
|
|
9
|
+
These metrics can be computed as follows:
|
|
10
|
+
```python
|
|
11
|
+
from traccuracy.matchers import PointMatcher
|
|
12
|
+
from traccuracy.metrics import BasicMetrics
|
|
13
|
+
|
|
14
|
+
# Data loaded using a function from traccuracy.loaders or constructed explicitly using a networkx graph and associated information
|
|
15
|
+
gt_data: TrackingGraph
|
|
16
|
+
pred_data: TrackingGraph
|
|
17
|
+
|
|
18
|
+
results, matched = run_metrics(
|
|
19
|
+
gt_data=gt_data,
|
|
20
|
+
pred_data=pred_data,
|
|
21
|
+
matcher=PointMatcher(), # Choose a matcher that produces a one-to-one mapping
|
|
22
|
+
metrics=[BasicMetrics()]
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The `results` object contains a dictionary `results.results` that stores all values associated with the metric.
|
|
27
|
+
|
|
28
|
+
The following counts are returned:
|
|
29
|
+
|
|
30
|
+
- Total ground truth
|
|
31
|
+
- Total predicted
|
|
32
|
+
- [True positives nodes](basic-node-tp)
|
|
33
|
+
- [False positive nodes](basic-node-fp)
|
|
34
|
+
- [False negative nodes](basic-node-fn)
|
|
35
|
+
- [True positives edges](basic-edge-tp)
|
|
36
|
+
- [False positive edges](basic-edge-fp)
|
|
37
|
+
- [False negative edges](basic-edge-fn)
|
|
38
|
+
|
|
39
|
+
If `relax_skips_gt` or `relax_skips_pred` are set to True, the following additional counts are returned and included in the calculation of summary statistics listed below. For a complete description of how skip edges are handled, see [here](basic-skip-edge).
|
|
40
|
+
|
|
41
|
+
- Skip true positives
|
|
42
|
+
- Skip false positives
|
|
43
|
+
- Skip false negatives
|
|
44
|
+
|
|
45
|
+
Using these counts, the following summary stastics are computed for both nodes and edges:
|
|
46
|
+
|
|
47
|
+
- {term}`Recall`
|
|
48
|
+
- {term}`Precision`
|
|
49
|
+
- {term}`F1 Score`
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# CHOTA Metric
|
|
2
|
+
|
|
3
|
+
CHOTA (Cell-specific Higher Order Tracking Accuracy) is a metric for cell tracking that unifies local correctness, global coherence, and lineage tracking aspects. It extends the HOTA metric[^2] from general multiple object tracking to address cell division and lineage relationships[^1].
|
|
4
|
+
|
|
5
|
+
:::{warning}
|
|
6
|
+
CHOTA is designed for cell tracking scenarios that include cell division and lineage information. For general object tracking without biological relationships, consider using the standard HOTA metric.
|
|
7
|
+
:::
|
|
8
|
+
|
|
9
|
+
CHOTA redefines trajectories to include entire cell lineages rather than just objects with the same ID. Two cells belong to the same trajectory if they have the same ID or if one is an ancestor of the other, capturing biologically relevant relationships.
|
|
10
|
+
Therefore, in a branched lineage, all parent-child relationships are included in the trajectory, but not sibling-sibling relationships.
|
|
11
|
+
|
|
12
|
+
These metrics can be computed as follows:
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from traccuracy.loaders import load_ctc_data
|
|
16
|
+
from traccuracy.matchers import CTCMatcher
|
|
17
|
+
from traccuracy.metrics import CHOTAMetrics
|
|
18
|
+
|
|
19
|
+
# Load data using a function of your choice from traccuracy.loaders
|
|
20
|
+
# Or initialize a TrackingGraph with a nx.DiGraph and optional segmentation arrays
|
|
21
|
+
gt_data = load_ctc_data(
|
|
22
|
+
"path/to/GT/TRA",
|
|
23
|
+
"path/to/GT/TRA/man_track.txt",
|
|
24
|
+
name="GT"
|
|
25
|
+
)
|
|
26
|
+
pred_data = load_ctc_data(
|
|
27
|
+
"path/to/prediction",
|
|
28
|
+
"path/to/prediction/track.txt",
|
|
29
|
+
name="prediction"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
results, matched = run_metrics(
|
|
33
|
+
gt_data=gt_data,
|
|
34
|
+
pred_data=pred_data,
|
|
35
|
+
matcher=CTCMatcher(),
|
|
36
|
+
metrics=[CHOTAMetrics()]
|
|
37
|
+
)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## CHOTA Score
|
|
41
|
+
|
|
42
|
+
CHOTA is calculated as:
|
|
43
|
+
|
|
44
|
+
$$CHOTA = \sqrt{\frac{\sum_{c \in TP} A^\sigma(c)}{|TP| + |FN| + |FP|}}$$
|
|
45
|
+
|
|
46
|
+
Where $A^\sigma(c)$ is a lineage-oriented association score that evaluates the overlap between predicted and ground truth trajectories, including all cells related through lineage. Unlike HOTA, CHOTA accounts for cell divisions and parent-daughter relationships when computing trajectory associations.
|
|
47
|
+
|
|
48
|
+
CHOTA provides continuous values between 0 and 1, with higher scores indicating better tracking performance across detection accuracy, association correctness, and lineage reconstruction.
|
|
49
|
+
|
|
50
|
+
[^1]: Kaiser, Timo, Vladimír Ulman, and Bodo Rosenhahn. "Chota: A higher order accuracy metric for cell tracking." European Conference on Computer Vision. Cham: Springer Nature Switzerland, 2024.
|
|
51
|
+
|
|
52
|
+
[^2]: Luiten, Jonathon, et al. "Hota: A higher order metric for evaluating multi-object tracking." International journal of computer vision 129.2 (2021): 548-578.
|