Skip to content

Wavelet transforms support#7

Merged
Obi-Wan merged 10 commits intomainfrom
wavelets_support
Oct 31, 2025
Merged

Wavelet transforms support#7
Obi-Wan merged 10 commits intomainfrom
wavelets_support

Conversation

@Obi-Wan
Copy link
Copy Markdown
Contributor

@Obi-Wan Obi-Wan commented Oct 23, 2025

Description / Context

Wavelet transforms enable representing signals in spaces where they are often sparser. This can be leveraged for imposing prior knowledge on the reconstructions, or as up-scaling / down-scaling functions in multi-scale analysis.
This PR implements a wrapper for ptwt (PyTorch-enabled version of pywt) for the discrete wavelet transform and its inverse (i.e., wavedecn and waverecn), and for the stationary wavelet transform (i.e., swtn). The inverse stationary wavelet transform might be added later.

TODO

  • Implement feature:
    • Implement wavedecn and waverecn wrappers for existing 1D, 2D, and 3D functions.
    • Implement swtn
    • Optional: implement iswtn
    • Convert the SWTN loss to use the new swtn function
    • Implement a DWTN loss to use the new dwtn function
  • Add/update documentation:
    • Docstrings
    • An example of different regularizations
  • Add/update examples (of different regularizations)
  • Add/update tests

Notes

This code is heavily inspired by ptwt: It borrows and generalizes various of its internal functions.

Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
@Obi-Wan Obi-Wan self-assigned this Oct 23, 2025
@Obi-Wan Obi-Wan added the enhancement New feature or request label Oct 23, 2025
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola Vigano <nicola.vigano@cea.fr>
Signed-off-by: Nicola Vigano <nicola.vigano@cea.fr>
Signed-off-by: Nicola Vigano <nicola.vigano@cea.fr>
@Obi-Wan
Copy link
Copy Markdown
Contributor Author

Obi-Wan commented Oct 31, 2025

This branch is now complete. The iswtn function can wait, as it is not going to be used in the near future.

@Obi-Wan Obi-Wan merged commit d0f2913 into main Oct 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant