LF-Net: Learning Local Features from Images

Yuki Ono, Eduard Trulls, Pascal Fua, Kwang Moo Yi

TL;DR

LF-Net (Local Feature Network) is a deep learning framework that learns the entire local feature pipeline—detection, orientation estimation, and description—from scratch. By leveraging geometric constraints from image pairs (depth and camera pose), it achieves state-of-the-art matching performance at real-time speeds (60+ FPS) without requiring human supervision or hand-crafted initialization.

Introduction

In computer vision, "local features" (like the classic SIFT algorithm) are the building blocks for tasks like 3D reconstruction and object recognition. Traditionally, these were hand-designed. While deep learning has improved individual parts of this pipeline, most existing "learned" methods suffer from two main issues:

  1. The "SIFT-dependency" Trap: Many models (like LIFT) require a hand-crafted detector like SIFT to provide initial "interesting" points for training. This means the network can never learn to find better points than what SIFT already finds.
  2. Differentiability Bottlenecks: Finding the "best" keypoints usually involves picking local maxima (peaks) in a score map. This operation is mathematically non-differentiable, making it extremely difficult to train a detector and a descriptor together from end-to-end.

LF-Net aims to break these dependencies by training a sparse-matching pipeline entirely from raw image sequences using only geometric consistency as a guide.

Methods

The authors introduce a novel architecture and a "two-branch" training strategy to overcome the differentiability bottleneck.

The Architecture

LF-Net Architecture
  • Detector: A fully convolutional ResNet-style network that produces a "score map" (where are the features?), a "scale map" (how big are they?), and an "orientation map" (which way are they facing?).
  • Scale-Invariant Detection: To handle different zoom levels, the network resizes internal feature maps into a "scale-space" and uses a differentiable softargmax to pinpoint the exact sub-pixel location and scale of a feature.
  • Descriptor: Once keypoints are found, a Spatial Transformer Network (STN) crops patches around them. These patches are fed into a second CNN that produces a 256-dimensional vector (the descriptor) for matching.

The Two-Branch Training Strategy

Two-Branch Training Strategy

This is the "secret sauce." To train the non-differentiable detector, they use two identical copies of the network:

  • Branch $j$ (The Teacher): Processes one image and uses a non-differentiable "scoremap cleaning" process to create a "virtual target"—essentially a perfect map of where features should be based on the ground-truth geometry.
  • Branch $i$ (The Student): Processes a second view of the same scene. It is optimized to predict a score map that matches the warped "virtual target" from the teacher.
  • Because the "teacher" branch is not back-propagated, the non-differentiable parts don't break the training of the "student" branch.

Datasets

The model was trained and evaluated on two distinct types of data:

  • Indoors (ScanNet): A massive dataset of 2.5 million RGB-D images of indoor environments. Ground truth comes from the Kinect sensor's depth maps.
  • Outdoors (Photo-tourism): 25 collections of images of famous landmarks (e.g., the British Museum). Since these don't have depth sensors, the authors used Structure-from-Motion (SfM) via COLMAP to generate 3D reconstructions and depth estimates.

Key Insights and Ideas

  • Geometry as Supervision: You don't need humans to tell a network what a "good" feature is. If a point can be consistently found and matched across two different camera views using known 3D geometry, it is, by definition, a good feature.
  • Joint Optimization Matters: The authors show that training the detector and descriptor together leads to a 7-45% improvement over training them separately. The detector learns to pick points that the descriptor is actually capable of describing.
  • The "Upright" Bias: Interestingly, the authors found that for many real-world datasets, disabling rotation and scale invariance actually improved results. This is because most photos (especially tourist photos) are taken "upright," and forcing the network to be invariant to 180-degree flips can sometimes introduce more noise than benefit.

Key Results

  • Accuracy: LF-Net outperformed all baselines, including SIFT and the then-state-of-the-art SuperPoint, on outdoor matching scores. It showed a 9% relative improvement over SuperPoint on outdoor data.
  • Speed: The system is highly optimized for production. It runs at 60+ FPS for QVGA images and 25 FPS for VGA images on a Titan X GPU, making it suitable for real-time robotics or AR applications.
  • Efficiency: By producing sparse features (only the "best" points) rather than dense maps, it remains computationally lightweight compared to dense matching methods.

Limitations and Future Work

  • Depth Quality: The model's performance is tied to the quality of the training depth maps. In indoor scenes with low texture or sensor noise (common with Kinect), the performance gain over competitors was less pronounced.
  • The "Teacher" Update: The two-branch setup requires an iterative update (similar to Q-learning in reinforcement learning). Exploring more stable ways to synchronize these branches could further improve convergence.
  • Extreme Baselines: While LF-Net excels at standard matching, extremely wide-baseline stereo (where the camera moves very far) remains a challenge for all sparse methods due to occlusions.

Summary updated

BibTeX
@inproceedings{ono2018lf,
  author = {Yuki Ono and Eduard Trulls and Pascal Fua and Kwang Moo Yi},
  title = {{LF-Net: Learning Local Features from Images}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=HkWDdvbuWS},
}
Figure