-
Notifications
You must be signed in to change notification settings - Fork 17
16 - Using a pre-trained denoiser in pytorch in the CIL FISTA algorithm #24
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
Conversation
…IL-User-Showcase into cil_torch_fista_pnp
…IL-User-Showcase into cil_torch_fista_pnp
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.
Looks really amazing. Here my comments.
Just under the heading "FISTA with the proximal step replaced by a learned denoiser" the first sentence, "When we use FISTA to ..." is very long and something seems broken or missing around "with g was a regularization".
On the "pip installing" suggest "pip installing pytorch into an environment that already contains CIL."
Bit further down the term "denoiser model" is used. I don't think "Model" is the best choice, since model means so many different things already including used in "forward model", "linear model", and some inverse problems communities (geoscience for example) use "model" as the name of the "solution". How about just "denoiser" or "denoiser method"?
I think it would be illustrative to demonstrate the effect of the chosen denoiser on an image, as it comes, before applying it as part of the iterative FISTA method. To convey what the denoiser "does" on its own.
Under "too small regularization" parameter typos "postentially" and "converegent".
The part on the cost of copying is potentially really great. I do not understand though "copying 0 to 20 times in each proximal operation", same next line "0 to 100", can you elaborate/rephrase to be clearer?
Next part about the 3D, it says we apply the 2D denoiser 3 times: once in the horizontal plane, once in the vertical plane. I don't get how that makes 3 times? Should it be once horizontal and once in each of the two vertical planes?
In the code after that, I only see the torch thing done one time, between permuting, but not three times? And some code is commented, should it not be or be omitted?
On the runtime reported at the end 5min, is it possible to report also the TV runtime (and FBP perhaps) to have a better reference of whether 5min is fast or slow?
Thanks @jakobsj - I have made those changes
x_torch = self.denoiser(x_torch, tau) # denoiser applied once
x_torch = x_torch.permute( 2, 1, 0, 3 ) #permute
x_torch= self.denoiser(x_torch, tau) # denoiser applied second time
x_torch = x_torch.permute( 2, 1, 0, 3 ) #permute back
|
@leftaroundabout - Would also appreciate if you have any thoughts or comments on the showcase! |
I would say it is a good proof-of-concept display, and well written documentation. Making the plots a bit smaller and perhaps also just removing some would make it rather more readable as a whole, though. I have not tried running the notebook in the current form, nor had much time to think about the technical details again. Regarding the matter of denoising 2 or 3 times: I certainly agree that 2 is enough to ensure all directions get some regularity, but I wonder whether this might introduce some anisotropic bias. One axis is processed twice as much as the others in this scheme, and diagonal features in the YZ plane are only seen by the denoiser at |
Thanks @leftaroundabout for your comments! I have shrunk some of the plots, so they are on one line and less overwhelming! I also went back to applying the denoiser in all 3 dimensions and made it clear that the proper thing to do would be to use a 3D denoiser! @jakobsj - if you are happy with the changes, we can merge |
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.
Very happy indeed, what a brilliant notebook! In particular great to see the effect of applying the denoiser in all three dimensions. Thanks very much @leftaroundabout and @MargaretDuff!
Describe your contribution
This notebook covers:
Checklist when you are ready to request a review
Note: for an example of a contribution, where a license header, description, data link and CIL version has been added, please
see: example_contribution