README.md

May 15, 2026 · View on GitHub

RDD: Robust Feature Detector and Descriptor using Deformable Transformer (CVPR 2025) (IMC 2025 Prize Winner)

Gonglin Chen · Tianwen Fu · Haiwei Chen · Wenbin Teng · Hanyuan Xiao · Yajie Zhao

Project Page

Table of Contents

Updates

[05/14/2026] Retrained RDD and LightGlue after fixing the data leakage issue; more details are available here.

MegaDepth-1500 MegaDepth-View Air-to-Ground
AUC 5°AUC 10°AUC 20° AUC 5°AUC 10°AUC 20° AUC 5°AUC 10°AUC 20°
RDD 51.667.479.6 52.066.577.8 56.270.981.0
RDD + LG 55.171.282.5 57.171.581.6 63.577.786.8
CVPR version 48.664.777.2 38.351.362.3 49.864.775.8

[02/11/2026] We updated RDD by replacing the backbone with ConvNeXt for better performance.

[02/11/2026] Air-to-Ground training data is available here. The aerial images are licensed under CC BY 4.0, and the ground images are sourced from MegaDepth.

[06/06/2025] Evaluation code for ScanNet has been added.

[06/03/2025] We won 4th place in the Image Matching Challenge 2025.

[05/16/2025] SfM reconstruction with COLMAP has been added. We provide a ready-to-use notebook for a simple example. Code adapted from hloc.

[05/12/2025] Training code and new weights released.

Installation

git clone --recursive https://github.com/xtcpete/rdd
cd rdd

# Create conda env
conda create -n rdd python=3.10 pip
conda activate rdd

# Install CUDA 
conda install -c nvidia/label/cuda-11.8.0 cuda-toolkit
# Install torch
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu118
# Install all dependencies
pip install -r requirements.txt
# Compile custom operations.
# You don't have to compile them to run RDD, but it is recommended for better performance.
cd ./src/models/ops
pip install -e .

We provide the download link for:

  • the MegaDepth-1500 test set
  • the MegaDepth-View test set
  • the Air-to-Ground test set
  • the ScanNet-1500 test set
  • two pretrained models: RDD and LightGlue for matching RDD features

Create the data folder and unzip the downloaded test data into it.

Create the weights folder, add the weights to it, and you are ready to go.

Usage

For your convenience, we provide a ready-to-use notebook with examples.

Inference

from src.RDD import build

RDD_model = build()

output = RDD_model.extract(torch.randn(1, 3, 480, 640))

Evaluation

Please note that due to different GPU architectures and the stochastic nature of RANSAC, you may observe slightly different results; Results can be visualized by passing --plot. The CVPR-version model can be evaluated by passing --config with the corresponding weights.

MegaDepth-1500

# Sparse matching
python ./benchmarks/mega_1500.py

# Dense matching
python ./benchmarks/mega_1500.py --method dense

# LightGlue
python ./benchmarks/mega_1500.py --method lightglue

MegaDepth-View

# Sparse matching
python ./benchmarks/mega_view.py

# Dense matching
python ./benchmarks/mega_view.py --method dense

# LightGlue
python ./benchmarks/mega_view.py --method lightglue

Air-to-Ground

# Sparse matching
python ./benchmarks/air_ground.py

# Dense matching
python ./benchmarks/air_ground.py --method dense

# LightGlue
python ./benchmarks/air_ground.py --method lightglue

ScanNet-1500

# Sparse matching
python ./benchmarks/scannet_1500.py

# Dense matching
python ./benchmarks/scannet_1500.py --method dense

# LightGlue
python ./benchmarks/scannet_1500.py --method lightglue

Training

  1. Download the MegaDepth dataset using download.sh and the megadepth_indices from LoFTR. Then the MegaDepth root folder should look like the following:
./data/megadepth/megadepth_indices # indices
./data/megadepth/depth_undistorted # depth maps
./data/megadepth/Undistorted_SfM # images and poses
./data/megadepth/scene_info # indices for training LightGlue
  1. Download the Air-to-Ground training data from here.
  2. Then you can train RDD in two steps: first, the descriptor
python -m training.train 

# You can train the RDD CVPR version with
python -m training.train --config ./configs/cvpr.yaml --no-crop

and then the detector

python -m training.train --detector_from /path/to/descriptor.pth --train_detector --training_res 480

# You can train the RDD CVPR version with
python -m training.train --detector_from /path/to/descriptor.pth --train_detector --training_res 480 --config ./configs/cvpr.yaml --no-crop

Citation

@InProceedings{Chen_2025_CVPR,
    author    = {Chen, Gonglin and Fu, Tianwen and Chen, Haiwei and Teng, Wenbin and Xiao, Hanyuan and Zhao, Yajie},
    title     = {RDD: Robust Feature Detector and Descriptor using Deformable Transformer},
    booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
    month     = {June},
    year      = {2025},
    pages     = {6394-6403}
}

License

License

Acknowledgements

We thank the authors of these great repositories: ALIKE, LoFTR, DeDoDe, XFeat, LightGlue, Kornia, and Deformable DETR, along with many other inspiring works from the community.

LightGlue is trained with Glue Factory.

Supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior/Interior Business Center (DOI/IBC) contract number 140D0423C0075. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation thereon. Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DOI/IBC, or the U.S. Government. We would like to thank Yayue Chen for her help with visualization.