The Devil is in the Darkness: Diffusion-Based Nighttime Dehazing Anchored in Brightness Perception

Xiaofeng Cong, Yu-Xin Zhang, Haoran Wei, Yeying Jin, Junming Hou, Jie Gui, Jing Zhang, Dacheng TaoarXiv 2025

Abstract

While nighttime image dehazing has been extensively studied, converting nighttime hazy images to daytime-equivalent brightness remains largely unaddressed. Existing methods face two critical limitations: (1) datasets overlook the brightness relationship between day and night, resulting in the brightness mapping being inconsistent with the real world during image synthesis; and (2) models do not explicitly incorporate daytime brightness knowledge, limiting their ability to reconstruct realistic lighting. To address these challenges, we introduce the Diffusion-Based Nighttime Dehazing (DiffND) framework, which excels in both data synthesis and lighting reconstruction. Our approach starts with a data synthesis pipeline that simulates severe distortions while enforcing brightness consistency between synthetic and real-world scenes, providing a strong foundation for learning night-to-day brightness mapping. Next, we propose a restoration model that integrates a pre-trained diffusion model guided by a brightness perception network. This design harnesses the diffusion model's generative ability while adapting it to nighttime dehazing through brightness-aware optimization. Experiments validate our dataset's utility and the model's superior performance in joint haze removal and brightness mapping.

The Challenge of Nighttime Dehazing and Brightness Mapping (NDBM)

Standard nighttime dehazing often leaves images dark and difficult to interpret because it primarily focuses on removing atmospheric scattering (the "fog") without addressing the inherent lack of illumination. A more ambitious and useful goal is Nighttime Dehazing and Brightness Mapping (NDBM), which aims to simultaneously remove haze and map the brightness from nighttime levels to daytime-equivalent levels.

Existing solutions for NDBM typically fail due to two main factors:

  1. Synthetic Data Mismatch: Most training datasets use global, uniform brightness adjustments to simulate nighttime. However, real-world lighting is non-uniform; for instance, the sky is often darker than the foreground, and light intensity attenuates with distance (depth).
  2. Lack of Daytime Priors: Models often lack an explicit understanding of "daytime brightness," leading to unrealistic color shifts or insufficient illumination in the final output.

The DiffND Framework

To overcome these hurdles, the DiffND framework introduces a novel approach that combines realistic data synthesis with a generative restoration model. The framework is built on the premise that nighttime brightness is highly dependent on scene geometry and that pre-trained generative models can serve as a powerful "knowledge base" for daytime lighting.

The DiffND framework architecture, featuring the data synthesis pipeline and the diffusion-based restoration model guided by a brightness perception network.

Realistic Data Synthesis

Instead of simple global darkening, DiffND employs a non-uniform data synthesis pipeline. By utilizing depth estimation and sky segmentation, the pipeline creates a more realistic night-to-day mapping. It simulates light attenuation and specific light sources (point and cone lights) to ensure the synthetic training data mimics the complex distortions found in real-world nighttime scenes. This bridges the domain gap between synthetic training environments and real-world performance.

Diffusion-Based Restoration with Brightness Anchoring

The restoration model leverages a pre-trained generative diffusion model (SD-Turbo) as its backbone. Diffusion models are adept at reconstructing realistic details because they are trained on vast datasets of high-quality images. To adapt this to NDBM, DiffND incorporates:

  • Brightness Perception Network ($\Phi$): This sub-network acts as an "anchor" by predicting a brightness map from the hazy input. This map guides the diffusion model's decoder via skip connections, ensuring the output has correct daytime-equivalent lighting.
  • Efficient Tuning: Using LoRA (Low-Rank Adaptation), the model fine-tunes the large diffusion model efficiently, allowing it to adapt to the dehazing task without retraining the entire network.
  • Prompt-Based Flexibility: The system can generate different lighting conditions (e.g., "dusky evening" vs. "clear daytime") simply by adjusting the text prompt during inference.

Experimental Evaluation

DiffND was evaluated using a manually curated training set of 1,546 high-quality images from the Places365 dataset and tested on the Real-World Nighttime Haze (RWNH) dataset.

Qualitative comparison of DiffND against state-of-the-art methods on real-world hazy nighttime images, demonstrating superior brightness mapping and detail reconstruction.

Key Results

  • Quantitative Performance: DiffND outperformed state-of-the-art models (such as SFSNiD and Fourmer) across 10 different no-reference image quality metrics. Notably, it achieved a Q-ALIGN score of 2.539, significantly higher than competitors.
  • Qualitative Realism: Visual comparisons demonstrate that while other models often produce images that are too dark, overly saturated, or artifact-heavy, DiffND produces clear images with natural-looking daytime illumination and sharp structural details.
  • Ablation Studies: Removing the brightness adjustment or the brightness perception network led to significantly worse results, confirming that both realistic synthesis and guided restoration are critical to success.

Conclusion

DiffND represents a significant step forward in nighttime image restoration. By anchoring a generative diffusion model with a brightness perception network and training it on geometrically-aware synthetic data, the framework successfully tackles the complex NDBM task. While future work may expand the dataset scale and address even more complex urban lighting, DiffND currently sets a new standard for reconstructing clear, daytime-equivalent images from hazy nighttime inputs.

Summary updated

BibTeX
@misc{cong2025devil,
  author = {Xiaofeng Cong and Yu-Xin Zhang and Haoran Wei and Yeying Jin and Junming Hou and Jie Gui and Jing Zhang and Dacheng Tao},
  title = {{The Devil is in the Darkness: Diffusion-Based Nighttime Dehazing Anchored in Brightness Perception}},
  year = {2025},
  eprint = {2506.02395},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.02395},
}
Figure