This is the implementation of the paper "Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions" by Ignacio Rocco, Relja Arandjelović and Josef Sivic [arXiv].
For installation instructions, please see INSTALL.md.
For a demo of the method, see the Jupyter notebook demo/demo.ipynb
.
To train a model with the default parameters run python train.py
.
- Browse to
eval/
. - Run
python eval_hpatches_extract.py
adjusting the checkpoint and experiment name. - Use
eval_hpatches_generate_plot.ipynb
with the appropriate experiment name to generate the plot.
In order to run the InLoc evaluation, you first need to clone the InLoc demo repo, and download and compile all the required depedencies. Then:
- Browse to
eval/
. - Run
python eval_inloc_extract.py
adjusting the checkpoint and experiment name. This will generate a series of matches files in thedatasets/inloc/matches/
folder that then need to be fed to the InLoc evaluation Matlab code. - Modify the
eval/eval_inloc_compute_poses.m
file provided in this repo to indicate the path of the InLoc demo repo, and the name of the experiment (the particular folder name insidedatasets/inloc/matches/
), and run it using Matlab. - Use the
eval/eval_inloc_generate_plot.m
file to plot the results from shortlist file generated in the previous stage:/your_path_to/InLoc_demo_old/experiment_name/shortlist_densePV.mat
. Precomputed shortlist files are provided indatasets/inloc/shortlist
.
In order to run the Aachen Day-Night evaluation, you first need to clone the Visualization benchmark repo, and download and compile all the required depedencies (in particular, you'll need to compile Colmap if you have not done so yet). Then:
- Browse to
eval/
. - Run
python eval_aachen_extract.py
adjusting the checkpoint and experiment name. - Copy the
eval_aachen_reconstruct.py
file tovisuallocalizationbenchmark/local_feature_evaluation
and run it in the following way:
python eval_aachen_reconstruct.py
--dataset_path /path_to_aachen/aachen
--colmap_path /local/colmap/build/src/exe
--method_name experiment_name
- Upload the file
/path_to_aachen/aachen/Aachen_eval_[experiment_name].txt
tohttps://www.visuallocalization.net/
to get the results on this benchmark.
If you use this code in your project, please cite our paper:
@article{Rocco20,
author = "Rocco, I. and Arandjelovi\'c, R. and Sivic, J."
title = "Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions",
journal = "arXiv preprint arXiv:2004.10566",
year = "2020",
}