Views
No views yet
1from lotis import TrajectoryLocalizer
2
3localizer = TrajectoryLocalizer.from_checkpoint(
4 checkpoint_path="final_model.pth",
5 config_path="final_config.yaml",
6 dinov3_weights="/path/to/dinov3_vitb16_pretrain.pth",
7)
8
9# Encode a trajectory — do this once and reuse
10encoding = localizer.encode_trajectory("path/to/trajectory.mp4")
11
12# Localize a query image
13result = localizer.localize("query.jpg", encoding)
14
15print(f"Closest trajectory frame: {result.closest_frame()}")
16print(f"Visible frames: {result.visible_indices()}")
17
18# Save and reload the trajectory encoding
19import torch
20torch.save(encoding.to_dict(), "encoding.pt")
21encoding = TrajectoryEncoding.from_dict(torch.load("encoding.pt"))1@misc{busch2026learninglocalizereferencetrajectories,
2 title={Learning to Localize Reference Trajectories in Image-Space for Visual Navigation},
3 author={Finn Lukas Busch and Matti Vahs and Quantao Yang and Jesús Gerardo Ortega Peimbert and Yixi Cai and Jana Tumova and Olov Andersson},
4 year={2026},
5 eprint={2602.18803},
6 archivePrefix={arXiv},
7 primaryClass={cs.RO},
8 url={https://arxiv.org/abs/2602.18803},
9}