Papers
Topics
Authors
Recent
Search
2000 character limit reached

HomoFM: Continuous Flow Homography Estimation

Updated 12 March 2026
  • HomoFM is a deep learning framework for homography estimation that uses a continuous velocity field to dynamically align images.
  • It employs a flow matching technique with multi-step Euler integration to achieve state-of-the-art precision and reduced computational cost.
  • The architecture integrates DINOv2-Small with a Feature Pyramid Network and gradient reversal for robust, domain-invariant feature extraction.

HomoFM is a deep learning framework for homography estimation that reinterprets the alignment task as a continuous transport of pixel coordinates under a learned velocity field, employing a flow matching technique originally developed for generative modeling. Unlike traditional methods that rely on direct regression or iterative refinement, HomoFM models homography as a velocity-controlled transformation, offering enhanced robustness and accuracy, particularly under large geometric transformations and conditions of domain shift. HomoFM sets new state-of-the-art performance on multiple benchmarks while maintaining low computational footprint (He et al., 26 Jan 2026).

1. Problem Context and Historical Development

Homography estimation involves determining a 2D projective map HR3×3H \in \mathbb{R}^{3\times 3} that warps a source image ISI_S onto a target image ITI_T. Traditional approaches consist of photometric-based alignment, which is effective in low-texture regions but fails under large displacements, and sparse feature-based matching, which copes with large baselines but is brittle with low texture or in cross-modal scenarios. Early convolutional neural network (CNN) methods, such as HomographyNet [Detone et al. 2016], implemented direct regression of four-corner offsets using a single forward pass. Later developments in cascaded or recurrent refinement improved precision but incurred significant computational cost and were challenged by severe geometric divergences.

HomoFM diverges from these paradigms by adopting continuous flow matching from generative modeling [Lipman et al. 2022, Liu et al. 2022], formulating homography inference as the computation of pixel-wise velocity fields that chart dynamic, temporally resolved alignment trajectories rather than static displacements or sets of offsets.

2. Mathematical Formulation

A homography transformation maps points x=[u,v,1]Tx = [u, v, 1]^T to HxHx. The classical approach parameterizes this by an 8-degree-of-freedom matrix via least squares fitting of a displacement field w(u,v)R2w(u, v) \in \mathbb{R}^2 over a regular grid.

HomoFM introduces a continuous velocity field view: each pixel is conceptualized as a particle whose displacement x(t)x(t) evolves within t[0,1]t\in[0,1], following

dx(t)dt=vθ(x(t),t,C),x(0)=0\frac{dx(t)}{dt} = v_\theta(x(t), t, C), \quad x(0) = 0

where vθv_\theta is a neural field parameterized by θ\theta and conditioned on the current position, continuous time, and an image context CC (extracted from IS,ITI_S, I_T).

The framework minimizes a flow matching loss:

LFM=E(x0,x1)Dx1x001vθ(x(t),t,C)dt2L_{FM} = \mathbb{E}_{(x_0,x_1)\sim D} \left\| x_1 - x_0 - \int_0^1 v_\theta(x(t), t, C)\,dt \right\|^2

In the homography setting, x0=0x_0 = 0 and x1=wgtx_1 = w_{gt}. The integral is approximated using NN-step Euler integration; typically, N=4N=4 is sufficient for high precision. The final loss is the robust L2 error at t=1t=1, employing a robust cost function (RoMa).

Key adaptations relative to generative modeling include replacing the usual Gaussian noise prior with a Dirac delta Δ(x)\Delta(x) at x=0x=0, and encoding the current time tt via FiLM layers to flexibly handle the continuous transport trajectory.

3. Network Architecture

HomoFM's backbone comprises DINOv2-Small with a Feature Pyramid Network (FPN) and cross-attention modules to extract multi-scale features at resolutions $1/14$, $1/8$, $1/4$, $1/2$, and full-scale. Low-resolution semantic features are upsampled and concatenated to the FPN to preserve fine-grained detail.

