Skip to content

Image quality and segmentation metrics #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Feb 3, 2023
Merged

Conversation

jdeschamps
Copy link
Contributor

@jdeschamps jdeschamps commented May 26, 2021

A bunch of classes to compute image quality or segmentation metrics between two RAI. The results have been checked against original implementations (Cell Tracking Challenge, StarDist) or widely used librairies (scikit-image).

Image Quality:

  • Mean squared error (MSE)
  • Peak signal-to-noise ratio (PSNR)
  • Structural similarity index measure (SSIM)

Segmentation:

  • SEG (from the Cell Tracking Challenge)
  • LazySEG: SEG calculation compatible with lazy loading and multithreading, accumulating the SEG score from each image pair added to the computation.
  • MultiMetrics: TP, FP, FN, Precision, Recall, F1, Accuracy, mean matched and mean true IoU (inspired from StarDist)
  • LazyMultiMetrics: MultiMetrics calculations compatible with lazy loading and multithreading, accumulating the SEG score from each image pair added to the computation.

Copy link
Member

@imagejan imagejan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jdeschamps for this work! I think some of the basic functionality should actually live in imglib2-roi where we have already similar methods related to overlapping labels.

@jdeschamps
Copy link
Contributor Author

jdeschamps commented Aug 30, 2021

Right now this PR has to wait for the resolution of imglib/imglib2-roi#59 !

edit: imglib/imglib2-roi#59 has been merged

@jdeschamps
Copy link
Contributor Author

jdeschamps commented Oct 5, 2021

New commits:

This PR is dependent on imglib2-roi 0.11.1-SNAPSHOT (currently 0.10.4 in the scijava-pom 30.0.0 and 0.11.0 in the scijava-pom 32.0.0-SNAPSHOT)

@ctrueden
Copy link
Member

ctrueden commented Oct 5, 2021

@jdeschamps Releasing imglib2-roi 0.12.0 now. Edit: It is released.

@jdeschamps
Copy link
Contributor Author

@tpietzsch Any news on this front? :D

@tpietzsch
Copy link
Member

tpietzsch commented Jan 5, 2023

@jdeschamps I rebased on current master (3dcd24c) and added a few easy simplifications. I will add more comments inline, but I think in principle this is fine as it is. Simplifications/optimizations can be made later.

The only real problem I see is MunkresKuhnAlgorithm (adapted from trackmate) which is under GPL license. This is incompatible with the BSD license of imglib2-algorithm. So either

  • this class (and MultiMetrics, LazyMultiMetrics that use it) should be moved to imglib2-algorithm-gpl, or
  • we should obtain permission to relicense it under BSD, or
  • this should be swapped with a different, compatibly licensed, implementation of the hungarian algorithm.

Whatever you prefer.

@jdeschamps
Copy link
Contributor Author

I get that!

I'd be in favor of relicensing. We should then ask @dscho whether he agrees to relicense MunkresKuhnAlgorithm.java from GPLv3 to BSD.

Do you know from the top of your head an alternative implementation? Otherwise I'd wait a bit and start looking for one in case @dscho disagrees.

@dscho
Copy link
Contributor

dscho commented Jan 12, 2023

I am fine with the proposed relicensing!

@tpietzsch
Copy link
Member

Awesome! Thank you Johannes! @dscho

@tpietzsch tpietzsch merged commit 03c6637 into imglib:master Feb 3, 2023
@tpietzsch
Copy link
Member

finally...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants