Doppelgangers: Learning to Disambiguate Images of Similar Structures

Ruojin Cai, Joseph Tung, Qianqian Wang, Hadar Averbuch-Elor, Bharath Hariharan, Noah Snavely

TL;DR

Standard 3D reconstruction algorithms are easily fooled by symmetric buildings and repeated structures, causing reconstructed models to erroneously collapse into themselves. This paper introduces a learning-based pairwise image classifier that leverages the spatial distribution of keypoints and feature matches to identify "doppelganger" images—pairs that look nearly identical but depict entirely different physical surfaces. When integrated into Structure from Motion (SfM) pipelines, this method successfully filters out false matches and yields highly accurate 3D models of ambiguous landmarks.

What Problem Does This Paper Address?

Imagine trying to reconstruct a 3D model of London's Big Ben from thousands of internet photos. Big Ben has a four-way symmetry; all four sides look almost exactly the same. Traditional computer vision algorithms rely on local feature matchers (like SIFT) to find corresponding points between images. Because the sides are so similar, these matchers find thousands of false correspondences across different faces of the tower.

When fed into Structure from Motion (SfM) pipelines, these "illusory matches" cause the algorithm to collapse different sides of a building into a single, corrupted 3D surface. This is known as the visual disambiguation or "Big Ben" problem. While humans can sometimes spot the subtle differences (like a unique background or a specific brick pattern), standard algorithms struggle. Prior solutions relied on complex, brittle global heuristics across entire image collections. This paper tackles the core building block of the problem: determining whether a single pair of visually similar images depicts the exact same 3D surface or two different ones.

Examples of doppelganger image pairs that observe distinct but visually similar 3D surfaces.

Methods

The authors frame visual disambiguation as a binary classification task on image pairs. Rather than relying solely on raw RGB pixels—which deep networks often over-associate based on semantic similarity—the proposed architecture explicitly incorporates geometric verification cues:

  1. Keypoint and Match Mask Generation: For a given pair of images, the method extracts local keypoints and matches using a feature matcher (like LoFTR). It then creates two binary masks per image: one for all detected keypoints and one for geometrically verified matches (filtered via RANSAC). Crucially, this highlights "negative space"—areas where keypoints exist but fail to find a match.
  2. Rough Geometric Alignment: To help the network compare corresponding regions directly, the images and their respective masks are roughly aligned using an affine transformation estimated from the feature matches.
  3. Classification Network: The aligned RGB images (6 channels) and their four binary masks (4 channels) are concatenated into a 10-channel tensor. This tensor is fed into a ResNet-18-based architecture trained with a focal loss function to handle class imbalance and emphasize hard negative examples.
Method overview showing keypoint/match mask generation, alignment, and binary classification.

Datasets

To train and evaluate their model, the authors introduced the Doppelgangers Dataset:

  • Data Mining: They recursively downloaded ~76K internet photos of 222 world landmarks from Wikimedia Commons, utilizing category structures organized by viewing direction (e.g., "North facade" vs. "South facade").
  • Data Cleaning: Because human uploaders often misclassify symmetric structures, they used a K-Nearest Neighbor (K-NN) algorithm on the COLMAP scene graph to automatically identify and remove incorrectly labeled images.
  • Flipping Augmentation: To combat the scarcity of natural negative pairs, they introduced a novel augmentation technique: horizontally flipping one image of a positive pair to synthetically create a hard negative (mirror-image) pair. They also applied this technique to the MegaDepth dataset.

The final dataset contains over 1 million visually similar image pairs, with a dedicated test set of 4,660 pairs across 16 unseen scenes.

Key Insights and Ideas

  • Missing Matches are Informative: The spatial distribution of where matches are absent provides a powerful signal. If two images share a high density of matches on a repeated wall pattern but zero matches on adjacent unique sculptures, the network learns that they are likely looking at different surfaces.
  • Geometry Over Pure Semantics: Off-the-shelf self-supervised models like DINO perform poorly on this task because they are optimized to recognize that two images contain the "same concept" (e.g., a cathedral), whereas visual disambiguation requires fine-grained geometric differentiation.
  • Pairwise Filtering Suffices: Surprisingly, resolving ambiguity at the individual image-pair level before running SfM is powerful enough to fix global reconstruction errors, bypassing the need for complex, downstream global graph adjustments.

Key Results

  • Visual Disambiguation: On the Doppelgangers test set, the proposed method achieved an Average Precision (AP) of 95.2% and an ROC AUC of 93.8%, dramatically outperforming baselines like LoFTR match-count thresholding (85.3% AP) and DINO feature maps (63.3% AP).
  • SfM Reconstruction: When integrated as a simple edge filter in COLMAP, the model successfully disambiguated and correctly reconstructed 12 out of 16 highly challenging landmark scenes using a single, fixed probability threshold. It successfully prevented model collapse on notoriously difficult structures like the Arc de Triomphe and Big Ben, outperforming specialized global heuristic baselines.
Visualization of SfM disambiguation results comparing vanilla COLMAP vs the proposed method.

Limitations and Future Work

  • Domain Generalization: The model struggled on non-landmark scenes (such as the "Cereal" and "Street" datasets) without manual threshold tuning, indicating a domain gap between internet landmark photos and generic environments.
  • Extreme Conditions: The network can still be fooled in extreme cases, such as when distinguishing features are entirely obscured by deep shadows, captured at night, or cropped out due to extreme close-up zoom views. Future work could involve incorporating stronger contextual or semantic priors to handle these edge cases.

Summary updated

BibTeX
@misc{cai2023doppelgangers,
  author = {Ruojin Cai and Joseph Tung and Qianqian Wang and Hadar Averbuch-Elor and Bharath Hariharan and Noah Snavely},
  title = {{Doppelgangers: Learning to Disambiguate Images of Similar Structures}},
  year = {2023},
  eprint = {2309.02420},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.02420},
}
Figure