traccuracy 0.4.0__tar.gz → 0.4.2__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.
Files changed (212) hide show
  1. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/workflows/benchmark-report.yml +2 -2
  2. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/workflows/ci.yml +11 -11
  3. {traccuracy-0.4.0 → traccuracy-0.4.2}/.pre-commit-config.yaml +3 -2
  4. {traccuracy-0.4.0/src/traccuracy.egg-info → traccuracy-0.4.2}/PKG-INFO +3 -2
  5. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/index.md +2 -0
  6. traccuracy-0.4.2/docs/source/matchers/matchers.md +28 -0
  7. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/metrics/basic.md +1 -0
  8. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/metrics/chota.md +1 -0
  9. traccuracy-0.4.2/docs/source/metrics/complete_tracks.md +65 -0
  10. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/metrics/ctc.md +2 -0
  11. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/metrics/divisions.md +1 -0
  12. traccuracy-0.4.2/docs/source/metrics/metrics.md +29 -0
  13. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/metrics/track_overlap.md +2 -1
  14. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/test_cases/divisions.md +4 -0
  15. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/track_errors/basic.md +1 -0
  16. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/track_errors/ctc.md +1 -0
  17. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/track_errors/divisions.md +1 -0
  18. {traccuracy-0.4.0 → traccuracy-0.4.2}/pyproject.toml +5 -3
  19. {traccuracy-0.4.0 → traccuracy-0.4.2}/scripts/test_case_report.py +8 -1
  20. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/_run_metrics.py +9 -1
  21. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/_tracking_graph.py +115 -64
  22. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/cli.py +1 -1
  23. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/loaders/_geff.py +31 -8
  24. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_iou.py +1 -1
  25. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_point_seg.py +2 -1
  26. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/__init__.py +4 -1
  27. traccuracy-0.4.2/src/traccuracy/metrics/_cca.py +130 -0
  28. traccuracy-0.4.2/src/traccuracy/metrics/_complete_tracks.py +247 -0
  29. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_ctc.py +1 -119
  30. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/utils.py +32 -24
  31. {traccuracy-0.4.0 → traccuracy-0.4.2/src/traccuracy.egg-info}/PKG-INFO +3 -2
  32. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy.egg-info/SOURCES.txt +6 -0
  33. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy.egg-info/requires.txt +2 -1
  34. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/bench.py +17 -2
  35. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/loaders/test_geff.py +28 -19
  36. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/loaders/test_point.py +6 -6
  37. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_iou.py +1 -1
  38. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_matched.py +3 -1
  39. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_point_seg.py +3 -3
  40. traccuracy-0.4.2/tests/metrics/test_cca.py +138 -0
  41. traccuracy-0.4.2/tests/metrics/test_complete_tracks.py +248 -0
  42. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_ctc_metrics.py +0 -135
  43. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/test_run_metrics.py +9 -2
  44. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/test_tracking_graph.py +42 -13
  45. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/test_utils.py +3 -2
  46. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/track_errors/test_basic.py +49 -1
  47. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/track_errors/test_ctc_errors.py +110 -9
  48. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/track_errors/test_divisions.py +12 -0
  49. traccuracy-0.4.0/docs/source/matchers/matchers.md +0 -28
  50. {traccuracy-0.4.0 → traccuracy-0.4.2}/.gitattributes +0 -0
  51. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/ISSUE_TEMPLATE/bugs.md +0 -0
  52. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/ISSUE_TEMPLATE/features.md +0 -0
  53. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/PULL_REQUEST_TEMPLATE/new_matcher_metric.md +0 -0
  54. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  55. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/dependabot.yml +0 -0
  56. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/release.yml +0 -0
  57. {traccuracy-0.4.0 → traccuracy-0.4.2}/.github/workflows/benchmark-pr.py +0 -0
  58. {traccuracy-0.4.0 → traccuracy-0.4.2}/.gitignore +0 -0
  59. {traccuracy-0.4.0 → traccuracy-0.4.2}/.readthedocs.yml +0 -0
  60. {traccuracy-0.4.0 → traccuracy-0.4.2}/LICENSE +0 -0
  61. {traccuracy-0.4.0 → traccuracy-0.4.2}/README.md +0 -0
  62. {traccuracy-0.4.0 → traccuracy-0.4.2}/developer_notes.md +0 -0
  63. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/Makefile +0 -0
  64. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/make.bat +0 -0
  65. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/_static/css/tablefix.css +0 -0
  66. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/cli.md +0 -0
  67. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/conf.py +0 -0
  68. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/examples/ctc.nblink +0 -0
  69. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/glossary.md +0 -0
  70. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/test_cases/errors.md +0 -0
  71. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/test_cases/index.md +0 -0
  72. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/test_cases/larger_examples.md +0 -0
  73. {traccuracy-0.4.0 → traccuracy-0.4.2}/docs/source/test_cases/matchers.md +0 -0
  74. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/ctc.ipynb +0 -0
  75. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask000.tif +0 -0
  76. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask001.tif +0 -0
  77. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask002.tif +0 -0
  78. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask003.tif +0 -0
  79. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask004.tif +0 -0
  80. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask005.tif +0 -0
  81. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask006.tif +0 -0
  82. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask007.tif +0 -0
  83. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask008.tif +0 -0
  84. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask009.tif +0 -0
  85. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask010.tif +0 -0
  86. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask011.tif +0 -0
  87. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask012.tif +0 -0
  88. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask013.tif +0 -0
  89. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask014.tif +0 -0
  90. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask015.tif +0 -0
  91. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask016.tif +0 -0
  92. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask017.tif +0 -0
  93. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask018.tif +0 -0
  94. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask019.tif +0 -0
  95. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask020.tif +0 -0
  96. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask021.tif +0 -0
  97. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask022.tif +0 -0
  98. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask023.tif +0 -0
  99. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask024.tif +0 -0
  100. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask025.tif +0 -0
  101. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask026.tif +0 -0
  102. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask027.tif +0 -0
  103. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask028.tif +0 -0
  104. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask029.tif +0 -0
  105. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask030.tif +0 -0
  106. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask031.tif +0 -0
  107. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask032.tif +0 -0
  108. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask033.tif +0 -0
  109. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask034.tif +0 -0
  110. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask035.tif +0 -0
  111. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask036.tif +0 -0
  112. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask037.tif +0 -0
  113. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask038.tif +0 -0
  114. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask039.tif +0 -0
  115. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask040.tif +0 -0
  116. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask041.tif +0 -0
  117. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask042.tif +0 -0
  118. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask043.tif +0 -0
  119. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask044.tif +0 -0
  120. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask045.tif +0 -0
  121. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask046.tif +0 -0
  122. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask047.tif +0 -0
  123. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask048.tif +0 -0
  124. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask049.tif +0 -0
  125. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask050.tif +0 -0
  126. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask051.tif +0 -0
  127. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask052.tif +0 -0
  128. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask053.tif +0 -0
  129. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask054.tif +0 -0
  130. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask055.tif +0 -0
  131. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask056.tif +0 -0
  132. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask057.tif +0 -0
  133. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask058.tif +0 -0
  134. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask059.tif +0 -0
  135. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask060.tif +0 -0
  136. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask061.tif +0 -0
  137. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask062.tif +0 -0
  138. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask063.tif +0 -0
  139. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask064.tif +0 -0
  140. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask065.tif +0 -0
  141. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask066.tif +0 -0
  142. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask067.tif +0 -0
  143. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask068.tif +0 -0
  144. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask069.tif +0 -0
  145. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask070.tif +0 -0
  146. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask071.tif +0 -0
  147. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask072.tif +0 -0
  148. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask073.tif +0 -0
  149. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask074.tif +0 -0
  150. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask075.tif +0 -0
  151. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask076.tif +0 -0
  152. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask077.tif +0 -0
  153. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask078.tif +0 -0
  154. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask079.tif +0 -0
  155. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask080.tif +0 -0
  156. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask081.tif +0 -0
  157. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask082.tif +0 -0
  158. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask083.tif +0 -0
  159. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask084.tif +0 -0
  160. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask085.tif +0 -0
  161. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask086.tif +0 -0
  162. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask087.tif +0 -0
  163. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask088.tif +0 -0
  164. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask089.tif +0 -0
  165. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask090.tif +0 -0
  166. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask091.tif +0 -0
  167. {traccuracy-0.4.0 → traccuracy-0.4.2}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/res_track.txt +0 -0
  168. {traccuracy-0.4.0 → traccuracy-0.4.2}/scripts/download_test_data.py +0 -0
  169. {traccuracy-0.4.0 → traccuracy-0.4.2}/setup.cfg +0 -0
  170. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/__init__.py +0 -0
  171. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/loaders/__init__.py +0 -0
  172. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/loaders/_ctc.py +0 -0
  173. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/loaders/_point.py +0 -0
  174. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/__init__.py +0 -0
  175. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_base.py +0 -0
  176. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_compute_overlap.py +0 -0
  177. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_ctc.py +0 -0
  178. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_matched.py +0 -0
  179. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/matchers/_point.py +0 -0
  180. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_base.py +0 -0
  181. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_basic.py +0 -0
  182. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_chota.py +0 -0
  183. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_divisions.py +0 -0
  184. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_results.py +0 -0
  185. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/metrics/_track_overlap.py +0 -0
  186. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/track_errors/__init__.py +0 -0
  187. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/track_errors/_basic.py +0 -0
  188. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/track_errors/_ctc.py +0 -0
  189. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy/track_errors/_divisions.py +0 -0
  190. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy.egg-info/dependency_links.txt +0 -0
  191. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy.egg-info/entry_points.txt +0 -0
  192. {traccuracy-0.4.0 → traccuracy-0.4.2}/src/traccuracy.egg-info/top_level.txt +0 -0
  193. {traccuracy-0.4.0/tests/track_errors → traccuracy-0.4.2/tests}/__init__.py +0 -0
  194. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/examples/graphs.py +0 -0
  195. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/examples/larger_examples.py +0 -0
  196. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/examples/segs.py +0 -0
  197. {traccuracy-0.4.0/tests/metrics → traccuracy-0.4.2/tests/loaders}/__init__.py +0 -0
  198. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/loaders/test_ctc.py +0 -0
  199. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/__init__.py +0 -0
  200. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_base.py +0 -0
  201. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_compute_overlap.py +0 -0
  202. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_ctc.py +1 -1
  203. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/matchers/test_point.py +1 -1
  204. {traccuracy-0.4.0/tests/loaders → traccuracy-0.4.2/tests/metrics}/__init__.py +0 -0
  205. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_base.py +0 -0
  206. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_basic.py +1 -1
  207. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_chota.py +0 -0
  208. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_divisions.py +0 -0
  209. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_track_overlap_metrics.py +0 -0
  210. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/metrics/test_weighted_error_sums.py +0 -0
  211. {traccuracy-0.4.0 → traccuracy-0.4.2}/tests/test_cli.py +0 -0
  212. {traccuracy-0.4.0/tests → traccuracy-0.4.2/tests/track_errors}/__init__.py +0 -0
