Table of Contents
Fetching ...

HomoFM: Deep Homography Estimation with Flow Matching

Mengfan He, Liangzheng Sun, Chunyu Li, Ziyang Meng

TL;DR

HomoFM introduces a flow-matching formulation for homography estimation by modeling the alignment as a continuous velocity-field transport from the identity grid to the ground-truth warp. It employs a Dirac initialization, an ODE-inspired trajectory with an Euler solver, and a FiLM-conditioned velocity predictor to achieve accurate, multi-step displacement refinement. A training-time gradient reversal layer enforces domain-invariant features, yielding robust cross-domain performance without inference overhead. Empirically, HomoFM attains state-of-the-art accuracy on standard and multimodal benchmarks while dramatically reducing MACs, and demonstrates strong zero-shot generalization on AVIID-homo. This framework offers a robust, efficient approach to geometry-aware vision tasks under domain shifts.

Abstract

Deep homography estimation has broad applications in computer vision and robotics. Remarkable progresses have been achieved while the existing methods typically treat it as a direct regression or iterative refinement problem and often struggling to capture complex geometric transformations or generalize across different domains. In this work, we propose HomoFM, a new framework that introduces the flow matching technique from generative modeling into the homography estimation task for the first time. Unlike the existing methods, we formulate homography estimation problem as a velocity field learning problem. By modeling a continuous and point-wise velocity field that transforms noisy distributions into registered coordinates, the proposed network recovers high-precision transformations through a conditional flow trajectory. Furthermore, to address the challenge of domain shifts issue, e.g., the cases of multimodal matching or varying illumination scenarios, we integrate a gradient reversal layer (GRL) into the feature extraction backbone. This domain adaptation strategy explicitly constrains the encoder to learn domain-invariant representations, significantly enhancing the network's robustness. Extensive experiments demonstrate the effectiveness of the proposed method, showing that HomoFM outperforms state-of-the-art methods in both estimation accuracy and robustness on standard benchmarks. Code and data resource are available at https://github.com/hmf21/HomoFM.

HomoFM: Deep Homography Estimation with Flow Matching

TL;DR

HomoFM introduces a flow-matching formulation for homography estimation by modeling the alignment as a continuous velocity-field transport from the identity grid to the ground-truth warp. It employs a Dirac initialization, an ODE-inspired trajectory with an Euler solver, and a FiLM-conditioned velocity predictor to achieve accurate, multi-step displacement refinement. A training-time gradient reversal layer enforces domain-invariant features, yielding robust cross-domain performance without inference overhead. Empirically, HomoFM attains state-of-the-art accuracy on standard and multimodal benchmarks while dramatically reducing MACs, and demonstrates strong zero-shot generalization on AVIID-homo. This framework offers a robust, efficient approach to geometry-aware vision tasks under domain shifts.

Abstract

Deep homography estimation has broad applications in computer vision and robotics. Remarkable progresses have been achieved while the existing methods typically treat it as a direct regression or iterative refinement problem and often struggling to capture complex geometric transformations or generalize across different domains. In this work, we propose HomoFM, a new framework that introduces the flow matching technique from generative modeling into the homography estimation task for the first time. Unlike the existing methods, we formulate homography estimation problem as a velocity field learning problem. By modeling a continuous and point-wise velocity field that transforms noisy distributions into registered coordinates, the proposed network recovers high-precision transformations through a conditional flow trajectory. Furthermore, to address the challenge of domain shifts issue, e.g., the cases of multimodal matching or varying illumination scenarios, we integrate a gradient reversal layer (GRL) into the feature extraction backbone. This domain adaptation strategy explicitly constrains the encoder to learn domain-invariant representations, significantly enhancing the network's robustness. Extensive experiments demonstrate the effectiveness of the proposed method, showing that HomoFM outperforms state-of-the-art methods in both estimation accuracy and robustness on standard benchmarks. Code and data resource are available at https://github.com/hmf21/HomoFM.
Paper Structure (15 sections, 5 equations, 4 figures, 4 tables)

This paper contains 15 sections, 5 equations, 4 figures, 4 tables.

Figures (4)

  • Figure 1: The differences between existing homography estimation methods and the proposed model.
  • Figure 2: The overview of the domain adapted design in feature extraction, taking visible-infrared alignment problem as an example.
  • Figure 3: Qualitative comparison of homography estimation results. The green and red polygons represent the ground truth and predicted alignment of $I_S$ onto $I_T$, respectively. The ACE is annotated on each sample for quantitative reference.
  • Figure 4: Representative test samples from the challenging AVIID-homo dataset. These pairs feature significant cross-modal discrepancies and are used to evaluate the model's zero-shot generalization.