traccuracy 0.1.0__tar.gz → 0.2.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 (196) hide show
  1. traccuracy-0.2.0/.github/ISSUE_TEMPLATE/features.md +36 -0
  2. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/PULL_REQUEST_TEMPLATE.md +12 -12
  3. traccuracy-0.2.0/.github/release.yml +39 -0
  4. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/workflows/benchmark-report.yml +20 -0
  5. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/workflows/ci.yml +76 -10
  6. {traccuracy-0.1.0 → traccuracy-0.2.0}/.gitignore +4 -0
  7. {traccuracy-0.1.0 → traccuracy-0.2.0}/.pre-commit-config.yaml +5 -5
  8. {traccuracy-0.1.0/src/traccuracy.egg-info → traccuracy-0.2.0}/PKG-INFO +8 -4
  9. {traccuracy-0.1.0 → traccuracy-0.2.0}/developer_notes.md +8 -3
  10. {traccuracy-0.1.0 → traccuracy-0.2.0}/docs/source/conf.py +10 -2
  11. traccuracy-0.2.0/docs/source/index.rst +43 -0
  12. traccuracy-0.2.0/docs/source/metrics/basic.rst +18 -0
  13. traccuracy-0.2.0/docs/source/metrics/ctc.rst +76 -0
  14. traccuracy-0.2.0/docs/source/metrics/divisions.rst +10 -0
  15. traccuracy-0.2.0/docs/source/metrics/track_overlap.rst +11 -0
  16. traccuracy-0.2.0/docs/source/test_cases/divisions.pct.py +142 -0
  17. traccuracy-0.2.0/docs/source/test_cases/graphs.pct.py +145 -0
  18. traccuracy-0.2.0/docs/source/test_cases/index.rst +13 -0
  19. traccuracy-0.2.0/docs/source/test_cases/segmentation.pct.py +79 -0
  20. traccuracy-0.2.0/docs/source/track_errors/basic.pct.py +208 -0
  21. traccuracy-0.2.0/docs/source/track_errors/ctc.rst +192 -0
  22. traccuracy-0.2.0/docs/source/track_errors/divisions.rst +180 -0
  23. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/ctc.ipynb +87 -86
  24. {traccuracy-0.1.0 → traccuracy-0.2.0}/pyproject.toml +10 -2
  25. traccuracy-0.2.0/scripts/download_test_data.py +37 -0
  26. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/__init__.py +2 -1
  27. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/_run_metrics.py +8 -2
  28. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/_tracking_graph.py +86 -37
  29. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/cli.py +4 -4
  30. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/loaders/__init__.py +2 -1
  31. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/loaders/_ctc.py +25 -12
  32. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/matchers/__init__.py +2 -1
  33. traccuracy-0.2.0/src/traccuracy/matchers/_base.py +211 -0
  34. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/matchers/_compute_overlap.py +24 -17
  35. traccuracy-0.2.0/src/traccuracy/matchers/_ctc.py +102 -0
  36. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/matchers/_iou.py +91 -16
  37. traccuracy-0.2.0/src/traccuracy/metrics/__init__.py +12 -0
  38. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/metrics/_base.py +83 -7
  39. traccuracy-0.2.0/src/traccuracy/metrics/_basic.py +74 -0
  40. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/metrics/_ctc.py +8 -5
  41. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/metrics/_divisions.py +40 -22
  42. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/metrics/_track_overlap.py +8 -30
  43. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/track_errors/_ctc.py +28 -41
  44. traccuracy-0.2.0/src/traccuracy/track_errors/basic.py +109 -0
  45. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/track_errors/divisions.py +25 -39
  46. {traccuracy-0.1.0 → traccuracy-0.2.0/src/traccuracy.egg-info}/PKG-INFO +8 -4
  47. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy.egg-info/SOURCES.txt +21 -1
  48. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy.egg-info/requires.txt +5 -0
  49. traccuracy-0.2.0/tests/bench.py +221 -0
  50. traccuracy-0.2.0/tests/examples/graphs.py +578 -0
  51. traccuracy-0.2.0/tests/examples/segs.py +369 -0
  52. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/loaders/test_ctc.py +25 -1
  53. traccuracy-0.2.0/tests/matchers/test_base.py +115 -0
  54. traccuracy-0.2.0/tests/matchers/test_compute_overlap.py +41 -0
  55. traccuracy-0.2.0/tests/matchers/test_ctc.py +137 -0
  56. traccuracy-0.2.0/tests/matchers/test_iou.py +280 -0
  57. traccuracy-0.2.0/tests/metrics/test_base.py +111 -0
  58. traccuracy-0.2.0/tests/metrics/test_basic.py +40 -0
  59. traccuracy-0.2.0/tests/metrics/test_ctc_metrics.py +54 -0
  60. traccuracy-0.2.0/tests/metrics/test_divisions.py +131 -0
  61. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/metrics/test_track_overlap_metrics.py +3 -10
  62. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/metrics/test_weighted_error_sums.py +1 -0
  63. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/test_run_metrics.py +12 -7
  64. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/test_tracking_graph.py +108 -25
  65. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/test_utils.py +51 -14
  66. traccuracy-0.2.0/tests/track_errors/test_basic.py +236 -0
  67. traccuracy-0.2.0/tests/track_errors/test_ctc_errors.py +530 -0
  68. traccuracy-0.2.0/tests/track_errors/test_divisions.py +254 -0
  69. traccuracy-0.1.0/.github/ISSUE_TEMPLATE/features.md +0 -36
  70. traccuracy-0.1.0/docs/source/index.rst +0 -17
  71. traccuracy-0.1.0/src/traccuracy/_utils.py +0 -18
  72. traccuracy-0.1.0/src/traccuracy/matchers/_base.py +0 -104
  73. traccuracy-0.1.0/src/traccuracy/matchers/_ctc.py +0 -127
  74. traccuracy-0.1.0/src/traccuracy/metrics/__init__.py +0 -5
  75. traccuracy-0.1.0/tests/bench.py +0 -161
  76. traccuracy-0.1.0/tests/matchers/test_base.py +0 -36
  77. traccuracy-0.1.0/tests/matchers/test_ctc.py +0 -48
  78. traccuracy-0.1.0/tests/matchers/test_iou.py +0 -114
  79. traccuracy-0.1.0/tests/metrics/test_ctc_metrics.py +0 -19
  80. traccuracy-0.1.0/tests/metrics/test_divisions.py +0 -31
  81. traccuracy-0.1.0/tests/track_errors/test_ctc_errors.py +0 -136
  82. traccuracy-0.1.0/tests/track_errors/test_divisions.py +0 -222
  83. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/ISSUE_TEMPLATE/bugs.md +0 -0
  84. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/PULL_REQUEST_TEMPLATE/new_matcher_metric.md +0 -0
  85. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/dependabot.yml +0 -0
  86. {traccuracy-0.1.0 → traccuracy-0.2.0}/.github/workflows/benchmark-pr.py +0 -0
  87. {traccuracy-0.1.0 → traccuracy-0.2.0}/.readthedocs.yml +0 -0
  88. {traccuracy-0.1.0 → traccuracy-0.2.0}/LICENSE +0 -0
  89. {traccuracy-0.1.0 → traccuracy-0.2.0}/README.md +0 -0
  90. {traccuracy-0.1.0 → traccuracy-0.2.0}/docs/Makefile +0 -0
  91. {traccuracy-0.1.0 → traccuracy-0.2.0}/docs/make.bat +0 -0
  92. {traccuracy-0.1.0 → traccuracy-0.2.0}/docs/source/cli.rst +0 -0
  93. {traccuracy-0.1.0 → traccuracy-0.2.0}/docs/source/examples/ctc.nblink +0 -0
  94. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask000.tif +0 -0
  95. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask001.tif +0 -0
  96. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask002.tif +0 -0
  97. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask003.tif +0 -0
  98. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask004.tif +0 -0
  99. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask005.tif +0 -0
  100. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask006.tif +0 -0
  101. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask007.tif +0 -0
  102. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask008.tif +0 -0
  103. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask009.tif +0 -0
  104. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask010.tif +0 -0
  105. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask011.tif +0 -0
  106. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask012.tif +0 -0
  107. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask013.tif +0 -0
  108. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask014.tif +0 -0
  109. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask015.tif +0 -0
  110. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask016.tif +0 -0
  111. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask017.tif +0 -0
  112. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask018.tif +0 -0
  113. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask019.tif +0 -0
  114. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask020.tif +0 -0
  115. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask021.tif +0 -0
  116. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask022.tif +0 -0
  117. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask023.tif +0 -0
  118. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask024.tif +0 -0
  119. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask025.tif +0 -0
  120. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask026.tif +0 -0
  121. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask027.tif +0 -0
  122. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask028.tif +0 -0
  123. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask029.tif +0 -0
  124. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask030.tif +0 -0
  125. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask031.tif +0 -0
  126. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask032.tif +0 -0
  127. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask033.tif +0 -0
  128. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask034.tif +0 -0
  129. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask035.tif +0 -0
  130. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask036.tif +0 -0
  131. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask037.tif +0 -0
  132. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask038.tif +0 -0
  133. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask039.tif +0 -0
  134. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask040.tif +0 -0
  135. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask041.tif +0 -0
  136. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask042.tif +0 -0
  137. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask043.tif +0 -0
  138. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask044.tif +0 -0
  139. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask045.tif +0 -0
  140. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask046.tif +0 -0
  141. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask047.tif +0 -0
  142. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask048.tif +0 -0
  143. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask049.tif +0 -0
  144. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask050.tif +0 -0
  145. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask051.tif +0 -0
  146. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask052.tif +0 -0
  147. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask053.tif +0 -0
  148. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask054.tif +0 -0
  149. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask055.tif +0 -0
  150. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask056.tif +0 -0
  151. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask057.tif +0 -0
  152. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask058.tif +0 -0
  153. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask059.tif +0 -0
  154. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask060.tif +0 -0
  155. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask061.tif +0 -0
  156. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask062.tif +0 -0
  157. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask063.tif +0 -0
  158. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask064.tif +0 -0
  159. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask065.tif +0 -0
  160. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask066.tif +0 -0
  161. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask067.tif +0 -0
  162. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask068.tif +0 -0
  163. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask069.tif +0 -0
  164. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask070.tif +0 -0
  165. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask071.tif +0 -0
  166. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask072.tif +0 -0
  167. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask073.tif +0 -0
  168. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask074.tif +0 -0
  169. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask075.tif +0 -0
  170. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask076.tif +0 -0
  171. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask077.tif +0 -0
  172. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask078.tif +0 -0
  173. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask079.tif +0 -0
  174. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask080.tif +0 -0
  175. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask081.tif +0 -0
  176. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask082.tif +0 -0
  177. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask083.tif +0 -0
  178. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask084.tif +0 -0
  179. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask085.tif +0 -0
  180. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask086.tif +0 -0
  181. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask087.tif +0 -0
  182. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask088.tif +0 -0
  183. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask089.tif +0 -0
  184. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask090.tif +0 -0
  185. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/mask091.tif +0 -0
  186. {traccuracy-0.1.0 → traccuracy-0.2.0}/examples/sample-data/Fluo-N2DL-HeLa/01_RES/res_track.txt +0 -0
  187. {traccuracy-0.1.0 → traccuracy-0.2.0}/setup.cfg +0 -0
  188. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy/track_errors/__init__.py +0 -0
  189. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy.egg-info/dependency_links.txt +0 -0
  190. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy.egg-info/entry_points.txt +0 -0
  191. {traccuracy-0.1.0 → traccuracy-0.2.0}/src/traccuracy.egg-info/top_level.txt +0 -0
  192. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/__init__.py +0 -0
  193. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/loaders/__init__.py +0 -0
  194. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/matchers/__init__.py +0 -0
  195. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/metrics/__init__.py +0 -0
  196. {traccuracy-0.1.0 → traccuracy-0.2.0}/tests/track_errors/__init__.py +0 -0
