Skip to content

vmanoj1996/libxfeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libxfeat - XFeat Feature Extractor written in native CUDA and C++

Build instructions

mkdir build 
cd build

cmake .. && make -j && ctest --verbose

# some tests require a python environment containing torch or numpy etc. Edit the below lines in CMakeLists.txt
# source ~/miniconda3/etc/profile.d/conda.sh && conda activate cusfm


# For debug builds, use cmake -DCMAKE_BUILD_TYPE=Debug ..



Comparison against Pytorch implementation

see perf_xfeat.py
--- Performance Summary (original implementation on 4070) ---
Total time for 1000 runs: 1087.497 ms
Average latency:        1.087 ms
Average throughput (FPS): 919.543
Median latency:         1.078 ms
Minimum latency:        1.050 ms
Maximum latency:        1.728 ms
---------------------------

--- Performance Summary (This implementation with TF32 multiplications enabled (tensor cores) on 4070) ---
cmake -D USE_TF32=ON ..
Total time for 1000 runs: 714.166 ms
Average latency:        0.714 ms
Average throughput (FPS): 1400.234
Median latency:         0.695 ms
Minimum latency:        0.689 ms
Maximum latency:        0.763 ms
Mean,var: 0.714 ± 0.030 ms
---------------------------

--- Performance Summary (This implementation with full FP32 on 4070) ---
cmake -D USE_TF32=OFF ..
Total time for 1000 runs: 815.103 ms
Average latency:        0.815 ms
Average throughput (FPS): 1226.839
Median latency:         0.799 ms
Minimum latency:        0.792 ms
Maximum latency:        0.859 ms
Mean,var: 0.815 ± 0.025 ms
---------------------------

Sample Heatmap output

TajMahal heatmap_visualization

Citation

If you find this code useful for your research, please cite the original paper along with this repo:

@software{Velmurugan_libxfeat_2025,
  author = {Velmurugan, Manoj},
  title = {{libxfeat: A C++/CUDA Implementation of XFeat}},
  url = {https://github.com/vmanoj1996/libxfeat},
  year = {2025}
}
@INPROCEEDINGS{potje2024cvpr,
  author={Potje, Guilherme and Cadar, Felipe and Araujo, André and Martins, Renato and Nascimento, Erickson R.},
  booktitle={2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, 
  title={XFeat: Accelerated Features for Lightweight Image Matching}, 
  year={2024},
  pages={2682-2691},
  keywords={Visualization;Accuracy;Image matching;Pose estimation;Feature extraction;Hardware;Real-time systems;Image matching;Local features;Lightweight;Fast},
  doi={10.1109/CVPR52733.2024.00259}}

https://github.com/verlab/accelerated_features

About

XFeat implementation in native CUDA and C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published