Demo code for ICCV19 Paper: SANet: Scene Agnostic Network for Camera Localization
CUDA 9.0
OpenCV 3.2
pybind11 2.4.3
Python 3.6
Pytorch 0.4.1
(The cuda module requires 0.4.1 to compile)jupyter lab
orjupyter notebook
ipyvolume 0.6.0
(Visualizing 3D point cloud in jupyter)
- Download 7Scenes dataset from https://www.microsoft.com/en-us/research/project/rgb-d-dataset-7-scenes/
- extract all sequences zip files.
- Re-organize the sequences using:
The above python script will generate two binary files:
python seq_data/seven_scenes/scenes2seq.py <7scene_seq_dir> e.g. suppose 7scenes sequence `heads` in /home/xxx/Dcouemtns/7scenes/heads, then, python seq_data/seven_scenes/scenes2seq.py /home/xxx/Dcouemtns/7scenes/heads
train_frames.bin
andtrain_frames.bin
inside of sequence directory, each file stores information of train or test frames (e.g. extrinsic and intrinsic matrix), and can be loaded wihpickle
lib. - Download pre-trained pytorch model from Google Drive, unzip files to
data
folder. It has two pre-trained model:seven_scene_model.pth
sa-net model trained with sun3d and use 7Scenes sequences for evaluation.netvlad_vgg16.tar
netvlad model used for query retrieval.
- Compile python interface for
vislearn/LessMore
:Note: you may need to modify the variablecd libs/lm_pnp mkdir build cd build cmake .. make all
PYTHON_EXECUTABLE
in line59
ofCMakeLists.txt
with your own python interpreter. - Compile PointNet++ module (requires
pytorch 0.4.1
)cd relocal/pointnet2 mkdir build cd build cmake .. make
Please refer to notebook example_7scenes.ipynb
, it requires ipyvolume
lib for visualizing point clouds.
Add cambridge
dataset examples.
- E. Brachmann, C. Rother, ”Learning Less is More - 6D Camera Localization via 3D Surface Regression”, CVPR 2018
- Charles R. Qi, Li (Eric) Yi, Hao Su, Leonidas J. Guibas, "PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space"