phernst / pytorch_radon

Pytorch implementation of scikit-image's radon function and more
MIT License
25 stars 11 forks source link

Vectorize for loop #3

Open zgyr opened 4 years ago

zgyr commented 4 years ago

Is it possible to unwrap this transformation loop? If it is possible to collect all the slices into one tensor and send for processing, it should be more efficient. And isn't another there a faster way to do this transform?

phernst commented 4 years ago

Yes, that's possible, see here. The problem is that self.all_grids is precomputed and can become pretty large depending on the number of projections and their size. Pushing it onto the gpu as a whole wouldn't work then. Transfering single grids to the gpu allows larger/more grids but decreases the speed, of course.