EDM: Efficient Deep Feature Matching
November 18, 2025 · View on GitHub
https://github.com/user-attachments/assets/f7e0e026-6b57-4577-a26c-185f82be725e
Installation
conda env create -f environment.yaml
conda activate edm
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia -y
pip install -r requirements.txt
We provide our pretrained model and a fixed onnx model in google drive and Baidu Netdisk. Please place ckpt in folder weights/ and onnx model in folder deploy/.
Demo
See demo_single_pair.ipynb
Deployment
See subdirectory deploy
ONNX Model
Exporting onnx model first:
cd deploy
pip install -r requirements_deploy.txt
python export_onnx.py
Run demo on ONNX Runtime using TensorRT backend:
python run_onnx.py
C++ Inference demo
Refer to edm_onnx_cpp
Testing
Setup the testing subsets of ScanNet and MegaDepth first.
The test and training can be downloaded by download link provided by LoFTR.
Create symlinks from the previously downloaded datasets to data/{{dataset}}/test.
# set up symlinks
ln -s /path/to/scannet-1500-testset/* data/scannet/test
ln -s /path/to/megadepth-1500-testset/* data/megadepth/test
MegaDepth dataset
bash scripts/reproduce_test/outdoor.sh
ScanNet dataset
bash scripts/reproduce_test/indoor.sh
Training
Prepare training data according to the settings of LoFTR.
bash scripts/reproduce_train/outdoor.sh
Acknowledgement
Part of the code is based on EfficientLoFTR and RLE. We thank the authors for their useful source code.
Citation
If you find this project useful, please cite:
@InProceedings{Li_2025_ICCV,
author = {Li, Xi and Rao, Tong and Pan, Cihui},
title = {EDM: Efficient Deep Feature Matching},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2025},
pages = {26198-26208}
}