Skip to content

Slim and modernize localizers on top of pycolmap 4.2.1 - #522

Draft
sarlinpe wants to merge 1 commit into
refresh/4-guided-geometric-verificationfrom
refresh/6-slim-localizer
Draft

sarlinpe wants to merge 1 commit into
refresh/4-guided-geometric-verificationfrom
refresh/6-slim-localizer

Conversation

@sarlinpe

@sarlinpe sarlinpe commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Slim and modernize hloc/localize_sfm.py and hloc/localize_inloc.py on top of pycolmap >= 4.2.1 (PR 5 of 6 in Stack #525, stacked on #520).

Changes

  • hloc/localize_sfm.py:
    • Validate QueryLocalizer config keys eagerly and construct pycolmap.AbsolutePoseEstimationOptions and pycolmap.AbsolutePoseRefinementOptions upfront.
    • Use image.point2D(int(m)) directly and get_observation_points2D() in do_covisibility_clustering.
    • Deep-merge ransac_thresh without mutating caller-supplied config; guard empty db_ids.
  • hloc/localize_inloc.py:
    • Construct explicit pycolmap.Camera, use HDF5 with context managers, and guard empty/None retrieval results cleanly.
  • hloc/matchers/__init__.py:
    • Remove dead get_matcher helper.

Verification

  • Verified end-to-end via tests/test_triangulation_and_localization.py and tests/test_extractors_and_sacre_coeur_e2e.py (with and without covisibility clustering, OOB index failure, empty db_ids, and localize_inloc empty DB).

@sarlinpe
sarlinpe added this pull request to stack #524 November 22, 2026 11:18
@sarlinpe
sarlinpe force-pushed the refresh/6-slim-localizer branch from 515fc6b to 2cd05f2 Compare November 22, 2026 14:05
@sarlinpe
sarlinpe removed this pull request from stack #524 November 22, 2026 14:17
@sarlinpe
sarlinpe changed the base branch from refresh/5-pycolmap-pairing to refresh/4-guided-geometric-verification November 22, 2026 14:17
@sarlinpe
sarlinpe force-pushed the refresh/6-slim-localizer branch from 2cd05f2 to f69880d Compare November 22, 2026 14:17
@sarlinpe
sarlinpe added this pull request to stack #525 November 22, 2026 14:17
@sarlinpe
sarlinpe force-pushed the refresh/6-slim-localizer branch from f69880d to f6a0145 Compare November 22, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant