DMAligner: Enhancing Image Alignment via Diffusion Model Based View Synthesis

Xinglong Luo, Ao Luo, Zhengning Wang, Yueqi Yang, Chaoyu Feng, Lei Lei, Bing Zeng, Shuaicheng Liu

TL;DR

DMAligner shifts the image alignment paradigm from traditional optical flow-based warping to generative view synthesis using a Latent Diffusion Model (LDM). By directly generating the aligned frame and leveraging a novel dynamics-aware mask module, it eliminates the ghosting and occlusion artifacts that have plagued classical alignment methods for years.

What Problem Does This Paper Address?

Image alignment—matching up consecutive video frames or burst photos—is the backbone of many computer vision tasks, including HDR imaging, video stabilization, and super-resolution. Traditionally, this is done using a discriminative approach: estimate the optical flow between two frames and warp one image to match the other.

However, this approach breaks down in the real world. When objects move or the camera shifts, certain regions become occluded or exposed. Warping pixels in these occlusion zones inevitably creates ugly "ghosting" artifacts or image tearing. Furthermore, optical flow relies on a "brightness constancy" assumption, meaning it struggles when lighting conditions change.

Figure 1. (a) Conventional image alignment based on optical flow and image warping, resulting in ghosting artifacts and occlusion. (b) Our DMAligner directly generates the complete alignment im- age via diffusion-based view synthesis.

DMAligner re-frames image alignment as a conditional view-synthesis problem. Instead of stretching and warping pixels, it uses a generative model to synthesize a completely clean, aligned novel view.

Methods

DMAligner is built on a Latent Diffusion Model (LDM) framework, but introduces two critical modifications tailored for the alignment task:

  1. Dynamics-aware Mask Producing (DMP) Module: Pure generative models can sometimes hallucinate details or lose track of moving objects. To prevent this, the DMP module computes a normalized dot-product cost volume between the latent features of the two input frames ($I_1$ and $I_2$). This cost volume is used to predict a motion mask ($M_{pred}$) that explicitly separates dynamic foreground objects from the static background.
  2. Mask-Guided Conditioning: The predicted motion mask is dilated and used to blend the background of $I_1$ with the foreground of $I_2$, creating a fused latent representation ($V_M$). This fused latent, along with the original latents of $I_1$ and $I_2$, serves as the conditioning signal ($x_{cond}$) for the diffusion denoising network.
  3. "Predict $x_0$" Strategy: Unlike standard diffusion models that predict the added noise ($\epsilon$) at each step, DMAligner is trained to directly predict the clean, aligned image latent ($x_0$). This approach proves much more effective for image alignment because the network can directly exploit the strong structural priors provided by the input frames.
Figure 3. Overview of our DMAligner. Instead of using the discriminative learning paradigm for optical flow estimation and image warping, our framework employs a generative approach to achieve image alignment with a diffusion model. Dynamics-aware Mask Producing (DMP) module is crucial for providing dynamic information, essential for performing the Dynamics-aware Diffusion Training process in this task.

Datasets

The authors utilized three primary datasets for training and evaluation:

  • DSIA (Dynamic Scene Image Alignment) Dataset: Because no large-scale dataset with perfect ground truth existed for this specific task, the authors created DSIA using Blender. It features 1,033 indoor and outdoor scenes with over 30K image pairs. It perfectly simulates simultaneous camera motion, moving characters, and fluctuating illumination. The ground truth ($I_{gt}$) represents the scene at time $t_2$ but captured from the camera pose of $P_1$.
  • Sintel: A challenging synthetic dataset used to evaluate cross-domain generalization (tested on both Clean and Final passes).
  • DAVIS: A widely-used real-world video dataset used for qualitative and zero-shot quantitative evaluation.
Overview of DSIA dataset generation

Key Insights and Ideas

  • Generative Over Discriminative: Moving from pixel-warping to pixel-generation fundamentally bypasses the mathematical limitations of many-to-one mapping in occlusion zones. The model doesn't need to figure out where a hidden pixel went; it simply generates what should be there.
  • Anchoring the Generation: Pure image-to-image translation can lose geometric fidelity. By explicitly calculating a cost volume and using it to fuse the input latents ($V_M$), the authors successfully "anchor" the diffusion process to the true scene geometry.
  • The Power of Structure: Predicting $x_0$ directly works better here because image alignment isn't generating an image from thin air; it's a rearrangement and refinement of existing visual data.

Key Results

DMAligner achieves state-of-the-art performance across both synthetic and real-world benchmarks:

  • DSIA Benchmark: DMAligner achieved an average PSNR of 26.67 dB and SSIM of 0.81, significantly outperforming top flow-warping methods like DPFlow (22.46 dB / 0.77) and competitive view-synthesis methods like GenWarp (24.23 dB / 0.78).
  • Zero-Shot Generalization: When trained on DSIA and directly evaluated on Sintel and DAVIS without fine-tuning, DMAligner achieved the lowest (best) average LPIPS and DreamSim scores, demonstrating robust cross-domain generalization.
  • Downstream Tasks: When plugged into an HDR imaging pipeline to align low-dynamic-range frames before fusion, DMAligner drastically reduced ghosting artifacts around fast-moving objects compared to traditional flow-based pre-alignment.

Limitations and Future Work

While DMAligner represents a major paradigm shift, the authors note a few areas for improvement:

  • Inference Speed: Because it relies on an iterative diffusion process (even when accelerated to $\Delta = 20$ steps), it is computationally heavier and slower than single-forward-pass optical flow networks.
  • Extreme Motion: Although a stress test showed that DMAligner degrades much slower than other methods as motion increases, extreme motion magnitudes still pose a challenge to local detail reconstruction.

Future work will likely focus on integrating faster sampling techniques (such as consistency models) to bring DMAligner closer to real-time performance for video applications.

Summary updated

BibTeX
@inproceedings{luo2026dmaligner,
  author = {Xinglong Luo and Ao Luo and Zhengning Wang and Yueqi Yang and Chaoyu Feng and Lei Lei and Bing Zeng and Shuaicheng Liu},
  title = {{DMAligner: Enhancing Image Alignment via Diffusion Model Based View Synthesis}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=ApDfEkwggO},
}
Figure