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

JVC giving NaN result in Matlab interface #3

Open
rcasero opened this issue Jan 15, 2012 · 2 comments
Open

JVC giving NaN result in Matlab interface #3

rcasero opened this issue Jan 15, 2012 · 2 comments

Comments

@rcasero
Copy link

rcasero commented Jan 15, 2012

Hi Cory,

I hadn't noticed this, but it seems that even though the CUDA implementation now compiles and runs in Ubuntu with the Gerardus matlab interface, I'm getting as a result a volume of NaNs. For example running

im = deconvolve('jvc', single(nrrd.data), single(psf), 8);

uses Clarity_JansenVanCittertDeconvolve, and im is just an array of NaNs. It works fine with

im = deconvolve('ml', single(nrrd.data), single(psf), 8);

that uses Clarity_MaximumLikelihoodDeconvolve. If I'm not wrong, Clarity_MaximumLikelihoodDeconvolve doesn't have a CUDA implementation.

I was just wondering whether you have observed something similar running Clarity by itself. Maybe this is just a problem when mixing it up with Matlab.

Best regards,

Ramon.

@cquammen
Copy link

Ramon,

Have you tried this outside the MATLAB interface with the same PSF and
image? I know that is more cumbersome, but I'm just curious. How about
trying it without CUDA?

If you want to send me the images, I can take a look and see what is
going on. I'm not sure where the NaNs would be coming from, because
the JVC algorithm doesn't do any division, so no division-by-zero is
occuring.

Thanks,
Cory

On Sun, Jan 15, 2012 at 2:35 PM, rcasero
reply@reply.github.com
wrote:

Hi Cory,

I hadn't noticed this, but it seems that even though the CUDA implementation now compiles and runs in Ubuntu with the Gerardus matlab interface, I'm getting as a result a volume of NaNs. For example running

im = deconvolve('jvc', single(nrrd.data), single(psf), 8);

uses Clarity_JansenVanCittertDeconvolve, and im is just an array of NaNs. It works fine with

im = deconvolve('ml', single(nrrd.data), single(psf), 8);

that uses Clarity_MaximumLikelihoodDeconvolve. If I'm not wrong, Clarity_MaximumLikelihoodDeconvolve doesn't have a CUDA implementation.

I was just wondering whether you have observed something similar running Clarity by itself. Maybe this is just a problem when mixing it up with Matlab.

Best regards,

Ramon.


Reply to this email directly or view it on GitHub:
#3

Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill

@rcasero
Copy link
Author

rcasero commented Jan 22, 2012

On 19/01/12 22:10, cquammen wrote:

Ramon,

Have you tried this outside the MATLAB interface with the same PSF and
image? I know that is more cumbersome, but I'm just curious. How about
trying it without CUDA?

If you want to send me the images, I can take a look and see what is
going on. I'm not sure where the NaNs would be coming from, because
the JVC algorithm doesn't do any division, so no division-by-zero is
occuring.

Hi Cory,

I haven't tried it outside Matlab. I have been running some tests, and
it may have nothing to do with CUDA.

I have compiled Clarity without CUDA, and passed the images, 8
iterations of the JVC deconvolution algorithm. Still get NaNs.

I have then tried running only 1 iteration, and what I see is that some
of the intensity values in the output image are quite large, even though
the PSF and the image have maximum value 255.

I have tried normalizing the PSF and image, and the intensity values get
smaller, although some are still ~100.

If I run 2 iterations instead of 1, then some values get much larger.

So what was happening with 8 iterations is that some of the intensity
values became Inf, and this eventually led to NaN values.

I'll send you two test images.

Cheers,

Ramon.

Dr. Ramón Casero Cañas

Computational Biology
Department of Computer Science
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf +44 (0) 1865 610737
web http://www.cs.ox.ac.uk/people/Ramon.CaseroCanas
photos http://www.flickr.com/photos/rcasero/

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

No branches or pull requests

2 participants