Visual loop closure detection is an important module in visual simultaneous localization and mapping (SLAM), which associates current camera observation with previously visited places. Loop closures correct drifts in trajectory estimation to build a globally consistent map. However, a false loop closure can be fatal, so verification is required as an additional step to ensure robustness by rejecting the false positive loops. Geometric verification has been a well-acknowledged solution that leverages spatial clues provided by local feature matching to find true positives. Existing feature matching methods focus on homography and pose estimation in long-term visual localization, lacking references for geometric verification. To fill the gap, this paper proposes a unified benchmark targeting geometric verification of loop closure detection under long-term conditional variations. Furthermore, we evaluate six representative local feature matching methods (handcrafted and learning-based) under the benchmark, with in-depth analysis for limitations and future directions.
dataset/gt
and images from google driveWe use part of the HLoc code for feature extraction and matching.
git clone && cd GV-Bench
git submodule init
git submodule update
cd third_party/Hierarchival-Localization
git checkout gvbench # this is a customized fork version
python -m pip install -e .
We provide the [output results]() with the format shown below. You can use these results directly.
$seq_$feature_$match.log
$seq_$feature_$match.npy # with following format
np.save(str(export_dir), {
'prob': num_matches_norm,
'qImages': qImages,
'rImages': rImages,
'gt': labels,
'inliers': inliers_list,
'all_matches': pointMaps,
'precision': precision,
'recall': recall,
'TH': TH,
'average_precision': average_precision,
'Max Recall': r_recall
})
To get standard feature detection and matching results, we proposed to use hloc.
Download the dataset sequences from google drive and put it under the dataset/
folder.
Extract and match feature using hloc.
python third_party/Hierarchical-Localization/gvbench_utils.py config/${seq}.yaml --extraction
# all methods except LoFTR
python third_party/Hierarchical-Localization/gvbench_utils.py config/${seq}.yaml --matching
python third_party/Hierarchical-Localization/gvbench_utils.py config/${seq}.yaml --matching_loftr
<!-- - We also provide the easy to run scripts
```bash
cd scripts/
bash evaluation.sh ${sequence_name}
``` -->
- Image pairs files
- We prepare pairs (GT) file for matching under `dataset/gt` foler.
- Make sure to use the fork hloc for feature extraction and matching `https://github.com/jarvisyjw/Hierarchical-Localization.git -b gvbench`
Evaluation
cd GV-Bench/scripts
bash ./evaluation <day> # run script with
#sequence name: day, night, night-hard, season, season-hard, weather
Using customized local features for geometric verification (GV).
TODO
plot_data.ipynb
jingwen.yu@connect.ust.hk