@@ -17,7 +17,7 @@ jobs:
17
17
  name: Report benchmarks on gh-pages
18
18
  runs-on: ubuntu-latest
19
19
  steps:
20
- - uses: actions/checkout@v4
20
+ - uses: actions/checkout@v5
21
21
 
22
22
  - name: Retrieve cached data
23
23
  uses: actions/cache/restore@v4
@@ -40,7 +40,7 @@ jobs:
40
40
  key: ${{ hashFiles('scripts/download_test_data.py') }}
41
41
 
42
42
  - name: Set up Python
43
- uses: actions/setup-python@v5
43
+ uses: actions/setup-python@v6
44
44
  with:
45
45
  python-version: 3.13
46
46
  cache-dependency-path: "pyproject.toml"
@@ -17,7 +17,7 @@ jobs:
17
17
  # check-manifest:
18
18
  # runs-on: ubuntu-latest
19
19
  # steps:
20
- # - uses: actions/checkout@v4
20
+ # - uses: actions/checkout@v5
21
21
  # - run: pipx run check-manifest
22
22
 
23
23
  test:
@@ -30,7 +30,7 @@ jobs:
30
30
  platform: [ubuntu-latest, macos-latest, windows-latest]
31
31
 
32
32
  steps:
33
- - uses: actions/checkout@v4
33
+ - uses: actions/checkout@v5
34
34
 
