DMAligner: Enhancing Image Alignment via Diffusion Model Based View Synthesis
Authors: Xinglong Luo, Ao Luo, Zhengning Wang, Yueqi Yang, Chaoyu Feng, Lei Lei, Bing Zeng, Shuaicheng Liu
Organizations: University of Electronic Science and Technology of China · Qianyuan Laboratory, Hangzhou, China · Southwest Jiaotong University · Independent Researcher
Image alignment is a fundamental task in computer vision with broad applications. Existing methods predominantly employ optical flow-based image warping. However, this technique is susceptible to common challenges such as occlusions and illumination variations, leading to degraded alignment visual quality and compromised accuracy in downstream tasks. In this paper, we present DMAligner, a diffusion-based framework for image alignment through alignment-oriented view synthesis. DMAligner is crafted to tackle the challenges in image alignment from a new perspective, employing a generation-based solution that showcases strong capabilities and avoids the problems associated with flow-based image warping. Specifically, we propose a Dynamics-aware Diffusion Training approach for learning conditional image generation, synthesizing a novel view for image alignment. This incorporates a Dynamics-aware Mask Producing (DMP) module to adaptively distinguish dynamic foreground regions from static backgrounds, enabling the diffusion model to more effectively handle challenges that classical methods struggle to solve. Furthermore, we develop the Dynamic Scene Image Alignment (DSIA) dataset using Blender, which includes 1,033 indoor and outdoor scenes with over 30K image pairs tailored for image alignment. Extensive experimental results demonstrate the superiority of the proposed approach on DSIA benchmarks, as well as on a series of widely-used video datasets for qualitative comparisons. Our code is available at https://github.com/boomluo02/DMAligner.
Figures & tables
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 image via diffusion-based view synthesis.
Figure 2: Overview of DSIA dataset generation. The ground truth image is rendered by setting the time to t2 and the camera pose to P1 , where the background statics mirror those in I1 , and the dynamics are akin to I2 , with slight visualization variances caused by pose changes. As a result, Igt can be regarded as the alignment-oriented view synthesis with reference from I2 to I1 ( i.e., I2′ for I2 to I1 alignment).
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.
Figure 4: Qualitative comparisons between DPFlow [ 34 ] , COGS [ 14 ] , GenWarp [ 41 ] and our DMAligner on our DSIA dataset.
Method
Input Structure
DPFlow [ 34 ]
2 images ( I1,I2 )
COGS [ 14 ]
2 images ( I1,I2 ) +
Depth ( D1,D2 ) + Mask ( M1,M2 )
AccidentalGS [ 33 ]
2 images ( I1,I2 ) +
Depth ( D1,D2 ) + Camera Intrinsics ( K )
GenWarp [ 41 ]
Single image ( I2 ) + Camera Intrinsics ( K ) +
Table 1: Comparison of network inputs among DPFlow [ 34 ] , COGS [ 14 ] , AccidentalGS [ 33 ] , GenWarp [ 41 ] and our DMAligner. Other optical flow networks (PWCNet [ 44 ] , RAFT [ 45 ] , FlowFormer++ [ 42 ] , FlowDiffuser [ 27 ] ) have the same input structure as DPFlow.
Methods
LcLf
LcSf
ScLf
ScSf
Avg.
PSNR ↑
SSIM ↑
PSNR ↑
SSIM ↑
PSNR ↑
SSIM ↑
PSNR ↑
SSIM ↑
PSNR ↑
SSIM ↑
Methods based on Flow Warping
PWCNet [ 44 ]
16.53
0.74
16.40
0.73
20.53
0.74
21.01
0.76
18.62
0.74
RAFT [ 45 ]
18.22
0.74
18.34
0.74
22.46
0.77
22.95
0.76
20.49
0.75
FlowFormer++ [ 42 ]
21.02
0.75
20.97
0.76
22.84
0.77
23.94
0.79
22.19
0.77
FlowDiffuser [ 27 ]
20.18
0.75
20.33
0.75
23.39
0.78
23.91
0.79
21.95
0.77
Table 2: Quantitative comparison on our DSIA dataset across four subsets (LcLf, LcSf, ScLf, and ScSf) using PSNR and SSIM metrics, higher scores indicate better performance . The average (“Avg”) across all subsets summarizes overall results. † indicates that occlusion and ghost regions are excluded during metric computation, as determined by forward-backward consistency check [ 50 ] .
Figure 5: Qualitative comparisons between DPFlow [ 34 ] , GenWarp [ 41 ] and our DMAligner on Sintel dataset.
Figure 6: Qualitative comparisons between DPFlow [ 34 ] , GenWarp [ 41 ] and our DMAligner on the real-world DAVIS dataset.
Figure 7: Comparison of HDR results using flow-based method HDRFlow [ 49 ] , DPFlow [ 34 ] and our DMAligner. Our DMAligner significantly reduces ghosting and background distortions, especially around occluded regions and moving objects.
Methods
Sintel (Clean)
Sintel (Final)
DAVIS
Avg.
LPIPS ↓
DreamSim ↓
LPIPS ↓
DreamSim ↓
LPIPS ↓
DreamSim ↓
LPIPS ↓
DreamSim ↓
Methods based on Flow Warping
PWCNet [ 44 ]
0.251
0.146
0.177
0.109
0.217
0.102
0.215
0.119
RAFT [ 45 ]
0.245
0.141
0.171
0.102
0.219
0.104
0.212
0.116
FlowFormer++ [ 42 ]
0.264
0.150
0.184
0.113
0.224
0.106
0.224
0.123
FlowDiffuser [ 27 ]
0.258
0.141
0.179
0.103
0.211
0.090
0.216
0.111
Table 3: Quantitative comparison on Sintel and DAVIS dataset. Due to the lack of ground truth for precise evaluation, we compute LPIPS and DreamSim [ 9 ] between Ipred and I1 . Lower scores indicate better performance .
Exp.
Predict
DMP
Avg
Targets
PSNR
SSIM
(a)
pred ϵ^t
w/o
24.82
0.77
(b)
pred x0
w/o
25.12
0.79
(c)
rectified flow
w/
25.98
0.80
(d)
v-prediction
w/
26.16
0.81
(e)
pred x0
w/
26.67
0.81
Table 4: Ablation studies of predict targets and our DMP.
Figure 8: Stress test: performance vs. motion magnitude.
Key Laboratory of Aerospace Information Security and Trusted Computing, Ministry of Education, School of Cyber Science and Engineering, Wuhan University, Wuhan, China · Shanghai Innovation Institute, Shanghai, China · Shanghai AI Laboratory, Shanghai, China