BioImageAnalysisNotebooks
BioImageAnalysisNotebooks copied to clipboard
fix F1 score computation
Partially? close https://github.com/haesleinhuepf/BioImageAnalysisNotebooks/issues/27
Hello,
I hope you are going well.
This PR proposes to update :
- The distance matrix label plot to make it more self-explanatory
- The
compute_true_positives- change
cle.maximum_y_projectiontocle.sum_y_projectionto correctly count ambiguous_matches - update to the way false positives are detected to match the new
distance_matrixshape - Following https://arxiv.org/pdf/2206.01653.pdf recommandation (Fig 14), add ambiguous match to false positive in the F1 score
- change
- Update the discussion about how to choose the threshold and its figure.
--> I think the previous graph (in red) had errors as there are 15 annotated cells, and all detected center point should be ambiguous with a big enough threshold?
Thank you,
Clément
If it's useful, I can also add to the PR :
-
manage image anisotropy similar to : https://haesleinhuepf.github.io/BioImageAnalysisNotebooks/19_spatial_transforms/scaling.html (plus it seems to me that the anisotropy is already relatively corrected in the recorded image)
-
Show the evolution of the F1 score depending on the threshold
-
propose a function that handles ambiguous cases using the greedy assignment or Hungarian assignment algorithm shown in figure DG9.1 (https://arxiv.org/abs/2206.01653) that are, if I understood correctly, preferred to validate center point detection?
-
replace the term "spot" with "center point" to match the naming from: https://arxiv.org/abs/2206.01653
What do you think?