35
35
  # downloading data, required for CHOTA metric test
36
36
  - name: Retrieve cached data
@@ -54,7 +54,7 @@ jobs:
54
54
  key: ${{ hashFiles('scripts/download_test_data.py') }}
55
55
 
56
56
  - name: Set up Python ${{ matrix.python-version }}
57
- uses: actions/setup-python@v5
57
+ uses: actions/setup-python@v6
58
58
  with:
59
59
  python-version: ${{ matrix.python-version }}
60
60
  cache-dependency-path: "pyproject.toml"
@@ -78,7 +78,7 @@ jobs:
78
78
  runs-on: ubuntu-latest
79
79
 
80
80
  steps:
81
- - uses: actions/checkout@v4
81
+ - uses: actions/checkout@v5
82
82
 
83
83
  - name: Retrieve cached data
84
84
  uses: actions/cache/restore@v4
@@ -101,7 +101,7 @@ jobs:
101
101
  key: ${{ hashFiles('scripts/download_test_data.py') }}
102
102
 
103
103
  - name: Set up Python 3.13
104
- uses: actions/setup-python@v5
104
+ uses: actions/setup-python@v6
105
105
  with:
106
106
  python-version: "3.13"
107
107
  cache-dependency-path: "pyproject.toml"
@@ -123,7 +123,7 @@ jobs:
123
123
  if: github.event_name == 'pull_request'
124
124
 
125
125
  steps:
126
- - uses: actions/checkout@v4
126
+ - uses: actions/checkout@v5
127
127
  with:
128
128
  fetch-depth: 50 # this is to make sure we obtain the target base commit
129
129
 
@@ -148,7 +148,7 @@ jobs:
148
148
  key: ${{ hashFiles('scripts/download_test_data.py') }}
149
149
 
150
150
  - name: Set up Python
151
- uses: actions/setup-python@v5
151
+ uses: actions/setup-python@v6
152
152
  with:
153
153
  python-version: 3.13
154
154
  cache-dependency-path: "pyproject.toml"
@@ -200,10 +200,10 @@ jobs:
200
200
  if: github.event_name == 'pull_request'
201
201
 
202
202
  steps:
203
- - uses: actions/checkout@v4
203
+ - uses: actions/checkout@v5
204
204
 
205
205
  - name: Set up Python 3.13
206
- uses: actions/setup-python@v5
206
+ uses: actions/setup-python@v6
207
207
  with:
208
208
  python-version: "3.13"
209
209
  cache-dependency-path: "pyproject.toml"
@@ -249,10 +249,10 @@ jobs:
249
249
  runs-on: ubuntu-latest
250
250
 
251
251
  steps:
252
- - uses: actions/checkout@v4
252
+ - uses: actions/checkout@v5
253
253
 
254
254
  - name: Set up Python
255
- uses: actions/setup-python@v5
255
+ uses: actions/setup-python@v6
256
256
  with:
257
257
  python-version: "3.x"
258
258
 
@@ -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.12.7
13
+ rev: v0.13.3
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.17.1
25
+ rev: v1.18.2
26
26
  hooks:
27
27
  - id: mypy
28
28
  files: "^src/"
@@ -32,3 +32,4 @@ repos:
32
32
  - scipy-stubs
33
33
  - pandas-stubs
34
34
  - types-tqdm
35
+ - geff
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: traccuracy
3
- Version: 0.4.0
3
+ Version: 0.4.2
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
@@ -32,7 +32,7 @@ Requires-Dist: numba
32
32
  Requires-Dist: pyarrow
33
33
  Requires-Dist: scipy
34
34
  Requires-Dist: skan>=0.13
35
- Requires-Dist: geff>=0.5.0
35
+ Requires-Dist: geff>=1.0
36
36
  Provides-Extra: test
37
37
  Requires-Dist: pytest>=6.0; extra == "test"
38
38
  Requires-Dist: pytest-cov; extra == "test"
@@ -58,6 +58,7 @@ Requires-Dist: jupytext<2,>=1.16.7; extra == "docs"
58
58
  Requires-Dist: nbsphinx-link==1.3.0; extra == "docs"
59
59
  Requires-Dist: nbsphinx==0.9.3; extra == "docs"
60
60
  Requires-Dist: docutils==0.20.*; extra == "docs"
61
+ Requires-Dist: astroid<4.0; extra == "docs"
61
62
  Provides-Extra: covreport
62
63
  Requires-Dist: traccuracy[test]; extra == "covreport"
63
64
  Requires-Dist: seaborn; extra == "covreport"
@@ -31,11 +31,13 @@ track_errors/ctc
31
31
  :hidden: true
32
32
  :maxdepth: 2
33
33
 
34
+ metrics/metrics
34
35
  metrics/basic
35
36
  metrics/ctc
36
37
  metrics/track_overlap
37
38
  metrics/divisions
38
39
  metrics/chota
40
+ metrics/complete_tracks
39
41
  ```
40
42
 
41
43
  ```{toctree}
