Views
No views yet


@InProceedings{HOTFormerLoc,
author = {Griffiths, Ethan and Haghighat, Maryam and Denman, Simon and Fookes, Clinton and Ramezani, Milad},
title = {{HOTFormerLoc}: {Hierarchical Octree Transformer} for {Versatile Lidar Place Recognition Across Ground} and {Aerial Views}},
booktitle = {2025 {IEEE}/{CVF Conference} on {Computer Vision} and {Pattern Recognition} ({CVPR})},
year = {2025},
month = {June},
}# Note: replace 'mamba' with 'conda' if using a vanilla conda install
mamba create -n hotformerloc python=3.11 -c conda-forge
mamba activate hotformerloc
mamba install 'numpy<2.0' -c conda-forge
mamba install pytorch==2.1.1 torchvision==0.16.1 pytorch-cuda=12.1 -c pytorch -c nvidia -c conda-forge
pip install -r requirements.txt
pip install libs/dwconvPYTHONPATH environment variable to include the absolute path to the repository root folder (ensure this variable is set every time you open a new shell):export PYTHONPATH=$PYTHONPATH:<path/to/HOTFormerLoc>data/wild_places.cd datasets/WildPlaces
python fix_broken_timestamps.py \
--root '../../data/wild_places/data/' \
--csv_filename 'poses.csv' \
--csv_savename 'poses_fixed.csv' \
--cloud_folder 'Clouds'
python fix_broken_timestamps.py \
--root '../../data/wild_places/data/' \
--csv_filename 'poses_aligned.csv' \
--csv_savename 'poses_aligned_fixed.csv' \
--cloud_folder 'Clouds_downsampled'cd datasets/WildPlaces
python generate_training_tuples.py \
--root '../../data/wild_places/data/'
python generate_test_sets.py \
--root '../../data/wild_places/data/'data/CS-Wild-Places (this should point to the top-level directory, with the data/ and metadata/ subdirectories). Note that our experiments only require the post-processed submaps (folder postproc_voxel_0.80m_rmground_normalised), so you can ignore the raw submaps if space is an issue. Check the README for further information and installation instructions for CS-Wild-Places.cd datasets/CSWildPlaces
python postprocess_wildplaces_ground.py \
--root '../../data/wild_places/data/' \
--cswildplaces_save_dir '../../data/CS-Wild-Places/data/CS-Wild-Places/postproc_voxel_0.80m_rmground_normalised' \
--remove_ground \
--downsample \
--downsample_type 'voxel' \
--voxel_size 0.8 \
--normalise \
--num_workers XX \
--verbose--normalise option, and by setting --cswildplaces_save_dir to '../../data/CS-Wild-Places/data/CS-Wild-Places/postproc_voxel_0.80m_rmground'.cd datasets/CSWildPlaces
python generate_train_test_tuples.py \
--root '../../data/CS-Wild-Places/data/CS-Wild-Places/postproc_voxel_0.80m_rmground_normalised/' \
--eval_thresh '30' \
--pos_thresh '15' \
--neg_thresh '60' \
--buffer_thresh '30' \
--v2_only--root by default.data/benchmark_datasets_cs_campus3d.cd datasets/CSCampus3D
python save_queries_HOTFormerLoc_format.pydata/benchmark_datasets.1cd datasets/pointnetvlad
2
3# Generate training tuples for the Baseline Dataset
4python generate_training_tuples_baseline.py --dataset_root '../../data/benchmark_datasets'
5
6# (Optionally) Generate training tuples for the Refined Dataset
7python generate_training_tuples_refine.py --dataset_root '../../data/benchmark_datasets'
8
9# Generate evaluation tuples
10python generate_test_sets.py --dataset_root '../../data/benchmark_datasets'config/.
Set the dataset_folder parameter to the dataset root folder (only necessary if you have issues with the default relative path).
If running out of GPU memory, decrease batch_split_size and val_batch_size parameter value. If running out of RAM, you may need to decrease the batch_size parameter or try reducing num_workers to 1, but note that a smaller batch size may slightly reduce performance. We use wandb for logging by default, but this can be disabled in the config.cd training
# To train HOTFormerLoc on CS-Wild-Places
python train.py --config ../config/config_cs-wild-places.txt --model_config ../models/hotformerloc_cs-wild-places_cfg.txt
# To train HOTFormerLoc on Wild-Places
python train.py --config ../config/config_wild-places.txt --model_config ../models/hotformerloc_wild-places_cfg.txt
# To train HOTFormerLoc on CS-Campus3D
python train.py --config ../config/config_cs-campus3d.txt --model_config ../models/hotformerloc_cs-campus3d_cfg.txt
# To train HOTFormerLoc on Oxford RobotCar
python train.py --config ../config/config_oxford.txt --model_config ../models/hotformerloc_oxford_cfg.txtsubmitit_train_job_single_node.py script to automate training job submission, with support for automatic checkpointing and resubmission on job timeout. Make sure to set job parameters appropriately for your cluster.weights directory. You can download them individually below, or download and extract all from this link.| Model | Dataset | Weights Download |
|---|---|---|
| HOTFormerLoc | CS-Wild-Places | hotformerloc_cs-wild-places.pth |
| HOTFormerLoc | CS-Campus3D | hotformerloc_cs-campus3D.pth |
| HOTFormerLoc | Wild-Places | hotformerloc_wild-places.pth |
| HOTFormerLoc | Oxford RobotCar | hotformerloc_oxford.pth |
| MinkLoc3Dv2 | CS-Wild-Places | minkloc3dv2_cs-wild-places.pth |
| CrossLoc3D | CS-Wild-Places | crossloc3d_cs-wild-places.pth |
| LoGG3D-Net | CS-Wild-Places | logg3dnet_cs-wild-places.pth |
cd eval
# To evaluate HOTFormerLoc trained on CS-Wild-Places
python pnv_evaluate.py --config ../config/config_cs-wild-places.txt --model_config ../models/hotformerloc_cs-wild-places_cfg.txt --weights ../weights/hotformerloc_cs-wild-places.pth
# To evaluate HOTFormerLoc trained on Wild-Places
python pnv_evaluate.py --config ../config/config_wild-places.txt --model_config ../models/hotformerloc_wild-places_cfg.txt --weights ../weights/hotformerloc_wild-places.pth
# To evaluate HOTFormerLoc trained on CS-Campus3D
python pnv_evaluate.py --config ../config/config_cs-campus3d.txt --model_config ../models/hotformerloc_cs-campus3d_cfg.txt --weights ../weights/hotformerloc_cs-campus3d.pth
# To evaluate HOTFormerLoc trained on Oxford RobotCar
python pnv_evaluate.py --config ../config/config_oxford.txt --model_config ../models/hotformerloc_oxford_cfg.txt --weights ../weights/hotformerloc_oxford.pth
