leaptorch Projector's bp and fbp error
Hi, when I use Projector class in leaptorch: proj = Projector(forward_project=False, use_static=True, use_gpu=True, gpu_device=device, batch_size=batchSize) f = proj(g) proj.leapct.fbp(g, f0) I found that f is in the order of 10^3, while f0 is in the order 10^(-4), is here any mistake I made? Actually I need to use f= proj(g) in my program, but the result's order is far from the order of FBP's result.
I may need some clarification on what the issue is here.
What I can tell you is that f is the backprojection of g and f0 is the FBP reconstruction of g, so the scaling and appearance of f and f0 should definitely be different. Note that backprojection is NOT the inverse of forward projection. Backprojection is the ADJOINT of forward projection.
I may need some clarification on what the issue is here.
What I can tell you is that f is the backprojection of g and f0 is the FBP reconstruction of g, so the scaling and appearance of f and f0 should definitely be different. Note that backprojection is NOT the inverse of forward projection. Backprojection is the ADJOINT of forward projection. In my iterative unrolling program, I need to call the forward projection A, and the transpose of A, i.e. A_T, which Class in the leaptorch can I use?
Sorry for the slow response; I was on vacation.
You may just want to use the tomographicModels class in leapctype.py. leaptorch has the PyTorch autograd stuff in it, but if all you want is to perform forward and back projections, just use leapctype; it works with both PyTorch tensors and numpy arrays. Just use it like this;
from leapctype import * leapct = tomographicModels() ... g = leapct.allocate_projections() f = leapct.allocate_volume() ...
Forward Projection
leapct.project(g,f)
Backprojection
leapct.backproject(g,f)
There are several examples of this in the leapctype demos folder. For example, see here.
Hi kyle,
Does the tomographicModels class work on GPU?
Yes, of course!