Rotation-Robust Descriptors and Orthographic Views for Local Feature Matching
Accepted to IROS 2021
- MMA : Training on PhotoTourism and testing on HPatches and proposed Rotated HPatches
- Pose Estimation : Training on same PhotoTourism datasets as used for MMA and testing on proposed DiverseView
- Visual Place Recognition : Oxford RobotCar training sequence and testing sequence
Download models from Google Drive (73.9 MB) in the base directory.
You can evaluate RoRD on demo images or replace it with your custom images.
- Dependencies can be installed in a
conda
orvirtualenv
(usingpython 3.6
) by running:pip install -r requirements.txt
python extractMatch.py <rgb_image1> <rgb_image2> --model_file <path to the model file RoRD>
- Example:
python extractMatch.py demo/rgb/rgb1_1.jpg demo/rgb/rgb1_2.jpg --model_file models/rord.pth
- This should give you output like this:
Download dataset from Google Drive (97.8 MB) in the base directory (only needed if you want to evaluate on DiverseView Dataset).
The DiverseView Dataset is a custom dataset consisting of 4 scenes with images having high-angle camera rotations and viewpoint changes.
- Pose estimation on single image pair of DiverseView dataset:
cd demo
python register.py --rgb1 <path to rgb image 1> --rgb2 <path to rgb image 2> --depth1 <path to depth image 1> --depth2 <path to depth image 2> --model_rord <path to the model file RoRD>
- Example:
python register.py --rgb1 rgb/rgb2_1.jpg --rgb2 rgb/rgb2_2.jpg --depth1 depth/depth2_1.png --depth2 depth/depth2_2.png --model_rord ../models/rord.pth
- This should give you output like this:
- To visualize the registered point cloud, use
--viz3d command
:python register.py --rgb1 rgb/rgb2_1.jpg --rgb2 rgb/rgb2_2.jpg --depth1 depth/depth2_1.png --depth2 depth/depth2_2.png --model_rord ../models/rord.pth --viz3d
-
Pose estimation on a sequence of DiverseView dataset:
cd evaluation/DiverseView/
python evalRT.py --dataset <path to DiverseView dataset> --sequence <sequence name> --model_rord <path to RoRD model> --output_dir <name of output dir>
- Example:
python evalRT.py --dataset /path/to/preprocessed/ --sequence data1 --model_rord ../../models/rord.pth --output_dir out
- This would generate
out
folder containing predicted transformations and matching results inout/vis
folder, containing images like below:
- SIFT Matching:
python evalRT.py --dataset /path/to/preprocessed/ --sequence data1 --sift --output_dir out_sift
- Matching on perspective view:
python evalRT.py --dataset /path/to/preprocessed/ --sequence data1 --model_rord ../../models/rord.pth --output_dir out_persp --persp
-
Training using rotation homographies with initialization from D2Net weights (Download base models as mentioned in Pretrained Models).
-
Download branderburg_gate dataset that is used in the
configs/train_scenes_small.txt
from here(5.3 Gb) inphototourism
folder. -
Folder stucture should be:
phototourism/ ___ brandenburg_gate ___ ___ dense ___ ___ ___ images ___ ___ ___ stereo ___ ___ ___ sparse
-
python trainPT_ipr.py --dataset_path <path_to_phototourism_folder> --init_model models/d2net.pth --plot
- Provide VPR code
- Provide combine training of RoRD + D2Net
- Provide code for calculating error in Diverseview Dataset
Our base model is borrowed from D2-Net.
If you use this code in your project, please cite the following paper:
@inproceedings{parihar2021rord,
title={RoRD: Rotation-Robust Descriptors and Orthographic Views for Local Feature Matching},
author={Parihar, Udit Singh and Gujarathi, Aniket and Mehta, Kinal and Tourani, Satyajit and Garg, Sourav and Milford, Michael and Krishna, K Madhava},
booktitle={2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={1593--1600},
organization={IEEE}
}