# cvg/hierarchical-localization

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cvg-hierarchical-localization).**

3,961 stars · 727 forks · Python · apache-2.0

## Links

- GitHub: https://github.com/cvg/Hierarchical-Localization
- awesome-repositories: https://awesome-repositories.com/repository/cvg-hierarchical-localization.md

## Topics

`deep-learning` `feature-matching` `image-retrieval` `pose-estimation` `structure-from-motion` `superglue` `visual-localization`

## Description

This project is a 3D visual localization framework designed to determine a camera's exact position and orientation by matching 2D image features against a 3D reference model. It includes a structure-from-motion pipeline to reconstruct 3D scene geometry from unordered image sets, creating the necessary spatial maps for localization.

The system employs a hierarchical coarse-to-fine localization approach. This process begins with a global-descriptor image retrieval system to identify candidate reference images from a large database and progresses through local feature matching to final 3D model alignment using perspective-n-point pose estimation.

The framework covers deep learning-based feature extraction, sparse feature matching, and camera model calibration to ensure accurate 3D reconstruction. It also provides tools for localization data visualization and 3D scene analysis to examine keypoint visibility and debug mapping errors.

## Tags

### Part of an Awesome List

- [Visual Localization](https://awesome-repositories.com/f/awesome-lists/ai/visual-localization.md) — Determines a camera's exact position and orientation by matching live images against a 3D reference model.
- [Deep Feature Extractors](https://awesome-repositories.com/f/awesome-lists/ai/deep-learning-and-computer-vision/deep-feature-extractors.md) — Identifies local keypoints and descriptors in images using neural network based computer vision.
- [Pose Estimation](https://awesome-repositories.com/f/awesome-lists/ai/pose-estimation.md) — Calculates the precise location and angle of a device within a mapped environment using visual features.
- [Structure From Motion](https://awesome-repositories.com/f/awesome-lists/ai/structure-from-motion.md) — Generates sparse 3D models from unordered image sets to serve as reference maps for localization. ([source](https://cdn.jsdelivr.net/gh/cvg/hierarchical-localization@master/README.md))
- [Local Feature Matching](https://awesome-repositories.com/f/awesome-lists/devtools/local-feature-matching.md) — Establishes geometric correspondences between images using local descriptors and RANSAC verification.
- [Camera Calibration](https://awesome-repositories.com/f/awesome-lists/ai/pose-estimation/camera-calibration.md) — Defines camera intrinsic parameters to ensure accuracy in 3D reconstruction and pose estimation. ([source](https://cdn.jsdelivr.net/gh/cvg/hierarchical-localization@master/README.md))
- [Simultaneous Localization and Mapping](https://awesome-repositories.com/f/awesome-lists/data/simultaneous-localization-and-mapping.md) — Modular toolbox for 6-DOF visual localization.

### Artificial Intelligence & ML

- [3D Pose Estimation](https://awesome-repositories.com/f/artificial-intelligence-ml/3d-pose-estimation.md) — Calculates precise camera position and orientation by solving the transformation between 2D points and 3D coordinates.
- [Visual Localization Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/3d-pose-estimation/visual-localization-frameworks.md) — Provides a complete system for determining camera poses by matching 2D features against 3D reference models.
- [Pose Refinement Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/coarse-to-fine-optimization/pose-refinement-pipelines.md) — Refines camera pose by progressing from global retrieval to local matching and 3D model alignment.
- [Visual Feature Extractors](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-architectures/visual-feature-extractors.md) — Uses neural networks to generate robust image descriptors stable across different lighting and viewpoints.
- [Feature Extraction](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-extraction.md) — Identifies local keypoints and descriptors from images using deep learning and traditional computer vision. ([source](https://cdn.jsdelivr.net/gh/cvg/hierarchical-localization@master/README.md))
- [Image Retrieval Systems](https://awesome-repositories.com/f/artificial-intelligence-ml/image-retrieval-systems.md) — Filters large image databases using high-level feature vectors to identify candidate reference images.
- [Large-Scale Image Retrieval](https://awesome-repositories.com/f/artificial-intelligence-ml/large-scale-image-retrieval.md) — Uses global descriptors to quickly identify the most relevant reference images from a large database.
