BioImageAnalysisNotebooks icon indicating copy to clipboard operation
BioImageAnalysisNotebooks copied to clipboard

fix F1 score computation

Open ClementCaporal opened this issue 2 years ago • 1 comments

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_projection to cle.sum_y_projection to correctly count ambiguous_matches
    • update to the way false positives are detected to match the new distance_matrix shape
    • Following https://arxiv.org/pdf/2206.01653.pdf recommandation (Fig 14), add ambiguous match to false positive in the F1 score
  • Update the discussion about how to choose the threshold and its figure. image --> 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

ClementCaporal avatar Jun 19 '23 17:06 ClementCaporal

If it's useful, I can also add to the PR :

  1. 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)

  2. Show the evolution of the F1 score depending on the threshold

  3. 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?

  4. replace the term "spot" with "center point" to match the naming from: https://arxiv.org/abs/2206.01653

What do you think?

ClementCaporal avatar Jun 19 '23 17:06 ClementCaporal