Skip to main content
QUICK REVIEW

[Paper Review] STN-Homography: estimate homography parameters directly

Qiang Zhou, Xin Li|arXiv (Cornell University)|Jun 6, 2019
Advanced Image and Video Retrieval TechniquesComputer Science20 references5 citations
TL;DR

This paper proposes STN-Homography, a novel CNN-based method that directly regresses the normalized $3\times3$ homography matrix using Spatial Transformer Networks (STN), bypassing the need for 4-point parameterization. By leveraging coordinate normalization to reduce element variance, the model achieves state-of-the-art accuracy with a 2.14-pixel mean corner error on MSCOCO, processing images in just 4.87 ms per inference on GPU.

ABSTRACT

In this paper, we introduce the STN-Homography model to directly estimate the homography matrix between image pair. Different most CNN-based homography estimation methods which use an alternative 4-point homography parameterization, we use prove that, after coordinate normalization, the variance of elements of coordinate normalized $3 imes3$ homography matrix is very small and suitable to be regressed well with CNN. Based on proposed STN-Homography, we use a hierarchical architecture which stacks several STN-Homography models and successively reduce the estimation error. Effectiveness of the proposed method is shown through experiments on MSCOCO dataset, in which it significantly outperforms the state-of-the-art. The average processing time of our hierarchical STN-Homography with 1 stage is only 4.87 ms on the GPU, and the processing time for hierarchical STN-Homography with 3 stages is 17.85 ms. The code will soon be open sourced.

Motivation & Objective

  • Address the limitations of 4-point homography parameterization in CNN-based homography estimation, which suffers from imbalanced gradients due to varying magnitudes of rotation, translation, scale, and shear components.
  • Demonstrate that coordinate-normalized homography matrices exhibit low variance in element magnitudes, making them suitable for direct regression with CNNs.
  • Develop a hierarchical and later a sequence-based STN-Homography architecture to iteratively refine homography predictions and improve accuracy.
  • Enable end-to-end training of the sequence model without requiring ground-truth homography for intermediate stages, enhancing robustness and generalization.
  • Achieve superior performance over existing methods on the MSCOCO dataset while maintaining low inference latency.

Proposed method

  • Apply pixel coordinate normalization using transformation matrix $M = \begin{bmatrix}\frac{2}{W}&0&-1\\ 0&\frac{2}{H}&-1\\ 0&0&1\end{bmatrix}$ to normalize the homography matrix $H_{ba}$ into $\overline{H}_{ba} = M H_{ba} M^{-1}$, reducing element variance.
  • Use a Spatial Transformer Network (STN) to predict the normalized homography matrix $\overline{H}_{ba}$ directly from image pairs, bypassing 4-point parameterization.
  • Design a hierarchical STN-Homography model that stacks multiple STN-Homography modules, where each stage refines the warped input using the predicted homography.
  • Introduce a sequence STN-Homography model that takes the original image pair as input and performs end-to-end training, with each stage using the warped output from the prior stage.
  • Implement a differentiable Tensor Homography Merge layer to compute composite homographies $\overline{H}_2 = \overline{H}_2' \overline{H}_1$ and $\overline{H}_3 = \overline{H}_3' \overline{H}_2$ for multi-stage refinement.
  • Train with a combination of L2 loss on normalized homography predictions $\overline{H}_{ba}$ and L1 photometric loss on warped image patches, enabling semi-supervised training when ground-truth homography is missing.

Experimental results

Research questions

  • RQ1Can a CNN directly regress the $3\times3$ homography matrix after coordinate normalization, achieving better performance than 4-point parameterization?
  • RQ2Does the low variance in normalized homography matrix elements enable more effective training and improved regression accuracy?
  • RQ3Can a hierarchical or sequence-based STN-Homography architecture iteratively reduce estimation error and outperform existing CNN-based homography estimation methods?
  • RQ4To what extent does combining L2 loss on homography predictions with L1 photometric loss improve model robustness and generalization?
  • RQ5Can the sequence STN-Homography model be trained end-to-end without requiring ground-truth homography for intermediate stages?

Key findings

  • The proposed STN-Homography model achieves a mean corner error of 2.14 pixels on the MSCOCO dataset with a two-stage sequence model, outperforming the two-stage hierarchical model (2.6 pixels).
  • The average inference time for a single-stage STN-Homography model is only 4.87 ms on GPU, and the three-stage hierarchical version runs in 17.85 ms, indicating high efficiency.
  • The L2 loss on normalized homography predictions $\overline{H}_{ba}$ plays a more critical role in performance than the L1 photometric loss during training.
  • The sequence STN-Homography model enables end-to-end training without requiring ground-truth homography for intermediate stages, improving training flexibility.
  • The model supports semi-supervised training by allowing samples to be trained without ground-truth homography values, leveraging only photometric consistency.
  • The method significantly outperforms state-of-the-art approaches on the MSCOCO benchmark, establishing a new SOTA in homography estimation accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.