feat(colmap): integrate EXIF pose prior, GPS alignment, model normalization… #3705
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.


Integrate COLMAP EXIF Pose Priors, GPS Alignment, Model Normalization, Geo-Alignment Export, and EXIF/Downscale Robustness Fixes
Background & Motivation
pose_prior_mapperormodel_alignerdirectly.No pose priors in database...).-map ""when--num-downscales > 0.What’s Changed
pose_prior_mappersupport (symmetric std + overwrite priors covariance option).model_alignerto align the SfM model to GPS priors; writes back intosparse/0.matching_method="spatial"(fallback tovocab_treefor toolchains that don’t support spatial; hloc branch always maps tovocab_tree).normalize_modelstep: estimate center and scale from COLMAP points, write a single-line transform filenormalization_transform.txt(s qw qx qy qz tx ty tzusing identity quaternion), invokecolmap model_transformer --transform_pathin-place.-map_metadata 0to all outputs.-mapconstruction for--num-downscales > 0(no empty maps, no unconnected outputs).get_vocab_tree()now fetches a FAISS-compatible vocab tree (if targeting upstream, switch back to the official URL or add auto-upgrade/rebuild logic).ns-export gaussian-splat, writegeo_transforms.jsoncontaining:dataparser_inverse.matrix(4×4)normalization_inverse.matrix(4×4, plus originalscale/quaternion/translation)composite_train_to_ecef.matrix(4×4)composite_train_to_ecef_dataparser: dataparser-style{ transform (3×4), scale }to make downstream usage consistent withdataparser_transforms.jsonNew/Updated CLI Arguments (data processing)
--use-pose-prior: enablepose_prior_mapper.--prior-position-std: EXIF pose prior std in meters.--align-model-to-priors,--alignment-max-error: enable and configuremodel_aligner.--matching-method spatial: usespatial_matcher(fallback if unsupported).--normalize-model: enable normalization (model_transformer).--normalization-center {bbox|mean}: choose center estimation (defaultbbox).--normalization-target-diagonaland--normalization-scale(the explicitscaletakes precedence).Compatibility & Impact
colmap/sparse/0); downstream readers remain unchanged.Files Changed
nerfstudio/process_data/colmap_utils.pyrun_colmap(...)withspatialmatching,pose_prior_mapper,model_aligner, and normalization (writenormalization_transform.txtand callmodel_transformer), and remove hard-coded GPU flags for broader compatibility.nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.pymatching_methodwithspatial, pose priors, alignment, normalization). Mapspatial→vocab_treefor hloc branch.nerfstudio/process_data/process_data_utils.py-map_metadata 0when re-encoding/downscaling.-mapgeneration for--num-downscales > 0(no empty maps, no unconnected outputs).nerfstudio/utils/scripts.pyrun_command: nodecodecrash whenstderr=Noneunder--verbose; show clearer error messages.nerfstudio/scripts/exporter.pygaussian-splatexport, writegeo_transforms.jsonwith inverse and composite transforms, including a dataparser-style{ transform, scale }for the composite mapping.Outcomes
pose_prior_mappercan read priors from DB.How to Run (from source)
python -m nerfstudio.scripts.process_data images --data DATA --output-dir OUT --camera-type perspective --matching-method vocab_tree --use-pose-prior --prior-position-std 2 --align-model-to-priors --normalize-model --normalization-center bbox --normalization-target-diagonal 4.0 --colmap-cmd colmap --no-verbosepython -m nerfstudio.scripts.train splatfacto --data OUT --pipeline.model.camera-optimizer.mode SO3xR3 --pipeline.model.use_scale_regularization True colmap --center-method none --auto-scale-poses Falsegeo_transforms.json):python -m nerfstudio.scripts.exporter gaussian-splat --load-config RUN/config.yml --output-dir EXPORT_DIRFrontend / 3D Engine (brief)
geo_transforms.json:composite_train_to_ecef_dataparserand applyx_ecef = s · (R · x_train + t).Known Issues & Notes
vocab_tree_builder.spatial_matcheravailability depends on the COLMAP build; fallback isvocab_tree/exhaustive.Validation
pose_prior_mapper,model_aligner, andDone normalizing model.colmap/sparse/0contains{cameras.bin, images.bin, points3D.bin}.geo_transforms.jsonis produced successfully.