@@ -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? Delete those that do not 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? Delete those that do not 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:
@@ -4,19 +4,19 @@ If you are implementing a new matcher or metric, please append this `&template=n
4
4
  Briefly describe the contribution. If it resolves an issue or feature request, be sure to link to that issue.
5
5
 
6
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.)
7
+ What types of changes does your code introduce? Delete those that do not 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
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.)
14
+ Which topics does your change affect? Delete those that do not apply.
15
+ - Loaders
16
+ - Matchers
17
+ - Track Errors
18
+ - Metrics
19
+ - Core functionality (e.g. `TrackingGraph`, `run_metrics`, `cli`, etc.)
20
20
 
21
21
  # Checklist
22
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.
@@ -0,0 +1,39 @@
1
+ changelog:
2
+ categories:
3
+ - title: '✨ Features'
4
+ labels:
5
+ - 'feature'
6
+ - 'enhancement'
7
+ - title: '🚀 Performance'
8
+ labels:
9
+ - 'performance'
10
+ - title: '🐛 Bug Fixes'
11
+ labels:
12
+ - 'fix'
13
+ - 'bugfix'
14
+ - 'bug'
15
+ - 'hotfix'
16
+ - title: '🧰 Maintenance'
17
+ labels:
18
+ - 'chore'
19
+ - 'dependencies'
20
+ - 'tests'
21
+ - title: '📚️ Documentation'
22
+ labels:
23
+ - 'documentation'
24
+ - title: 'Miscellaneous'
25
+ labels:
26
+ - '*'
27
+ exclude:
28
+ labels:
29
+ - 'feature'
30
+ - 'enhancement'
31
+ - 'performance'
32
+ - 'fix'
33
+ - 'bugfix'
34
+ - 'bug'
35
+ - 'hotfix'
36
+ - 'chore'
37
+ - 'dependencies'
38
+ - 'tests'
39
+ - 'documentation'
@@ -19,6 +19,26 @@ jobs:
19
19
  steps:
20
20
  - uses: actions/checkout@v4
21
21
 
22
+ - name: Retrieve cached data
23
+ uses: actions/cache/restore@v4
24
+ id: cache_data
25
+ with:
26
+ path: downloads
27
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
28
+
29
+ - name: Download Samples
30
+ if: steps.cache_data.outputs.cache-hit != 'true'
31
+ run: |
32
+ pip install requests
33
+ python scripts/download_test_data.py
34
+
35
+ - name: Cache sample data
36
+ uses: actions/cache/save@v4
37
+ if: steps.cache_data.outputs.cache-hit != 'true'
38
+ with:
39
+ path: downloads
40
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
41
+
22
42
  - name: Set up Python
23
43
  uses: actions/setup-python@v5
24
44
  with:
@@ -26,7 +26,7 @@ jobs:
26
26
  strategy:
27
27
  fail-fast: false
28
28
  matrix:
29
- python-version: ["3.8", "3.9", "3.10", "3.11"]
29
+ python-version: ["3.9", "3.10", "3.11"]
30
30
  platform: [ubuntu-latest, macos-latest, windows-latest]
31
31
 
32
32
  steps:
@@ -48,7 +48,53 @@ jobs:
48
48
  run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
49
49
 
50
50
  - name: Coverage
51
- uses: codecov/codecov-action@v3
51
+ uses: codecov/codecov-action@v5
52
+ with:
53
+ token: ${{ secrets.CODECOV_TOKEN }}
54
+
55
+ examples:
56
+ name: Examples
57
+ runs-on: ubuntu-latest
58
+
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+
62
+ - name: Retrieve cached data
63
+ uses: actions/cache/restore@v4
64
+ id: cache_data
65
+ with:
66
+ path: downloads
67
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
68
+
69
+ - name: Download Samples
70
+ if: steps.cache_data.outputs.cache-hit != 'true'
71
+ run: |
72
+ pip install requests
73
+ python scripts/download_test_data.py
74
+
75
+ - name: Cache sample data
76
+ uses: actions/cache/save@v4
77
+ if: steps.cache_data.outputs.cache-hit != 'true'
78
+ with:
79
+ path: downloads
80
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
81
+
82
+ - name: Set up Python 3.11
83
+ uses: actions/setup-python@v5
84
+ with:
85
+ python-version: "3.11"
86
+ cache-dependency-path: "pyproject.toml"
87
+ cache: "pip"
88
+
89
+ - name: Install dependencies
90
+ run: |
91
+ python -m pip install -U pip
92
+ python -m pip install -e . nbclient ipykernel
93
+
94
+ - name: Run notebooks
95
+ # This will exit after the first error and will not report errors in subsequent nbs
96
+ run: jupyter execute examples/*.ipynb
97
+
52
98
 
53
99
  benchmark:
54
100
  name: Benchmark
@@ -60,6 +106,26 @@ jobs:
60
106
  with:
61
107
  fetch-depth: 50 # this is to make sure we obtain the target base commit
62
108
 
109
+ - name: Retrieve cached data
110
+ uses: actions/cache/restore@v4
111
+ id: cache_data
112
+ with:
113
+ path: downloads
114
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
115
+
116
+ - name: Download Samples
117
+ if: steps.cache_data.outputs.cache-hit != 'true'
118
+ run: |
119
+ pip install requests
120
+ python scripts/download_test_data.py
121
+
122
+ - name: Cache sample data
123
+ uses: actions/cache/save@v4
124
+ if: steps.cache_data.outputs.cache-hit != 'true'
125
+ with:
126
+ path: downloads
127
+ key: ${{ hashFiles('scripts/download_test_data.py') }}
128
+
63
129
  - name: Set up Python
64
130
  uses: actions/setup-python@v5
65
131
  with:
@@ -74,21 +140,21 @@ jobs:
74
140
  python -m pip install tabulate
75
141
 
76
142
  - name: Retrieve cached baseline if available
77
- uses: actions/cache/restore@v3
78
- id: cache
143
+ uses: actions/cache/restore@v4
144
+ id: cache_baseline
79
145
  with:
80
146
  path: baseline.json
81
147
  key: ${{ github.event.pull_request.base.sha }}
82
148
 
83
149
  - name: Run baseline benchmark if not in cache
84
- if: steps.cache.outputs.cache-hit != 'true'
150
+ if: steps.cache_baseline.outputs.cache-hit != 'true'
85
151
  run: |
86
152
  git checkout ${{ github.event.pull_request.base.sha }}
87
- pytest tests/bench.py --benchmark-json baseline.json
153
+ pytest tests/bench.py -v --benchmark-json baseline.json
88
154
 
89
155
  - name: Cache baseline results
90
- uses: actions/cache/save@v3
91
- if: steps.cache.outputs.cache-hit != 'true'
156
+ uses: actions/cache/save@v4
157
+ if: steps.cache_baseline.outputs.cache-hit != 'true'
92
158
  with:
93
159
  path: baseline.json
94
160
  key: ${{ github.event.pull_request.base.sha }}
@@ -96,7 +162,7 @@ jobs:
96
162
  - name: Run benchmark on PR head commit
97
163
  run: |
98
164
  git checkout ${{ github.event.pull_request.head.sha }}
99
- pytest tests/bench.py --benchmark-json pr.json
165
+ pytest tests/bench.py -v --benchmark-json pr.json
100
166
 
101
167
  - name: Generate report
102
168
  run: python .github/workflows/benchmark-pr.py baseline.json pr.json report.md
@@ -135,6 +201,6 @@ jobs:
135
201
  TWINE_USERNAME: __token__
136
202
  TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
137
203
 
138
- - uses: softprops/action-gh-release@v1
204
+ - uses: softprops/action-gh-release@v2
139
205
  with:
140
206
  generate_release_notes: true
@@ -1,3 +1,6 @@
1
+ docs/dest
2
+ .DS_Store
3
+
1
4
  # Byte-compiled / optimized / DLL files
2
5
  __pycache__/
3
6
  *.py[cod]
@@ -65,6 +68,7 @@ instance/
65
68
 
66
69
  # Sphinx documentation
67
70
  docs/_build/
71
+ docs/jupyter_execute
68
72
 
69
73
  # PyBuilder
70
74
  target/
@@ -5,28 +5,28 @@ ci:
5
5
 
6
6
  repos:
7
7
  - repo: https://github.com/crate-ci/typos
8
- rev: v1.16.26
8
+ rev: dictgen-v0.3.1
9
9
  hooks:
10
10
  - id: typos
11
11
 
12
12
  - repo: https://github.com/astral-sh/ruff-pre-commit
13
- rev: v0.1.9
13
+ rev: v0.8.6
14
14
  hooks:
15
15
  - id: ruff
16
16
  args: [--fix]
17
17
 
18
18
  - repo: https://github.com/psf/black
19
- rev: 23.12.1
19
+ rev: 24.10.0
20
20
  hooks:
21
21
  - id: black
22
22
 
23
23
  - repo: https://github.com/abravalheri/validate-pyproject
24
- rev: v0.15
24
+ rev: v0.23
25
25
  hooks:
26
26
  - id: validate-pyproject
27
27
 
28
28
  - repo: https://github.com/pre-commit/mirrors-mypy
29
- rev: v1.8.0
29
+ rev: v1.14.1
30
30
  hooks:
31
31
  - id: mypy
32
32
  files: "^src/"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: traccuracy
3
- Version: 0.1.0
3
+ Version: 0.2.0
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
@@ -11,12 +11,11 @@ Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: License :: OSI Approved :: BSD License
12
12
  Classifier: Natural Language :: English
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
14
  Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Typing :: Typed
19
- Requires-Python: >=3.8
18
+ Requires-Python: >=3.9
20
19
  Description-Content-Type: text/markdown
21
20
  License-File: LICENSE
22
21
  Requires-Dist: numpy
@@ -28,6 +27,7 @@ Requires-Dist: scikit-image
28
27
  Requires-Dist: tqdm
29
28
  Requires-Dist: typer
30
29
  Requires-Dist: numba; python_version != "3.11"
30
+ Requires-Dist: pyarrow
31
31
  Provides-Extra: test
32
32
  Requires-Dist: pytest>=6.0; extra == "test"
33
33
  Requires-Dist: pytest-cov; extra == "test"
@@ -53,6 +53,10 @@ Requires-Dist: sphinx-autoapi==3.0.0; extra == "docs"
53
53
  Requires-Dist: sphinx-click==5.0.1; extra == "docs"
54
54
  Requires-Dist: sphinx-rtd-theme==1.3.0; extra == "docs"
55
55
  Requires-Dist: Sphinx==7.2.6; extra == "docs"
56
+ Requires-Dist: jupytext; extra == "docs"
57
+ Requires-Dist: ipykernel; extra == "docs"
58
+ Requires-Dist: jupyter-sphinx; extra == "docs"
59
+ Requires-Dist: matplotlib; extra == "docs"
56
60
 
57
61
  # traccuracy: Evaluate Cell Tracking Solutions
58
62
 
@@ -37,10 +37,15 @@ Documentation is built with Sphinx using `sphinx-autoapi` to automatically gener
37
37
  ```
