Skip to content

ShngJZ/PMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PMatch

This repository contains the official implementation of the paper:
PMatch: Paired Masked Image Modeling for Dense Geometric Matching, CVPR'23, [arXiv]

Authors: Shengjie Zhu and Xiaoming Liu

Installation

# Clone the repository
git clone https://github.com/shngjz/PMatchRelease.git
cd PMatchRelease

# Install dependencies
conda create -n pmatch python=3.9
conda activate pmatch
pip install -r requirements.txt

Download Datasets

Download the benchmark MegaDepth and ScanNet datasets from Huggingface. Please ensure you agree to the licenses for each dataset.

git clone https://huggingface.co/datasets/shngjz/ce29d0e9486d476eb73163644b050222/
mv ce29d0e9486d476eb73163644b050222 TwoViewBenchmark

Checkpoints

Download the pre-trained models from Huggingface using our provided script:

# Make the script executable if needed
chmod +x download_models.sh

# Run the download script
./download_models.sh

This will automatically download both models and place them in the checkpoints directory.

Demo

Run a simple demo with your own images:

python PMatch/Benchmarks/demo.py

Benchmarking

Evaluate PMatch on MegaDepth dataset:

python PMatch/Benchmarks/benchmark_pmatch_megadepth.py \
    --data_path /path/to/TwoViewBenchmark/megadepth_test_1500 \
    --checkpoints checkpoints/pmatch_mega.pth

Evaluate PMatch on ScanNet dataset:

python PMatch/Benchmarks/benchmark_pmatch_scannet.py \
    --data_path /path/to/TwoViewBenchmark/scannet_test_1500 \
    --checkpoints checkpoints/pmatch_scannet.pth

Citation

If you find this code useful for your research, please cite our paper:

@inproceedings{zhu2023pmatch,
    title={PMatch: Paired Masked Image Modeling for Dense Geometric Matching},
    author={Zhu, Shengjie and Liu, Xiaoming},
    booktitle={CVPR},
    year={2023}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published