Computer Vision2024Open Source

3D Neural Localization & Spatial Reconstruction

6-DoF visual localization and 3D structure-from-motion pipelines

3D visual reconstruction and hierarchical localization (HLoc) pipeline combining deep feature matching with COLMAP structure-from-motion for high-precision 6-DoF camera pose estimation.

PythonPyTorchCOLMAPHLocSuperPointStructure from MotionOpenCV

Visual evidence

Recovered 3D Camera Trajectory

Reconstructed 3D camera trajectory showing recovered 6-DoF poses

Supplementary evidence

Sparse 3D Point Cloud Reconstruction

Sparse 3D point cloud reconstruction from multi-view image collection

Reference figure from the COLMAP project (Schönberger & Frahm), not this project's output.

Supplementary evidence

Incremental SfM Pipeline

Incremental Structure-from-Motion triangulation and bundle adjustment

Reference figure from Schönberger & Frahm, "Structure-from-Motion Revisited" (CVPR 2016).

Computer Vision & 3D Spatial Systems

Interactive Spatial & Vision Inspector

Hands-on visual inspection of 6-DoF camera trajectory reconstruction (COLMAP + HLoc) and zero-shot retail SKU segmentation (Segment Anything + CLIP).

Click & Drag to Orbit 3D Pose Cloud

Pose State Matrix

6-DoF Camera Extrinsics

Frame 42 / 120

Translation Vector [X, Y, Z]

X: 1.06mY: -0.21mZ: -1.13m

Estimated Accuracy & Matchers

Trajectory Error:< 0.8 cm (Sub-Centimeter)
Reprojection RMSE:0.42 pixels
Deep Inliers:1,248 (SuperGlue)
Bundle Adjustment:Converged (Ceres)

Pipeline Method

Hierarchical visual retrieval (NetVLAD) narrows candidate pairs from O(N²) to Top-K nearest neighbors before dense correspondence matching.

Stack: PyTorch, COLMAP, OpenCV, Segment Anything (SAM), CLIP
Real Repository Assets: colmap_hloc & shelf-product-identifier

Case study

Problem, Build, Outcome

Problem

Real-world visual localization fails under extreme viewpoint changes, dynamic lighting, and textureless environments when using traditional feature matchers alone.

Build

Coupled SuperPoint/SuperGlue deep learned features with hierarchical visual retrieval (NetVLAD) and COLMAP bundle adjustment to produce robust 3D point cloud maps and camera trajectories.

Outcome

Achieved sub-centimeter camera pose recovery on complex indoor/outdoor sequences with 3x faster correspondence matching compared to baseline SIFT workflows.

Architecture

System Flow

1Image Acquisition
2Deep Feature Extraction
3Hierarchical Matching
4Bundle Adjustment

Architecture Notes

  • Feature extractor pairs local learned descriptors with global image retrieval embeddings.
  • Epipolar geometry verification filters outliers before incremental triangulation.
  • Non-linear bundle adjustment optimizes camera intrinsics, poses, and 3D landmark positions simultaneously.

Engineering choices

Technical Decisions

Selected SuperPoint and SuperGlue over traditional SIFT for robust keypoint survival across harsh lighting variations.

Implemented hierarchical localization to prune pair comparison space from O(N^2) to top-K candidate retrieval.

Utilized COLMAP incremental SfM for robust outlier rejection and metric scale recovery.

Evidence

Proof Points

Sub-centimeter 6-DoF camera pose estimation on complex trajectories

Hierarchical image retrieval scaling to large-scale multi-view datasets

Sparse and dense 3D point cloud triangulation with bundle adjustment

Next read

Related Deep Dives