Deep Homography Estimation for Dynamic Scenes

Hoang Le, Feng Liu, Shu Zhang, Aseem Agarwala

Abstract

Homography estimation is an important step in many computer vision problems. Recently, deep neural network methods have shown to be favorable for this problem when compared to traditional methods. However, these new methods do not consider dynamic content in input images. They train neural networks with only image pairs that can be perfectly aligned using homographies. This paper investigates and discusses how to design and train a deep neural network that handles dynamic scenes. We first collect a large video dataset with dynamic content. We then develop a multi-scale neural network and show that when properly trained using our new dataset, this neural network can already handle dynamic scenes to some extent. To estimate a homography of a dynamic scene in a more principled way, we need to identify the dynamic content. Since dynamic content detection and homography estimation are two tightly coupled tasks, we follow the multi-task learning principles and augment our multi-scale network such that it jointly estimates the dynamics masks and homographies. Our experiments show that our method can robustly estimate homography for challenging scenarios with dynamic scenes, blur artifacts, or lack of textures.

Introduction

A homography is a mathematical transformation relating two images of the same planar surface from different perspectives. It is a cornerstone of computer vision, essential for image stitching, video stabilization, and SLAM (Simultaneous Localization and Mapping). While traditional methods like SIFT+RANSAC rely on point matching, they often fail in blurry or textureless environments. Recent deep learning models handle textureless regions better but struggle with dynamic content—moving objects like people or cars that act as outliers, confusing the model into calculating incorrect transformations.

Homography estimation on a static scene where the quadrilateral represents the geometric alignment between frames.

Methodology

The authors propose two primary architectural contributions to address these challenges:

  1. Multi-scale Homography Network (MHN): Instead of a single-pass estimation, the model utilizes a three-level image pyramid. It estimates a coarse homography at low resolution, warps the image to "pre-align" it, and progressively refines the estimate at higher resolutions. This allows the model to handle significantly larger camera motions than previous single-scale approaches.
  2. Mask-augmented Network (MHNm): To handle dynamic scenes, the authors treat homography estimation and dynamic object detection as a multi-task learning problem. A convolutional decoder is added to predict a "dynamics mask"—a pixel-wise map identifying moving objects. By training the network to identify these regions, the model learns to ignore them when calculating the global geometric transformation.

Datasets

To address the lack of dynamic data, the authors created two new benchmarks:

  • VidSet_s (Static): Image pairs generated from single video frames to simulate perfectly static scenes.
  • VidSet_d (Dynamic): A large-scale dataset containing 32,385 video clips from YouTube. The authors used videos with static cameras but moving content (e.g., street scenes) and applied known, random homography warps. This provided perfect ground truth for camera motion while maintaining real-world object dynamics.

Results and Key Insights

The research highlights a "tight coupling" between homography and dynamics detection: knowing the homography reveals what is moving, and knowing what is moving allows for a better homography calculation. Jointly training for both tasks creates a virtuous cycle that improves performance.

Homography estimation in a dynamic scene. The model must distinguish between global camera motion and local object movement.

On the VidSet_d dataset, the mask-augmented model (MHNm) significantly outperformed previous models like DHN and PFNet, achieving a corner error of less than 1.0 pixel for over 85% of test cases. Furthermore, the model proved robust in "textureless" scenes where moving objects dominate blank backgrounds, successfully ignoring the foreground to align the static environment.

Conclusion and Future Work

While the proposed model handles dynamic outliers effectively, it is still mathematically limited by the planar assumptions of homographies and does not replace full 3D motion estimation in complex environments with significant parallax. Future work may involve training on videos with complex, real-world camera trajectories and 3D ground truth, as well as optimizing the multi-scale architecture for real-time applications on mobile devices.

Summary updated

BibTeX
@inproceedings{le2020deep,
  author = {Hoang Le and Feng Liu and Shu Zhang and Aseem Agarwala},
  title = {{Deep Homography Estimation for Dynamic Scenes}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=BHg--mI6ckq},
}
Figure