traccuracy 0.4.2__tar.gz → 0.4.3__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.4.2 → traccuracy-0.4.3}/.github/workflows/benchmark-report.yml +3 -3
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/workflows/ci.yml +14 -14
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.pre-commit-config.yaml +2 -2
- {traccuracy-0.4.2/src/traccuracy.egg-info → traccuracy-0.4.3}/PKG-INFO +2 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/pyproject.toml +2 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/_tracking_graph.py +4 -2
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_compute_overlap.py +6 -2
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_ctc.py +4 -2
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_iou.py +12 -36
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_point.py +16 -45
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_divisions.py +1 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/track_errors/_basic.py +12 -12
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/track_errors/_ctc.py +11 -11
- {traccuracy-0.4.2 → traccuracy-0.4.3/src/traccuracy.egg-info}/PKG-INFO +2 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy.egg-info/requires.txt +1 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_ctc.py +5 -4
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_iou.py +5 -2
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_point.py +26 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_ctc_metrics.py +18 -1
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_divisions.py +20 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/test_tracking_graph.py +4 -4
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/test_utils.py +23 -3
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.gitattributes +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/ISSUE_TEMPLATE/bugs.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/ISSUE_TEMPLATE/features.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/PULL_REQUEST_TEMPLATE/new_matcher_metric.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/dependabot.yml +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/release.yml +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.github/workflows/benchmark-pr.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.gitignore +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/.readthedocs.yml +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/LICENSE +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/README.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/developer_notes.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/Makefile +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/make.bat +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/_static/css/tablefix.css +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/cli.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/conf.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/examples/ctc.nblink +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/glossary.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/index.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/matchers/matchers.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/basic.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/chota.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/complete_tracks.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/ctc.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/divisions.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/metrics.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/metrics/track_overlap.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/test_cases/divisions.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/test_cases/errors.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/test_cases/index.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/test_cases/larger_examples.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/test_cases/matchers.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/track_errors/basic.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/track_errors/ctc.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/docs/source/track_errors/divisions.md +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/ctc.ipynb +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask000.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask001.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask002.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask003.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask004.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask005.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask006.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask007.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask008.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask009.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask010.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask011.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask012.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask013.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask014.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask015.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask016.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask017.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask018.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask019.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask020.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask021.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask022.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask023.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask024.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask025.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask026.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask027.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask028.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask029.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask030.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask031.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask032.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask033.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask034.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask035.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask036.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask037.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask038.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask039.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask040.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask041.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask042.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask043.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask044.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask045.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask046.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask047.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask048.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask049.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask050.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask051.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask052.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask053.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask054.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask055.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask056.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask057.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask058.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask059.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask060.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask061.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask062.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask063.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask064.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask065.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask066.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask067.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask068.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask069.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask070.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask071.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask072.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask073.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask074.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask075.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask076.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask077.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask078.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask079.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask080.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask081.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask082.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask083.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask084.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask085.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask086.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask087.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask088.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask089.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask090.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask091.tif +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/res_track.txt +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/scripts/download_test_data.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/scripts/test_case_report.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/setup.cfg +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/_run_metrics.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/cli.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/loaders/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/loaders/_ctc.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/loaders/_geff.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/loaders/_point.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_base.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_matched.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/matchers/_point_seg.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_base.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_basic.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_cca.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_chota.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_complete_tracks.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_ctc.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_results.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/metrics/_track_overlap.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/track_errors/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/track_errors/_divisions.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy/utils.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy.egg-info/SOURCES.txt +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy.egg-info/dependency_links.txt +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy.egg-info/entry_points.txt +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/src/traccuracy.egg-info/top_level.txt +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/bench.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/examples/graphs.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/examples/larger_examples.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/examples/segs.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/loaders/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/loaders/test_ctc.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/loaders/test_geff.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/loaders/test_point.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_base.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_compute_overlap.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_matched.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/matchers/test_point_seg.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_base.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_basic.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_cca.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_chota.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_complete_tracks.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_track_overlap_metrics.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/metrics/test_weighted_error_sums.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/test_cli.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/test_run_metrics.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/track_errors/__init__.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/track_errors/test_basic.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/track_errors/test_ctc_errors.py +0 -0
- {traccuracy-0.4.2 → traccuracy-0.4.3}/tests/track_errors/test_divisions.py +0 -0
|
@@ -17,10 +17,10 @@ jobs:
|
|
|
17
17
|
name: Report benchmarks on gh-pages
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
21
|
|
|
22
22
|
- name: Retrieve cached data
|
|
23
|
-
uses: actions/cache/restore@
|
|
23
|
+
uses: actions/cache/restore@v5
|
|
24
24
|
id: cache_data
|
|
25
25
|
with:
|
|
26
26
|
path: downloads
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
python scripts/download_test_data.py
|
|
34
34
|
|
|
35
35
|
- name: Cache sample data
|
|
36
|
-
uses: actions/cache/save@
|
|
36
|
+
uses: actions/cache/save@v5
|
|
37
37
|
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
38
38
|
with:
|
|
39
39
|
path: downloads
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
# check-manifest:
|
|
18
18
|
# runs-on: ubuntu-latest
|
|
19
19
|
# steps:
|
|
20
|
-
# - uses: actions/checkout@
|
|
20
|
+
# - uses: actions/checkout@v6
|
|
21
21
|
# - run: pipx run check-manifest
|
|
22
22
|
|
|
23
23
|
test:
|
|
@@ -30,11 +30,11 @@ jobs:
|
|
|
30
30
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
31
31
|
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
34
|
|
|
35
35
|
# downloading data, required for CHOTA metric test
|
|
36
36
|
- name: Retrieve cached data
|
|
37
|
-
uses: actions/cache/restore@
|
|
37
|
+
uses: actions/cache/restore@v5
|
|
38
38
|
id: cache_data
|
|
39
39
|
with:
|
|
40
40
|
path: downloads
|
|
@@ -47,7 +47,7 @@ jobs:
|
|
|
47
47
|
python scripts/download_test_data.py
|
|
48
48
|
|
|
49
49
|
- name: Cache sample data
|
|
50
|
-
uses: actions/cache/save@
|
|
50
|
+
uses: actions/cache/save@v5
|
|
51
51
|
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
52
52
|
with:
|
|
53
53
|
path: downloads
|
|
@@ -78,10 +78,10 @@ jobs:
|
|
|
78
78
|
runs-on: ubuntu-latest
|
|
79
79
|
|
|
80
80
|
steps:
|
|
81
|
-
- uses: actions/checkout@
|
|
81
|
+
- uses: actions/checkout@v6
|
|
82
82
|
|
|
83
83
|
- name: Retrieve cached data
|
|
84
|
-
uses: actions/cache/restore@
|
|
84
|
+
uses: actions/cache/restore@v5
|
|
85
85
|
id: cache_data
|
|
86
86
|
with:
|
|
87
87
|
path: downloads
|
|
@@ -94,7 +94,7 @@ jobs:
|
|
|
94
94
|
python scripts/download_test_data.py
|
|
95
95
|
|
|
96
96
|
- name: Cache sample data
|
|
97
|
-
uses: actions/cache/save@
|
|
97
|
+
uses: actions/cache/save@v5
|
|
98
98
|
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
99
99
|
with:
|
|
100
100
|
path: downloads
|
|
@@ -123,12 +123,12 @@ jobs:
|
|
|
123
123
|
if: github.event_name == 'pull_request'
|
|
124
124
|
|
|
125
125
|
steps:
|
|
126
|
-
- uses: actions/checkout@
|
|
126
|
+
- uses: actions/checkout@v6
|
|
127
127
|
with:
|
|
128
128
|
fetch-depth: 50 # this is to make sure we obtain the target base commit
|
|
129
129
|
|
|
130
130
|
- name: Retrieve cached data
|
|
131
|
-
uses: actions/cache/restore@
|
|
131
|
+
uses: actions/cache/restore@v5
|
|
132
132
|
id: cache_data
|
|
133
133
|
with:
|
|
134
134
|
path: downloads
|
|
@@ -141,7 +141,7 @@ jobs:
|
|
|
141
141
|
python scripts/download_test_data.py
|
|
142
142
|
|
|
143
143
|
- name: Cache sample data
|
|
144
|
-
uses: actions/cache/save@
|
|
144
|
+
uses: actions/cache/save@v5
|
|
145
145
|
if: steps.cache_data.outputs.cache-hit != 'true'
|
|
146
146
|
with:
|
|
147
147
|
path: downloads
|
|
@@ -161,7 +161,7 @@ jobs:
|
|
|
161
161
|
python -m pip install tabulate
|
|
162
162
|
|
|
163
163
|
- name: Retrieve cached baseline if available
|
|
164
|
-
uses: actions/cache/restore@
|
|
164
|
+
uses: actions/cache/restore@v5
|
|
165
165
|
id: cache_baseline
|
|
166
166
|
with:
|
|
167
167
|
path: baseline.json
|
|
@@ -174,7 +174,7 @@ jobs:
|
|
|
174
174
|
pytest tests/bench.py -v --benchmark-json baseline.json
|
|
175
175
|
|
|
176
176
|
- name: Cache baseline results
|
|
177
|
-
uses: actions/cache/save@
|
|
177
|
+
uses: actions/cache/save@v5
|
|
178
178
|
if: steps.cache_baseline.outputs.cache-hit != 'true'
|
|
179
179
|
with:
|
|
180
180
|
path: baseline.json
|
|
@@ -200,7 +200,7 @@ jobs:
|
|
|
200
200
|
if: github.event_name == 'pull_request'
|
|
201
201
|
|
|
202
202
|
steps:
|
|
203
|
-
- uses: actions/checkout@
|
|
203
|
+
- uses: actions/checkout@v6
|
|
204
204
|
|
|
205
205
|
- name: Set up Python 3.13
|
|
206
206
|
uses: actions/setup-python@v6
|
|
@@ -249,7 +249,7 @@ jobs:
|
|
|
249
249
|
runs-on: ubuntu-latest
|
|
250
250
|
|
|
251
251
|
steps:
|
|
252
|
-
- uses: actions/checkout@
|
|
252
|
+
- uses: actions/checkout@v6
|
|
253
253
|
|
|
254
254
|
- name: Set up Python
|
|
255
255
|
uses: actions/setup-python@v6
|
|
@@ -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.14.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.19.0
|
|
26
26
|
hooks:
|
|
27
27
|
- id: mypy
|
|
28
28
|
files: "^src/"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: traccuracy
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Utilities for computing common accuracy metrics on cell tracking challenge solutions with ground truth
|
|
5
5
|
Author-email: Draga Doncila Pop <draga.doncilapop1@monash.edu>, Caroline Malin-Mayor <cmalinmayor@gmail.com>, Morgan Schwartz <msschwartz21@gmail.com>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -33,6 +33,7 @@ Requires-Dist: pyarrow
|
|
|
33
33
|
Requires-Dist: scipy
|
|
34
34
|
Requires-Dist: skan>=0.13
|
|
35
35
|
Requires-Dist: geff>=1.0
|
|
36
|
+
Requires-Dist: pylapy[sparse]>=1.0
|
|
36
37
|
Provides-Extra: test
|
|
37
38
|
Requires-Dist: pytest>=6.0; extra == "test"
|
|
38
39
|
Requires-Dist: pytest-cov; extra == "test"
|
|
@@ -282,8 +282,10 @@ class TrackingGraph:
|
|
|
282
282
|
self.division_annotations = False
|
|
283
283
|
self.division_skip_gt_relaxed = False
|
|
284
284
|
self.division_skip_pred_relaxed = False
|
|
285
|
-
self.
|
|
286
|
-
self.
|
|
285
|
+
self.basic_node_errors = False
|
|
286
|
+
self.basic_edge_errors = False
|
|
287
|
+
self.ctc_node_errors = False
|
|
288
|
+
self.ctc_edge_errors = False
|
|
287
289
|
self.skip_edges_gt_relaxed = False
|
|
288
290
|
self.skip_edges_pred_relaxed = False
|
|
289
291
|
|
|
@@ -14,7 +14,7 @@ import numpy as np
|
|
|
14
14
|
from skimage.measure import regionprops
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def _union_slice(a: tuple[slice], b: tuple[slice]) -> tuple[slice, ...]:
|
|
17
|
+
def _union_slice(a: tuple[slice, ...], b: tuple[slice, ...]) -> tuple[slice, ...]:
|
|
18
18
|
"""returns the union of slice tuples a and b"""
|
|
19
19
|
starts = tuple(min(_a.start, _b.start) for _a, _b in zip(a, b, strict=True))
|
|
20
20
|
stops = tuple(max(_a.stop, _b.stop) for _a, _b in zip(a, b, strict=True))
|
|
@@ -30,6 +30,7 @@ def _bbox_to_slice(bbox: tuple[int, int, int, int]) -> tuple[slice, ...]:
|
|
|
30
30
|
def graph_bbox_and_labels(
|
|
31
31
|
graph: nx.DiGraph,
|
|
32
32
|
nodes: Iterable[Hashable],
|
|
33
|
+
label_key: str | None = "segmentation_id",
|
|
33
34
|
) -> tuple[np.ndarray | None, np.ndarray | None]:
|
|
34
35
|
"""
|
|
35
36
|
Get bounding boxes and labels for a list of nodes in a graph.
|
|
@@ -39,13 +40,16 @@ def graph_bbox_and_labels(
|
|
|
39
40
|
Args:
|
|
40
41
|
graph (nx.DiGraph): The graph to get the bounding boxes and labels from.
|
|
41
42
|
nodes (list[Hashable]): The nodes to get the bounding boxes and labels for.
|
|
43
|
+
label_key (str, optional): The key to use for the labels. Defaults to 'segmentation_id'.
|
|
42
44
|
|
|
43
45
|
Returns:
|
|
44
46
|
tuple[np.ndarray | None, np.ndarray | None]: The bounding boxes and labels for the nodes.
|
|
45
47
|
"""
|
|
46
48
|
try:
|
|
47
49
|
gt_boxes = np.asarray([graph.nodes[node]["bbox"] for node in nodes])
|
|
48
|
-
gt_labels = np.asarray(
|
|
50
|
+
gt_labels = np.asarray(
|
|
51
|
+
[graph.nodes[node][label_key] for node in nodes if label_key is not None]
|
|
52
|
+
)
|
|
49
53
|
except KeyError:
|
|
50
54
|
gt_boxes, gt_labels = None, None
|
|
51
55
|
return gt_boxes, gt_labels
|
|
@@ -86,8 +86,10 @@ class CTCMatcher(Matcher):
|
|
|
86
86
|
if pred_label_key in G_pred.graph.nodes[node]
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
gt_boxes, gt_labels = graph_bbox_and_labels(gt.graph, gt_frame_nodes)
|
|
90
|
-
pred_boxes, pred_labels = graph_bbox_and_labels(
|
|
89
|
+
gt_boxes, gt_labels = graph_bbox_and_labels(gt.graph, gt_frame_nodes, gt_label_key)
|
|
90
|
+
pred_boxes, pred_labels = graph_bbox_and_labels(
|
|
91
|
+
pred.graph, pred_frame_nodes, pred_label_key
|
|
92
|
+
)
|
|
91
93
|
|
|
92
94
|
overlaps = get_labels_with_overlap(
|
|
93
95
|
gt_frame,
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import TYPE_CHECKING, cast
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
|
-
|
|
6
|
+
import pylapy
|
|
7
7
|
from tqdm import tqdm
|
|
8
8
|
|
|
9
9
|
from traccuracy._tracking_graph import TrackingGraph
|
|
@@ -92,43 +92,19 @@ def _one_to_one_assignment(
|
|
|
92
92
|
Returns:
|
|
93
93
|
tuple: Tuple of two arrays, one for indices of each axis
|
|
94
94
|
"""
|
|
95
|
-
#
|
|
96
|
-
|
|
97
|
-
n0 = iou.shape[0] - 1
|
|
98
|
-
n1 = iou.shape[1] - 1
|
|
99
|
-
n_obj = n0 + n1
|
|
100
|
-
matrix = np.ones((n_obj, n_obj))
|
|
95
|
+
# Lap solver using scipy
|
|
96
|
+
solver = pylapy.LapSolver(implementation="scipy", sparse_implementation="csgraph")
|
|
101
97
|
|
|
102
|
-
#
|
|
98
|
+
# Exclude the background which is currently included in iou matrix
|
|
103
99
|
cost = 1 - iou[1:, 1:]
|
|
104
|
-
|
|
105
|
-
cost[cost == 1] = unmapped_cost + 1
|
|
106
|
-
matrix[:n0, :n1] = cost
|
|
107
|
-
matrix[n_obj - n1 :, n_obj - n0 :] = cost.T
|
|
108
|
-
|
|
109
|
-
# Calculate unassigned corners, with base cost of 10*unmapped cost
|
|
110
|
-
# Diagonals are set to unmapped_cost
|
|
111
|
-
bl = np.full((n1, n1), unmapped_cost * 10)
|
|
112
|
-
np.fill_diagonal(bl, unmapped_cost)
|
|
113
|
-
tr = np.full((n0, n0), unmapped_cost * 10)
|
|
114
|
-
np.fill_diagonal(tr, unmapped_cost)
|
|
115
|
-
|
|
116
|
-
# Assign diagonals to cm
|
|
117
|
-
matrix[n_obj - n1 :, :n1] = bl
|
|
118
|
-
matrix[:n0, n_obj - n0 :] = tr
|
|
119
|
-
|
|
120
|
-
results = linear_sum_assignment(matrix)
|
|
121
|
-
|
|
122
|
-
# Map results back to cost matrix
|
|
123
|
-
assignment_matrix = np.zeros_like(matrix)
|
|
124
|
-
assignment_matrix[results] = 1
|
|
100
|
+
cost[cost == 1] = np.inf
|
|
125
101
|
|
|
126
|
-
#
|
|
127
|
-
|
|
102
|
+
# Let's keep eta = unmapped_cost + 1 for compatibility. But one could probably do
|
|
103
|
+
# hard thresholding instead (using hard=True) which is indeed what we want to do
|
|
104
|
+
# Add 1 to all indices to correct for the removed background
|
|
105
|
+
rows, cols = (solver.sparse_solve(cost, eta=unmapped_cost + 1) + 1).T
|
|
128
106
|
|
|
129
|
-
|
|
130
|
-
matches = (matches[0] + 1, matches[1] + 1)
|
|
131
|
-
return matches
|
|
107
|
+
return rows, cols
|
|
132
108
|
|
|
133
109
|
|
|
134
110
|
def _construct_time_to_seg_id_map(
|
|
@@ -205,8 +181,8 @@ def match_iou(
|
|
|
205
181
|
gt_nodes = gt.nodes_by_frame[t]
|
|
206
182
|
pred_nodes = pred.nodes_by_frame[t]
|
|
207
183
|
|
|
208
|
-
gt_boxes, gt_labels = graph_bbox_and_labels(gt.graph, gt_nodes)
|
|
209
|
-
pred_boxes, pred_labels = graph_bbox_and_labels(pred.graph, pred_nodes)
|
|
184
|
+
gt_boxes, gt_labels = graph_bbox_and_labels(gt.graph, gt_nodes, gt.label_key)
|
|
185
|
+
pred_boxes, pred_labels = graph_bbox_and_labels(pred.graph, pred_nodes, pred.label_key)
|
|
210
186
|
|
|
211
187
|
matches = _match_nodes(
|
|
212
188
|
gt.segmentation[i],
|
|
@@ -2,8 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
from scipy.optimize import linear_sum_assignment
|
|
5
|
+
import pylapy
|
|
7
6
|
from scipy.spatial import KDTree
|
|
8
7
|
|
|
9
8
|
from ._base import Matcher
|
|
@@ -12,6 +11,9 @@ if TYPE_CHECKING:
|
|
|
12
11
|
from collections.abc import Hashable
|
|
13
12
|
from typing import Any
|
|
14
13
|
|
|
14
|
+
import numpy as np
|
|
15
|
+
from scipy.sparse import coo_matrix
|
|
16
|
+
|
|
15
17
|
from traccuracy._tracking_graph import TrackingGraph
|
|
16
18
|
|
|
17
19
|
|
|
@@ -42,6 +44,9 @@ class PointMatcher(Matcher):
|
|
|
42
44
|
# this matching is always one-to-one
|
|
43
45
|
self._matching_type = "one-to-one"
|
|
44
46
|
|
|
47
|
+
# Lap solver using scipy
|
|
48
|
+
self._solver = pylapy.LapSolver(implementation="scipy", sparse_implementation="csgraph")
|
|
49
|
+
|
|
45
50
|
def _compute_mapping(
|
|
46
51
|
self, gt_graph: TrackingGraph, pred_graph: TrackingGraph
|
|
47
52
|
) -> list[tuple[Any, Any]]:
|
|
@@ -89,52 +94,18 @@ class PointMatcher(Matcher):
|
|
|
89
94
|
return mapping
|
|
90
95
|
gt_kdtree = KDTree(gt_locations)
|
|
91
96
|
pred_kdtree = KDTree(pred_locations)
|
|
97
|
+
|
|
92
98
|
# indices correspond to indices in the gt_nodes, pred_nodes lists
|
|
93
|
-
sdm:
|
|
94
|
-
pred_kdtree, max_distance=self.threshold, output_type="
|
|
95
|
-
)
|
|
96
|
-
# unmapped cost has to be higher than the max distance so if something can
|
|
97
|
-
# be matched it will
|
|
98
|
-
unmapped_cost = self.threshold * 4
|
|
99
|
-
# indices in this matrix correspond to indices in the concatenated gt_nodes
|
|
100
|
-
# + pred_nodes list
|
|
101
|
-
num_gt = len(gt_nodes)
|
|
102
|
-
num_pred = len(pred_nodes)
|
|
103
|
-
total_objects = num_gt + num_pred
|
|
104
|
-
# initialize to unmapped cost + 1
|
|
105
|
-
cost_matrix: np.ndarray = np.ones(shape=(total_objects, total_objects)) * (
|
|
106
|
-
unmapped_cost + 1
|
|
99
|
+
sdm: coo_matrix = gt_kdtree.sparse_distance_matrix(
|
|
100
|
+
pred_kdtree, max_distance=self.threshold, output_type="coo_matrix"
|
|
107
101
|
)
|
|
108
102
|
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
cost_matrix[-1 * pred_idx, -1 * gt_idx] = dist
|
|
116
|
-
|
|
117
|
-
# Calculate unassigned corners, with base cost of 10*unmapped cost
|
|
118
|
-
# Diagonals are set to unmapped_cost
|
|
119
|
-
bot_left = np.full((num_pred, num_pred), unmapped_cost * 10)
|
|
120
|
-
np.fill_diagonal(bot_left, unmapped_cost)
|
|
121
|
-
top_right = np.full((num_gt, num_gt), unmapped_cost * 10)
|
|
122
|
-
np.fill_diagonal(top_right, unmapped_cost)
|
|
123
|
-
|
|
124
|
-
# Assign diagonals to cm
|
|
125
|
-
cost_matrix[total_objects - num_pred :, :num_pred] = bot_left
|
|
126
|
-
cost_matrix[:num_gt, total_objects - num_gt :] = top_right
|
|
127
|
-
|
|
128
|
-
row_ind, col_ind = linear_sum_assignment(cost_matrix)
|
|
129
|
-
# go back to matched node ids from matrix indices
|
|
130
|
-
for row, col in zip(row_ind, col_ind, strict=True):
|
|
131
|
-
# it said they were sorted by row index, so we only want the top left corner
|
|
132
|
-
if row >= num_gt:
|
|
133
|
-
break
|
|
134
|
-
if (
|
|
135
|
-
col >= num_pred
|
|
136
|
-
): # the gt was unmatched (matched to the unmatched cost in the top right)
|
|
137
|
-
continue
|
|
103
|
+
# Let's keep threshold * 4 for compatibility. But one could probably do
|
|
104
|
+
# hard thresholding instead (using hard=True) which is indeed what we want to do
|
|
105
|
+
links = self._solver.sparse_solve(sdm, self.threshold).T
|
|
106
|
+
|
|
107
|
+
# Go back to matched node ids from matrix indices
|
|
108
|
+
for row, col in links.T.tolist():
|
|
138
109
|
gt_id = gt_nodes[row]
|
|
139
110
|
pred_id = pred_nodes[col]
|
|
140
111
|
mapping.append((gt_id, pred_id))
|
|
@@ -216,7 +216,7 @@ class DivisionMetrics(Metric):
|
|
|
216
216
|
recall = self._get_recall(total_tp_div, gt_div_count)
|
|
217
217
|
precision = self._get_precision(total_tp_div, pred_div_count)
|
|
218
218
|
f1 = self._get_f1(recall, precision)
|
|
219
|
-
mbc = self._get_mbc(gt_div_count, tp_division_count,
|
|
219
|
+
mbc = self._get_mbc(gt_div_count, tp_division_count, fp_division_count)
|
|
220
220
|
|
|
221
221
|
res_dict[f"Frame Buffer {fb}"] = {
|
|
222
222
|
"Division Recall": recall,
|
|
@@ -54,14 +54,14 @@ def _classify_nodes(matched: Matched) -> None:
|
|
|
54
54
|
pred_graph = matched.pred_graph
|
|
55
55
|
gt_graph = matched.gt_graph
|
|
56
56
|
|
|
57
|
-
if pred_graph.
|
|
58
|
-
graph_with_errors = "pred graph" if pred_graph.
|
|
57
|
+
if pred_graph.basic_node_errors + gt_graph.basic_node_errors == 1:
|
|
58
|
+
graph_with_errors = "pred graph" if pred_graph.basic_node_errors else "GT graph"
|
|
59
59
|
raise ValueError(
|
|
60
60
|
f"Only {graph_with_errors} has node errors annotated. Please ensure either both "
|
|
61
61
|
+ "or neither of the graphs have traccuracy annotations before running metrics."
|
|
62
62
|
)
|
|
63
63
|
|
|
64
|
-
if pred_graph.
|
|
64
|
+
if pred_graph.basic_node_errors and gt_graph.basic_node_errors:
|
|
65
65
|
warnings.warn("Node errors already calculated. Skipping graph annotation", stacklevel=2)
|
|
66
66
|
return
|
|
67
67
|
|
|
@@ -80,8 +80,8 @@ def _classify_nodes(matched: Matched) -> None:
|
|
|
80
80
|
for node in fn_nodes:
|
|
81
81
|
gt_graph.set_flag_on_node(node, NodeFlag.FALSE_NEG)
|
|
82
82
|
|
|
83
|
-
gt_graph.
|
|
84
|
-
pred_graph.
|
|
83
|
+
gt_graph.basic_node_errors = True
|
|
84
|
+
pred_graph.basic_node_errors = True
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
def _classify_edges(
|
|
@@ -107,16 +107,16 @@ def _classify_edges(
|
|
|
107
107
|
|
|
108
108
|
# if only one of the graphs has been annotated, we raise
|
|
109
109
|
# because we'll likely leave things in an inconsistent state
|
|
110
|
-
if pred_graph.
|
|
111
|
-
graph_with_errors = "pred graph" if pred_graph.
|
|
110
|
+
if pred_graph.basic_edge_errors + gt_graph.basic_edge_errors == 1:
|
|
111
|
+
graph_with_errors = "pred graph" if pred_graph.basic_edge_errors else "GT graph"
|
|
112
112
|
raise ValueError(
|
|
113
113
|
f"Only {graph_with_errors} has edge errors annotated. Please ensure either both or"
|
|
114
114
|
" neither of the graphs have traccuracy annotations before running metrics."
|
|
115
115
|
)
|
|
116
116
|
|
|
117
117
|
if (
|
|
118
|
-
pred_graph.
|
|
119
|
-
and gt_graph.
|
|
118
|
+
pred_graph.basic_edge_errors
|
|
119
|
+
and gt_graph.basic_edge_errors
|
|
120
120
|
# if we're not requiring relaxation OR it's already been computed,
|
|
121
121
|
# we can skip edge classification
|
|
122
122
|
and (not relax_skips_gt or gt_graph.skip_edges_gt_relaxed)
|
|
@@ -126,7 +126,7 @@ def _classify_edges(
|
|
|
126
126
|
return
|
|
127
127
|
|
|
128
128
|
# Node errors are needed for edge annotation
|
|
129
|
-
if not pred_graph.
|
|
129
|
+
if not pred_graph.basic_node_errors and not gt_graph.basic_node_errors:
|
|
130
130
|
logger.info("Node errors have not been annotated. Running node annotation.", stacklevel=2)
|
|
131
131
|
_classify_nodes(matched)
|
|
132
132
|
|
|
@@ -199,7 +199,7 @@ def _classify_edges(
|
|
|
199
199
|
for edge in fp_skips:
|
|
200
200
|
pred_graph.set_flag_on_edge(edge, EdgeFlag.SKIP_FALSE_POS)
|
|
201
201
|
|
|
202
|
-
pred_graph.
|
|
203
|
-
gt_graph.
|
|
202
|
+
pred_graph.basic_edge_errors = True
|
|
203
|
+
gt_graph.basic_edge_errors = True
|
|
204
204
|
gt_graph.skip_edges_gt_relaxed = relax_skips_gt
|
|
205
205
|
pred_graph.skip_edges_pred_relaxed = relax_skips_pred
|
|
@@ -35,15 +35,15 @@ def get_vertex_errors(matched_data: Matched) -> None:
|
|
|
35
35
|
gt_graph = matched_data.gt_graph
|
|
36
36
|
dict_mapping = matched_data.pred_gt_map
|
|
37
37
|
|
|
38
|
-
if comp_graph.
|
|
39
|
-
graph_with_errors = "pred graph" if comp_graph.
|
|
38
|
+
if comp_graph.ctc_node_errors + gt_graph.ctc_node_errors == 1:
|
|
39
|
+
graph_with_errors = "pred graph" if comp_graph.ctc_node_errors else "GT graph"
|
|
40
40
|
raise ValueError(
|
|
41
41
|
f"Only {graph_with_errors} has node errors annotated. "
|
|
42
42
|
"Please ensure either both or neither "
|
|
43
43
|
+ "of the graphs have traccuracy annotations before running metrics."
|
|
44
44
|
)
|
|
45
45
|
|
|
46
|
-
if comp_graph.
|
|
46
|
+
if comp_graph.ctc_node_errors and gt_graph.ctc_node_errors:
|
|
47
47
|
warnings.warn("Node errors already calculated. Skipping graph annotation", stacklevel=2)
|
|
48
48
|
return
|
|
49
49
|
|
|
@@ -69,8 +69,8 @@ def get_vertex_errors(matched_data: Matched) -> None:
|
|
|
69
69
|
gt_graph.remove_flag_from_node(gt_id, NodeFlag.CTC_FALSE_NEG)
|
|
70
70
|
|
|
71
71
|
# Record presence of annotations on the TrackingGraph
|
|
72
|
-
comp_graph.
|
|
73
|
-
gt_graph.
|
|
72
|
+
comp_graph.ctc_node_errors = True
|
|
73
|
+
gt_graph.ctc_node_errors = True
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
def get_edge_errors(matched_data: Matched) -> None:
|
|
@@ -78,20 +78,20 @@ def get_edge_errors(matched_data: Matched) -> None:
|
|
|
78
78
|
gt_graph = matched_data.gt_graph
|
|
79
79
|
node_mapping = matched_data.mapping
|
|
80
80
|
|
|
81
|
-
if comp_graph.
|
|
82
|
-
graph_with_errors = "pred graph" if comp_graph.
|
|
81
|
+
if comp_graph.ctc_edge_errors + gt_graph.ctc_edge_errors == 1:
|
|
82
|
+
graph_with_errors = "pred graph" if comp_graph.ctc_edge_errors else "GT graph"
|
|
83
83
|
raise ValueError(
|
|
84
84
|
f"Only {graph_with_errors} has edge errors annotated. "
|
|
85
85
|
"Please ensure either both or neither "
|
|
86
86
|
+ "of the graphs have traccuracy annotations before running metrics."
|
|
87
87
|
)
|
|
88
88
|
|
|
89
|
-
if comp_graph.
|
|
89
|
+
if comp_graph.ctc_edge_errors and gt_graph.ctc_edge_errors:
|
|
90
90
|
warnings.warn("Edge errors already calculated. Skipping graph annotation", stacklevel=2)
|
|
91
91
|
return
|
|
92
92
|
|
|
93
93
|
# Node errors must already be annotated
|
|
94
|
-
if not comp_graph.
|
|
94
|
+
if not comp_graph.ctc_node_errors and not gt_graph.ctc_node_errors:
|
|
95
95
|
logger.info("Node errors have not been annotated. Running node annotation.", stacklevel=2)
|
|
96
96
|
get_vertex_errors(matched_data)
|
|
97
97
|
|
|
@@ -148,5 +148,5 @@ def get_edge_errors(matched_data: Matched) -> None:
|
|
|
148
148
|
if expected_comp_edge not in induced_graph.edges:
|
|
149
149
|
gt_graph.set_flag_on_edge(edge, EdgeFlag.CTC_FALSE_NEG, True)
|
|
150
150
|
|
|
151
|
-
gt_graph.
|
|
152
|
-
comp_graph.
|
|
151
|
+
gt_graph.ctc_edge_errors = True
|
|
152
|
+
comp_graph.ctc_edge_errors = True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: traccuracy
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Utilities for computing common accuracy metrics on cell tracking challenge solutions with ground truth
|
|
5
5
|
Author-email: Draga Doncila Pop <draga.doncilapop1@monash.edu>, Caroline Malin-Mayor <cmalinmayor@gmail.com>, Morgan Schwartz <msschwartz21@gmail.com>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -33,6 +33,7 @@ Requires-Dist: pyarrow
|
|
|
33
33
|
Requires-Dist: scipy
|
|
34
34
|
Requires-Dist: skan>=0.13
|
|
35
35
|
Requires-Dist: geff>=1.0
|
|
36
|
+
Requires-Dist: pylapy[sparse]>=1.0
|
|
36
37
|
Provides-Extra: test
|
|
37
38
|
Requires-Dist: pytest>=6.0; extra == "test"
|
|
38
39
|
Requires-Dist: pytest-cov; extra == "test"
|
|
@@ -47,7 +47,8 @@ class TestCTCMatcher:
|
|
|
47
47
|
TrackingGraph(nx.DiGraph(), segmentation=np.zeros((5, 10, 5), dtype=np.uint16)),
|
|
48
48
|
)
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
@pytest.mark.parametrize("label_key", ["segmentation_id", "custom_label"])
|
|
51
|
+
def test_end_to_end(self, label_key):
|
|
51
52
|
n_labels = 3
|
|
52
53
|
n_frames = 3
|
|
53
54
|
movie = get_annotated_movie(
|
|
@@ -67,7 +68,7 @@ class TestCTCMatcher:
|
|
|
67
68
|
"t": t,
|
|
68
69
|
"y": 0,
|
|
69
70
|
"x": 0,
|
|
70
|
-
|
|
71
|
+
label_key: i,
|
|
71
72
|
"bbox": np.array([0, 0, 256, 256]),
|
|
72
73
|
}
|
|
73
74
|
nx.set_node_attributes(g, attrs)
|
|
@@ -76,8 +77,8 @@ class TestCTCMatcher:
|
|
|
76
77
|
g = nx.convert_node_labels_to_integers(g, first_label=1)
|
|
77
78
|
|
|
78
79
|
matched = self.matcher.compute_mapping(
|
|
79
|
-
TrackingGraph(g, segmentation=movie),
|
|
80
|
-
TrackingGraph(g, segmentation=movie),
|
|
80
|
+
TrackingGraph(g, segmentation=movie, label_key=label_key),
|
|
81
|
+
TrackingGraph(g, segmentation=movie, label_key=label_key),
|
|
81
82
|
)
|
|
82
83
|
|
|
83
84
|
# Check for correct number of pairs
|
|
@@ -337,11 +337,14 @@ class Test_match_iou:
|
|
|
337
337
|
TrackingGraph(nx.DiGraph()),
|
|
338
338
|
)
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
@pytest.mark.parametrize("label_key", ["segmentation_id", "label"])
|
|
341
|
+
def test_end_to_end_2d(self, label_key):
|
|
341
342
|
# Test 2d data
|
|
342
343
|
n_frames = 3
|
|
343
344
|
n_labels = 3
|
|
344
|
-
track_graph = get_movie_with_graph(
|
|
345
|
+
track_graph = get_movie_with_graph(
|
|
346
|
+
ndims=3, n_frames=n_frames, n_labels=n_labels, label_key=label_key
|
|
347
|
+
)
|
|
345
348
|
mapper = match_iou(
|
|
346
349
|
track_graph,
|
|
347
350
|
track_graph,
|
|
@@ -6,7 +6,7 @@ import pytest
|
|
|
6
6
|
from examples.segs import SegmentationData
|
|
7
7
|
|
|
8
8
|
import tests.examples.segs as ex_segs
|
|
9
|
-
from tests.test_utils import get_movie_with_graph
|
|
9
|
+
from tests.test_utils import get_movie_with_graph, shuffle_graph
|
|
10
10
|
from traccuracy import TrackingGraph
|
|
11
11
|
from traccuracy.matchers._point import PointMatcher
|
|
12
12
|
|
|
@@ -376,3 +376,28 @@ class TestPointMatcher:
|
|
|
376
376
|
# gt and pred node should be the same
|
|
377
377
|
for pair in matched.mapping:
|
|
378
378
|
assert pair[0] == pair[1]
|
|
379
|
+
|
|
380
|
+
def test_shuffle(self):
|
|
381
|
+
"""Test shuffling the graph as in #319"""
|
|
382
|
+
gt_data = self.track_graph
|
|
383
|
+
pred_data = get_movie_with_graph(ndims=3, n_frames=self.n_frames, n_labels=self.n_labels)
|
|
384
|
+
gt_random, random_mapping = shuffle_graph(gt_data)
|
|
385
|
+
|
|
386
|
+
# Use a large threshold to get matches
|
|
387
|
+
matcher = PointMatcher(threshold=200)
|
|
388
|
+
mapping_gt_pred = dict(matcher._compute_mapping(gt_data, pred_data))
|
|
389
|
+
mapping_rand_pred = dict(matcher._compute_mapping(gt_random, pred_data))
|
|
390
|
+
|
|
391
|
+
# Should be the same matches after 'random_mapping'
|
|
392
|
+
assert len(mapping_gt_pred) == len(mapping_rand_pred)
|
|
393
|
+
|
|
394
|
+
# Let's re-order mapping_rand_pred to gt_data node ids
|
|
395
|
+
reversed_mapping_rand_pred = {}
|
|
396
|
+
for key, value in random_mapping.items():
|
|
397
|
+
if value in mapping_rand_pred:
|
|
398
|
+
reversed_mapping_rand_pred[key] = mapping_rand_pred[value]
|
|
399
|
+
|
|
400
|
+
# Let's test all matches
|
|
401
|
+
for key, value in mapping_gt_pred.items():
|
|
402
|
+
other_value = reversed_mapping_rand_pred.get(key)
|
|
403
|
+
assert value == other_value
|