Motion Basis Learning for Unsupervised Deep Homography Estimation with Subspace Projection

Nianjin Ye, Chuan Wang, Haoqiang Fan, Shuaicheng Liu

TL;DR

Instead of regressing corner offsets and relying on a numerical solver, this paper reimagines deep homography estimation as predicting weights for eight pre-computed motion bases. Combined with a low-rank feature projection block to filter out dynamic outliers and a warp-equivariance loss, this framework achieves state-of-the-art unsupervised image alignment without needing explicit outlier masks.

What Problem Does This Paper Address?

Homography estimation—finding the $3 \times 3$ transformation matrix that aligns two images of a planar scene—is a foundational task in computer vision. While classical methods rely on matching hand-crafted features (like SIFT or ORB), deep learning approaches map images directly to a homography matrix.

Standard deep methods typically predict four corner offsets and pass them to a Direct Linear Transform (DLT) solver. However, this setup faces three major hurdles:

  1. Optimization Instability: Directly regressing matrix elements or offsets can be unstable because the underlying parameters operate at different scales.
  2. Motion Outliers: Unsupervised methods struggle when scenes contain dynamic objects (e.g., walking pedestrians, flowing water) or multi-depth parallax. The network tries to align everything, leading to corrupted homography estimates.
  3. Feature Distortion: Unsupervised networks often use triplet losses to learn distinct features. Without constraints, the network can "cheat" the loss by distorting the feature space rather than actually aligning the images.

Methods

The authors introduce a three-part framework to tackle these challenges:

1. Homography Flow Representation

Instead of predicting corner offsets, the network predicts eight linear weights ($\alpha_1 \dots \alpha_8$). These weights combine eight pre-computed, orthogonal "homography flow bases" to generate a dense optical flow field constrained to valid homography motions. This linear formulation bypasses the need for a DLT solver during inference.

Figure 1. (a) Previous deep homography methods estimate 4 mo- tion offsets and solve a DLT for the result. (b) We construct 8 flow motion bases by modifying matrix elements of a homography, and then regress 8 weights to combine the flow bases for the result.

2. Low Rank Representation (LRR) Block

A homography has only 8 Degrees of Freedom (DOFs), meaning valid homography motion lies in a very low-rank subspace. Network features, however, have a much higher rank due to noise and dynamic scene elements. The authors insert LRR blocks into a ResNet-34 backbone to project feature maps into a low-rank subspace. This automatically filters out high-rank "motion noise" like moving objects.

Figure 2. Our network pipeline takes grayscale image patches Ia and Ib as input, and produces 8 weights to combine 8 pre-defined homography bases to produce a homography flow as output. The network consists of two modules, a warp-equivariant feature extractor f(·) and a homography estimator h(·), with 2 inserted LRR blocks to reduce the rank of the motion features.

3. Feature Identity Loss (FIL)

To prevent the feature extractor from learning trivial, distorted solutions, the authors introduce FIL to enforce warp-equivariance. This mathematical constraint ensures that extracting features from a warped image yields the same result as warping the features extracted from the original image:

$$W(f(I)) \approx f(W(I))$$

Datasets

The framework was evaluated on the CA-Unsupervised dataset introduced by Zhang et al. This dataset consists of small-baseline image pairs divided into five challenging real-world categories:

  • Regular (RE)
  • Low-Texture (LT)
  • Low-Light (LL)
  • Small-Foregrounds (SF)
  • Large-Foregrounds (LF)

Evaluation is performed using the average $l_2$ distance between warped source points and ground-truth target points.

Key Insights and Ideas

  • Implicit Outlier Rejection: Instead of training a separate, complex network branch to predict an attention mask for outliers, filtering can be achieved structurally. By forcing the motion features into a low-rank subspace via the LRR block, non-homography motions (like a person walking across the frame) are naturally suppressed.
  • Linearizing Homography: For small-baseline scenarios, the perspective transformation space can be accurately approximated as a linear combination of flow fields centered around an identity transformation.
  • Stabilizing Triplet Loss: Unsupervised triplet losses are notoriously finicky. Enforcing warp-equivariance (via FIL) acts as a regularizer that stabilizes feature learning, ensuring the network optimizes for true spatial alignment.

Key Results

Quantitative Performance

The proposed method achieves an average point-matching error of 0.50, outperforming all deep and feature-based baselines on the CA-Unsupervised benchmark. It beats the previous best unsupervised deep method (CA-Unsupervised) by 43% (error of 0.88 vs 0.50) and outperforms advanced feature-matching pipelines like SuperPoint + SuperGlue + MAGSAC (error of 0.63).

Qualitative Performance

As shown in the qualitative comparisons, the framework excels in highly challenging environments:

  • In low-light scenes with repetitive dynamic textures (like flowing rivers), it avoids tracking the water movement.
  • In low-texture scenes with moving foreground objects (like a person walking in the snow), it successfully aligns the background structure (e.g., poles) where other methods fail by trying to track the person.
Figure 6. Qualitative comparison with recent DNN-based approaches. Columns 1 ∼4 are results of supervised [5], Unsupervised [18], CA-Unsupervised [28] and ours. The alignment difficulty of Rows 2 is greater than Row 1.

Limitations and Future Work

  • Small-Baseline Assumption: The eight pre-computed flow bases are derived as a linear approximation around the identity matrix. In large-baseline scenarios, this linear approximation degrades, which can introduce estimation errors.
  • Single Homography Constraint: Representing the entire scene transformation with a single homography is inherently limited when dealing with complex, multi-plane 3D geometry.

The authors suggest that extending this motion-basis learning approach to mesh-based multi-homographies is a promising direction for future research.

Summary updated

BibTeX
@misc{ye2021motion,
  author = {Nianjin Ye and Chuan Wang and Haoqiang Fan and Shuaicheng Liu},
  title = {{Motion Basis Learning for Unsupervised Deep Homography Estimation with Subspace Projection}},
  year = {2021},
  eprint = {2103.15346},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.15346},
}
Figure