-
Notifications
You must be signed in to change notification settings - Fork 411
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
3D extension for SSIM #818
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some first comments.
Usually there are 2 ways for testing:
1.) Use random data and compare the results with a gold-standard implementation (like sklearn)
2.) Use predefined-data, calculate result manually once and hardcode those results as targets.
Ideally we would prefer Option 1 since that way you can always test it with additional data if required. I think the sklearn implementation here should also work with 3D data :)
Edit: have a look at the 2d tests here
Codecov Report
@@ Coverage Diff @@
## master #818 +/- ##
=====================================
- Coverage 95% 95% -0%
=====================================
Files 173 173
Lines 7257 7328 +71
=====================================
+ Hits 6900 6958 +58
- Misses 357 370 +13 |
Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Justus Schock <[email protected]>
for more information, see https://pre-commit.ci
I think your current tests that compare the results from torchmetrics with the results from skimage are faulty. |
@weningerleon If you could fix those while working on it, this would also be highly appreciated :D |
Yes, have a look at the updates files ;) |
@Borda why are the tests not running? |
I guess it is due to GH outage... |
@justusschock mind check the failing tests, pls? 🐰 |
talked to him and he is fine with passing tests :)
@weningerleon thank you for all your effort; very appreciated! |
Glad I could help to improve this awesome project! |
What does this PR do?
Fixes #812
Changes StructuralSimilarityIndexMeasure to be able to handle 3D images. Deciding whether the 2D or 3D version is used is determined automatically based on kernel_size. Basic sanity checks are carried out. Produces sensible results on my dataset.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