@@ -0,0 +1,28 @@
1
+ # Matchers Overview
2
+
3
+ The first step in comparing a ground truth and predicted graph is computing a matching
4
+ between the two graphs. Currently, traccuracy represents a matching between graphs
5
+ as a matching between the nodes of the graphs - edges are considered matched if the
6
+ endpoints of the edge are matched. Traccuracy supports four types of matchings, depending
7
+ on how many nodes in one graph can be matched to one node in the other graph:
8
+
9
+ * `one-to-one`: every node can be matched to at most one node in the other graph
10
+ * `many-to-one`: many ground truth nodes may be matched to one predicted node
11
+ * `one-to-many`: one ground truth node may be matched to many predicted nodes
12
+ * `many-to-many`: anything goes! (no implemented metrics support many-to-many at this time)
13
+
14
+ Many metrics only operate on one-to-one matchings, or support at most one of the "many"
15
+ mappings. Matchers can operate on the segmentation or directly on the point locations.
16
+ Below is a table summarizing the implemented matchers, what types of matchings
17
+ they can produce, and a brief description of behavior and any hyperparameters.
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
+
23
+ | Matcher | Matching Type(s) | Description |
24
+ ----------|------------------|-------------
25
+ | [Point](traccuracy.matchers.PointMatcher) | `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. |
26
+ | [Point to Seg](traccuracy.matchers.PointSegMatcher)| `one-to-one`, `many-to-one`, `one-to-many` | Given one dataset with segmentation data, this matcher will match nodes from the points-only graph to nodes from the segmentation graph if and only if the point location is within the the segmentation label. |
27
+ | [IOU](traccuracy.matchers.IOUMatcher) | `one-to-one`, `many-to-one`, `one-to-many` | Given a minimum overlap threshold, will match the segmentations in each frame of the ground truth and predicted tracks with intersection-over-union greater than or equal to the given threshold. If the one-to-one flag is true, will produce a one-to-one matching by running linear assignment/hungarian matching on the thresholded iou array. |
28
+ | [CTC](traccuracy.matchers.CTCMatcher) | `one-to-one`, `many-to-one` | A predicted node is matched to a reference node if the computed segmentation covers a majority of the reference segmentation. See https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144959 for complete details. |
@@ -1,3 +1,4 @@
1
+ (basic-metrics)=
1
2
  # Basic Performance Metrics
2
3
 
3
4
  Basic performance metrics are computed based on the error classifications described in {doc}`../track_errors/basic`.
@@ -1,3 +1,4 @@
1
+ (chota-metric)=
1
2
  # CHOTA Metric
2
3
 
3
4
  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].
@@ -0,0 +1,65 @@
1
+ (complete-tracks)=
2
+ # Complete Tracklets and Lineages
3
+
4
+ Complete tracklets and lineages report the fraction of {term}`tracklets <tracklet>` and {term}`lineages <lineage>` that are completely correctly reconstructed.
5
+
6
+ This metric is an extension of the CTC-BIO metric "Complete Tracks" as defined in *Maška, M., Ulman, V., Delgado-Rodriguez, P. et al. The Cell Tracking Challenge: 10 years of objective benchmarking. Nat Methods 20, 1010–1020 (2023). https://doi.org/10.1038/s41592-023-01879-y*:
7
+ > Complete tracks (CT) measures the fraction of reference cell tracks that a given method
8
+ can reconstruct entirely from the frame in which they appear to the frame in which they disappear. CT is especially relevant when a perfect
9
+ reconstruction of the cell lineages is required.
10
+
11
+ While cell lineages are mentioned in this definition, the reference implementation in [`py-ctcmetrics`](https://github.com/CellTrackingChallenge/py-ctcmetrics) appears to only consider tracklets. We provide both numbers.
12
+
13
+ If the predicted lineage continues beyond the start or end of a ground truth lineage, this is *not*
14
+ counted as incorrect, nor are false positive tracks penalized, making this metric suitable
15
+ for evaluating with sparse ground truth annotations. If a False Positive Division occurs within the ground truth track (or, for the CTC
16
+ errors, a wrong semantic edge), this *is* counted as incorrect.
17
+
18
+ Complete tracklets and lineages can be computed with either the [basic](basic-errors) and
19
+ [division errors](division-errors) or the [CTC errors](ctc-errors) as follows:
20
+
21
+ ```python
22
+ from traccuracy.matchers import PointMatcher, CTCMatcher
23
+ from traccuracy.metrics import CompleteTracks
24
+
25
+ # Data loaded using a function from traccuracy.loaders or constructed explicitly using a networkx graph and associated information
26
+ gt_data: TrackingGraph
27
+ pred_data: TrackingGraph
28
+
29
+ # using the basic errors
30
+ results, matched = run_metrics(
31
+ gt_data=gt_data,
32
+ pred_data=pred_data,
33
+ matcher=PointMatcher(), # Choose a matcher that produces a one-to-one mapping
34
+ metrics=[CompleteTracks(error_type="basic")]
35
+ )
36
+
37
+ # or using the ctc errors
38
+ results, matched = run_metrics(
39
+ gt_data=gt_data,
40
+ pred_data=pred_data,
41
+ matcher=CTCMatcher(),
42
+ metrics=[CompleteTracks(error_type="ctc")]
43
+ )
44
+ ```
45
+ The `results` object contains a dictionary `results.results` that stores all values associated with the metric:
46
+
47
+ - `total_lineages` - the number of connected components in the ground truth graph
48
+ - `correct_lineages` - the number of fully correct connected components
49
+ - `complete_lineages` - `correct_lineages` / `total_lineages`, or `np.nan` if
50
+ `total_lineages` is 0
51
+ - `total_tracklets` - the number of tracklets in the ground truth graph, defined
52
+ as the connected components of the graph after division edges are removed.
53
+ Division edges are not included in the tracklets, or counted at all
54
+ in the tracklet metrics.
55
+ - `correct_tracklets` - the number of fully correct tracklets
56
+ - `complete_tracklets` - `correct_tracklets` / `total_tracklets`, or `np.nan` if
57
+ `total_tracklets` is 0
58
+
59
+ When using basic error annotations, complete tracklets and lineages also supports
60
+ relaxing {term}`skip edges` on the ground truth and/or the prediction graph.
61
+ If skip edges are relaxed in one graph, then skip true positive edges in the other graph are
62
+ counted as correct, along with nodes between the skip true positive edges in that graph.
63
+
64
+ Correct tracks can easily be extended to other types of error annotations in the future
65
+ by providing a definition of what is "correct" and "incorrect" on the graph.
@@ -1,3 +1,4 @@
1
+ (ctc-metrics)=
1
2
  # CTC/AOGM Metrics
2
3
 
3
4
  These metrics are an implementation of the Cell Segmentation & Tracking Challenge TRA and DET metrics,
@@ -162,6 +163,7 @@ div_results = DivisionMetrics(max_frame_buffer=0).compute(gt_data, pred_data)
162
163
  branching_correctness = div_results.results["Division F1"]
163
164
  ```
