[ICCV '25 Highlight ๐] CoMatch: Dynamic Covisibility-Aware Transformer for Bilateral Subpixel-Level Semi-Dense Image Matching
July 25, 2025 ยท View on GitHub
Paper
Welcome to the CoMatch repository! This is the official implementation of our ICCV'25 paper titled "CoMatch: Dynamic Covisibility-Aware Transformer for Bilateral Subpixel-Level Semi-Dense Image Matching".
Accepted to ICCV 2025 Conference
๐ง Pipeline Overview
- Stage 1: Given a pair of images, a CNN network extracts coarse features and , alongside fine ones.
- Stage 2: Dynamic covisibility-aware Transformer is stacked times to conduct efficient, robust, and compact context interaction for coarse feature transformation.
- Stage 3: Transformed coarse features are correlated, followed by a dual-softmax (DS) operation to yield the assignment matrix , where mutual nearest neighbor (MNN) matching is used to establish coarse matches .
- Stage 4: Fine distinctive features and at the original resolution are derived by progressively fusing and with backbone features at and resolutions. Later, feature patches centered on are cropped, followed by a two-stage refinement to produce fine matches with bilateral subpixel accuracy.
๐งช Visualization of Covisibility Prediction
We first bilinearly up-sample the covisibility score map to match the original image resolution, and then multiply it with the input image.
๐๏ธ Training and Inference
Installation
conda env create -f environment.yaml
conda activate comatch
pip install torch==2.0.0+cu118 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
The test and training can be downloaded by download link provided by LoFTR
We provide our pre-trained model in download link
Reproduce the testing results with pytorch-lightning
You need to first set up the testing subsets of ScanNet and MegaDepth. We create symlinks from the previously downloaded datasets to data/{{dataset}}/test.
# set up symlinks
ln -s /path/to/scannet-1500-testset/* /path/to/CoMatch/data/scannet/test
ln -s /path/to/megadepth-1500-testset/* /path/to/CoMatch/data/megadepth/test
Inference
conda activate comatch
bash scripts/reproduce_test/outdoor.sh # evalutaion on MegaDepth
bash scripts/reproduce_test/indoor.sh # evalutaion on ScanNet
Training
conda activate comatch
bash scripts/reproduce_train/comatch_outdoor.sh comatch_outdoor
Citation
If you find this code useful for your research, please use the following BibTeX entry.
@inproceedings{li2025comatch,
title={CoMatch: Dynamic Covisibility-Aware Transformer for Bilateral Subpixel-Level Semi-Dense Image Matching},
author={Li, Zizhuo and Lu, yifan and Tang, Linfeng and Zhang, Shihua and Ma, Jiayi},
booktitle={ICCV},
year={2025}
}
๐โโ๏ธ Acknowledgements
We build upon recent advances in Efficient LoFTR and LoFTR.