README / README.md
astoken's picture
Update README.md
bb3ff53 verified
---
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.