Learning Deblurring Texture Prior from Unpaired Data with Diffusion Model

Chengxu Liu, Lu Qi, Jinshan Pan, Xueming Qian, Ming-Hsuan Yang

TL;DR

This paper introduces TP-Diff, a novel framework for unsupervised image deblurring that leverages diffusion models to learn spatially varying texture priors from unpaired blurry and sharp images. By generating these priors, TP-Diff significantly improves deblurring performance, outperforming existing state-of-the-art methods without requiring paired training data.

What Problem Does This Paper Address?

Acquiring large datasets of perfectly aligned blurry and sharp image pairs for training deblurring models is a significant challenge. Real-world blurs are complex and unpredictable, making it difficult to manually create such datasets or rely solely on synthetic data, which may not generalize well. While unsupervised methods exist, they often struggle with the spatial diversity of blurs, leading to suboptimal performance. This paper aims to bridge this gap by developing an effective unsupervised deblurring method that can learn from readily available unpaired blurry and sharp images.

Methods

TP-Diff is built upon a novel diffusion model (DM) based framework and consists of four main components:

  • Texture Prior Encoder (TPE): This component is designed to extract spatially varying texture priors from unpaired blurry and sharp images. It utilizes a memory mechanism to learn texture representations from sharp images and then transfers this knowledge to represent textures in the blurry input.
  • Diffusion Model (DM): The DM is employed to generate reliable spatially varying texture priors. It involves a forward diffusion process that adds noise to a ground truth prior and a reverse denoising process, handled by a neural network, to reconstruct the prior from noisy inputs. This process is trained to generate priors that are then used to guide the deblurring network.
  • Deblurring Network: This network is responsible for removing blur from the input image. It incorporates the novel Texture Transfer Transformer (TTformer) layer, which leverages the learned texture priors.
  • Reblurring Network: This network is part of the cycle structure and is used to synthesize blurry images, aiding in the unsupervised training process.

The TTformer layer is a key innovation, comprising:

  • Filter-Modulated Multi-head Self-Attention (FM-MSA): This module uses adaptive filtering, guided by the texture prior, to effectively remove spatially varying blurs.
  • Transform-Modulated Feed-Forward Network (TM-FFN): This component further processes features using dynamic parameters derived from the texture prior.

The training is conducted in two stages:

  1. Stage One: Jointly train the TPE and the entire cycle structure (deblurring and reblurring networks) using adversarial and cycle consistency losses, along with a proposed wavelet-based adversarial loss to preserve high-frequency details.
  2. Stage Two: Freeze the TPE and jointly train the DM and the cycle structure, optimizing for the diffusion loss.

Datasets

The paper evaluates TP-Diff on several widely-used datasets:

  • GoPro [31]
  • HIDE [42]
  • RealBlur [38] (RealBlur-R and RealBlur-J)
  • RB2V_Street [34]
  • RSBlur [39]

For training, the authors follow existing practices to split these datasets into unpaired blurry and sharp image pairs.

Key Insights and Ideas

  • Diffusion Models for Texture Priors: The core insight is using diffusion models not to directly generate sharp images (which can introduce artifacts) but to generate texture priors. This approach effectively bridges the gap between the abstract nature of diffusion models and the specific task of image deblurring.
  • Spatially Varying Priors are Crucial: The paper emphasizes that real-world blurs are spatially diverse. By learning spatially varying texture priors, TP-Diff can adapt to these local variations, leading to better deblurring results than methods that assume a uniform blur.
  • TPE as a Robust Prior Extractor: The Texture Prior Encoder, with its memory mechanism and feature-space prior learning, proves to be robust and capable of benefiting from diverse unpaired sharp images, even with random sampling.
  • TTformer for Effective Prior Utilization: The Texture Transfer Transformer layer, particularly the FM-MSA, demonstrates how to effectively integrate learned texture priors into the deblurring network through adaptive filtering.

Key Results

  • State-of-the-Art Performance: TP-Diff achieves state-of-the-art results on multiple benchmarks, including GoPro, HIDE, RealBlur-R, and RealBlur-J, outperforming existing unsupervised deblurring methods. For example, on GoPro, it achieves a PSNR of 28.13 dB and SSIM of 0.903.
  • Improved Visual Quality: Qualitative results show significant improvements, especially in recovering detailed textures and sharp edges, such as clear windows in images.
  • Efficiency: The method achieves strong performance with fewer parameters compared to some other methods, and the diffusion process for prior generation requires fewer iterations than direct image generation.
  • Component Effectiveness: Ablation studies confirm the crucial role of each proposed component (DM, TPE, TTformer, WaveLoss) in achieving the overall performance.

Limitations and Future Work

  • Computational Cost: While the diffusion process for prior generation is more efficient than direct image generation, diffusion models are generally computationally intensive. The paper mentions that the number of iterations for the denoising process can be optimized, and setting T=8 was found to be a good trade-off.
  • Memory Size Trade-off: The paper notes that a larger memory size (N) in the TPE can improve performance but reduces model efficiency. They settled on N=256 after trade-offs.
  • Future Work: The paper suggests that the proposed framework provides inspiration for other unpaired restoration tasks, implying that this approach could be extended to other image restoration problems. The authors also mention providing supplementary material for more detailed analysis and efficiency metrics.

Summary updated

BibTeX
@inproceedings{liu2025learning,
  author = {Chengxu Liu and Lu Qi and Jinshan Pan and Xueming Qian and Ming-Hsuan Yang},
  title = {{Learning Deblurring Texture Prior from Unpaired Data with Diffusion Model}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure