This repository is a modified version of NetVLAD (available at Original PyTorch NetVLAD) which is compatible with the LW dataset. The LW dataset is a large-scale indoor industrial VPR dataset featuring images from four RGB-D cameras (mounted around a logistic robot) and their corresponding pose and IMU data. This dataset will be published soon after receiving approvals.
We suggest creating a separate conda environment for this repository. In your terminal, execute:
-
conda create -n vpr_env python pandas==2.0.3 h5py tensorboardX numpy=1.21 pytorch-gpu torchvision natsort tqdm opencv pillow scikit-learn faiss matplotlib-base ros-rosbag-c conda-forge -
conda activate vpr_env
To train the model and see the test result, execute:
- cd to your code directory and adjust the input parameters.
python main.py --mode cluster --num_clusters 64python main.py --mode train --batchSize 6 --cacheBatchSize 6 --arch vgg16 --pooling netvlad --num_clusters 64 --nEpochs 1 --optim ADAM --threads 8python main.py --mode test --resume=/path/to/your/run --ckpt best --split testTo switch between the test and validation splits, change the --split parameter to (val or test) Visualization of the model predictions willbe shown at the end of test. Metrics including Recall@N, per-query MLE@1, Grouped MLE@1, and average timestamp difference between successfull and failure cases will be also printed in the terminal.