Restoring images captured underwater is a notoriously difficult task. Between wavelength-dependent light attenuation (causing color casts), scattering from particles (causing haze and blur), and generally low-light conditions, underwater scenes rarely suffer from just one type of degradation.
In their paper, "UniUIR: Considering Underwater Image Restoration as An All-in-One Learner," Xu Zhang and colleagues propose a universal framework designed to handle these complex, overlapping distortions simultaneously rather than treating them as isolated problems.
TL;DR
UniUIR is a universal "all-in-one" framework for underwater image restoration that tackles mixed distortions—like haze, color cast, and blur—simultaneously. By combining a Mamba-based Mixture-of-Experts backbone with spatial-frequency priors and pre-trained depth information, it achieves state-of-the-art results across diverse real-world underwater scenarios.
What Problem Does This Paper Address?
Underwater physics is messy. Light doesn't just disappear; it changes. Red light is absorbed faster than blue/green, leading to the characteristic teal tint. Microorganisms scatter light, creating a "haze" effect that washes out contrast and blurs details.
Most existing Underwater Image Restoration (UIR) methods are specialized: they might be great at fixing color but fail at dehazing, or vice versa. However, real-world data shows that these distortions almost always co-occur. As shown in Figure 1, even images primarily classified as "blurred" often exhibit significant color distortion and low contrast.
Existing deep learning approaches often struggle with these "mixed distortions" because they ignore the interactions and conflicts between different degradation types. Furthermore, many rely on physical models that are too idealized for real-world complexity or require paired ground-truth depth data, which is incredibly difficult to capture underwater.
Methods
UniUIR adopts a "divide-and-conquer" strategy through a multi-stage architecture (see Figure 3).
Key innovations include:
- Mamba Mixture-of-Experts (MMoE-UIR): The backbone uses the Vision State-Space Model (Mamba) for its linear computational complexity. Within this, the authors implement a Water Mixture-of-Experts (W-MoE) module. A gating mechanism (router) dynamically sends image features to different "experts" specialized in specific degradation aspects, allowing the network to handle conflicting restoration tasks efficiently. (Detailed in Figure 5).
- Spatial-Frequency Prior Generator (SFPG): To recover lost details, the model extracts priors from both the spatial and frequency domains (using FFT). It uses Task-Related Prompts (TRP) to adaptively select the best restoration path based on the specific mix of distortions in the input image.
- Depth Integration: Recognizing that underwater distortion is depth-dependent, UniUIR leverages the Depth Anything V2 foundation model. This provides a "pseudo-depth" map that helps the network distinguish between foreground and background elements, allowing for more precise, localized restoration.
- Latent Conditional Diffusion Model (LCDM): In the final stage, a diffusion process in the latent space refines the restored image, helping to reconstruct fine-grained details and ensure visual consistency that standard deterministic models often miss.
Datasets
The authors trained and evaluated UniUIR on a mix of paired and unpaired datasets:
- Training: UIEB-T (800 pairs) and LSUI-T (3,879 pairs).
- Testing (Reference-based): T90 (90 images) and LSUI-400.
- Testing (Non-reference/Generalization): U45, SQUID-16, Challenge-60, UCCS, and EUVP-330. These datasets represent a wide variety of real-world underwater challenges.
Key Insights and Ideas
- The "All-in-One" Philosophy: Instead of building a pipeline of separate modules for color, haze, and blur, UniUIR treats restoration as a unified multi-task problem.
- Efficiency via Mamba: By using Mamba instead of standard Transformers, the model maintains global context and high performance while keeping computational costs (FLOPs) manageable.
- Foundation Models for Physics: Using a pre-trained depth model (Depth Anything V2) is a clever workaround for the lack of underwater ground-truth depth data. It provides the necessary physical context (distance-based attenuation) without needing specific underwater training.
- Frequency Domain Matters: The authors demonstrate that explicitly modeling the frequency domain is crucial for recovering high-frequency textures that are often completely lost in blurry or hazy underwater shots.
Key Results
UniUIR consistently outperformed state-of-the-art (SOTA) methods like Semi-UIR, HCLR-Net, and Ucolor across nearly all metrics.
- Quantitative: On the T90 dataset, UniUIR achieved a PSNR of 25.11 dB and an SSIM of 0.933, significantly higher than its closest competitors.
- Qualitative: Visual comparisons (Figure 5) show that UniUIR produces images with more natural colors, sharper details, and better contrast, especially in challenging low-light scenes where other methods introduce artifacts or "yellowish" color casts.
- Downstream Tasks: The authors showed that images restored by UniUIR significantly improved the performance of subsequent machine vision tasks, such as depth estimation and semantic segmentation (using the Segment Anything Model).
Limitations and Future Work
While robust, UniUIR has a few acknowledged hurdles:
- Extreme Cases: The model still struggles with extreme low-light or very heavy blur, largely because these scenarios are underrepresented in current training datasets.
- Depth Model Bias: Depth Anything V2 was trained primarily on terrestrial scenes. While effective, its depth maps might not perfectly capture the unique optical properties of water (like turbidity-induced depth perception errors).
Future Directions: The authors suggest using generative techniques to create synthetic "extreme" underwater datasets and exploring parameter-efficient fine-tuning (like LoRA) to better adapt foundation depth models to the underwater domain.
Summary updated