Vision Transformers for Single Image Dehazing

Yuda Song, Zhuqing He, Hui Qian, Xin Du · DOI

Abstract

DehazeFormer is a novel Transformer-based architecture designed specifically for single image dehazing. While Vision Transformers (ViTs) have excelled in high-level vision tasks, their application to low-level restoration has been hindered by standard components like LayerNorm and GELU. DehazeFormer addresses these limitations through restoration-friendly modifications, including RescaleNorm, reflection padding, and parallel convolutions. Experimental results demonstrate that DehazeFormer sets new state-of-the-art records, achieving over 40 dB PSNR on the SOTS indoor benchmark while maintaining significantly higher efficiency than previous CNN-based leaders.

Introduction

Single image dehazing aims to recover a clear image from a hazy input, a task traditionally dominated by Convolutional Neural Networks (CNNs). Recent attempts to adapt hierarchical Transformers, such as the Swin Transformer, to this domain have faced challenges. The authors identify three primary mismatches: standard LayerNorm destroys essential brightness and contrast information, non-monotonic activation functions (e.g., GELU) complicate the "inversion" of haze effects, and cyclic shift mechanisms introduce edge artifacts. DehazeFormer is proposed to bridge this gap by tailoring the Transformer architecture to the physical properties of light and haze.

Methods

The DehazeFormer architecture builds upon the Swin Transformer but introduces several critical innovations for image restoration:

  • RescaleNorm: Replaces standard LayerNorm to preserve global style and contrast by normalizing the entire feature map and reintroducing mean and variance.
  • Activation Functions: Utilizes monotonic functions like ReLU or the proposed SoftReLU, which are hypothesized to be more "invertible" for reconstruction tasks compared to GELU.
  • Reflection Padding: Replaces cyclic shifts to ensure consistent window sizes at image boundaries, eliminating edge artifacts.
  • W-MHSA with Parallel Convolution: Combines the low-pass filtering properties of self-attention with a parallel convolution branch to preserve high-frequency details.
  • Soft Reconstruction: Incorporates a constraint based on the atmospheric scattering model to guide the final image generation.
The DehazeFormer architecture and its internal block design.

Datasets and Evaluation

The model was evaluated on the RESIDE benchmark (ITS, OTS, and SOTS) and a new large-scale Remote Sensing Haze (RS-Haze) dataset. RS-Haze utilizes multi-spectral Landsat-8 data to simulate realistic, non-homogeneous haze patterns, providing a more challenging testbed than traditional synthetic datasets.

Key Results

DehazeFormer achieves unprecedented performance across benchmarks. Notably, DehazeFormer-L is the first method to surpass 40 dB PSNR on the SOTS indoor set. Beyond accuracy, the model demonstrates remarkable efficiency. As shown in Figure 1, the "Small" variant (DehazeFormer-S) outperforms the previous state-of-the-art FFA-Net while requiring only 25% of the parameters and 5% of the computational cost (MACs). Qualitative analysis confirms that DehazeFormer effectively avoids color distortion and blocky artifacts common in CNN-based approaches.

Performance comparison (PSNR vs. MACs) of DehazeFormer variants against existing state-of-the-art methods.

Conclusion

DehazeFormer proves that well-designed Transformers can outperform deep CNNs in low-level vision tasks both in terms of accuracy and efficiency. Future work includes exploring "thumbnail-to-full-res" decoding for real-time 4K processing and investigating the generalizability of these modifications to other restoration tasks like denoising and super-resolution.

Summary updated

BibTeX
@article{song2023vision,
  author = {Yuda Song and Zhuqing He and Hui Qian and Xin Du},
  title = {{Vision Transformers for Single Image Dehazing}},
  journal = {IEEE Trans. Image Process.},
  year = {2023},
  doi = {10.1109/tip.2023.3256763},
}
Figure