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

Affine transform issue #27

Open
ebolotin02 opened this issue Jan 10, 2024 · 1 comment
Open

Affine transform issue #27

ebolotin02 opened this issue Jan 10, 2024 · 1 comment

Comments

@ebolotin02
Copy link

I am trying to mostly do Affine transform, I have a lot of images mostly rotated/scaled/moved coordinates, when I try to add diffeo_start and set to any value I get no output and a RuntimeWarning (invalid value)
params = {
'niter': 200,

      'device': device,
      'sigmaP': 2e-1,
      'sigmaM': 0.18,
      'sigmaB': 0.18,
      'sigmaA': 0.18,
     'diffeo_start' : 100,
      'epL': 5e-11,
      'epT': 5e-4,
      'epV': 5e1
      }

Output message here:

/opt/mamba/envs/stalign_conda_v2/lib/python3.10/site-packages/torch/utils/device.py:77: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor).
return func(*args, **kwargs)
/opt/mamba/envs/stalign_conda_v2/lib/python3.10/site-packages/STalign/STalign.py:1301: UserWarning: Data has no positive values, and therefore cannot be log-scaled.
axE[2].set_yscale('log')
/opt/mamba/envs/stalign_conda_v2/lib/python3.10/site-packages/matplotlib/cm.py:494: RuntimeWarning: invalid value encountered in cast
xx = (xx * 255).astype(np.uint8)

Any ideas? Thanks!

@kpclifton
Copy link
Collaborator

Hi,

Thanks for your question and apologies for the delay in response. I haven't been able to reproduce the issue in which you get no output when using diffeo_start. I have gotten the same output messages before but even with the messages the function is still able to return the intended output in that case.

If you are still interested in diagnosing the issue, could you try reproducing this tutorial notebook which we used diffeo_start to see if you get the output messages but still get the function output?

Best,
Kalen

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