Restoring vision in hazy weather with hierarchical contrastive learning

Tao Wang, Guangpin Tao, Wanglong Lu, Kaihao Zhang, Wenhan Luo, Xiaoqin Zhang, Tong Lu

Introduction

Single image dehazing is a fundamental yet challenging task in computer vision, aimed at recovering a clear scene from a single degraded observation. Despite significant progress driven by deep learning, existing state-of-the-art (SOTA) methods often struggle with two primary issues: the neglect of feature hierarchy and the underutilization of negative supervision. Standard models frequently fail to effectively integrate information across different network depths, leading to artifacts and color distortion. Furthermore, most approaches rely solely on positive supervision (ground-truth clear images), ignoring the valuable information contained within the hazy input itself.

To address these challenges, this work introduces Hierarchical Contrastive Dehazing (HCD). HCD leverages a novel framework that integrates multi-scale features through a hierarchical network architecture and employs a contrastive loss function to explicitly distinguish between hazy and clear image characteristics.

Methodology

The HCD framework is composed of two primary innovations: the Hierarchical Dehazing Network (HDN) and the Hierarchical Contrastive Loss (HCL).

Hierarchical Dehazing Network (HDN)

The HDN is designed to process features at multiple resolutions simultaneously to preserve both fine-grained textures and high-level semantic context.

  • Hierarchical Feature Extractor (HFE): Utilizing Deformable Convolutions (DCN), the HFE adapts its receptive field to the non-uniform distribution of haze, allowing for more flexible feature representation compared to standard fixed-grid convolutions.
  • Hierarchical Interaction Module (HIM): This module facilitates bidirectional information flow. A bottom-up path propagates high-level context to help shallow layers suppress noise, while a top-down path provides detailed structural information to refine deep features.
  • Multi-output Reconstruction: The network generates restored images at three different scales, ensuring consistency across various levels of abstraction for the loss function to evaluate.

Hierarchical Contrastive Loss (HCL)

The HCL introduces contrastive learning to the dehazing task. By mapping images into a latent space using a pre-trained VGG-19 network, the loss function performs two key operations:

  1. Positive Pull: It minimizes the distance between the restored output and the ground-truth clear image (positive pairs).
  2. Negative Push: It maximizes the distance between the restored output and the original hazy input (negative pairs).

This "push-pull" mechanism helps the model learn a sharper decision boundary for haze removal. The loss is applied hierarchically across all three output scales of the HDN, ensuring the model learns to remove haze at both coarse and fine levels.

Experimental Results

The HCD framework was evaluated on several benchmark datasets, including RESIDE (Indoor and Outdoor SOTS), HazeRD, and DENSE-HAZE.

Quantitative comparison of HCD against SOTA methods across four benchmark datasets (INDOOR-SOTS, OUTDOOR-SOTS, HazeRD, and DENSE-HAZE).

As shown in the figure above, HCD consistently outperforms existing methods. On the SOTS-Indoor dataset, HCD achieved a PSNR of 38.31 dB, a significant improvement of 1.14 dB over the previous best-performing model, AECR-Net. Performance gains were also observed in more challenging scenarios; for instance, on the DENSE-HAZE dataset, HCD improved PSNR by 0.61 dB. Qualitatively, HCD produces images with superior color fidelity and fewer artifacts compared to traditional methods like Dark Channel Prior (DCP) or earlier CNN-based models.

Beyond dehazing, HCD demonstrated strong generalization capabilities. In image deraining tasks using the Rain100L dataset, HCD surpassed the specialized MSPFN model by 2.61 dB, highlighting the robustness of the hierarchical contrastive approach for general image restoration.

Discussion and Conclusion

The success of HCD underscores the importance of utilizing "negative" information in supervised learning. By treating the hazy input as a negative example, the model gains a better understanding of what features to avoid, acting as a powerful regularizer. Furthermore, the bidirectional feature interaction in the HIM ensures that multi-scale information is effectively integrated to "revise" feature responses.

While HCD sets a new benchmark for supervised dehazing, it remains dependent on paired training data. Future research will focus on extending this hierarchical contrastive framework to unsupervised settings and other restoration tasks such as desnowing, deblurring, and low-light enhancement.

Summary updated

BibTeX
@article{wang2022restoring,
  author = {Tao Wang and Guangpin Tao and Wanglong Lu and Kaihao Zhang and Wenhan Luo and Xiaoqin Zhang and Tong Lu},
  title = {{Restoring vision in hazy weather with hierarchical contrastive learning}},
  journal = {Pattern Recognition},
  year = {2022},
}
Figure