164
165
 
166
+ (cca)=
165
167
  ### Cell Cycle Accuracy (CCA)
166
168
 
167
169
  The CCA metric captures the ability of a method to identify a distribution of cell
@@ -1,3 +1,4 @@
1
+ (division-metrics)=
1
2
  # Division Metrics
2
3
 
3
4
  Division metrics are computed using the annotations described in {doc}`../track_errors/divisions`.
@@ -0,0 +1,29 @@
1
+ # Metrics Overview
2
+
3
+ After matching ground truth and predicted graphs, metrics can be computed on the matched graphs.
4
+ Matched graphs have one of the following matching types:
5
+
6
+ * `one-to-one`: every node can be matched to at most one node in the other graph
7
+ * `many-to-one`: many ground truth nodes may be matched to one predicted node
8
+ * `one-to-many`: one ground truth node may be matched to many predicted nodes
9
+ * `many-to-many`: anything goes! (no implemented metrics support many-to-many at this time)
10
+
11
+ Each metric supports one or more of these matching types.
12
+ Below is a table summarizing the implemented metrics, what types of matchings
13
+ they can accept, and a brief description of behavior and any hyperparameters.
14
+
15
+ Many metrics support relaxing skip edges for the ground truth and/or the prediction. Relaxing a skip edge means allowing one edge that spans multiple frames to match multiple edges in the other graph, thus potentially reducing the number of errors.
16
+
17
+ :::{warning}
18
+ Unless otherwise noted, metrics are written assuming that you have dense ground truth annotations. The results on sparse annotations may be unpredictable and should be interpreted cautiously.
19
+ :::
20
+
21
+ | Metric category | Matching Type(s) | Description |
22
+ ------------------|------------------|-------------
23
+ | [Basic Metrics](basic-metrics): TP, FP, and FN nodes and edges | `one-to-one` | Counts the number of **true positive** (matched) nodes and edges, **false positive** (unmatched in the prediction) nodes and edges, and **false negative** (unmatched in the ground truth) nodes and edges. |
24
+ | [Division metrics](division-metrics): TP, FP, and FN divisions and F1 score/Branching Correctness (BC) | `one-to-one` | Counts the number of **true positive** (matched) divisions, **false positive** (unmatched in the prediction) divisions, and **false negative** (unmatched in the ground truth) divisions. Then computes the division **F1-Score**, also called **Branching Correctness** by the CTC-Bio metrics. Has a `max_frame_buffer` parameter that allows counting divisions as correct within `max_frame_buffer` frames as long as the parent and children match within the buffer|
25
+ | [CTC Metrics](ctc-metrics): DET, LNK, TRA | `one-to-one`, `many-to-one` | A set of three metrics between 0 and 1, with higher scores indicating better performance. DET measures node errors, LNK measures linking errors, and TRA combines detection and linking errors. |
26
+ | [Cell Cycle Accuracy (CCA)](cca)| `one-to-one`, `many-to-one`| One of the CTC-Bio metrics. Measures the ability of a method to identify a distribution of cell cycle lengths that matches the distribution present in the ground truth.|
27
+ | [Complete Tracklets and Lineages](complete-tracks) | `one-to-one`, `many-to-one`| Extends the "Complete Tracks" from the CTC-Bio metrics. Measures the fraction of tracklets and lineages that are fully correct in the prediction.|
28
+ | [Track Overlap Metrics](track-overlap-metrics): Track Purity (TP), Target Effectiveness (TE), Track Fractions (TF) | `one-to-one`, `many-to-one` , `one-to-many`| A set of metrics that compute the maximum overlap for each track, where track is defined as the region between divisions. Target effectiveness (TE) measures how much of each ground truth track is covered by the most overlapping predicted track, weighted by track length. Track Purity (TP) is the inverse of TE, and Track Fractions (TF) is the unwighted average of TE. |
29
+ | [Cell-specific Higher Order Tracking Accuracy (CHOTA)](chota-metric) |`one-to-one`, `many-to-one`, `one-to-many`, `many-to-many` | A metric between 0 and 1 that unifies local correctness, global coherence, and lineage tracking. Higher scores are better.|
@@ -1,7 +1,8 @@
1
+ (track-overlap-metrics)=
1
2
  # Track Overlap Metrics
