LightGlue icon indicating copy to clipboard operation
LightGlue copied to clipboard

matcher needs image as an input

Open YJonmo opened this issue 2 years ago • 3 comments

Hi there,

Thanks for this great work.

In class LightGlue(nn.Module), the images are not mentioned as required_data_keys. But later on they are needed in the forward function: kpts0 = normalize_keypoints( kpts0_, size=data.get('image_size0'), shape=data['image0'].shape) kpts1 = normalize_keypoints( kpts1_, size=data.get('image_size1'), shape=data['image1'].shape)

YJonmo avatar Aug 03 '23 03:08 YJonmo

Hey @YJonmo

Thanks for opening your issue! This was indeed a bug in the initial code, and has since been fixed in PR #22. Furthermore, in the newest PR #37, we perform normalization based on the available keypoints, so it is not required to forward image_size or image to the matcher anymore.

I suggest pulling the latest changes where this issue should be fixed.

Phil26AT avatar Aug 03 '23 14:08 Phil26AT

@YJonmo or you can use matching interface from the kornia: https://kornia.readthedocs.io/en/latest/feature.html#kornia.feature.LightGlueMatcher

ducha-aiki avatar Aug 22 '23 13:08 ducha-aiki

Hi there,

Sorry for reopening this query.

I tried to use kornia as you suggested but have an issue with it.

Have you tried to get the LighGlue in kornia running?

Cheers, Yaqub

YJonmo avatar Nov 10 '23 01:11 YJonmo