This PR exposes a new function pycolmap.match_from_pairs (binding to CreateImagePairsFeatureMatcher) to allow feature matching for a user-specified list of image pairs.
Motivation:
Currently, users who want to match a custom list of pairs (e.g., from custom retrieval logic, custom intra-camera-rig connections, etc) are often directed to use pycolmap.verify_matches.
However, using pycolmap.verify_matches for this purpose is problematic:
- CPU Only: It hardcodes
use_gpu = false, which is a bottleneck - Hidden Settings: It doesn't allow passing
FeatureMatchingOptions, so you're stuck with default SIFT parameters. - Confusing Name: The name
verify_matchesimplies it's just checking consistent geometry for already matched points. In reality, it runs a full feature matching pipeline, which isn't obvious to new users.
Changes:
- Added
pycolmap.match_from_pairsbinding. - Takes default matching options by default, supporting GPU execution (
Device::AUTO). - Exposes full control over matching and verification options.
Usage:
pairing_options = pycolmap.ImportedPairingOptions() pairing_options.match_list_path = "pairs.txt" pycolmap.match_from_pairs( database_path, pairing_options=pairing_options, matching_options=pycolmap.FeatureMatchingOptions(), device=pycolmap.Device.GPU )
This would resolve multiple open colmap issues: (Issues #3133, #3151)