rpautrat / SuperPoint

Efficient neural feature detector and descriptor
MIT License
1.88k stars 416 forks source link

Pixel coordinates from feature extractor #242

Closed rishabhramteke closed 2 years ago

rishabhramteke commented 2 years ago

How can I get the pixel coordinates from the keypoints or descriptors obtained from the superpoint feature extractor?

rpautrat commented 2 years ago

Hi, check this out: https://github.com/rpautrat/SuperPoint/blob/313a0a115961bc2a98a5ed1d7bde33fa99542398/superpoint/match_features_demo.py#L19 This code is only extracting integer keypoints though, but you can remove the cast to integers, and use torch.nn.functional.grid_sample to extract the descriptors from float keypoints.