Adds HaarPSI as additional metric and loss#7
Open
TimPaquaij wants to merge 1 commit into
Open
Conversation
**.DS_Store Add HaarPSI and VSI Added HaarPSI loss and VSI to base (rec and rs) Error after running test files fixed fix fix Added test function for loss Added test_metric update Remove VSI and redundant files Update style update Update Last update Update DOCS and minor fixes Update patial.func Last update Update quantitative Update style and docs Update req Change ref Fix style reconstruction/base.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a PR that adds the HaarPSI as an additional metric and loss. This image quality assessment (IQA) metric scores well in relation to the radiologist's opinions, making it a valid measurement to add to atomic.
Studie for IQA and radiologist opinion:
Kastryulin, S., Zakirov, J., Pezzotti, N., & Dylov, D. V. (2023). Image quality assessment for magnetic resonance imaging. IEEE Access, 11, 14154-14168.
Metric:
Reisenhofer, R., Bosse, S., Kutyniok, G., & Wiegand, T. (2018). A Haar wavelet-based perceptual similarity index for image quality assessment. Signal Processing: Image Communication, 61, 33-43.
Optimised parameters for medical images:
Karner, C., Gröhl, J., Selby, I., Babar, J., Beckford, J., Else, T. R., ... & Breger, A. (2024). Parameter choices in HaarPSI for IQA with medical images. arXiv preprint arXiv:2410.24098.
Collection: Multi-task, Reconstruction and Qualification
Changelog
See PR
Usage
Loss
Examples
----------
# >>> loss = HaarPSILoss()
#>>> x = torch.rand(3, 3, 256, 256, requires_grad=True)
#>>> y = torch.rand(3, 3, 256, 256)
#>>> output = loss(x, y)
#>>> output.backward()
"""
Metric
Examples
--------
>>> from atommic.collections.reconstruction.metrics.reconstruction_metrics import haarpsi
>>> import numpy as np
>>> datax = np.random.rand(3, 100, 100)
>>> datay = datax * 0.5
>>> haarpsi(datax, datay)
0.65396311731067
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information