VolkerH / Lattice_Lightsheet_Deskew_Deconv

Open-source, GPU accelerated code for deskewing and deconvolving lattice light sheet data
Other
22 stars 3 forks source link

include gputools.deconv as deconvolution backend #19

Closed VolkerH closed 5 years ago

VolkerH commented 5 years ago

While looking for solutions to also perform GPU-accelerated decon on non-CUDA GPUs I just noticed that gputools also has a RL deconvolution built on the Reikna OpenCL fft. A first test in a Jupyter notebook showed that this works as well (although it seems to produce a few more ringing artefacts) and could be included as an alternative deconvolution backend.

Took about 7 seconds for 10 iterations on my laptop's on-chip GPU. (this is without the I/O)

Include as backend.

VolkerH commented 5 years ago

a quick hack to try this out https://github.com/VolkerH/Lattice_Lightsheet_Deskew_Deconv/blob/gputools_deconv/lls_dd/deconvolution_gputools.py Worked surprisingly well. Signficantly slower than flowdec, but also significantly faster than CPU and not limited to CUDA. Does not seem to keep the FFT plan, so significant potential for speedup by keeping this. Doesn't throw any memory allocation errors for datasets where flowdec competes with gputools. Also has a spatial deconvolutoin option (without FFT). Might be worth a try for small PSFs if we can also find a seperable approximation.

Todo:

VolkerH commented 5 years ago

closing this as this is implemented now. Not yet as a generic class that wraps all deconvolution backends but working.

VolkerH commented 5 years ago

Works reasonably fast with the changes in: https://github.com/VolkerH/Lattice_Lightsheet_Deskew_Deconv/blob/master/lls_dd/deconv_gputools_rewrite.py

Visually not quite the same quality as the flowdec result, but probably not too hard to include the additional tweaks. Low priority at the moment.