Skip to content

Commit

Permalink
project page
Browse files Browse the repository at this point in the history
  • Loading branch information
Parskatt committed Dec 29, 2023
1 parent d743898 commit 32da5f7
Show file tree
Hide file tree
Showing 79 changed files with 3,345 additions and 5,116 deletions.
5 changes: 0 additions & 5 deletions .gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

83 changes: 1 addition & 82 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1 @@
#
<p align="center">
<h1 align="center"> <ins>RoMa</ins> 🏛️:<br> Robust Dense Feature Matching</h1>
<p align="center">
<a href="https://scholar.google.com/citations?user=Ul-vMR0AAAAJ">Johan Edstedt</a>
·
<a href="https://scholar.google.com/citations?user=HS2WuHkAAAAJ">Qiyu Sun</a>
·
<a href="https://scholar.google.com/citations?user=FUE3Wd0AAAAJ">Georg Bökman</a>
·
<a href="https://scholar.google.com/citations?user=6WRQpCQAAAAJ">Mårten Wadenbäck</a>
·
<a href="https://scholar.google.com/citations?user=lkWfR08AAAAJ">Michael Felsberg</a>
</p>
<h2 align="center"><p>
<a href="https://arxiv.org/abs/2305.15404" align="center">Paper</a> |
<a href="https://parskatt.github.io/RoMa" align="center">Project Page (TODO)</a>
</p></h2>
<div align="center"></div>
</p>
<br/>
<p align="center">
<img src="https://github.com/Parskatt/RoMa/assets/22053118/15d8fea7-aa6d-479f-8a93-350d950d006b" alt="example" width=80%>
<br>
<em>RoMa is the robust dense feature matcher capable of estimating pixel-dense warps and reliable certainties for almost any image pair.</em>
</p>

## Setup/Install
In your python environment (tested on Linux python 3.10), run:
```bash
pip install -e .
```
## Demo / How to Use
We provide two demos in the [demos folder](demo).
Here's the gist of it:
```python
from roma import roma_outdoor
roma_model = roma_outdoor(device=device)
# Match
warp, certainty = roma_model.match(imA_path, imB_path, device=device)
# Sample matches for estimation
matches, certainty = roma_model.sample(warp, certainty)
# Convert to pixel coordinates (RoMa produces matches in [-1,1]x[-1,1])
kptsA, kptsB = roma_model.to_pixel_coordinates(matches, H_A, W_A, H_B, W_B)
# Find a fundamental matrix (or anything else of interest)
F, mask = cv2.findFundamentalMat(
kptsA.cpu().numpy(), kptsB.cpu().numpy(), ransacReprojThreshold=0.2, method=cv2.USAC_MAGSAC, confidence=0.999999, maxIters=10000
)
```

**New**: You can also match arbitrary keypoints with RoMa. A demo for this will be added soon.

## Reproducing Results
The experiments in the paper are provided in the [experiments folder](experiments).

### Training
1. First follow the instructions provided here: https://github.com/Parskatt/DKM for downloading and preprocessing datasets.
2. Run the relevant experiment, e.g.,
```bash
torchrun --nproc_per_node=4 --nnodes=1 --rdzv_backend=c10d experiments/roma_outdoor.py
```
### Testing
```bash
python experiments/roma_outdoor.py --only_test --benchmark mega-1500
```
## License
All our code except DINOv2 is MIT license.
DINOv2 has an Apache 2 license [DINOv2](https://github.com/facebookresearch/dinov2/blob/main/LICENSE).

## Acknowledgement
Our codebase builds on the code in [DKM](https://github.com/Parskatt/DKM).

## BibTeX
If you find our models useful, please consider citing our paper!
```
@article{edstedt2023roma,
title={{RoMa: Robust Dense Feature Matching}},
author={Edstedt, Johan and Sun, Qiyu and Bökman, Georg and Wadenbäck, Mårten and Felsberg, Michael},
journal={arXiv preprint arXiv:2305.15404},
year={2023}
}
```
# RoMa Project Page
Binary file removed assets/sacre_coeur_A.jpg
Binary file not shown.
Binary file removed assets/sacre_coeur_B.jpg
Binary file not shown.
Binary file removed assets/toronto_A.jpg
Binary file not shown.
Binary file removed assets/toronto_B.jpg
Binary file not shown.
2 changes: 0 additions & 2 deletions data/.gitignore

This file was deleted.

46 changes: 0 additions & 46 deletions demo/demo_3D_effect.py

This file was deleted.

33 changes: 0 additions & 33 deletions demo/demo_fundamental.py

This file was deleted.

47 changes: 0 additions & 47 deletions demo/demo_match.py

This file was deleted.

43 changes: 0 additions & 43 deletions demo/demo_match_opencv_sift.py

This file was deleted.

2 changes: 0 additions & 2 deletions demo/gif/.gitignore

This file was deleted.

Loading

0 comments on commit 32da5f7

Please sign in to comment.