Skip to content

udaysankar01/xfeat_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Implementation of XFeat

This repo contains the C++ implementation of the CVPR 2024 paper XFeat: Accelerated Features for Lightweight Image Matching.

Original Repo: https://github.com/verlab/accelerated_features

Paper: https://arxiv.org/abs/2404.19174

Image Matches

Prerequisite

In this project, the following packages are used. Make sure the right versions of libraries are installed and linked.

  1. Tested in Ubuntu 22.04
  2. Nvidia-driver-535 and CUDA Toolkit 12.2
  3. gcc and g++ compilers 11.4.0
  4. CMake 3.22.1
  5. OpenCV 4.5.4
  6. libtorch: Please avoid using the pre-built version of libtorch since it will cause linking issues (CXX11 ABI issue)

Setup

To download the project:

git clone https://github.com/udaysankar01/xfeat_cpp
cd xfeat_cpp

To install the necessary packages (OpenCV and libtorch):

chmod +x project_setup.sh
./project_setup.sh

To build the project:

mkdir -p build
cd build
cmake ..
make -j4

Running

To perform matching between two images, use this command:

./build/examples/example /absolute/path/to/image1 /absolute/path/to/image2

Matching Example:

./build/examples/match $(pwd)/ref.png $(pwd)/tgt.png

Realtime Matching Example:

./build/examples/realtime_demo

Bibtex Citation

@misc{potje2024xfeatacceleratedfeatureslightweight,
      title={XFeat: Accelerated Features for Lightweight Image Matching},
      author={Guilherme Potje and Felipe Cadar and Andre Araujo and Renato Martins and Erickson R. Nascimento},
      year={2024},
      eprint={2404.19174},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2404.19174},
}