Structure-from-Motion using Dense CNN Features with Keypoint Relocalization

Aji Resindra Widya, Akihiko Torii, Masatoshi OkutomiarXiv 2018

TL;DR

Traditional Structure-from-Motion (SfM) algorithms frequently fail when images contain extreme appearance changes, such as transitioning from day to night, because standard keypoint detectors cannot reliably find the same points. This paper introduces a novel SfM pipeline that leverages robust, densely extracted convolutional neural network (CNN) features combined with a coarse-to-fine keypoint relocalization strategy. This approach achieves pixel-level accuracy efficiently, doubling the number of successfully registered night images compared to state-of-the-art sparse feature methods.

What Problem Does This Paper Address?

Structure-from-Motion (SfM) is the foundational computer vision technology used to reconstruct 3D models from collections of 2D images. The first and most critical step in SfM is identifying and matching local feature points (like corners or distinct textures) across different views.

Standard hand-crafted features, such as SIFT, rely heavily on "feature repeatability"—the ability to detect the exact same physical point across images taken at different times or viewpoints. However, when conditions change drastically (e.g., mapping a city during the day and trying to localize a vehicle at night), feature repeatability drops significantly.

While deep learning and CNNs offer highly robust feature descriptors that can bridge this day-to-night gap, they introduce a new problem: spatial resolution loss. As an image passes deeper into a CNN, max-pooling layers downsample the spatial dimensions. Matching these coarse features results in poorly localized keypoints, which degrades the final 3D reconstruction accuracy. Furthermore, matching fully dense, high-resolution features across images is computationally prohibitive and memory-intensive.

Methods

The authors propose a hybrid pipeline that combines the semantic robustness of deep CNN layers with the pixel-level precision required for accurate 3D reconstruction.

Pipeline overview of the proposed SfM method using dense CNN features and keypoint relocalization.

The pipeline consists of the following key steps:

  1. Dense Feature Extraction: Images are fed into a pre-trained VGG-16 network. Instead of sparse keypoints, the activations of the max-pooling layers are treated as dense feature descriptors arranged on a regular grid.
  2. Tentative Matching: Initial feature matching is performed at a coarse resolution (e.g., the conv4 or conv5 layers). Deeper layers have larger receptive fields and capture high-level semantic information, making them highly invariant to illumination changes. Matching at this lower resolution also keeps computational costs low.
  3. Keypoint Relocalization: To restore pixel-level accuracy without exploding the keypoint count, the authors introduce a coarse-to-fine relocalization strategy. For each matched keypoint at a coarse layer, they look at a small $K \times K$ neighborhood (where $K=2$) in the next higher-resolution layer. The keypoint is shifted to the pixel position with the largest descriptor norm ($L_2$ norm). This process is repeated down the network hierarchy until it reaches the conv1_2 layer, which matches the original input image resolution.
  4. Geometric Verification & Reconstruction: Outliers are filtered using a modified Homography-RANSAC loop designed to handle dense structures, and the final refined matches are passed into COLMAP, a standard state-of-the-art SfM engine.
The coarse-to-fine keypoint relocalization process across CNN layers.

Datasets

The method was evaluated on two distinct benchmarks:

  • Aachen Day-Night Dataset: A challenging dataset specifically designed to evaluate visual localization under extreme illumination changes. It contains 98 subsets, each consisting of 20 daytime images and one nighttime query image.
  • Strecha Dataset: A classic, well-textured dataset used to evaluate how the pipeline performs under standard, "easy" conditions.

Key Insights and Ideas

  • The $L_2$ Norm as a Precision Anchor: The core "aha moment" of the paper is using the magnitude ($L_2$ norm) of the CNN descriptor to guide keypoint refinement. The authors discovered that the pixel with the highest descriptor norm within a local pooling region consistently corresponds to the most stable and salient physical feature, allowing them to track keypoints accurately back to the original image resolution.
  • Coarse Matching + Fine Relocalization = Efficiency: Attempting to match dense features at full resolution creates a massive computational burden. By performing the initial match in a low-resolution semantic space and then tracking the keypoints downward, the method achieves the accuracy of dense matching at a fraction of the computational cost.

Key Results

The proposed method was compared against a strong baseline: COLMAP utilizing standard Difference-of-Gaussians (DoG) + RootSIFT.

  • Aachen Day-Night Results: The proposed dense CNN method with relocalization successfully reconstructed 96 night images, whereas the RootSIFT baseline only managed to reconstruct 48.
  • The Importance of Relocalization: As shown in the quantitative evaluation, dense CNN matching without the proposed relocalization step performed poorly at strict accuracy thresholds (under 3.5 meters). Adding the relocalization step drastically boosted accuracy, outperforming the baseline by a wide margin across all distance thresholds.
Quantitative evaluation showing the percentage of correctly registered night images across different error thresholds.

Limitations and Future Work

While the method shines in challenging environments, it underperforms on standard, well-textured datasets. On the Strecha dataset, the proposed method yielded a mean position error of 0.59 meters, compared to the much tighter 0.17 meters achieved by RootSIFT. This indicates that while dense CNN features provide excellent robustness against extreme appearance changes, they still lack the absolute geometric precision of traditional hand-crafted features in ideal conditions.

Future work will likely focus on closing this precision gap and optimizing the pipeline to better handle highly repetitive structures (like windows and pillars), which can still confuse dense matchers.

Summary updated

BibTeX
@misc{widya2018structure,
  author = {Aji Resindra Widya and Akihiko Torii and Masatoshi Okutomi},
  title = {{Structure-from-Motion using Dense CNN Features with Keypoint Relocalization}},
  year = {2018},
  eprint = {1805.03879},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.03879},
}
Figure