2
3
 
3
4
  The track overlap metrics include Track Purity (TP) and Target Effectiveness (TE), as defined in Bise et al., 2011[^1], Chen, 2021[^2], and Fukai et al., 2023[^3]. Track overlap metrics are computed for tracks as a whole, but in the case of divisions, each region between divisions is considered its own track. There is a single hyperparameter, `include_division_edges`; if `True`, edges immediately following a division are included in the subsequent tracks, such that the parent node is duplicated. If `False`, the edges immediately following divisions are not included at all.
4
- The length of a track is the number of edges included in it, not the number of time frames it spans (this is different if considering connected components with divisions as tracks). Singleton nodes are ignored in these metrics.
5
+ The length of a track is the number of edges included in it, not the number of time frames it spans. Singleton nodes are ignored in these metrics.
5
6
 
6
7
  :::{warning}
7
8
  If you have sparse ground truth annotations, target effectiveness and track fractions will still accurately represent your ability to reconstruct the ground truth. Track purity should not be interpreted as any predicted tracks not present in the ground truth will be fully penalized.
@@ -94,6 +94,10 @@ def plot_matched(examples, title):
94
94
  fig.suptitle(title, y=1.05)
95
95
  ```
96
96
 
97
+ ```{code-cell} ipython3
98
+ plot_matched([ex_graphs.empty_pred_div(1), ex_graphs.empty_gt_div(1)], "Empty Divisions")
99
+ ```
100
+
97
101
  ```{code-cell} ipython3
98
102
  plot_matched([ex_graphs.good_div(t) for t in [0, 1, 2]], "Correct Divisions")
