File size: 1,553 Bytes
e2bc82d
 
 
 
 
 
 
1dfc26d
bb3ff53
e2bc82d
 
42bf2f6
 
0a547d7
42bf2f6
 
0a547d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42bf2f6
bb3ff53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: README
emoji: πŸš€
colorFrom: indigo
colorTo: green
sdk: static
pinned: false
short_description: A unified API wrapping 37+ image matching models
license: bsd
---

# Welcome to [Image Matching Models (IMM)](https://github.com/alexstoken/image-matching-models)! 
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. 

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/alexstoken/image-matching-models/blob/main/demo.ipynb)
#### Usage Example:
```
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](https://github.com/alexstoken/image-matching-models) for a full list of supported models and example scripts and notebooks.