ContextDesc: Local Descriptor Augmentation With Cross-Modality Context

Zixin Luo, Tianwei Shen, Lei Zhou, Jiahui Zhang, Yao Yao, Shiwei Li, Tian Fang, Long Quan

Abstract

Local feature matching is a cornerstone of computer vision, yet traditional patch-based descriptors often fail in the presence of visual ambiguity, such as repetitive structures. We present ContextDesc, a lightweight framework that augments local descriptors with high-level visual context and spatial geometric context. By integrating regional semantic information and keypoint distribution patterns, ContextDesc significantly enhances matching robustness. Our approach achieves state-of-the-art performance on multiple benchmarks, including a 125% improvement in inlier matches for challenging indoor scenes.

Introduction

In computer vision, matching "keypoints" between images is fundamental for tasks like 3D reconstruction and panorama stitching. For years, research focused on making the local "patch" around a keypoint as descriptive as possible. However, this "myopic" approach hits a wall when faced with visual ambiguity.

Imagine a skyscraper with hundreds of identical windows. If you only look at a tiny square around one corner of a window, it looks exactly like every other window corner. Traditional descriptors struggle here because they lack context. Humans, however, can distinguish these points by looking at where they sit relative to the whole building (visual context) or how they are arranged relative to other points (geometric context). ContextDesc aims to give neural networks this same situational awareness.

Visual ambiguity in local patches (a) and the resulting matching performance (b).

Methodology

The authors propose a unified augmentation scheme that can be "plugged into" existing local descriptors without increasing their final dimensionality. The architecture consists of two main encoders:

  1. Visual Context Encoder: Instead of just looking at a local 32x32 patch, this module taps into high-level features from a ResNet-50 backbone. It uses inverse distance weighted interpolation to grab regional information from the image and associate it with specific keypoints. This tells the descriptor if a point is part of a "tree," a "building," or "sky."
  2. Geometric Context Encoder: This module looks at the 2D distribution of all detected keypoints. It uses Context Normalization (CN) to capture how points relate to one another spatially. A key innovation here is the Matchability Predictor, which learns to identify which keypoints are actually "matchable" before the matching process even begins, acting as a learned attention mechanism.
The ContextDesc architecture, featuring Preparation and Augmentation stages with Visual and Geometric Context Encoders.

Training Strategy

The authors introduce a modified N-pair loss with softmax temperature. Standard losses often require tedious manual tuning of "margins." By adding a single trainable parameter ($\alpha$) to the softmax function, the network automatically scales its input to the optimal range, leading to faster and more stable convergence.

Key Results and Insights

ContextDesc achieves state-of-the-art results across the board, with the most dramatic impact seen in "wild" datasets characterized by repetition and clutter:

  • Indoor Scenes (SUN3D): A massive 125% improvement in the median number of inlier matches compared to previous leaders like GeoDesc.
  • Outdoor Scenes (YFCC100M): A 35% improvement in matching performance.
  • 3D Reconstruction: In large-scale tests (like the Roman Forum), ContextDesc registered more images and generated significantly denser point clouds than SIFT or GeoDesc.
  • Efficiency: The augmentation adds only about 5% computational overhead if regional features are already being extracted for other tasks.

One of the primary insights of this work is that context is multi-modal. The paper demonstrates that geometry (where points are) and semantics (what the region looks like) are complementary; using both provides a much larger boost than using either alone. Furthermore, by teaching the network to predict "matchability," the geometric encoder can ignore noise and focus on structurally significant points.

Conclusion and Future Work

ContextDesc successfully addresses the limitations of patch-based descriptors by incorporating broader scene context. While highly effective, the authors note that the regional feature extractor (ResNet) is not perfectly rotation-invariant, which can lead to performance dips in extreme cases. Future work may explore integrating other visual components, such as saliency maps or segmentation masks, and addressing the challenges of joint end-to-end training for even greater consistency.

Summary updated

BibTeX
@inproceedings{luo2019contextdesc,
  author = {Zixin Luo and Tianwei Shen and Lei Zhou and Jiahui Zhang and Yao Yao and Shiwei Li and Tian Fang and Long Quan},
  title = {{ContextDesc: Local Descriptor Augmentation With Cross-Modality Context}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00263},
}
Figure