image-matching-models/se2_loftr
Updated
•
3
image matching; image registration; local features; visual localization
IMM is a unified interface that wraps 37+ image matching models, making it easy to apply the models to a downstream task or eval with minimal boilerplate. We provide a simple API for deploying keypoint, semi dense, and dense image matching models on image pairs.
from matching import get_matcher
from matching.viz import plot_matches
device = 'cuda' # 'cpu'
matcher = get_matcher('my-fav-matcher', device=device) # Choose any of our ~37+ matchers listed below
img_size = 512 # optional
img0 = matcher.load_image('assets/example_pairs/outdoor/montmartre_close.jpg', resize=img_size)
img1 = matcher.load_image('assets/example_pairs/outdoor/montmartre_far.jpg', resize=img_size)
result = matcher(img0, img1)
# result.keys() = ['num_inliers', 'H', 'all_kpts0', 'all_kpts1', 'all_desc0', 'all_desc1', 'matched_kpts0', 'matched_kpts1', 'inlier_kpts0', 'inlier_kpts1']
plot_matches(img0, img1, result, save_path='plot_matches.png')
See our github repo for a full list of supported models and example scripts and notebooks.