Skip to content

Offload exhaustive, sequential, and spatial pairing to pycolmap PairGenerators - #521

Closed
sarlinpe wants to merge 1 commit into
refresh/4-guided-geometric-verificationfrom
refresh/5-pycolmap-pairing
Closed

sarlinpe wants to merge 1 commit into
refresh/4-guided-geometric-verificationfrom
refresh/5-pycolmap-pairing

Conversation

@sarlinpe

Copy link
Copy Markdown
Member

Summary

Delete hloc/pairs_from_exhaustive.py and replace it with a thin hloc/pairs_from_colmap.py wrapper over COLMAP's native pycolmap PairGenerators (ExhaustivePairGenerator, SequentialPairGenerator, SpatialPairGenerator, VocabTreePairGenerator) (PR 5 of 7 in the hloc refresh stack, stacked on #520).

Changes

  • Delete hloc/pairs_from_exhaustive.py.
  • Add hloc/pairs_from_colmap.py supporting exhaustive, sequential, spatial, and vocabtree modes from an existing COLMAP --database or an ephemeral :memory: DB built from image_list/features (plus ref_list/ref_features query-vs-reference exhaustive pairing).
  • Guard against empty DBs (avoiding a COLMAP 4.2.1 VocabTreePairGenerator null dereference), self-pairs, duplicate directed pairs, duplicate image names, and invalid option combinations.
  • Update demo.ipynb and pipeline_SfM.ipynb from pairs_from_exhaustive to pairs_from_colmap.

Superseded Open PRs (to be noted after review)

  • Supersedes #175 and the sequential-pairing part of #441.

Verification

  • Verified all 4 pairing modes (exhaustive, sequential, spatial, vocabtree), query-vs-ref pairing, CLI --options, empty/1-image/duplicate/error edge cases, flake8, isort, and black.

@sarlinpe
sarlinpe force-pushed the refresh/4-guided-geometric-verification branch from fab233e to 7bb3ab3 Compare November 22, 2026 14:05
@sarlinpe
sarlinpe force-pushed the refresh/5-pycolmap-pairing branch from 88ee9e2 to 295e7bb Compare November 22, 2026 14:05
@sarlinpe
sarlinpe removed this pull request from stack #524 November 22, 2026 14:17
@sarlinpe

Copy link
Copy Markdown
Member Author

Dropped from the refresh stack: the LOC savings over pairs_from_exhaustive.py do not justify the added database/wrapper complexity.

@sarlinpe sarlinpe closed this Nov 22, 2026
@sarlinpe
sarlinpe deleted the refresh/5-pycolmap-pairing branch November 22, 2026 14:17
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