Learning Frequency-Aware Dynamic Transformers for All-In-One Image Restoration

Zenglin Shi, Tong Su, Pei Liu, Yunpeng Wu, Le Zhang, Meng WangarXiv 2024 · OpenReview

Abstract: This work aims to tackle the all-in-one image restoration task, which seeks to handle multiple types of degradation with a single model. The primary challenge is to extract degradation representations from the input degraded images and use them to guide the model's adaptation to specific degradation types. Building on the insight that various degradations affect image content differently across frequency bands, we propose a new dual-transformer approach comprising two components: a frequency-aware Degradation estimation transformer (Dformer) and a degradation-adaptive Restoration transformer (Rformer). The Dformer captures the essential characteristics of various degradations by decomposing the input into different frequency components. By understanding how degradations affect these frequency components, the Dformer learns robust priors that effectively guide the restoration process. The Rformer then employs a degradation-adaptive self-attention module to selectively focus on the most affected frequency components, guided by the learned degradation representations. Extensive experimental results demonstrate that our approach outperforms existing methods in five representative restoration tasks, including denoising, deraining, dehazing, deblurring, and low-light enhancement. Additionally, our method offers benefits for handling, real-world degradations, spatially variant degradations, and unseen degradation levels.

Introduction

Image restoration aims to recover high-quality images from degraded versions. Traditional methods often specialize in a single degradation type, such as noise or blur. However, real-world scenarios often involve multiple, unknown degradations. "All-in-one" models attempt to solve this but face the challenge of degradation uncertainty. Without explicit knowledge of the corruption type, models struggle to adapt, often leading to "task interference" where performance on one task comes at the expense of another.

This research identifies that different degradations leave unique "fingerprints" across frequency bands. For instance, noise and rain typically amplify high-frequency components, whereas haze and blur suppress them. This statistical separability provides a powerful prior for restoration.

Statistical analysis showing that different degradations (denoise, derain, dehaze, deblur) cluster distinctly based on their high and low frequency ratios.

Proposed Method: Dual-Transformer Architecture

To leverage these frequency-dependent characteristics, the authors propose a dual-transformer framework consisting of two specialized components: the Dformer and the Rformer.

Overview of the proposed dual-transformer framework, featuring the Dformer for estimation and Rformer for adaptive restoration, along with detailed views of the FA-TB and DA-SA modules.

1. Dformer (Degradation Estimation Transformer)

The Dformer acts as a diagnostic tool. It begins with an Input Frequency Decomposition module using Discrete Fourier Transforms to partition the image into multiple frequency bands. It then processes these bands through Frequency-Aware Transformer Blocks (FA-TB), which utilize both intra-band and inter-band self-attention to capture a robust degradation representation (or "prior").

2. Rformer (Restoration Transformer)

The Rformer performs the actual restoration, guided by the degradation signature provided by the Dformer. Its key innovation is the Degradation-Adaptive Self-Attention (DA-SA) mechanism. Instead of a static processing path, DA-SA dynamically modulates its attention to focus on the frequency components most severely impacted by the specific degradation identified. This allows the model to act as a "dynamic specialist" for any given input.

The model is trained in two stages: initial representation learning for the Dformer via contrastive learning (MoCo framework), followed by joint fine-tuning of both networks using a composite loss function.

Experimental Evaluation

The framework was evaluated across five major restoration tasks: denoising, deraining, dehazing, deblurring, and low-light enhancement.

Datasets

Standard benchmarks were used, including BSD68 (denoising), Rain100L (deraining), SOTS (dehazing), GoPro (deblurring), and LOL (low-light). The model was also tested on real-world noisy images (SIDD) and spatially variant degradations where noise levels differ across the image.

Key Results

  • Superior Performance: The proposed method achieved an average PSNR of 29.69 dB on a 5-task benchmark, outperforming state-of-the-art models like AirNet and PromptIR by significant margins.
  • Robustness to Task Interference: While competing models saw significant performance drops (up to 3.6 dB) as more degradation types were added, this method remained stable, with a drop of only 1.43 dB.
  • Visual Fidelity: Qualitative analysis indicates better edge preservation in denoising and more accurate color reproduction in dehazing compared to existing all-in-one solutions.

Conclusion and Future Directions

By decoupling degradation estimation from image restoration and operating in the frequency domain, this dual-transformer approach effectively handles multiple corruptions with a single model. The use of frequency-aware priors allows for dynamic adaptation, mitigating the interference typically seen in multi-task learning.

Future work may address the computational overhead associated with increasing frequency bands and explore learnable frequency filters to replace the current fixed decomposition. Additionally, optimizing the architecture for real-time performance on mobile devices remains an important next step.

Summary updated

BibTeX
@misc{shi2024learning,
  author = {Zenglin Shi and Tong Su and Pei Liu and Yunpeng Wu and Le Zhang and Meng Wang},
  title = {{Learning Frequency-Aware Dynamic Transformers for All-In-One Image Restoration}},
  year = {2024},
  eprint = {2407.01636},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.01636},
}
Figure