FriendNet: Detection-Friendly Dehazing Network

Yihua Fan, Yongzhen Wang, Mingqiang Wei, Fu Lee Wang, Haoran Xie

TL;DR

This paper introduces FriendNet, a novel deep learning framework that jointly optimizes image dehazing and object detection for adverse weather conditions. By establishing a positive feedback loop where detection guides dehazing and vice-versa, FriendNet significantly improves both image quality and detection accuracy, outperforming existing methods.

What Problem Does This Paper Address?

Autonomous driving systems and advanced driver assistance systems (ADAS) heavily rely on accurate object detection from camera imagery. However, adverse weather conditions like fog and haze severely degrade image quality, leading to significant performance drops in these critical detection tasks. While traditional approaches either directly train detectors on hazy images (leading to poor feature learning) or use dehazing as a separate pre-processing step (which doesn't guarantee improved detection), this paper questions whether a more integrated approach can yield better results. The core problem is the disconnect between the low-level goal of image restoration (dehazing) and the high-level goal of object detection, which often have conflicting optimization objectives.

Methods

FriendNet tackles this challenge by proposing a unified framework that tightly couples image dehazing and object detection. The key innovation lies in establishing a "detection-friendly" dehazing process. Here's how it works:

  • Task-Driven Learning: Instead of treating dehazing as a standalone pre-processing step, FriendNet trains a dehazing network and an object detection network (specifically, YOLOv7-tiny for its efficiency) in an end-to-end manner.
  • Detection Guidance: The pre-trained object detector, initially frozen, provides "detection guidance" to the dehazing network. This guidance is a mask-like image derived from the detector's predictions (bounding boxes and confidence scores).
  • Guidance Integration Modules: Two novel modules, the Guidance Fusion Block (GFB) and Guidance Attention Block (GAB), are introduced to effectively integrate this detection guidance into the dehazing network's feature maps. GFB is used for shallow features, and GAB for deep features, ensuring guidance at both coarse and fine levels.
  • Physics-Aware Feature Enhancement Block (PFEB): This block enhances the dehazing network's feature extraction by incorporating physics-based priors from the atmospheric scattering model. This helps generate more robust features beneficial for both dehazing and detection.
  • Joint Loss Function: The total loss comprises a restoration loss (Mean Absolute Error - MAE) and a detection loss (from YOLOv7-tiny). This joint optimization encourages the dehazing network to produce features that are not only visually pleasing but also highly relevant for the subsequent detection task.

Datasets

  • VOC-FOG Dataset: A synthetic dataset created by simulating fog on the original VOC dataset using the atmospheric scattering model. This dataset was used for training and testing, specifically designed to bridge the gap between image restoration and object detection.
  • VOC-FOG-Test: A separate synthetic test set generated using the same methodology as VOC-FOG.
  • Foggy Driving Dataset: A real-world dataset used to evaluate the method's generality and performance in practical scenarios.

Key Insights and Ideas

  • Dehazing for Detection, Not Just Aesthetics: The paper strongly argues that simply improving image quality through dehazing doesn't automatically translate to better object detection. The dehazing process itself needs to be optimized with the downstream detection task in mind.
  • Detection as a Prior for Dehazing: The detection network's output (even if imperfect) provides valuable "hints" about where objects are, guiding the dehazing network to focus its efforts and preserve crucial object-related features.
  • Bidirectional Benefit: The interaction is mutually beneficial: cleaner features from dehazing help detection, and detection guidance helps dehazing produce more relevant features.
  • Physics-Informed Deep Learning: Integrating physics-based priors (like the atmospheric scattering model) into deep learning modules (PFEB) can enhance feature representation and improve performance, especially in domain-specific tasks like dehazing.

Key Results

  • Superior Performance: FriendNet consistently outperformed state-of-the-art methods in both image quality (PSNR, SSIM) and object detection (mAP) on both synthetic (VOC-FOG-Test) and real-world (Foggy Driving) datasets.
  • Significant mAP Gains: On the Foggy Driving dataset, FriendNet achieved the highest mAP and surpassed the second-best method by a significant margin (3.02).
  • Detection Accuracy Close to Clean Images: On the synthetic VOC-FOG-Test dataset, FriendNet achieved a mAP very close to that of YOLOv7-tiny trained on clean images (79.31 vs. 79.70), demonstrating its effectiveness in adverse conditions.
  • Balanced Computational Efficiency: While FriendNet introduces some overhead compared to lightweight dehazing methods, it strikes a favorable balance between performance gains and computational cost, offering a substantial improvement in mAP for a modest increase in parameters and FLOPs.

Limitations and Future Work

  • Extremely Hazy Conditions: The paper acknowledges that FriendNet still faces challenges in extremely hazy images where even human perception is limited. In such scenarios, the lack of visual information makes it difficult to recover missing details for accurate detection.
  • Future Directions: The authors plan to explore more powerful prior knowledge and integrate it into feature extraction. They also aim to extend their work to other low-level and high-level vision tasks to investigate the framework's versatility.

Summary updated

Abstract

Adverse weather conditions often impair the quality of captured images, inevitably inducing cutting-edge object detection models for advanced driver assistance systems (ADAS) and autonomous driving. In this paper, we raise an intriguing question: can the combination of image restoration and object detection enhance detection performance in adverse weather conditions? To answer it, we propose an effective architecture that bridges image dehazing and object detection together via guidance information and task-driven learning to achieve detection-friendly dehazing, termed FriendNet. FriendNet aims to deliver both high-quality perception and high detection capacity. Different from existing efforts that intuitively treat image dehazing as pre-processing, FriendNet establishes a positive correlation between these two tasks. Clean features generated by the dehazing network potentially contribute to improvements in object detection performance. Conversely, object detection crucially guides the learning process of the image dehazing network under the task-driven learning scheme. We shed light on how downstream tasks can guide upstream dehazing processes, considering both network architecture and learning objectives. We design Guidance Fusion Block (GFB) and Guidance Attention Block (GAB) to facilitate the integration of detection information into the network. Furthermore, the incorporation of the detection task loss aids in refining the optimization process. Additionally, we introduce a new Physics-aware Feature Enhancement Block (PFEB), which integrates physics-based priors to enhance the feature extraction and representation capabilities. Extensive experiments on synthetic and real-world datasets demonstrate the superiority of our method over state-of-the-art methods on both image quality and detection precision. Our source code is available at https://github.com/fanyihua0309/FriendNet.
BibTeX
@misc{fan2024friendnet,
  author = {Yihua Fan and Yongzhen Wang and Mingqiang Wei and Fu Lee Wang and Haoran Xie},
  title = {{FriendNet: Detection-Friendly Dehazing Network}},
  year = {2024},
  eprint = {2403.04443},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.04443},
}
Figure