Jiajie Li* · Boyang Sun* · Luca Di Giammarino · Hermann Blum · Marc Pollefeys
CoRL 2025
Paper |
Webpage |
Interactive Demo |
We present ActLoc, a learning-based approach for active viewpoint selection.
ActLoc selects viewing directions at given locations that maximize visual localization performance.
- Sep 22, 2025: Check out our online interactive demo!
- Sep 21, 2025: Initial code release
Our code has been tested on a workstation running Ubuntu 22.04 with an NVIDIA RTX 4090 (24GB) GPU and CUDA 12.4.
We recommend creating the environment from the provided environment.yml
file:
# create environment
conda env create -f environment.yml
# activate environment
conda activate actloc_env
We provide one example scene from HM3D:
chmod +x download_example_data.sh && ./download_example_data.sh
You can also download the example data from here and put it in the root folder of this repo to use for demos.
This script takes an SfM model and a list of waypoints as input, and predicts the optimal camera pose (extrinsic matrix) for each one individually.
python demo_single.py \
--sfm-dir ./example_data/reference_sfm \
--waypoints-file ./example_data/waypoints.txt \
--checkpoint ./checkpoints/trained_actloc.pth \
--output-file ./example_data/selected_poses.npz
Expected Output: This will create a file named selected_poses.npz
in the example_data
directory, which contains the calculated poses.
To choose viewpoint that balances localization performance and rotation continuity, run:
python demo_multi.py \
--sfm-dir ./example_data/reference_sfm \
--waypoints-file ./example_data/waypoints.txt \
--checkpoint ./checkpoints/trained_actloc.pth \
--output-file ./example_data/selected_poses_multi.npz \
--lamda 0.02
To visualize the scene and the prediction results:
python vis.py \
--meshfile ./example_data/scene.glb \
--waypoints-file ./example_data/waypoints.txt \
--poses-file ./example_data/selected_poses.npz
or:
python vis.py \
--meshfile ./example_data/scene.glb \
--waypoints-file ./example_data/waypoints.txt \
--poses-file ./example_data/selected_poses_multi.npz
To see the observation ath selected poses, use the selected_poses.npz
file generated to render images from the 3D mesh.
python capture_predicted_views.py \
--mesh-file ./example_data/scene.glb \
--poses-file ./example_data/selected_poses.npz \
--output-folder ./example_data/best_viewpoint_images
Expected Output: This will create a new folder named best_viewpoint_images
containing the rendered images for each successful waypoint. This process might take a while.
- Single-viewpoint Selection Inference Code Release
- Single-viewpoint Selection Demo Release
- Path Planning Inference Code Release
- Path Planning Demo Release
- Test Data and Evaluation Script Release
- Training Data and Training Script Release
If you find our paper useful, please consider citing:
@misc{li2025actloclearninglocalizeactive,
title={ActLoc: Learning to Localize on the Move via Active Viewpoint Selection},
author={Jiajie Li and Boyang Sun and Luca Di Giammarino and Hermann Blum and Marc Pollefeys},
year={2025},
eprint={2508.20981},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2508.20981},
}