38
38
  # Install docs requirements
39
39
  pip install -e ".[docs]"
40
- # Run the build
41
- sphinx-build docs/source docs/_build
40
+ # Change into docs directory
41
+ cd docs
42
+ # Run the build
43
+ sphinx-build source _build
42
44
  ```
43
45
 
44
46
  Note that running documentation locally requires Pandoc to be installed as well - https://pandoc.org/installing.html.
45
47
 
46
- You can view the documentation by opening `docs/_build/index.html` in your browser.
48
+ You can view the documentation by opening `docs/_build/index.html` in your browser.
49
+
50
+ #### Running code cells in docs
51
+ Executable code blocks can be added to rst files using `.. jupyter-execute::`. In order to get these code cells to run, assume that sphinx-build is being called from the docs/source directory and append to `sys.path` if necessary.
@@ -53,6 +53,7 @@ extensions = [
53
53
  "nbsphinx", # add notebooks to docs
54
54
  "nbsphinx_link", # add notebooks to docs
55
55
  "sphinx_click", # auto document cli
56
+ "jupyter_sphinx", # executable code blocks in rst
56
57
  ]
57
58
 
58
59
  napoleon_google_docstring = True
@@ -83,10 +84,17 @@ autoapi_ignore = ["*/cli.py"]
83
84
 
84
85
  # -- Nbsphinx extension ------------------------------------------------------
85
86
 
86
- # Disable nbsphinx extension from running notebooks
87
- nbsphinx_execute = "never"
87
+ nbsphinx_execute = "auto"
88
88
  exclude_patterns = ["_build", "**.ipynb_checkpoints"]
89
89
 
90
+ nbsphinx_custom_formats = {
91
+ ".pct.py": ["jupytext.reads", {"fmt": "py:percent"}],
92
+ }
93
+
94
+ # Import Matplotlib to avoid this message in notebooks:
95
+ # "Matplotlib is building the font cache; this may take a moment."
96
+ import matplotlib.pyplot # noqa
97
+
90
98
  # -- Options for HTML output -------------------------------------------------
91
99
 
92
100
  # The theme to use for HTML and HTML Help pages. See the documentation for
@@ -0,0 +1,43 @@
1
+ .. include:: ../../README.md
2
+ :parser: myst_parser.sphinx_
3
+
4
+ .. toctree::
5
+ :maxdepth: 2
6
+ :hidden:
7
+ :caption: Examples:
8
+
9
+ examples/ctc
10
+
11
+ .. toctree::
12
+ :maxdepth: 2
13
+ :hidden:
14
+ :caption: Traccuracy API:
15
+
16
+ autoapi/index
17
+ cli
18
+
19
+ .. toctree::
20
+ :maxdepth: 2
21
+ :hidden:
22
+ :caption: Track Errors
23
+
24
+ track_errors/basic
25
+ track_errors/divisions
26
+ track_errors/ctc
27
+
28
+ .. toctree::
29
+ :maxdepth: 2
30
+ :hidden:
31
+ :caption: Metrics
32
+
33
+ metrics/basic
34
+ metrics/ctc
35
+ metrics/track_overlap
36
+ metrics/divisions
37
+
38
+ .. toctree::
39
+ :maxdepth: 2
40
+ :hidden:
41
+ :caption: Development
42
+
43
+ test_cases/index
@@ -0,0 +1,18 @@
1
+ Basic Performance Metrics
2
+ =========================
3
+
4
+ Basic performance metrics are computed based on the error classifications described in :doc:`../track_errors/basic`.
5
+
6
+ For both nodes and edges, the following counts are returned:
7
+
8
+ * Total ground truth
9
+ * Total predicted
10
+ * True positives
11
+ * False positives
12
+ * False negatives
13
+
14
+ Using these counts, the following summary stastics are computed for both nodes and edges:
15
+
16
+ * Recall
17
+ * Precision
18
+ * F1 Score
@@ -0,0 +1,76 @@
1
+ CTC/AOGM Metrics
2
+ =================
3
+
4
+ These metrics are an implementation of the Cell Segmentation \& Tracking Challenge TRA and DET metrics,
5
+ as described on the Challenge `website <http://celltrackingchallenge.net/evaluation-methodology/>`_,
6
+ as well as the more general Acyclic Oriented Graph Measure (AOGM) metric, as described in `this
7
+ paper <https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0144959&type=printable>`_.
8
+
9
+
10
+ DET
11
+ -----------------------
12
+
13
+ This metric assesses the solution's detection performance only, and therefore only measures
14
+ and annotates node errors.
15
+
16
+ Each type of node error is weighted based on how difficult it would be for a human to correct
17
+ the error by hand. The original Cell Tracking Challenge weights are used for all error types:
18
+
19
+ * Non-Split nodes are weighted 5
20
+ * False Negative nodes are weighted 10
21
+ * False Positive nodes are weighted 1
22
+
23
+ See Track Errors for the definition of each error type.
24
+
25
+ To compute the DET score for a dataset, the weighted sum of all node errors in the solution (:math:`AOGM-D`)
26
+ is normalized to a 0-1 value using a maximum potential error. The maximum potential error
27
+ (:math:`AOGM-D_{0}`) is defined as the cost of creating the ground truth nodes from scratch i.e. assume all
28
+ nodes in the ground truth are False Negative, and compute the weighed sum of errors
29
+ on this graph.
30
+
31
+ The final DET score is therefore:
32
+
33
+ .. math::
34
+
35
+ DET = 1 - min(AOGM-D, AOGM-D_{0}) / AOGM-D_{0}
36
+
37
+
38
+ TRA
39
+ -----------------------
40
+
41
+ The TRA measure assesses the solution's detection *and* tracking performance and therefore
42
+ includes both the node errors specified in DET (with identical weights) and the edge errors
43
+ computed by the general AOGM metric. Edge error weights are as follows:
44
+
45
+ * Wrong-Semantic edges are weighted 1
46
+ * False Negative edges are weighed 1.5
47
+ * False Positive edges are weighted 1
48
+
49
+ See Track Errors for the definition of each error type.
50
+
51
+ To compute the TRA score, the weighted sum of all node and edge errors in the solution (:math:`AOGM`)
52
+ is normalized to a 0-1 value using a maximum potential error. The maximum potential error (:math:`AOGM_{0}`) is again
53
+ defined based on the weighted error sum of an empty solution graph i.e. assume all nodes and edges in the ground truth
54
+ are False Negative, and computed the weighted sum of errors on this graph.
55
+
56
+ The final TRA score is therefore:
57
+
58
+ .. math::
59
+
60
+ TRA = 1 - min(AOGM, AOGM_{0}) / AOGM_{0}
61
+
62
+
63
+ AOGM
64
+ -----------------------
65
+
66
+ The AOGM metric is a generalized graph measure that allows users to define their own
67
+ error weights for each type of node and edge error. The AOGM is simply the
68
+ weighted sum of all errors. This means that unlike the TRA and DET metrics,
69
+ the AOGM is **not** normalized to 0-1. The AOGM ranges between 0 (when
70
+ the predicted solution and ground truth are identical) and infinity (because in theory
71
+ an infinitely large predicted graph could be matched against ground truth), where
72
+ larger numbers mean more errors.
73
+
74
+ Note that the same process used to normalize TRA and DET can be used to normalize the
75
+ generalized AOGM - once the weights are chosen, compute the error sum of an empty solution
76
+ and use this to normalize the error sum of the predicted solution.
@@ -0,0 +1,10 @@
1
+ Division Metrics
2
+ ================
3
+
4
+ .. note::
5
+ Coming soon!
6
+
7
+
8
+
9
+ Mitotic Branching Score
10
+ -----------------------
@@ -0,0 +1,11 @@
1
+ Track Overlap Metrics
2
+ =====================
3
+
4
+ .. note::
5
+ Coming soon!
6
+
7
+ Track Purity
8
+ ------------
9
+
10
+ Target Effectiveness
11
+ --------------------