traccuracy 0.0.2__tar.gz → 0.1.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.
Files changed (187) hide show
  1. traccuracy-0.0.2/.github/ISSUE_TEMPLATE.md → traccuracy-0.1.0/.github/ISSUE_TEMPLATE/bugs.md +16 -2
  2. traccuracy-0.1.0/.github/ISSUE_TEMPLATE/features.md +36 -0
  3. traccuracy-0.1.0/.github/PULL_REQUEST_TEMPLATE/new_matcher_metric.md +18 -0
  4. traccuracy-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +32 -0
  5. traccuracy-0.1.0/.github/workflows/benchmark-pr.py +49 -0
  6. traccuracy-0.1.0/.github/workflows/benchmark-report.yml +45 -0
  7. traccuracy-0.1.0/.github/workflows/ci.yml +140 -0
  8. {traccuracy-0.0.2 → traccuracy-0.1.0}/.pre-commit-config.yaml +10 -5
  9. {traccuracy-0.0.2 → traccuracy-0.1.0}/.readthedocs.yml +4 -0
  10. traccuracy-0.1.0/PKG-INFO +114 -0
  11. traccuracy-0.1.0/README.md +58 -0
  12. traccuracy-0.0.2/README.md → traccuracy-0.1.0/developer_notes.md +7 -19
  13. traccuracy-0.1.0/docs/source/cli.rst +6 -0
  14. {traccuracy-0.0.2 → traccuracy-0.1.0}/docs/source/conf.py +5 -3
  15. {traccuracy-0.0.2 → traccuracy-0.1.0}/docs/source/index.rst +4 -2
  16. traccuracy-0.1.0/examples/ctc.ipynb +285 -0
  17. {traccuracy-0.0.2 → traccuracy-0.1.0}/pyproject.toml +38 -26
  18. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy/__init__.py +3 -4
  19. traccuracy-0.1.0/src/traccuracy/_run_metrics.py +45 -0
  20. traccuracy-0.1.0/src/traccuracy/_tracking_graph.py +492 -0
  21. traccuracy-0.1.0/src/traccuracy/_utils.py +18 -0
  22. traccuracy-0.1.0/src/traccuracy/cli.py +259 -0
  23. traccuracy-0.1.0/src/traccuracy/loaders/__init__.py +10 -0
  24. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy/loaders/_ctc.py +93 -28
  25. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy/matchers/__init__.py +4 -3
  26. traccuracy-0.1.0/src/traccuracy/matchers/_base.py +104 -0
  27. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy/matchers/_compute_overlap.py +29 -5
  28. traccuracy-0.1.0/src/traccuracy/matchers/_ctc.py +127 -0
  29. traccuracy-0.1.0/src/traccuracy/matchers/_iou.py +162 -0
  30. traccuracy-0.1.0/src/traccuracy/metrics/__init__.py +5 -0
  31. traccuracy-0.1.0/src/traccuracy/metrics/_base.py +115 -0
  32. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy/metrics/_ctc.py +17 -21
  33. traccuracy-0.1.0/src/traccuracy/metrics/_divisions.py +128 -0
  34. traccuracy-0.1.0/src/traccuracy/metrics/_track_overlap.py +130 -0
  35. traccuracy-0.1.0/src/traccuracy/track_errors/__init__.py +2 -0
  36. traccuracy-0.1.0/src/traccuracy/track_errors/_ctc.py +152 -0
  37. traccuracy-0.1.0/src/traccuracy/track_errors/divisions.py +271 -0
  38. traccuracy-0.1.0/src/traccuracy.egg-info/PKG-INFO +114 -0
  39. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy.egg-info/SOURCES.txt +17 -6
  40. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy.egg-info/requires.txt +11 -7
  41. traccuracy-0.1.0/tests/bench.py +161 -0
  42. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/loaders/test_ctc.py +2 -5
  43. traccuracy-0.1.0/tests/matchers/test_base.py +36 -0
  44. traccuracy-0.1.0/tests/matchers/test_ctc.py +48 -0
  45. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/matchers/test_iou.py +43 -21
  46. traccuracy-0.1.0/tests/metrics/test_ctc_metrics.py +19 -0
  47. traccuracy-0.1.0/tests/metrics/test_divisions.py +31 -0
  48. traccuracy-0.1.0/tests/metrics/test_track_overlap_metrics.py +189 -0
  49. traccuracy-0.1.0/tests/test_run_metrics.py +70 -0
  50. traccuracy-0.1.0/tests/test_tracking_graph.py +271 -0
  51. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/test_utils.py +46 -1
  52. traccuracy-0.1.0/tests/track_errors/test_ctc_errors.py +136 -0
  53. traccuracy-0.1.0/tests/track_errors/test_divisions.py +222 -0
  54. traccuracy-0.0.2/.github/workflows/ci.yml +0 -80
  55. traccuracy-0.0.2/PKG-INFO +0 -83
  56. traccuracy-0.0.2/examples/ctc.ipynb +0 -274
  57. traccuracy-0.0.2/src/traccuracy/_run_metrics.py +0 -55
  58. traccuracy-0.0.2/src/traccuracy/_tracking_data.py +0 -24
  59. traccuracy-0.0.2/src/traccuracy/_tracking_graph.py +0 -315
  60. traccuracy-0.0.2/src/traccuracy/_utils.py +0 -59
  61. traccuracy-0.0.2/src/traccuracy/cli.py +0 -276
  62. traccuracy-0.0.2/src/traccuracy/loaders/__init__.py +0 -10
  63. traccuracy-0.0.2/src/traccuracy/matchers/_ctc.py +0 -191
  64. traccuracy-0.0.2/src/traccuracy/matchers/_iou.py +0 -127
  65. traccuracy-0.0.2/src/traccuracy/matchers/_matched.py +0 -32
  66. traccuracy-0.0.2/src/traccuracy/metrics/__init__.py +0 -4
  67. traccuracy-0.0.2/src/traccuracy/metrics/_base.py +0 -40
  68. traccuracy-0.0.2/src/traccuracy/metrics/_divisions.py +0 -380
  69. traccuracy-0.0.2/src/traccuracy/track_errors/__init__.py +0 -5
  70. traccuracy-0.0.2/src/traccuracy/track_errors/_ctc.py +0 -182
  71. traccuracy-0.0.2/src/traccuracy/track_errors/_division_events.py +0 -81
  72. traccuracy-0.0.2/src/traccuracy/track_errors/_track_events.py +0 -96
  73. traccuracy-0.0.2/src/traccuracy.egg-info/PKG-INFO +0 -83
  74. traccuracy-0.0.2/tests/matchers/test_ctc.py +0 -91
  75. traccuracy-0.0.2/tests/metrics/test_ctc_metrics.py +0 -24
  76. traccuracy-0.0.2/tests/metrics/test_divisions.py +0 -297
  77. traccuracy-0.0.2/tests/test_tracking_graph.py +0 -200
  78. traccuracy-0.0.2/tests/track_errors/test_ctc_errors.py +0 -129
  79. {traccuracy-0.0.2 → traccuracy-0.1.0}/.github/dependabot.yml +0 -0
  80. {traccuracy-0.0.2 → traccuracy-0.1.0}/.gitignore +0 -0
  81. {traccuracy-0.0.2 → traccuracy-0.1.0}/LICENSE +0 -0
  82. {traccuracy-0.0.2 → traccuracy-0.1.0}/docs/Makefile +0 -0
  83. {traccuracy-0.0.2 → traccuracy-0.1.0}/docs/make.bat +0 -0
  84. {traccuracy-0.0.2 → traccuracy-0.1.0}/docs/source/examples/ctc.nblink +0 -0
  85. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask000.tif +0 -0
  86. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask001.tif +0 -0
  87. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask002.tif +0 -0
  88. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask003.tif +0 -0
  89. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask004.tif +0 -0
  90. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask005.tif +0 -0
  91. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask006.tif +0 -0
  92. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask007.tif +0 -0
  93. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask008.tif +0 -0
  94. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask009.tif +0 -0
  95. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask010.tif +0 -0
  96. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask011.tif +0 -0
  97. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask012.tif +0 -0
  98. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask013.tif +0 -0
  99. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask014.tif +0 -0
  100. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask015.tif +0 -0
  101. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask016.tif +0 -0
  102. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask017.tif +0 -0
  103. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask018.tif +0 -0
  104. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask019.tif +0 -0
  105. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask020.tif +0 -0
  106. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask021.tif +0 -0
  107. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask022.tif +0 -0
  108. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask023.tif +0 -0
  109. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask024.tif +0 -0
  110. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask025.tif +0 -0
  111. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask026.tif +0 -0
  112. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask027.tif +0 -0
  113. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask028.tif +0 -0
  114. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask029.tif +0 -0
  115. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask030.tif +0 -0
  116. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask031.tif +0 -0
  117. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask032.tif +0 -0
  118. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask033.tif +0 -0
  119. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask034.tif +0 -0
  120. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask035.tif +0 -0
  121. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask036.tif +0 -0
  122. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask037.tif +0 -0
  123. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask038.tif +0 -0
  124. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask039.tif +0 -0
  125. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask040.tif +0 -0
  126. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask041.tif +0 -0
  127. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask042.tif +0 -0
  128. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask043.tif +0 -0
  129. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask044.tif +0 -0
  130. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask045.tif +0 -0
  131. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask046.tif +0 -0
  132. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask047.tif +0 -0
  133. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask048.tif +0 -0
  134. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask049.tif +0 -0
  135. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask050.tif +0 -0
  136. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask051.tif +0 -0
  137. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask052.tif +0 -0
  138. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask053.tif +0 -0
  139. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask054.tif +0 -0
  140. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask055.tif +0 -0
  141. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask056.tif +0 -0
  142. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask057.tif +0 -0
  143. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask058.tif +0 -0
  144. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask059.tif +0 -0
  145. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask060.tif +0 -0
  146. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask061.tif +0 -0
  147. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask062.tif +0 -0
  148. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask063.tif +0 -0
  149. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask064.tif +0 -0
  150. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask065.tif +0 -0
  151. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask066.tif +0 -0
  152. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask067.tif +0 -0
  153. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask068.tif +0 -0
  154. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask069.tif +0 -0
  155. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask070.tif +0 -0
  156. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask071.tif +0 -0
  157. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask072.tif +0 -0
  158. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask073.tif +0 -0
  159. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask074.tif +0 -0
  160. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask075.tif +0 -0
  161. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask076.tif +0 -0
  162. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask077.tif +0 -0
  163. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask078.tif +0 -0
  164. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask079.tif +0 -0
  165. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask080.tif +0 -0
  166. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask081.tif +0 -0
  167. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask082.tif +0 -0
  168. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask083.tif +0 -0
  169. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask084.tif +0 -0
  170. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask085.tif +0 -0
  171. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask086.tif +0 -0
  172. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask087.tif +0 -0
  173. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask088.tif +0 -0
  174. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask089.tif +0 -0
  175. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask090.tif +0 -0
  176. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask091.tif +0 -0
  177. {traccuracy-0.0.2 → traccuracy-0.1.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/res_track.txt +0 -0
  178. {traccuracy-0.0.2 → traccuracy-0.1.0}/setup.cfg +0 -0
  179. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy.egg-info/dependency_links.txt +0 -0
  180. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy.egg-info/entry_points.txt +0 -0
  181. {traccuracy-0.0.2 → traccuracy-0.1.0}/src/traccuracy.egg-info/top_level.txt +0 -0
  182. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/__init__.py +0 -0
  183. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/loaders/__init__.py +0 -0
  184. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/matchers/__init__.py +0 -0
  185. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/metrics/__init__.py +0 -0
  186. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/metrics/test_weighted_error_sums.py +0 -0
  187. {traccuracy-0.0.2 → traccuracy-0.1.0}/tests/track_errors/__init__.py +0 -0
@@ -1,15 +1,29 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
1
10
  * traccuracy version:
2
11
  * Python version:
3
12
  * Operating System:
4
13
 
5
- ### Description
14
+ # Description
6
15
 
7
16
  Describe what you were trying to get done.
8
17
  Tell us what happened, what went wrong, and what you expected to happen.
9
18
 
10
- ### What I Did
19
+ # Minimal example to reproduce the bug
11
20
 
12
21
  ```
13
22
  Paste the command(s) you ran and the output.
14
23
  If there was a crash, please include the traceback here.
15
24
  ```
25
+
26
+ # Severity
27
+ - [ ] Unusable
28
+ - [ ] Annoying, but still functional
29
+ - [ ] Very minor
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Feature
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ # Description
11
+
12
+ Please describe the feature that you would like to see implemented in `traccuracy`.
13
+
14
+ # Topics
15
+
16
+ What types of changes are you suggesting? Put an x in the boxes that apply.
17
+ - [ ] New feature or enhancement
18
+ - [ ] Documentation update
19
+ - [ ] Tests and benchmarks
20
+ - [ ] Maintenance (e.g. dependencies, CI, releases, etc.)
21
+
22
+ Which topics does your change affect? Put an x in the boxes that apply.
23
+ - [ ] Loaders
24
+ - [ ] Matchers
25
+ - [ ] Track Errors
26
+ - [ ] Metrics
27
+ - [ ] Core functionality (e.g. `TrackingGraph`, `run_metrics`, `cli`, etc.)
28
+
29
+ # Priority
30
+ - [ ] This is an essential feature
31
+ - [ ] Nice to have
32
+ - [ ] Future idea
33
+
34
+ # Are you interested in contributing?
35
+ - [ ] Yes! :tada:
36
+ - [ ] No :slightly_frowning_face:
@@ -0,0 +1,18 @@
1
+ # Proposed Matcher or Metric Addition
2
+ - [ ] Matcher
3
+ - [ ] Metric
4
+
5
+ Briefly describe your new Matcher or Metric class, including links to publication or other source code if relevant. A full description should be included in the documentation. If it resolves a feature request, be sure to link to that issue.
6
+
7
+ # Checklist
8
+ Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
9
+
10
+ - [ ] I have read the developer/contributing docs.
11
+ - [ ] I have added tests that prove that my feature works in various situations.
12
+ - [ ] I have checked that I maintained or improved code coverage.
13
+ - [ ] I have added benchmarking functions for my change `tests/bench.py`.
14
+ - [ ] I have added a page to the documentation with a complete description of my matcher/metric including any references.
15
+ - [ ] I have written docstrings and checked that they render correctly in the Read The Docs build (created after the PR is opened).
16
+
17
+ # Further Comments
18
+ If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
@@ -0,0 +1,32 @@
1
+ If you are implementing a new matcher or metric, please append this `&template=new_matcher_metric.md` to your url to load the correct template.
2
+
3
+ # Proposed Change
4
+ Briefly describe the contribution. If it resolves an issue or feature request, be sure to link to that issue.
5
+
6
+ # Types of Changes
7
+ What types of changes does your code introduce? Put an x in the boxes that apply.
8
+ - [ ] Bugfix (non-breaking change which fixes an issue)
9
+ - [ ] New feature or enhancement
10
+ - [ ] Documentation update
11
+ - [ ] Tests and benchmarks
12
+ - [ ] Maintenance (e.g. dependencies, CI, releases, etc.)
13
+
14
+ Which topics does your change affect? Put an x in the boxes that apply.
15
+ - [ ] Loaders
16
+ - [ ] Matchers
17
+ - [ ] Track Errors
18
+ - [ ] Metrics
19
+ - [ ] Core functionality (e.g. `TrackingGraph`, `run_metrics`, `cli`, etc.)
20
+
21
+ # Checklist
22
+ Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
23
+
24
+ - [ ] I have read the developer/contributing docs.
25
+ - [ ] I have added tests that prove that my feature works in various situations or tests the bugfix (if appropriate).
26
+ - [ ] I have checked that I maintained or improved code coverage.
27
+ - [ ] I have checked the benchmarking action to verify that my changes did not adversely affect performance.
28
+ - [ ] I have written docstrings and checked that they render correctly in the Read The Docs build (created after the PR is opened).
29
+ - [ ] I have updated the general documentation including Metric descriptions and example notebooks if necessary.
30
+
31
+ # Further Comments
32
+ If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
@@ -0,0 +1,49 @@
1
+ import json
2
+
3
+ import pandas as pd
4
+ import typer
5
+
6
+
7
+ def load_stats(path):
8
+ with open(path) as f:
9
+ data = json.load(f)
10
+
11
+ commit = data["commit_info"]["id"]
12
+
13
+ rows = []
14
+ for d in data["benchmarks"]:
15
+ rows.append({"Benchmark": d["name"], "mean": d["stats"]["mean"]})
16
+
17
+ return commit, pd.DataFrame(rows)
18
+
19
+
20
+ def make_report(old_path, new_path, out_file):
21
+ old = load_stats(old_path)
22
+ new = load_stats(new_path)
23
+
24
+ # Merge on benchmark name
25
+ df = old[-1].merge(new[-1], on="Benchmark", suffixes=("_old", "_new"))
26
+
27
+ df["Percent Change"] = 100 * (df["mean_new"] - df["mean_old"]) / df["mean_old"]
28
+ df["Percent Change"] = df["Percent Change"].map("{:+.2f}".format)
29
+
30
+ # Format runtimes
31
+ df["mean_old"] = df["mean_old"].map("{:.5f}".format)
32
+ df["mean_new"] = df["mean_new"].map("{:.5f}".format)
33
+
34
+ # Change column names to commit ids
35
+ df = df.rename(
36
+ columns={
37
+ "mean_new": f"Mean (s) HEAD {new[0]}",
38
+ "mean_old": f"Mean (s) BASE {old[0]}",
39
+ }
40
+ )
41
+
42
+ df.to_markdown(out_file, index=False)
43
+
44
+ # Print report to logs
45
+ print(df.to_markdown(index=False))
46
+
47
+
48
+ if __name__ == "__main__":
49
+ typer.run(make_report)
@@ -0,0 +1,45 @@
1
+ name: Benchmark
2
+
3
+ # Do not run this workflow on pull request since this workflow has permission to modify contents.
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ # deployments permission to deploy GitHub pages website
11
+ deployments: write
12
+ # contents permission to update benchmark contents in gh-pages branch
13
+ contents: write
14
+
15
+ jobs:
16
+ benchmark:
17
+ name: Report benchmarks on gh-pages
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: 3.11
26
+ cache-dependency-path: "pyproject.toml"
27
+ cache: "pip"
28
+
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install -U pip
32
+ python -m pip install -e .[test]
33
+
34
+ - name: Run benchmark
35
+ run: |
36
+ pytest tests/bench.py --benchmark-json output.json
37
+
38
+ - name: Store benchmark results
39
+ uses: benchmark-action/github-action-benchmark@v1
40
+ with:
41
+ name: Python Benchmark with pytest-benchmark
42
+ tool: 'pytest'
43
+ output-file-path: output.json
44
+ github-token: ${{ secrets.GITHUB_TOKEN }}
45
+ auto-push: true
@@ -0,0 +1,140 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "v*"
9
+ pull_request:
10
+ workflow_dispatch:
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ # check-manifest:
18
+ # runs-on: ubuntu-latest
19
+ # steps:
20
+ # - uses: actions/checkout@v4
21
+ # - run: pipx run check-manifest
22
+
23
+ test:
24
+ name: ${{ matrix.platform }} (${{ matrix.python-version }})
25
+ runs-on: ${{ matrix.platform }}
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ python-version: ["3.8", "3.9", "3.10", "3.11"]
30
+ platform: [ubuntu-latest, macos-latest, windows-latest]
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ uses: actions/setup-python@v5
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+ cache-dependency-path: "pyproject.toml"
40
+ cache: "pip"
41
+
42
+ - name: Install dependencies
43
+ run: |
44
+ python -m pip install -U pip
45
+ python -m pip install -e .[test]
46
+
47
+ - name: Test
48
+ run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
49
+
50
+ - name: Coverage
51
+ uses: codecov/codecov-action@v3
52
+
53
+ benchmark:
54
+ name: Benchmark
55
+ runs-on: ubuntu-latest
56
+ if: github.event_name == 'pull_request'
57
+
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+ with:
61
+ fetch-depth: 50 # this is to make sure we obtain the target base commit
62
+
63
+ - name: Set up Python
64
+ uses: actions/setup-python@v5
65
+ with:
66
+ python-version: 3.11
67
+ cache-dependency-path: "pyproject.toml"
68
+ cache: "pip"
69
+
70
+ - name: Install dependencies
71
+ run: |
72
+ python -m pip install -U pip
73
+ python -m pip install -e .[test]
74
+ python -m pip install tabulate
75
+
76
+ - name: Retrieve cached baseline if available
77
+ uses: actions/cache/restore@v3
78
+ id: cache
79
+ with:
80
+ path: baseline.json
81
+ key: ${{ github.event.pull_request.base.sha }}
82
+
83
+ - name: Run baseline benchmark if not in cache
84
+ if: steps.cache.outputs.cache-hit != 'true'
85
+ run: |
86
+ git checkout ${{ github.event.pull_request.base.sha }}
87
+ pytest tests/bench.py --benchmark-json baseline.json
88
+
89
+ - name: Cache baseline results
90
+ uses: actions/cache/save@v3
91
+ if: steps.cache.outputs.cache-hit != 'true'
92
+ with:
93
+ path: baseline.json
94
+ key: ${{ github.event.pull_request.base.sha }}
95
+
96
+ - name: Run benchmark on PR head commit
97
+ run: |
98
+ git checkout ${{ github.event.pull_request.head.sha }}
99
+ pytest tests/bench.py --benchmark-json pr.json
100
+
101
+ - name: Generate report
102
+ run: python .github/workflows/benchmark-pr.py baseline.json pr.json report.md
103
+
104
+ - name: Comment on commit with report for non-forks
105
+ uses: peter-evans/commit-comment@v3
106
+ if: github.event.pull_request.head.repo.fork == false
107
+ with:
108
+ body-path: report.md
109
+
110
+ deploy:
111
+ name: Deploy
112
+ needs: test
113
+ if: success() && startsWith(github.ref, 'refs/tags/')
114
+ runs-on: ubuntu-latest
115
+
116
+ steps:
117
+ - uses: actions/checkout@v4
118
+
119
+ - name: Set up Python
120
+ uses: actions/setup-python@v5
121
+ with:
122
+ python-version: "3.x"
123
+
124
+ - name: install
125
+ run: |
126
+ git tag
127
+ pip install -U pip build twine
128
+ python -m build
129
+ twine check dist/*
130
+ ls -lh dist
131
+
132
+ - name: Build and publish
133
+ run: twine upload dist/*
134
+ env:
135
+ TWINE_USERNAME: __token__
136
+ TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
137
+
138
+ - uses: softprops/action-gh-release@v1
139
+ with:
140
+ generate_release_notes: true
@@ -4,24 +4,29 @@ ci:
4
4
  autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"
5
5
 
6
6
  repos:
7
- - repo: https://github.com/charliermarsh/ruff-pre-commit
8
- rev: v0.0.254
7
+ - repo: https://github.com/crate-ci/typos
8
+ rev: v1.16.26
9
+ hooks:
10
+ - id: typos
11
+
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.1.9
9
14
  hooks:
10
15
  - id: ruff
11
16
  args: [--fix]
12
17
 
13
18
  - repo: https://github.com/psf/black
14
- rev: 23.1.0
19
+ rev: 23.12.1
15
20
  hooks:
16
21
  - id: black
17
22
 
18
23
  - repo: https://github.com/abravalheri/validate-pyproject
19
- rev: v0.12.1
24
+ rev: v0.15
20
25
  hooks:
21
26
  - id: validate-pyproject
22
27
 
23
28
  - repo: https://github.com/pre-commit/mirrors-mypy
24
- rev: v1.1.1
29
+ rev: v1.8.0
25
30
  hooks:
26
31
  - id: mypy
27
32
  files: "^src/"
@@ -14,6 +14,10 @@ build:
14
14
  # Build documentation in the docs/ directory with Sphinx
15
15
  sphinx:
16
16
  configuration: docs/source/conf.py
17
+ # this is strict and can be removed later if it becomes annoying
18
+ # but it makes sure that all references are valid and that
19
+ # everything is building correctly
20
+ fail_on_warning: true
17
21
 
18
22
  python:
19
23
  install:
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.1
2
+ Name: traccuracy
3
+ Version: 0.1.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/Janelia-Trackathon-2023/traccuracy
8
+ Project-URL: repository, https://github.com/Janelia-Trackathon-2023/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.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy
23
+ Requires-Dist: networkx
24
+ Requires-Dist: pandas
25
+ Requires-Dist: tifffile
26
+ Requires-Dist: imagecodecs
27
+ Requires-Dist: scikit-image
28
+ Requires-Dist: tqdm
29
+ Requires-Dist: typer
30
+ Requires-Dist: numba; python_version != "3.11"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=6.0; extra == "test"
33
+ Requires-Dist: pytest-cov; extra == "test"
34
+ Requires-Dist: pytest-benchmark; extra == "test"
35
+ Requires-Dist: pytest-timeout; extra == "test"
36
+ Requires-Dist: tabulate; extra == "test"
37
+ Provides-Extra: dev
38
+ Requires-Dist: black; extra == "dev"
39
+ Requires-Dist: ipython; extra == "dev"
40
+ Requires-Dist: mypy; extra == "dev"
41
+ Requires-Dist: pdbpp; extra == "dev"
42
+ Requires-Dist: pre-commit; extra == "dev"
43
+ Requires-Dist: pytest-cov; extra == "dev"
44
+ Requires-Dist: pytest; extra == "dev"
45
+ Requires-Dist: rich; extra == "dev"
46
+ Requires-Dist: ruff; extra == "dev"
47
+ Provides-Extra: docs
48
+ Requires-Dist: ipython==8.17.1; extra == "docs"
49
+ Requires-Dist: myst-parser==2.0.0; extra == "docs"
50
+ Requires-Dist: nbsphinx-link==1.3.0; extra == "docs"
51
+ Requires-Dist: nbsphinx==0.9.3; extra == "docs"
52
+ Requires-Dist: sphinx-autoapi==3.0.0; extra == "docs"
53
+ Requires-Dist: sphinx-click==5.0.1; extra == "docs"
54
+ Requires-Dist: sphinx-rtd-theme==1.3.0; extra == "docs"
55
+ Requires-Dist: Sphinx==7.2.6; extra == "docs"
56
+
57
+ # traccuracy: Evaluate Cell Tracking Solutions
58
+
59
+ [![License](https://img.shields.io/pypi/l/traccuracy.svg?color=green)](https://github.com/Janelia-Trackathon-2023/traccuracy/raw/main/LICENSE)
60
+ [![PyPI](https://img.shields.io/pypi/v/traccuracy.svg?color=green)](https://pypi.org/project/traccuracy)
61
+ [![Python Version](https://img.shields.io/pypi/pyversions/traccuracy.svg?color=green)](https://python.org)
62
+ [![CI](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml/badge.svg)](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml)
63
+ [![Benchmarking](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/benchmark-report.yml/badge.svg)](https://janelia-trackathon-2023.github.io/traccuracy/dev/bench/)
64
+ [![Documentation Status](https://readthedocs.org/projects/traccuracy/badge/?version=latest)](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
65
+ [![codecov](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy/branch/main/graph/badge.svg)](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy)
66
+
67
+
68
+ `traccuracy` provides a suite of benchmarking functions that can be used to evaluate cell
69
+ 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
70
+ metrics used in the field.
71
+
72
+ `traccuracy` can compute a comprehensive set of metrics for evaluating the cell linking and division performance, and can compute biologically meaningful metrics such as number of correctly reconstructed lineages over N frames and cell cycle length accuracy. As matching ground truth and
73
+ predicted lineages is a crucial step for performing evaluation, `traccuracy` includes
74
+ a number of algorithms for matching ground truth and predicted lineages, both with
75
+ and without segmentation masks.
76
+
77
+ Learn more in the [documentation](https://traccuracy.readthedocs.io/en/latest/) or check out the [source code](https://github.com/Janelia-Trackathon-2023/traccuracy).
78
+
79
+ ## Installation
80
+ `pip install traccuracy`
81
+
82
+ ## Getting Started
83
+ The `traccuracy` library has three main components: loaders, matchers, and metrics.
84
+ 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.
85
+ A TrackingGraph is a spatiotemporal graph.
86
+ Nodes represent a single cell in a given time point, and are annotated with a time and a location.
87
+ Edges point from a node representing a cell in time point `t` to the same cell or its daughter in `t+1`.
88
+ To load TrackingGraphs from a custom format, you will likely need to implement a loader: see
89
+ documentation [here](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/loaders/index.html#module-traccuracy.loaders) for more information.
90
+
91
+ Matchers take a ground truth and a predicted TrackingGraph with optional segmentation masks and match the nodes and edges to allow evaluation to occur.
92
+ Metrics are then computed on the matched graphs, and a summary is printed out.
93
+
94
+ The `traccuracy` library has a command line interface for running common metrics
95
+ pipelines, [documented here](https://traccuracy.readthedocs.io/en/latest/cli.html), and a flexible Python API, shown in [this](https://traccuracy.readthedocs.io/en/latest/examples/ctc.html) example notebook.
96
+
97
+
98
+ ## Implemented Metrics
99
+
100
+ - CTC-DET from the [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
101
+ - CTC-TRA from the [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
102
+ - Acyclic Oriented Graph Metric (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.
103
+ - Division Precision. Optionally allows detection within N frames of ground truth division.
104
+ - Division Recall. Optionally allows detection within N frames of ground truth division.
105
+ - Division F1 score. Optionally allows detection within N frames of ground truth division.
106
+ - Mitotic Branching Correctness from [Ulicna et al. 2021](https://doi.org/10.3389/fcomp.2021.734559). TP / (TP + FP + FN). Optionally allows detection within N frames of ground truth division.
107
+
108
+ ## Glossary
109
+
110
+ **Tracklet**
111
+ : 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.
112
+
113
+ **Track**
114
+ : A single cell and all of its progeny. In graph terms, a connected component including divisions.
@@ -0,0 +1,58 @@
1
+ # traccuracy: Evaluate Cell Tracking Solutions
2
+
3
+ [![License](https://img.shields.io/pypi/l/traccuracy.svg?color=green)](https://github.com/Janelia-Trackathon-2023/traccuracy/raw/main/LICENSE)
4
+ [![PyPI](https://img.shields.io/pypi/v/traccuracy.svg?color=green)](https://pypi.org/project/traccuracy)
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/traccuracy.svg?color=green)](https://python.org)
6
+ [![CI](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml/badge.svg)](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml)
7
+ [![Benchmarking](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/benchmark-report.yml/badge.svg)](https://janelia-trackathon-2023.github.io/traccuracy/dev/bench/)
8
+ [![Documentation Status](https://readthedocs.org/projects/traccuracy/badge/?version=latest)](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
9
+ [![codecov](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy/branch/main/graph/badge.svg)](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy)
10
+
11
+
12
+ `traccuracy` provides a suite of benchmarking functions that can be used to evaluate cell
13
+ 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
14
+ metrics used in the field.
15
+
16
+ `traccuracy` can compute a comprehensive set of metrics for evaluating the cell linking and division performance, and can compute biologically meaningful metrics such as number of correctly reconstructed lineages over N frames and cell cycle length accuracy. As matching ground truth and
17
+ predicted lineages is a crucial step for performing evaluation, `traccuracy` includes
18
+ a number of algorithms for matching ground truth and predicted lineages, both with
19
+ and without segmentation masks.
20
+
21
+ Learn more in the [documentation](https://traccuracy.readthedocs.io/en/latest/) or check out the [source code](https://github.com/Janelia-Trackathon-2023/traccuracy).
22
+
23
+ ## Installation
24
+ `pip install traccuracy`
25
+
26
+ ## Getting Started
27
+ The `traccuracy` library has three main components: loaders, matchers, and metrics.
28
+ 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.
29
+ A TrackingGraph is a spatiotemporal graph.
30
+ Nodes represent a single cell in a given time point, and are annotated with a time and a location.
31
+ Edges point from a node representing a cell in time point `t` to the same cell or its daughter in `t+1`.
32
+ To load TrackingGraphs from a custom format, you will likely need to implement a loader: see
33
+ documentation [here](https://traccuracy.readthedocs.io/en/latest/autoapi/traccuracy/loaders/index.html#module-traccuracy.loaders) for more information.
34
+
35
+ Matchers take a ground truth and a predicted TrackingGraph with optional segmentation masks and match the nodes and edges to allow evaluation to occur.
36
+ Metrics are then computed on the matched graphs, and a summary is printed out.
37
+
38
+ The `traccuracy` library has a command line interface for running common metrics
39
+ pipelines, [documented here](https://traccuracy.readthedocs.io/en/latest/cli.html), and a flexible Python API, shown in [this](https://traccuracy.readthedocs.io/en/latest/examples/ctc.html) example notebook.
40
+
41
+
42
+ ## Implemented Metrics
43
+
44
+ - CTC-DET from the [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
45
+ - CTC-TRA from the [Cell Tracking Challenge Evaluation Methodology](http://celltrackingchallenge.net/evaluation-methodology/)
46
+ - Acyclic Oriented Graph Metric (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.
47
+ - Division Precision. Optionally allows detection within N frames of ground truth division.
48
+ - Division Recall. Optionally allows detection within N frames of ground truth division.
49
+ - Division F1 score. Optionally allows detection within N frames of ground truth division.
50
+ - Mitotic Branching Correctness from [Ulicna et al. 2021](https://doi.org/10.3389/fcomp.2021.734559). TP / (TP + FP + FN). Optionally allows detection within N frames of ground truth division.
51
+
52
+ ## Glossary
53
+
54
+ **Tracklet**
55
+ : 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.
56
+
57
+ **Track**
58
+ : A single cell and all of its progeny. In graph terms, a connected component including divisions.
@@ -1,31 +1,17 @@
1
- # traccuracy
2
-
3
- [![License](https://img.shields.io/pypi/l/traccuracy.svg?color=green)](https://github.com/Janelia-Trackathon-2023/traccuracy/raw/main/LICENSE)
4
- [![PyPI](https://img.shields.io/pypi/v/traccuracy.svg?color=green)](https://pypi.org/project/traccuracy)
5
- [![Python Version](https://img.shields.io/pypi/pyversions/traccuracy.svg?color=green)](https://python.org)
6
- [![CI](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml/badge.svg)](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml)
7
- [![Documentation Status](https://readthedocs.org/projects/traccuracy/badge/?version=latest)](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
8
-
9
-
10
- `traccuracy` provides a suite of benchmarking functions that can be used to evaluate tracking solutions against ground truth annotations. It includes the standard metrics that are calculated by the [Cell Tracking Challenge](http://celltrackingchallenge.net/evaluation-methodology/).
11
-
12
- Learn more in the [documentation](https://traccuracy.readthedocs.io/en/latest/).
13
-
14
- ## Installation
15
- `pip install traccuracy`
1
+ # Traccuracy Developer Notes
16
2
 
17
3
  ## Development
18
4
  For local development, clone the repo and install in editable mode.
19
5
  ```
20
6
  git clone https://github.com/Janelia-Trackathon-2023/traccuracy.git
21
7
  cd traccuracy
22
- pip install -e .[dev]
8
+ pip install -e ".[dev]"
23
9
  ```
24
10
 
25
11
  ### Testing
26
12
  Install testing requirements
27
13
  ```
28
- pip install -e .[test]
14
+ pip install -e ".[test]"
29
15
  ```
30
16
  Run tests
31
17
  ```
@@ -34,7 +20,7 @@ python -m pytest tests
34
20
  ### Style
35
21
  We utilize `pre-commit` with black (formatting) and ruff (linting). If you would like to run `pre-commit` locally:
36
22
  ```
37
- pip install -e .[dev]
23
+ pip install -e ".[dev]"
38
24
  pre-commit install
39
25
  ```
40
26
  Alternatively [pre-commit.ci](https://pre-commit.ci/), will run and commit changes on any open PRs.
@@ -50,9 +36,11 @@ git push --follow-tags
50
36
  Documentation is built with Sphinx using `sphinx-autoapi` to automatically generate API documentation at build time. Docs are hosted on ReadTheDocs and build automatically after each push to main. Documentation can be built locally by running the following:
51
37
  ```
52
38
  # Install docs requirements
53
- pip install -e .[docs]
39
+ pip install -e ".[docs]"
54
40
  # Run the build
55
41
  sphinx-build docs/source docs/_build
56
42
  ```
57
43
 
44
+ Note that running documentation locally requires Pandoc to be installed as well - https://pandoc.org/installing.html.
45
+
58
46
  You can view the documentation by opening `docs/_build/index.html` in your browser.
@@ -0,0 +1,6 @@
1
+ CLI
2
+ ===
3
+
4
+ .. click:: traccuracy.cli:typer_click_object
5
+ :prog: traccuracy
6
+ :nested: full