DnSwin: Toward Real-World Denoising via Continuous Wavelet Sliding-Transformer

Hao Li, Zhijing Yang, Xiaobin Hong, Ziying Zhao, Junyang Chen, Yukai Shi, Jinshan Pan

Abstract

Real-world image denoising remains a challenging task due to the complexity of sensor noise compared to synthetic variants. While Vision Transformers (ViTs) offer powerful long-range modeling, their standard tokenization process often introduces patching artifacts that damage fine textures. This paper introduces DnSwin, a hybrid architecture that integrates Discrete Wavelet Transforms (DWT) with a sliding-window Transformer. By decomposing images into frequency subbands, DnSwin preserves structural continuity and high-frequency details, achieving state-of-the-art performance on benchmarks like SIDD and DND with high computational efficiency.

Introduction

Image denoising is a fundamental low-level vision task. However, real-world noise—typically encountered in low-light smartphone photography—is spatially correlated and signal-dependent, making it far more difficult to remove than synthetic Gaussian noise.

Recent advancements have seen Vision Transformers (ViTs) outperform traditional CNNs due to their global receptive fields. Nevertheless, ViTs face a critical "tokenization" hurdle: cutting an image into non-overlapping patches breaks the continuity of noise patterns and destroys the gradients needed to reconstruct fine textures. Conversely, traditional CNN-based UNets often lose high-frequency information during repeated downsampling. DnSwin addresses these issues by using wavelets to maintain image continuity while leveraging the modeling power of Transformers.

Comparison between standard Vision Transformer patching (top) and the proposed wavelet-based approach (bottom). The wavelet transform maintains a compact pattern and builds correspondence across frequencies, avoiding fragmental artifacts.

Proposed Method: DnSwin

The DnSwin architecture utilizes a "sandwich" structure consisting of a CNN encoder, a Wavelet Sliding-Window Transformer (WSWT) bottleneck, and a CNN decoder.

Wavelet Sliding-Window Transformer (WSWT)

The core innovation lies in the WSWT, which avoids arbitrary patching. Instead, it employs the Discrete Wavelet Transform (DWT) to decompose features into four frequency subbands: one low-frequency (LL) and three high-frequency (LH, HL, HH).

  • LF-WSA (Low-Frequency Window-based Self-Attention): Processes structural information in the LL subband using standard windowed attention.
  • HF-SWSA (High-Frequency Sliding Window-based Self-Attention): Targets the high-frequency subbands where noise is most prevalent. The sliding mechanism allows the model to build correspondences across window boundaries, effectively "healing" the continuity issues inherent in standard Transformers.

After processing, an Inverse DWT (IDWT) integrates the subbands, ensuring that frequency-specific dependencies are preserved before the final CNN-based reconstruction.

The complete DnSwin architecture, featuring the CNN Encoder, the Wavelet Sliding-Window Transformer (WSWT) bottleneck with DWT/IDWT stages, and the CNN Decoder.

Experiments and Results

Datasets and Evaluation

The model was evaluated on the gold standards for real-world denoising:

  • SIDD (Smartphone Image Denoising Dataset): Thousands of real noisy/clean pairs from smartphone sensors.
  • DND (Darmstadt Noise Dataset): A blind benchmark of 50 high-resolution real-world images used to test generalization.

Performance and Efficiency

DnSwin achieved state-of-the-art (SOTA) results across major benchmarks. On the SIDD validation set, it reached a PSNR of 39.80 dB, surpassing models like SwinIR and MIRNet. On the DND benchmark, it achieved 40.29 dB PSNR.

Beyond accuracy, DnSwin is highly efficient. For a 256x256 image, it records an inference time of 0.0847 seconds, making it nearly twice as fast as MIRNet and significantly faster than SwinIR (0.4726s). This balance of performance and speed makes it highly suitable for practical, real-time applications.

Conclusion

DnSwin demonstrates that frequency-aware modeling is key to solving the tokenization artifacts in Transformer-based denoisers. By utilizing wavelets as "smart" tokenizers, the model effectively separates structure from noise while maintaining global context. Future work will explore extending this hybrid architecture to other restoration tasks such as deblurring and super-resolution, and incorporating GAN-based training to further enhance perceptual sharpness.

Summary updated

BibTeX
@article{li2022dnswin,
  author = {Hao Li and Zhijing Yang and Xiaobin Hong and Ziying Zhao and Junyang Chen and Yukai Shi and Jinshan Pan},
  title = {{DnSwin: Toward Real-World Denoising via Continuous Wavelet Sliding-Transformer}},
  journal = {Knowledge-Based Systems},
  year = {2022},
  doi = {10.1016/j.knosys.2022.109815},
}
Figure