Fix GPU SIFT flag names for COLMAP >=3.13 - #3781
Open
bjoernellens1 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
COLMAP's #3465 (released in 3.13.0) renamed the
use_gpu/gpu_indexoptions fromSiftExtraction/SiftMatchingtoFeatureExtraction/FeatureMatching, as part of generalizing feature extraction beyond SIFT. The old option names were dropped, not kept as aliases.nerfstudio/process_data/colmap_utils.pystill uses the old--SiftExtraction.use_gpu/--SiftMatching.use_gpuflags unconditionally. Against any COLMAP built from a recent enough source (>=3.13.0),feature_extractor/*_matcherreject these as unrecognized options, so--gpusilently 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_versionvalue this file already computes viaget_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
SiftExtraction, 3.13 ->FeatureExtraction, 4.2.0.dev0 ->FeatureExtraction)--FeatureExtraction.use_gpu/--FeatureMatching.use_gpuagainst a real COLMAP 4.2.0.dev0 build'sfeature_extractor -h/*_matcher -houtput