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

Accelerated reconstruction algorithms are unstable at a number of high iterations #490

Open
dreycenfoiles opened this issue Jun 5, 2020 · 4 comments
Labels
bug A confirmed issue that needs to be fixed

Comments

@dreycenfoiles
Copy link
Contributor

When running the accelerated versions of the SIRT and MLEM reconstruction algorithms, the images produced become unstable after a large number of iterations even when the projects are padded with zeros. This can be seen in an example of SIRT using the proj.npy and angle.npy found in the test_data folder.

prj = np.load('proj.npy')
ang = np.load('angle.npy').astype('float32')
pad_width = 50
prj = np.pad(prj, ((0, 0), (0, 0), (pad_width, pad_width)))
norm_sirt = recon(prj, ang, algorithm='sirt',
                  num_iter=100, accelerated=False)
accel_sirt = recon(prj, ang, algorithm='sirt',
                  num_iter=100, accelerated=True) 
plt.imshow(accel_sirt[0]) 
plt.imshow(norm_sirt[0]) 

The above code will produce the following two images. The result of the acceleration algorithm is on top and the non-accelerated is on the bottom.

accel
norm

@dreycenfoiles dreycenfoiles added the feature request Feature requests or discussions label Jun 5, 2020
@carterbox
Copy link
Member

The instability comes in the form of the bright spot in the lower left corner near (135, 0). This spot grows in intensity.

@carterbox carterbox added bug A confirmed issue that needs to be fixed and removed feature request Feature requests or discussions labels Jun 5, 2020
@jrmadsen
Copy link
Collaborator

jrmadsen commented Jun 6, 2020

Is this also reproducible with other images? Also, was this with nearest-neighbor interpolation? What happens when you use linear interpolation? Cubic interpolation?

What kind of GPU was this run on? Bc I ran far more iterations than 100 when I worked on this and don't really remember an issue along these lines. Lower quality GPUs are more prone to numerical faults which could cause something like this.

@jrmadsen
Copy link
Collaborator

jrmadsen commented Jun 6, 2020

I've actually got to do some tomopy benchmarking sometime before Wednesday for a paper so if you send me what I need to run this, I can see if it still shows up on our V100 GPUs.

@carterbox
Copy link
Member

@jrmadsen, @dreycenfoiles doesn't have access to a GPU right now, so we are using the OpenCV implementation. proj.npy and angle.npy are from /test/test_tomopy/test_data.

@dreycenfoiles, can see what happens with other interpolation schemes when he needs something to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed issue that needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants