Skip to content

Fix GPU SIFT flag names for COLMAP >=3.13 - #3781

Open
bjoernellens1 wants to merge 1 commit into
nerfstudio-project:mainfrom
bjoernellens1:upstream-colmap-gpu-flag-fix
Open

Fix GPU SIFT flag names for COLMAP >=3.13#3781
bjoernellens1 wants to merge 1 commit into
nerfstudio-project:mainfrom
bjoernellens1:upstream-colmap-gpu-flag-fix

Conversation

@bjoernellens1

Copy link
Copy Markdown

Summary

COLMAP's #3465 (released in 3.13.0) renamed the use_gpu/gpu_index options from SiftExtraction/SiftMatching to FeatureExtraction/FeatureMatching, as part of generalizing feature extraction beyond SIFT. The old option names were dropped, not kept as aliases.

nerfstudio/process_data/colmap_utils.py still uses the old --SiftExtraction.use_gpu/--SiftMatching.use_gpu flags unconditionally. Against any COLMAP built from a recent enough source (>=3.13.0), feature_extractor/*_matcher reject these as unrecognized options, so --gpu silently has no effect (or the command errors, depending on COLMAP's exact CLI parsing behavior for unknown options).

Not specific to any particular GPU backend — this affects standard CUDA COLMAP builds too, once built from source at 3.13.0+. Found while validating a COLMAP fork built from a recent source tree, not something specific to that fork.

Fix

Version-gates the flag prefix using the colmap_version value this file already computes via get_colmap_version(), following the same pattern already used a few lines below for a different version-dependent option (if colmap_version >= Version("3.7")).

Test plan

  • Verified the version-gating logic across the 3.13 boundary (3.8 -> SiftExtraction, 3.13 -> FeatureExtraction, 4.2.0.dev0 -> FeatureExtraction)
  • Confirmed --FeatureExtraction.use_gpu/--FeatureMatching.use_gpu against a real COLMAP 4.2.0.dev0 build's feature_extractor -h/*_matcher -h output

COLMAP's nerfstudio-project#3465 (released in 3.13.0) renamed the use_gpu/gpu_index
options from SiftExtraction/SiftMatching to FeatureExtraction/
FeatureMatching, without keeping the old names as aliases. Discovered
while wiring in the ROCm colmap fork's hip-integration branch (COLMAP
4.2.0.dev0), which would otherwise silently ignore --gpu since the
old flag names error out under newer COLMAP. Version-gated using the
same colmap_version check already used elsewhere in this file.
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