-
Notifications
You must be signed in to change notification settings - Fork 279
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
How to get description from giving point(x,y) #101
Comments
Hey @phamkhactu, LightGlue actually takes the description of each point(x,y) as input to find correspondences between 2 images. However, you can get the description from the extractors, something like this: from lightglue import LightGlue, SuperPoint
from lightglue.utils import load_image, rbd
# SuperPoint+LightGlue
extractor = SuperPoint(max_num_keypoints=2048).eval().cuda() # load the extractor
matcher = LightGlue(features='superpoint').eval().cuda() # load the matcher
# load image as a torch.Tensor on GPU with shape (3,H,W), normalized in [0,1]
image0 = load_image('path/to/image_0.jpg').cuda()
# extract local features
feats0 = extractor.extract(image0) # auto-resize the image, disable with resize=None
keypoints, descriptors = feats0["keypoints"][0], feats0["descriptors"][0] |
Hi @Phil26AT As your describe above, each point has description. But I see that model limited by max_num_keypoints, so with image has 1280x720, some pixel doesn't has description. I am so sorry if I misunderstand your response. |
Thanks for great work!
I want to get description from point(x,y).
For example in cv2 I can get:
but I don't know the way to get it in LightGlue
I'm happy for your help! Thank you.
The text was updated successfully, but these errors were encountered: