Skip to content

Adds HaarPSI as additional metric and loss#7

Open
TimPaquaij wants to merge 1 commit into
wdika:mainfrom
TimPaquaij:metrics
Open

Adds HaarPSI as additional metric and loss#7
TimPaquaij wants to merge 1 commit into
wdika:mainfrom
TimPaquaij:metrics

Conversation

@TimPaquaij

Copy link
Copy Markdown

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:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

  • Related to # (issue)

**.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
@github-actions github-actions Bot added the Stale label Dec 11, 2024
@github-actions github-actions Bot closed this Dec 19, 2024
@wdika wdika reopened this Jan 9, 2025
@github-actions github-actions Bot removed the Stale label Jan 10, 2025
@github-actions github-actions Bot added the Stale label Jan 25, 2025
@github-actions github-actions Bot closed this Feb 1, 2025
@wdika wdika reopened this Feb 10, 2025
@github-actions github-actions Bot removed the Stale label Feb 11, 2025
@github-actions github-actions Bot added the Stale label Feb 25, 2025
@github-actions github-actions Bot closed this Mar 4, 2025
@wdika wdika reopened this Mar 6, 2025
@github-actions github-actions Bot removed the Stale label Mar 7, 2025
@github-actions github-actions Bot added the Stale label Mar 21, 2025
@github-actions github-actions Bot closed this Mar 28, 2025
@wdika wdika reopened this Mar 28, 2025
@github-actions github-actions Bot removed the Stale label Mar 29, 2025
@github-actions github-actions Bot added the Stale label Apr 12, 2025
@wdika wdika added help wanted Extra attention is needed and removed Stale labels Apr 14, 2025
@github-actions github-actions Bot added the Stale label Apr 29, 2025
@wdika wdika removed the Stale label Apr 29, 2025
@github-actions github-actions Bot added the Stale label May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
Repository owner deleted a comment from github-actions Bot May 14, 2025
@wdika wdika removed the Stale label May 14, 2025
@github-actions github-actions Bot added the Stale label May 29, 2025
@wdika wdika removed the Stale label May 30, 2025
@github-actions github-actions Bot added the Stale label Jun 14, 2025
@wdika wdika removed the Stale label Jun 17, 2025
@github-actions github-actions Bot added the Stale label Jul 2, 2025
@wdika wdika removed the Stale label Jul 2, 2025
@github-actions github-actions Bot added the Stale label Jul 17, 2025
@github-actions github-actions Bot closed this Jul 24, 2025
@wdika wdika reopened this Oct 7, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Repository owner deleted a comment from github-actions Bot Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants