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

images in [assets] are used for matching, but getting 0 image matching correspondences #50

Open
demonove opened this issue Aug 18, 2023 · 1 comment

Comments

@demonove
Copy link

extractor = SuperPoint(max_num_keypoints=2048).eval().cuda()
matcher = LightGlue(features='superpoint').eval().cuda()

image0 = load_image('path/assets/DSC_0410.jpg').cuda()
image1 = load_image('path/assets/DSC_0411.jpg').cuda()

feats0 = extractor.extract(image0)
feats1 = extractor.extract(image1)

matches01 = matcher({'image0': feats0, 'image1': feats1})
feats0, feats1, matches01 = [rbd(x) for x in [feats0, feats1, matches01]]
kpts0 = feats0['keypoints']
kpts1 = feats1['keypoints']
print("kpts0 = ",kpts0.shape)
print("kpts1 = ",kpts1.shape)
matches = matches01['matches']
print("matches = ",matches.shape)

kpts0 = torch.Size([2048, 2])
kpts1 = torch.Size([2048, 2])
matches = torch.Size([0, 2])

@demonove
Copy link
Author

emmm, maybe the code download from github is something different from git clone? when i use the .py in git clone the demo runs normal

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

1 participant