99
103
  ```
@@ -3,6 +3,7 @@ file_format: mystnb
3
3
  mystnb:
4
4
  remove_code_source: True
5
5
  ---
6
+ (basic-errors)=
6
7
  # Basic Errors
7
8
 
8
9
  This set of node and edge errors applies only to graphs with a one-to-one matching.
@@ -3,6 +3,7 @@ file_format: mystnb
3
3
  mystnb:
4
4
  remove_code_source: True
5
5
  ---
6
+ (ctc-errors)=
6
7
  # CTC Errors
7
8
 
8
9
  These node and edge error annotations are used to calculate the CTC metrics TRA and DET as well as the basic AOGM metric as described in {doc}`../metrics/ctc`.
@@ -3,6 +3,7 @@ file_format: mystnb
3
3
  mystnb:
4
4
  remove_code_source: True
5
5
  ---
6
+ (division-errors)=
6
7
  # Division Errors
7
8
 
8
9
  Note: These flags are annotated on the parent nodes.
@@ -43,7 +43,7 @@ dependencies = [
43
43
  "pyarrow",
44
44
  "scipy",
45
45
  "skan>=0.13",
46
- "geff>=0.5.0"
46
+ "geff>=1.0"
47
47
  ]
48
48
 
49
49
  # extras
@@ -75,7 +75,8 @@ docs = [
75
75
  "jupytext >=1.16.7, <2",
76
76
  "nbsphinx-link==1.3.0",
77
77
  "nbsphinx==0.9.3",
78
- "docutils==0.20.*"
78
+ "docutils==0.20.*",
79
+ "astroid<4.0" # build issues popped up after 4.0 release
79
80
  ]
80
81
  covreport = [
81
82
  "traccuracy[test]",
@@ -111,7 +112,7 @@ test = "pytest"
111
112
  benchmark = { cmd = "pytest tests/bench.py", depends-on = ["getdata"] }
112
113
 
113
114
  [tool.pixi.feature.covreport.tasks]
114
- test-case-report = "python scripts/test_case_report.py test-case-report && rm matchers*.json track_errors*.json"
115
+ test-case-report = "python scripts/test_case_report.py test-case-report && rm matchers*.json track_errors*.json metrics*.json"
115
116
 
116
117
  [tool.pixi.feature.docs.tasks]
117
118
  kernel-config = { cmd = "python -m ipykernel install --user --name=\"traccuracy-docs\""}
@@ -206,6 +207,7 @@ disallow_subclassing_any = false
206
207
  show_error_codes = true
207
208
  pretty = true
208
209
  disallow_untyped_defs = true
210
+ plugins = ['pydantic.mypy']
209
211
 
210
212
  [[tool.mypy.overrides]]
211
213
  module = ["numba"]
@@ -28,6 +28,8 @@ SKIP_FUNCTIONS = [
28
28
  "make_split_cell_3d",
29
29
  "nodes_from_segmentation",
30
30
  "sphere",
31
+ "SegmentationData.__init__",
32
+ "all_basic_errors", # Used for testing metrics
31
33
  ]
32
34
  # Ungrouped functions will be displayed in a separate section, but should be added here eventually
33
35
  GROUPS = {
@@ -76,6 +78,10 @@ GROUPS = {
76
78
  "gap_close_offset",
77
79
  "div_parent_gap",
78
80
  "div_daughter_gap",
81
+ "gap_close_two_to_one",
82
+ "div_daughter_dual_gap",
83
+ "div_parent_daughter_gap",
84
+ "div_shifted_one_side_skip",
79
85
  ],
80
86
  },
81
87
  "matchers": {
@@ -99,6 +105,7 @@ GROUPS = {
99
105
  ],
100
106
  },
101
107
  }
108
+ GROUPS["metrics"] = GROUPS["track_errors"]
102
109
 
103
110
 
104
111
  def run_coverage(test_target: str, ex_module: str):
@@ -218,7 +225,7 @@ def plot_heatmap(df: pd.DataFrame, name: str, ax: Axes, groups: dict[str, list[s
218
225
 
219
226
  if __name__ == "__main__":
220
227
  output_name = sys.argv[1]
221
- param_sets = [("track_errors", "graphs"), ("matchers", "segs")]
228
+ param_sets = [("track_errors", "graphs"), ("matchers", "segs"), ("metrics", "graphs")]
222
229
 
223
230
  dfs, maxcols, maxrows = [], [], []
224
231
  for name, target_mod in param_sets:
@@ -15,6 +15,8 @@ def run_metrics(
15
15
  pred_data: TrackingGraph,
16
16
  matcher: Matcher,
17
17
  metrics: list[Metric],
18
+ relax_skips_gt: bool = False,
19
+ relax_skips_pred: bool = False,
18
20
  ) -> tuple[list[dict], Matched]:
19
21
  """Compute given metrics on data using the given matcher.
20
22
 
@@ -28,6 +30,10 @@ def run_metrics(
28
30
  matcher (traccuracy.matchers._base.Matcher): instantiated matcher object
29
31
  metrics (List[traccuracy.metrics._base.Metric]): list of instantiated metrics objects
30
32
  to compute
33
+ relax_skips_gt (bool): If True, the metric will check if skips in the ground truth
34
+ graph have an equivalent multi-edge path in predicted graph
35
+ relax_skips_pred (bool): If True, the metric will check if skips in the predicted
36
+ graph have an equivalent multi-edge path in ground truth graph
31
37
 
32
38
  Returns:
33
39
  List[Dict]: List of dictionaries with one dictionary per Metric object
@@ -45,6 +51,8 @@ def run_metrics(
45
51
  matched = matcher.compute_mapping(gt_data, pred_data)
46
52
  results = []
47
53
  for _metric in metrics:
48
- result = _metric.compute(matched)
54
+ result = _metric.compute(
55
+ matched, relax_skips_gt=relax_skips_gt, relax_skips_pred=relax_skips_pred
56
+ )
49
57
  results.append(result.to_dict())
50
58
  return results, matched