Home

Awesome

Neural Reprojection Error: Merging Feature Learning and Camera Pose Estimation (CVPR 2021)

This is the official repository for our paper, which contains model weights and source code to perform NRE-based absolute camera pose estimation.

[Paper] [Supp.Mat.] [ArXiv] [Website]

:gear: Dependencies

This repository was tested with the following packages, other versions should be compatible:

They can all be installed following command:
pip3 install numpy opencv-python torch torchvision pytorch-lightning plotly coloredlogs

:test_tube: Running

For a given pair of images, localizing with the NRE-based pose estimator is as simple as:

<p align="center"> <img src="assets/carbon.png" width="100%"/> </p>

:video_game: Try it

You can run NRE-based camera pose estimation on a Megadepth validation sample in example.ipynb. You will need to have the aforementionned dependencies installed, as well as a GPU with 8Gb+ memory. For simple visualization of the notebook try this link.

:control_knobs: Additional parameters

For additional control over NRE-based camera pose estimation, you can tweak several parameters in config.yml. Notably:

:page_with_curl: BibTex

Please consider citing our work:

@InProceedings{Germain_2021_CVPR,
    author    = {Germain, Hugo and Lepetit, Vincent and Bourmaud, Guillaume},
    title     = {Neural Reprojection Error: Merging Feature Learning and Camera Pose Estimation},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2021},
    pages     = {414-423}
}

:busts_in_silhouette: Acknowledgments

This codebase reuses some code snippets originally written by Paul-Edouard Sarlin for PixLoc.