WaterFlow: Heuristic Normalizing Flow for Underwater Image Enhancement and Beyond

Zengxi Zhang, Zhiying Jiang, Jinyuan Liu, Xin Fan, Risheng Liu

Abstract

Underwater image enhancement is a critical prerequisite for marine exploration and autonomous underwater vehicles (AUVs). Traditional deep learning approaches often treat enhancement as a black-box mapping, frequently ignoring physical imaging laws and the specific requirements of downstream computer vision tasks. This paper introduces WaterFlow, a novel framework based on normalizing flows that transforms degraded underwater images into clear, semantically preserved outputs. By leveraging invertible neural networks and heuristic physical priors, WaterFlow ensures that enhanced images are not only visually pleasing to humans but also optimized for machine perception tasks like object detection.

Introduction

Underwater environments present a unique set of challenges for optical imaging. Light traveling through water is subject to wavelength-dependent absorption and scattering by suspended particles, resulting in severe color casts (typically blue or green), low contrast, and significant blurring. These degradations severely hinder the performance of standard computer vision algorithms designed for terrestrial use.

Existing enhancement methods often suffer from two primary limitations. First, many models lack physical grounding, leading to artificial artifacts or "hallucinated" details. Second, there is a persistent "task gap": an image enhanced for human aesthetics may lose the subtle texture or edge information required by object detection algorithms. WaterFlow addresses these issues by combining the mathematical rigor of normalizing flows with a detection-driven feedback loop.

Methodology

Normalizing Flows and Invertible Mapping

Unlike standard convolutional neural networks or Generative Adversarial Networks (GANs), WaterFlow utilizes Normalizing Flows (NF). The core advantage of NF is its inherent invertibility. The network learns a bijective mapping between the degraded image domain and the clear image domain. This "bilateral constraint" ensures that the model can mathematically reconstruct the original blurry image from the enhanced version. This constraint acts as a powerful regularizer, preventing the network from introducing non-existent features and ensuring that the transformation remains faithful to the underlying scene geometry.

Heuristic Prior Injector (HPI)

To move beyond pure data-driven learning, WaterFlow incorporates a Heuristic Prior Injector (HPI). This module embeds physical knowledge into the network architecture using the Beer-Lambert law of light attenuation. By estimating depth maps and gradient maps (which highlight edges and contrast), the HPI provides the model with structural cues about how light was likely degraded in that specific environment. This makes the enhancement process more interpretable and robust across varying water types, from murky coastal waters to the deep ocean.

Detection Perception Module (DPM)

WaterFlow is designed to be "detection-driven." The authors integrate a Detection Perception Module (DPM), which links the enhancement network to a pre-trained object detector. During the training phase, the detector’s performance serves as a semantic guidance signal. If the detector fails to identify an object in the enhanced image, the DPM provides feedback to the enhancement module, forcing it to prioritize the preservation of features—such as sharp boundaries and local textures—that are critical for machine recognition.

Experimental Evaluation

Datasets and Metrics

The framework was evaluated using several benchmark datasets, including UIEBD and EUVP for paired image quality, and U45 for real-world generalization. For downstream tasks, the UCCS and Aquarium datasets were used to test object detection performance on marine species like sea urchins, scallops, and sea cucumbers.

Results and Key Insights

  • Visual Quality: WaterFlow consistently achieved top-tier scores in the Underwater Image Quality Measurement (UIQM) and Underwater Image Colorfulness Measure (UICM). It proved particularly effective at neutralizing heavy color casts that typically cause other models to fail.
  • Detection Accuracy: On the UCCS dataset, WaterFlow significantly outperformed established competitors such as Water-Net and Ucolor. In specific tests for detecting "trepangs" (sea cucumbers), the model yielded higher confidence scores and a lower rate of false negatives.
  • Ablation Studies: The authors confirmed that both the HPI and DPM are essential. Removing the physical priors (HPI) led to a drop in visual consistency, while removing the semantic guidance (DPM) resulted in a measurable decrease in mean Average Precision (mAP) for object detection.

Conclusion and Future Work

WaterFlow represents a significant step forward in bridging the gap between image restoration and machine perception. By utilizing invertible normalizing flows and physical heuristics, the model provides a grounded, reliable method for underwater enhancement.

While the results are promising, future research will focus on reducing the computational overhead associated with the Jacobian determinants in normalizing flows to enable real-time deployment on low-power AUV hardware. Additionally, extending the framework to handle temporal consistency in video sequences remains a priority for dynamic underwater exploration.

Summary updated

BibTeX
@inproceedings{zhang2023waterflow,
  author = {Zengxi Zhang and Zhiying Jiang and Jinyuan Liu and Xin Fan and Risheng Liu},
  title = {{WaterFlow: Heuristic Normalizing Flow for Underwater Image Enhancement and Beyond}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3611727},
}
Figure