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

'HomographyWarper' object has no attribute 'warp_grid' #29

Open
jia199903 opened this issue Jun 4, 2024 · 3 comments
Open

'HomographyWarper' object has no attribute 'warp_grid' #29

jia199903 opened this issue Jun 4, 2024 · 3 comments

Comments

@jia199903
Copy link

warper = tgm.HomographyWarper(I1Tensor.size()[2], I1Tensor.size()[3])
grid = warper.warp_grid(torch.from_numpy(bestParam.astype(np.float32)).unsqueeze(0).cuda())

作者您好,我在运行这段代码时会报错AttributeError: 'HomographyWarper' object has no attribute 'warp_grid',您知道是为什么吗

@abdullah-altun
Copy link

I solved the problem where the usage of the warp_grid property of the HomographyWarper class was changed in this way:
Replace 'flowCoarse = warper.warp_grid(bestPara)' with

'warper.precompute_warp_grid(bestPara)
flowCoarse = warper._warped_grid'

@jia199903
Copy link
Author

hello,Does this happen when you test some pictures with ransac-flow like below (straight line bend)
image

@jia199903
Copy link
Author

@abdullah-altun
#29 (comment)
Do you know why this max piexl is 24

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