Skip to content
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

Add IRFFT2 transform #1656

Closed
Tracked by #1646
guarin opened this issue Oct 2, 2024 · 6 comments · Fixed by #1662
Closed
Tracked by #1646

Add IRFFT2 transform #1656

guarin opened this issue Oct 2, 2024 · 6 comments · Fixed by #1662

Comments

@guarin
Copy link
Contributor

guarin commented Oct 2, 2024

See #1646 for information

Please use https://pytorch.org/docs/stable/generated/torch.fft.irfft2.html to implement the transform.

@guarin guarin changed the title Add IRFFT2 (inverse fast fourier) transform using https://pytorch.org/docs/stable/generated/torch.fft.irfft2.html#torch.fft.irfft2 Add IRFFT2 transform Oct 2, 2024
@snehilchatterjee
Copy link
Contributor

snehilchatterjee commented Oct 2, 2024

Hi, I’d like to work on this and RFFT2 as my first issues! Can you assign them to me?

@guarin
Copy link
Contributor Author

guarin commented Oct 2, 2024

Hi, yes of course, I'll assign the issue to you.

@snehilchatterjee
Copy link
Contributor

Hi, I’ve added the RFFT2D and IRFFT2D transforms to lightly/transforms. As mentioned in the original issue, I ensured that the input and output formats for both transforms are C, H, W.

Additionally, I used an image from the BSD100 dataset to verify that the transforms are working as expected. I obtained the frequency image using RFFT2D and passed it through IRFFT2D to confirm that the original image is restored correctly.

Is there anything else I might have missed in addressing the issue? If everything is in order, would it be alright to open a PR for these two transforms?

@guarin
Copy link
Contributor Author

guarin commented Oct 3, 2024

This sounds great! Feel free to open a PR

@snehilchatterjee
Copy link
Contributor

Hi have opened a PR but it seems that it failed on format check because of init.py because I didn't want to change the format of the file from the master branch. Please let me know if you want me to change the format for init.py so that it passes the format check.

@guarin
Copy link
Contributor Author

guarin commented Oct 3, 2024

I answered directly in the PR :)

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

Successfully merging a pull request may close this issue.

2 participants