|
|
пре 1 месец | |
|---|---|---|
| .. | ||
| assets | пре 1 месец | |
| configs | пре 1 месец | |
| data | пре 1 месец | |
| demo | пре 1 месец | |
| docs | пре 1 месец | |
| notebooks | пре 1 месец | |
| scripts | пре 1 месец | |
| src | пре 1 месец | |
| .gitignore | пре 1 месец | |
| .gitmodules | пре 1 месец | |
| LICENSE | пре 1 месец | |
| README.md | пре 1 месец | |
| environment.yaml | пре 1 месец | |
| requirements.txt | пре 1 месец | |
| test.py | пре 1 месец | |
| train.py | пре 1 месец | |
LoFTR: Detector-Free Local Feature Matching with Transformers
Jiaming Sun*, Zehong Shen*, Yu'ang Wang*, Hujun Bao, Xiaowei Zhou
CVPR 2021
Discussions about the paper are welcomed in the discussion panel.
:thinking: FAQ
:triangular_flag_on_post: Updates
:white_check_mark: Integrated to Huggingface Spaces with Gradio. See Gradio Web Demo
Want to run LoFTR with custom image pairs without configuring your own GPU environment? Try the Colab demo:
LoFTR is integrated into kornia library since version 0.5.11.
pip install kornia
Then you can import it as
from kornia.feature import LoFTR
See tutorial on using LoFTR from kornia here.
# For full pytorch-lightning trainer features (recommended)
conda env create -f environment.yaml
conda activate loftr
# For the LoFTR matcher only
pip install torch einops yacs kornia
We provide the download link to
By now, the environment is all set and the LoFTR-DS model is ready to go! If you want to run LoFTR-OT, some extra steps are needed:
An example is given in notebooks/demo_single_pair.ipynb.
Run the online demo with a webcam or video to reproduce the result shown in the GIF above.
cd demo
./run_demo.sh
You need to setup the testing subsets of ScanNet and MegaDepth first. We create symlinks from the previously downloaded datasets to data/{{dataset}}/test.
# set up symlinks
ln -s /path/to/scannet-1500-testset/* /path/to/LoFTR/data/scannet/test
ln -s /path/to/megadepth-1500-testset/* /path/to/LoFTR/data/megadepth/test
conda activate loftr
# with shell script
bash ./scripts/reproduce_test/indoor_ds.sh
# or
python test.py configs/data/scannet_test_1500.py configs/loftr/loftr_ds.py --ckpt_path weights/indoor_ds.ckpt --profiler_name inference --gpus=1 --accelerator="ddp"
For visualizing the results, please refer to notebooks/visualize_dump_results.ipynb.
See Training LoFTR for more details.
If you find this code useful for your research, please use the following BibTeX entry.
@article{sun2021loftr,
title={{LoFTR}: Detector-Free Local Feature Matching with Transformers},
author={Sun, Jiaming and Shen, Zehong and Wang, Yuang and Bao, Hujun and Zhou, Xiaowei},
journal={{CVPR}},
year={2021}
}
This work is affiliated with ZJU-SenseTime Joint Lab of 3D Vision, and its intellectual property belongs to SenseTime Group Ltd.
Copyright SenseTime. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.