The conditional flow trajectory module, given the current displacement xtn1RH×W×2x_{t_{n-1}} \in \mathbb{R}^{H \times W \times 2}, time embedding tn1t_{n-1}, and context CRH×W×DC \in \mathbb{R}^{H \times W \times D}, employs a FiLM-modulated residual head to output the instantaneous velocity vθ(x,t,C)v_\theta(x, t, C). Inference proceeds via NN Euler steps:

1
2
3
4
5
6
x = zeros(H,W,2)
for n in 1..N:
  t = n/N
  v = VelocityHead(x, t, C)
  x = x + (1/N) * v
w_pred = x

The predicted displacement field wpredw_{pred} is then fit to the 3×33 \times 3 homography matrix HH via Direct Linear Transform (DLT).

4. Domain Adaptation Strategy

HomoFM employs a gradient reversal layer (GRL), following [Ganin & Lempitsky 2015], to enhance domain invariance in scenarios with significant appearance shifts (e.g., visible-infrared or satellite-map matching). A domain discriminator DD is attached to the first decoder layer through the GRL. The domain adversarial loss

Ladv=[logD(FS)+log(1D(FT))]\mathcal{L}_{adv} = -\left[ \log D(F_S) + \log (1 - D(F_T)) \right]

is applied during training, where FSF_S and FTF_T denote source and target image features. The GRL inverts gradients (α-\alpha multiplier), encouraging the backbone to suppress domain-specific cues. The discriminator and GRL are removed at inference, introducing zero runtime overhead.

5. Training Objectives and Optimization

The complete objective function comprises the primary flow matching loss LFM\mathcal{L}_{FM} (summed across all FPN scales) and the domain adversarial loss λLadv\lambda \mathcal{L}_{adv}, weighted by λ=0.01\lambda=0.01 following a 5% warm-up:

L=scalesLFM+λLadv\mathcal{L} = \sum_{\text{scales}} \mathcal{L}_{FM} + \lambda \mathcal{L}_{adv}

Training is performed on a single A100 GPU, with mixed precision, gradient clipping (norm 1.0), and N=4N=4 Euler inference steps. Multi-scale supervision is enforced by summing LFM\mathcal{L}_{FM} across each FPN level.

6. Empirical Evaluation

HomoFM is benchmarked on MSCOCO (natural scenes), VIS-IR (visible/infrared), GoogleMap (satellite/map), and zero-shot AVIID-homo (no fine-tuning). Metrics include AUC@{3,5,10,20} pixels of average corner error (ACE), mean ACE (MACE), parameter count, and MACs.

Benchmark HomoFM AUC@3 GFNet AUC@3 Params (M) MACs (G)
MSCOCO 98.45% 97.69% 3.37 147.4
VIS-IR 24.51% 21.28% 3.37 147.4
GoogleMap 54.39% 51.44% 3.37 147.4

HomoFM reduces computation (–91% MACs vs GFNet) while achieving superior accuracy. Ablation indicates that flow matching yields a 1.0% AUC@3 gain on MSCOCO over an 8-block convolutional regression head, and multi-step inference (N=4) provides further benefits over single-step regression.

Domain adaptation via GRL confers additional robustness, e.g., +0.98% AUC@3 gain on GoogleMap when added to flow matching. Zero-shot generalization on AVIID-homo shows HomoFM maintains the best alignment under severe domain shift (e.g., AUC@3=0.70% vs MCNet’s 0.12% and GFNet’s 0.42%).

7. Limitations and Prospects

HomoFM incurs slightly higher inference latency than single-shot regression due to extra ODE steps but retains a favorable balance between speed and precision. The current architecture assumes a planar scene; extension to nonplanar or 3D warping remains an open direction. Prospective improvements include adaptive step-size integrators to further decrease NN, application of flow matching to optical flow or dense stereo correspondence, and integration of uncertainty estimation for more robust RANSAC-free alignment, particularly within robotics.

Demonstrated application domains encompass AR/VR image stitching, UAV geo-localization, multimodal medical image alignment, and SLAM under challenging illumination. HomoFM introduces continuous flow modeling and robust domain-invariant feature extraction into homography estimation, attaining high accuracy, strong generalization, and computational efficiency (He et al., 26 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to HomoFM.